xsl-list
[Top] [All Lists]

Re: [xsl] nbsp and copy-of and output xml

2008-08-18 07:54:26
first thanks for the reply to my problem. But your solution results
into the next problem:

What problem is that?

I can not use "copy-of" with output="xml" because "&nbsp" will not be
displayed.

It's because "copy-of" will copy the _expanded value_ of the entity
from the input tree to the result tree.  You have &nbsp in your input,
which is expanded by the XML parser when the input tree is
constructed.  The XSLT processor operates on that input tree and
creates the result tree.  The serializer then operates on that result
tree to output flat text.

Instead (before I transformed with jdom, now with xalan) I use
output="html"

Nice, BUT: the result is invalid html because in empty tags it does not
close the tag.

No, that would be valid HTML, but invalid XML

Solution (as suggested in many forums): use output="xml" or output="xhtml"
for 2.0 which closes the tags - BUT THIS brings me to problem one.

If you can use the XHTML output method - use that, it's the one you need.

Any workaround - professional solutions for that.

So what is your real problem?  Why do you need &nbsp in the output,
and not just #160?


-- 
Andrew Welch
http://andrewjwelch.com
Kernow: http://kernowforsaxon.sf.net/

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--