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: building a link using MSXML(latest)


sixty nine wrote:
> <books>
> 	<book title="XML">
> 		<author>ZZZ</author>
> 	</book>
> 	<book title="ASP">
> 		<author>NNN</author>
> 		<author>MMM</author>
> 	</book>
> </books>
> 
> I need to build a link:
> <a href="book.aspb?b=XML&au=zzz></a>
> <a href="book.aspb?b=ASP&au=nnn></a>
> <a href="book.aspb?b=ASP&au=mmm></a>

You forgot closing quotes.

Unescaped ampersands may be accepted by your browser but HTML
allows/prefers them to be properly escaped, and only the dumbest of
cell phones can't handle seeing &amp; in URIs.

Use this:

<xsl:template match="book">
  <a href="book.aspb?b={@title}&amp;au={author}"/>
</xsl:template>


   - Mike
____________________________________________________________________
Mike J. Brown, software engineer at         My XML/XSL resources:
webb.net in Denver, Colorado, USA           http://www.skew.org/xml/


 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]