This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: getting XSL to output XSL...


I wrote a stylesheet that outputs another stylesheet. Here is a snippet

...
   <xsl:element name="xsl:stylesheet">
       <xsl:attribute name="version">1.0</xsl:attribute>

        ...all the content...

   </xsl:element>
...

It should output this

<xsl:stylesheet version="1.0">
   ...all the content...
</xsl:stylesheet>

There are several other ways to get the xsl tags out. The above uses 
xsl:element which is perhaps a bit 'wordy' but was easier for me to 
understand when I was first learning.

Gary

Rafael 'Dido' Sevilla wrote:
> How do I write a stylesheet that generates another stylesheet?  Will
> XSLT processors be smart enough to note that:
> 
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
>   xmlns:xslout="http://www.w3.org/1999/XSL/Transform";
>   version="1.0"/>
> 
> the <xslout:.../> tags are not supposed to be processed?  I've thought
> of slightly modifying the namespace URI for the new stylesheet but I
> want to avoid making manual changes to the result if at all possible.
> 
> This is probably in the FAQ somewhere, I know, but i can't seem to
> find any topic that seems suitable...
> 
> 



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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]