Subject: Re: XT and HTML conversion From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> Date: Sat, 27 Feb 1999 06:06:51 -0800 |
At 99/02/26 15:55 -0500, Richard Lander wrote: >[Chris] >>XT converts XML to XML. However, it can change how it serializes the >>result based on the result-ns attribute. If the result-ns identifies >>the result as HTML 4.0, which XT knows uses SGML syntax, proper syntax >>is used. If you don't use the result-ns attribute, I don't believe XT >>will attempt to guess the intended syntax (IOW, XML syntax will be >>used for the serialization). > >Hmmm. I'm not actually using the result-ns attribute, but am using the HTML >namespace. I'm using the following stylesheet element: > ><xsl:stylesheet > xmlns:xsl="http://www.w3.org/TR/WD-xsl" > xmlns="http://www.w3.org/TR/REC-html40" > result-ns=""> In effect you *are* using the result-ns attribute ... you are telling the XSL engine to interpret the result node tree using the syntax conventions of the namespace with the empty prefix ... the engine then checks to see what that prefix is, but it only knows which prefix to use by way of the result-ns attribute. As Chris mentioned, the result-ns attribute is the mechanism by which you are communicating to the engine the semantics of the result. If you don't have to ask the XSL engine to do anything special, there is no need to use the attribute. >If I wanted to convert to an XMLized HTML, I guess XHTML, then would I >remove the ns identifier (if it is called that) and add a similar XHTML one? All that is needed is to identify the XSL instructions: <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> >I take it that only HTML4 and XSLwd are understood. Perhaps more accurately stated as only HTML4 and XML syntax conventions are used by the engine when emitting the result node tree as a file. Other engines may offer off-the-shelf support of other syntax conventions for representing the result node tree. Consider the declaration: <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl" xmlns:fo="http://www.w3.org/TR/WD-xsl/FO" result-ns="fo"> Here the stylesheet writer is telling the XSL engine through the result-ns attribute that the result node tree is to be interpreted as a hierarchy of formatting objects ... the engine isn't required to emit the tree as a file. I hope this helps. ........ Ken -- 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) Website: XSL/XML/DSSSL/SGML services outline, XSL/DSSSL shareware, stylesheet resource library, conference training schedule, commercial stylesheet training materials, on-line XSL CBT. Next instructor-led XSL Training: X-Tech:1999-03-07 WWW8:1999-05-11 XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: XT and HTML conversion, Richard Lander | Thread | Re: XT and HTML conversion, G. Ken Holman |
RE: entities in XML/XSL, G. Ken Holman | Date | Re: XT and HTML conversion, Simon St.Laurent |
Month |