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

Re: nbsp and copy-of and output xml

Subject: Re: nbsp and copy-of and output xml
From: "Andrew Welch" <andrew.j.welch@xxxxxxxxx>
Date: Mon, 18 Aug 2008 15:54:02 +0100
Re:  nbsp and copy-of and output xml
> 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/

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.