Subject: Re: Re: A Query From: Anupam Gupta <anupam@xxxxxxxxxxx> Date: Mon, 26 Jul 1999 18:40:51 -0700 |
Hi Guys, Another extension to the same query. Currently I am using CDATA to output the new stylesheet. Is there any way by which you can use them and still generate angle brackets in the output.?? ** Thanks Ken Anupam "G. Ken Holman" wrote: > At 99/07/26 15:56 -0700, Anupam Gupta wrote: > >Query: > >------- > >How do you generate a XSL stylesheet by applying a stylesheet to a XML > >document ? > > By escaping the namespace of the output XSLT instructions so the XSLT > engine doesn't get confused between what you are asking it to do and what > you are asking it to put to the result tree. > > Without this mechanism, there would be no way to tell the difference > between an instruction to be acted on and an instruction to be emitted. > > This escaping mechanism can be applied any number of times (stylesheets for > stylesheets for stylesheets etc.) > > >Process: > >-------- > > > >XML + XSL ==> XSL > > + XML (Another One) ===> HTML > > A terse example is below. > > Note how the "xslo" namespace URI is prefaced with "quote:" which is > removed on output by the XSLT engine. With it removed, it is recognized > the second time around. > > I hope this helps. > > ........... Ken > > p.s. please note that I changed "html" to be "hmtl" so that my mailer > wouldn't eat the markup and *help* me by displaying the HTML; the > principles of what I'm trying to show are unchanged. > > T:\FTEMP>type xsl.xsl > <?xml version="1.0"?><!--xsl.xsl--> > <!--XSLT Working Draft 1999-07-09 - http://www.CraneSoftwrights.com--> > > <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" > indent-result="yes"> > > <xsl:template match="/"> <!--root rule--> > <xslo:stylesheet xmlns:xslo="quote:http://www.w3.org/XSL/Transform/1.0"> > <xslo:template match="/"> > <hmtl> <!--I made this is a typo because of my mailer--> > <p>Hello world</p> > </hmtl> > </xslo:template> > </xslo:stylesheet> > </xsl:template> > > </xsl:stylesheet> > > T:\FTEMP>call xsl xsl.xsl xsl.xsl xslo.xsl > T:\FTEMP>type xslo.xsl > <xslo:stylesheet xmlns:xslo="http://www.w3.org/XSL/Transform/1.0"> > <xslo:template match="/"> > <hmtl> > <p>Hello world</p> > </hmtl> > </xslo:template> > </xslo:stylesheet> > > T:\FTEMP>call xsl xsl.xsl xslo.xsl xslo.htm > T:\FTEMP>type xslo.htm > <hmtl><p>Hello world</p></hmtl> > T:\FTEMP> > > -- > 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, training, libraries, products. > Publications: Introduction to XSLT (3rd Edition) ISBN 1-894049-00-4 > Next instructor-led training: MS'99 1999-08-16 MT'99 1999-12-05/06 > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: A Query, G. Ken Holman | Thread | Re: A Query, Imran Rashid |
Re: A Query, G. Ken Holman | Date | Re: Problem with new XT version, James Clark |
Month |