|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: how to include an ampersand in an html href using xt and
John,
This (<a href="foo&bar">xxx</a>) is conform to the HTML 4.0
recommendation (see B.2.2,
http://www.w3.org/TR/html401/appendix/notes.html#h-B.2.2 ) :
> For example, to use the URI "http://host/?x=1&y=2" as a linking URI,
> it must be written <A href="http://host/?x=1&y=2"> or
> <A href="http://host/?x=1&y=2">.
Eric
Eric van der Vlist wrote:
>
> Ooops, sorry,
>
> It's producing "<a href="foo&bar">xxx</a>" !
>
> Sorry
>
> Eric
>
> Eric van der Vlist wrote:
> >
> > Hi John,
> >
> > ---------------
> > <xsl:template match="/">
> > <a>
> > <xsl:attribute name="href">foo&bar</xsl:attribute>
> > </a>
> > </xsl:template>
> > ---------------
> >
> > Is just working fine (tested against XT) !
> >
> > Hope this helps.
> >
> > Eric
> >
> > John Sidlo wrote:
> > >
> > > I'm trying to generate an href like...
> > >
> > > <a href="foo&bar">xxx</a>
> > >
> > > using xsl similar to...
> > >
> > > <a>
> > > <xsl:attribute name="href"><xsl:text
> > > disable-output-escaping="yes">foo&bar</xsl:text>
> > > </xsl:attribute>
> > > </a>
> > >
> > > and a variety of permutations on this theme.
> > >
> > > Section 16.4 of XSLT "Disabling Output Escaping" seems to say that
> > > putting ampersands in attributes is flat-out illegal! ("Thus, it is an
> > > error to disable output escaping for an ... xsl:text element that is
> > > used ot generate the string-value of a ... attribute node")
> > >
> > > But & is a common character in href's.
> > >
> > > I must be missing something somewhere.
> > >
> > > Thanks in advance for any suggestions.
> > >
> > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
> >
> > --
> > ------------------------------------------------------------------------
> > Eric van der Vlist Dyomedea
> >
> > http://www.dyomedea.com http://www.ducotede.com
> > ------------------------------------------------------------------------
>
> --
> ------------------------------------------------------------------------
> Eric van der Vlist Dyomedea
>
> http://www.dyomedea.com http://www.ducotede.com
> ------------------------------------------------------------------------
--
------------------------------------------------------------------------
Eric van der Vlist Dyomedea
http://www.dyomedea.com http://www.ducotede.com
------------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








