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

Re: output xhtml with html style entities

Subject: Re: output xhtml with html style entities
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Sat, 19 Jan 2002 15:11:35 -0500
xslt output xhtml
At 2002-01-19 19:43 +0100, Thomas Winkler wrote:
what would be the best way to output xhtml with xhtml/html entity
references? if you use xml output, what you need for generating xhtml,

Careful, that isn't entirely true. True XHTML has an additional lexical requirement that your XSLT processor XML serialization may not support. Empty elements are serialized differently in XHTML than in XML:

      HTML:   <hr>
      XML:    <hr/>
      XHTML:  <hr />

The private extension {http://icl.com/saxon}xhtml does do the above required serialization for XHTML.

the output is serialized into the defined character set, what is indeed
what i expect.

.. and is equivalent to the use of the entity reference ... why is the entity reference important to your work?

Given that XSLT doesn't create the internal declaration subset for output, putting a raw entity reference in XHTML results in the entity reference being exposed (per XHTML 1.0 Section 3.2 Point 7), not the character itself. From what I see in the XHTML document there are no predefined character entities other than XML's 5 predefined character entities and the User Agent Conformance in section 3.2 doesn't say anything about HTML's known entities such as "eacute".

The stylesheet writer has little or no control over serialization because the theory is the output from your XSLT is going to be input to a processor, not a human. Therefore, it doesn't matter which serialization is used as long as it is correct.

so what would be the best way, or am i missing something?

I think there is no way to request character entities to be used by a processor during serialization.

I hope this helps.

..................... Ken

-- Upcoming: 3-days XSLT/XPath and/or 2-days XSLFO - Feb 18-22, 2002

G. Ken Holman                mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6                        Definitive XSLT & XPath
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1               Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books(electronic, printed),
articles, training(instructor-live,Internet-live,web/CD,licensed)
Next public training:  02-02-11,12,14,15,18,21,03-04,05,06,08,11,
-                                04-08,09,10,12,05-14,15,06-04,07

XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list

Current Thread


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.
First Name
Last Name
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.