xsl-list
[Top] [All Lists]

referencing a stylesheet within xsl:document

2002-12-17 18:16:46
I am splitting multiple xml documents into smaller files using xsl:document. Each of the output files needs to include a reference to another transform to display in a browser. What I would like to do is someting like:

<xsl:for-each select="namespace/class">
     <xsl:variable name="class" select="@name"/>
<xsl:variable name="file" select="concat($namespace, '.', $class, '.xml')"/>


     <xsl:document method="xml" href="{$file}">
      <?xml-stylesheet type="text/xsl" href="../display.xsl"?>

       <class><xsl:copy-of select="@name"/>
         <xsl:call-template name="hierarchy"/>
         <xsl:call-template name="mergefiles"/>
       </class>

   </xsl:document>
 </xsl:for-each>


However, it does not pick up the <?xml-stylesheet type="text/xsl" href="../display.xsl"?> line. I tried putting this content within an xsl:text element but that complained about the content of the element. I also tried changing < and > to their related entity refs, but that just pulled in the entity refs.

It would seem that you should be able to do this in one of the attributes of xsl:document, but I'm not seeing it.


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



<Prev in Thread] Current Thread [Next in Thread>