This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Generating Link References


Hi Doug,

I'm rather new in the XML-world, so I understand your confusion. IE uses 
the MSXML*.DLL for creating your output. At the * you can find nothing up 
to 4, this depends on MSXML-version you have installed. I have MSXML4.DLL 
installed. I believe that IE 5.5 comes with MSXML.DLL, i.e. without a 
number.
The functions in this DLL are looking at the namespace at the top of your 
XSL to see what work has to be done and what to expect in your XSL and if 
you use the wrong one, some things just don't work!
Most of the "older" XML-books tell you to use 
"http://www.w3.org/TR/WD-xsl";, but that doesn't work for the transformation 
you wanted. This namespace refers to MS first partial implementation of 
XSL, which at the moment is not longer conform the W3C.

Look for MSXML3 at: 
http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.as  
p?url=/msdn-files/027/001/591/msdncompositedoc.xml

XML/XSL-experts, please correct me if I'm wrong at these statements above.

My XML was:
<root>
	<name position="manager">Joe blow</name>
	<email>blow.joe</email>
</root>

My complete stylesheet was (first line is important!):

<xsl:stylesheet version="1.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html"/>

<xsl:template match="/">
	<xsl:apply-templates/>
</xsl:template>

<xsl:template match="email">
	<a>
		<xsl:attribute name="href">
			<xsl:text>mailto:</xsl:text>
			<xsl:value-of select="."/>
			<xsl:text>@somecompany.com</xsl:text>
		</xsl:attribute>
		<img src="images/mail_icon.gif"/>
	</a>
</xsl:template>


</xsl:stylesheet>

Greetings Rene
   { @   @ }
        ^
      \__/

"You don't need eyes to see, you need vision!"

-----Oorspronkelijk bericht-----
Van:	Hewko, Doug [SMTP:Doug.Hewko@ccra-adrc.gc.ca]
Verzonden:	vrijdag 29 juni 2001 10:28
Aan:	'xsl-list@lists.mulberrytech.com'
CC:	'davidc@nag.co.uk'
Onderwerp:	RE: [xsl] Generating Link References

Thanks! That's pretty neat! Just one question, and it may because of MS IE,
I am using the "http://www.w3.org/TR/WD-xsl"; stylesheet. Whenever I tried
the code, I get "{.)" instead of the e-mail name. I am using the curly
brackets, in case I'm mistyping.

-----Original Message-----
From: David Carlisle [mailto:davidc@nag.co.uk]
Sent: June 28, 2001 1:41 PM
To: xsl-list@lists.mulberrytech.com
Subject: Re: [xsl] Generating Link References



   This template should do the trick:

   <xsl:template match="email">
	   <a>
		   <xsl:attribute name="href">
			   <xsl:text>mailto:</xsl:text>
			   <xsl:value-of select="."/>
			   <xsl:text>@somecompany.com</xsl:text>
		   </xsl:attribute>
		   <img src="images/mail_icon.gif"/>
	   </a>
   </xsl:template>


It would but

   <xsl:template match="email">
	   <a href="mailto:{.}@@somecompany.com";>
		   <img src="images/mail_icon.gif"/>
	   </a>
   </xsl:template>

is equivalent and easier to type.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet
delivered through the MessageLabs Virus Scanning Service. For further
information visit http://www.star.net.uk/stats.asp or alternatively call
Star Internet for details on the Virus Scanning Service.

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]