[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: Thomas Winkler <t.winkler@xxxxxxxxxxx>
Date: 19 Jan 2002 22:46:01 +0100
xml output to xhtml
Am Sam, 2002-01-19 um 21.11 schrieb G. Ken Holman:
> 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 />

i was aware of xml serialization to <hr/>, but xhtml serialization to
<hr /> is recommended for compatibility only. so the xml method is still
the only way to output valid xhtml, since the html method removes the
trailing slash.

but, you are right, my first thought was not entirely right. guess, i
wasn't going the whole way. i wasn't thinking about this little
difference at all. 

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

so there is no "recommended" way. that's what i wanted to know.

is there going to be a xhtml output method?

> >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?

no. it's not important to my work. when i was converting one of my old
html output stylesheets to output valid xhtml i was wondering if its
possible at all to have the xhtml/html entity references in the output
at all, as it works with html output. i haven't read anything specific
about it, so i was asking myself if there is a standard way. 
> 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.

yes, but in html output the xhtml/html entity references are used for
output. that's why i was thinking about it. 
> >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.

yes it did,
thank you once again,

 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.