[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: a quick question re:   html entity

Subject: RE: a quick question re:   html entity
From: "Julian Reschke" <julian.reschke@xxxxxx>
Date: Fri, 7 Feb 2003 09:50:14 +0100
nbsp html
...clarifying:

Ampersands in HTML attributes MUST be escaped. It's true that most user
agents *also* try to support non-escaped ampersands, but that's a
*workaround* (some would call it a bug), not a feature to rely on.

Julian
--
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Marco
> Guazzone
> Sent: Friday, February 07, 2003 8:47 AM
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: Re:  a quick question re: &nbsp; html entity
>
>
> Hi Terence,
> Have you tried to open the resulting page with a browser (if it is an HTML
> page)?
> If not try it.
> In fact I often use:
> <a href="/Foobar.html?p1=v1&amp;p2={value-from-node}">...</a>
> or
> <form
> name="frm" method="post"
> action="/Foobar.html?p1=v1&amp;p2={value-from-node}>
> ...
> </form>
> and it works!
> That is the &amp; inside the attribute is correctly interpreted by
> browsers
> as "&".
> Cheers,
>
> ---------------------------------
> Marco Guazzone
> Software Engineer
> Kerbero S.r.L. - Gruppo TC
> Viale Forlanini, 36
> Garbagnate M.se (MI)
> 20024 - Italy
> mail: marco.guazzone@xxxxxxxxxxx
> www: http://www.kerbero.com
> Tel. +39 02 99514.247
> Fax. +39 02 99514.399
> --------------------------------
>
> On Fri, 7 Feb 2003, Terence wrote:
>
> > Marco Guazzone wrote:
> >
> > >Hi,
> > >my advice is to use a numerical entity; so for "&nbsp;" you could just
> > >write
> > >"&#x20;".
> > >An alternative, if you prefer to write it in a symbolic way you can:
> > >1) add <!ENTITY > declaration in the DTD of your sheet
> > >2) you can create a named template like this:
> > >   <xsl:template name="ent:nbsp">
> > >      <xsl:text>&#x20;</xsl:text>
> > >3) AVOID THIS: use xsl:text with
> 'disable-output-escaping="yes"' attribute
> > >   and do this: <xsl:text
> > >disable-output-escaping="yes"><![CDATA[&nbsp;]]></xsl:text>
> > >   but this way is NOT THE RIGHT ONE.
> > >   THINK TWICE BEFORE USING disable-output-escaping :))
> > >Hope this helps!
> > >Regards,
> > >
> > The solution and the alternatives you provided were most helpful to say
> > the least. Thanks :)
> >
> > At the moment, I'm trying to output
> >
> > <form method="post" id="filter"
> > action="/sops/sk.php?op=listing&NOCACHE=1&DEBUG=xml" />
> >
> > but I always get &amp; due to output escaping.
> >
> > <form method="post" id="filter"
> > action="/sops/sk.php?op=listing&amp;NOCACHE=1&amp;DEBUG=xml" />
> >
> > It looks like I have no choice but to disable output escaping in this
> > particular instance.
> >
> > For the above example, I used the following code to produce it...
> > <form method="post" id="filter">
> > * *<xsl:attribute
> >
> name="action"><![CDATA[/sops/sk.php?op=listing&NOCACHE=1&DEBUG=xml
> ]]></xsl:attribute>
> >
> > is there any way to achieve what I want without turning off
> output escaping?
> >
> >
> >  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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.