If what you say is true, then why is Xalan translating ô into é
everywhere *except* inside of attribute values? It's being inconsistent -
doing the "right" (IMO) thing for element values, but not for attribute
I know enough XSL to be dangerous - not a guru. As such, it would seem to
me that when using the HTML output method the result would be pretty
ordinary, conforming HTML. é is ordinary HTML.
This is not an academic exercise - I'm trying to find a workaround for what
appears to be a Netscape/Mozilla bug. Neither browser seems to like
UTF-8-encoded chars in INPUT button titles. Both display a "?" in place of
the offending character. They *are* happy when the character is encoded as
a normal HTML entity (i.e. é).
This HTML stream is being generated by a servlet and I'm being careful to
set the content-type to text/html; charset=UTF-8. The browsers seem to
understand that the document is UTF-8 encoded so that doesn't appear to be
> > I'm trying to do what I think would be a relatively straightforward
> > thing,
> > but am having zero luck. I hope some XSL whiz can help me out.
> > I want my XSL transform to generate the following literal HTML:
> > <input type="submit" name="foo" value="abc é def"></input>
> > The problem is that no matter how I try to code this in the stylesheet,
> > Xalan's HTML output method insists on expanding the entity reference
> > the "value" attribute.
> > The stylesheet's header looks like this:
> > <?xml version="1.0" encoding="UTF-8"?>
> > <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > version="1.0">
> > <xsl:output method="html" encoding="UTF-8"/>
> > and the source which I'm attempting to make work looks like this:
> > <input type="submit" name="foo">
> > <xsl:attribute name="value">abc à def</xsl:attribute>
> > </input>
> Nor will you get any different with any other conformant system.
> Its been requested and rejected by the rec editors.
> If your encoding is right (utf-8), then what you are getting is valid XML.
> If you view it with a utf-8 capable editor, it will 'look' right too.
> Its XML you're dealing with, not ASCII.
> HTH DaveP
ETA Associates, Inc.