Subject: RE: Inline (embedded) XSL within XML document From: Toben Taft <ttaft@xxxxxxxxxxxxxxx> Date: Mon, 4 Dec 2000 17:12:39 -0600 |
Thank you for your response. If I use your example and create the following XML document, the template match element (notvalidelement) is being processed even though the element name does not match a document element. If I separate the XML and XSL documents, the template match element is not processed. <?xml version="1.0"?> <?xml-stylesheet href="#style" type="text/xsl"?> <document> <xsl:stylesheet id="style" version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:template match="notvalidelement"> !! inside not valid element !! </xsl:template> <xsl:template match="xsl:stylesheet"/> </xsl:stylesheet> </document> > -----Original Message----- > From: Pendakur, Ramesh [SMTP:ramesh.pendakur@xxxxxxxxx] > Sent: Monday, December 04, 2000 2:41 PM > To: 'xsl-list@xxxxxxxxxxxxxxxx' > Subject: RE: Inline (embedded) XSL within XML document > > The canonical format for such a thing is as follows: > > <?xml version="1.0"?> > <?xml-stylesheet href="#style" type="text/xsl"?> > <document> > ... > ... > ... > <xsl:stylesheet id="style" version="1.0" > xmlns:xsl="http://www.w3.org/1999/XSL/Transform" > > > ... > > xsl elements > ... > <xsl:template match="xsl:stylesheet"/> > > </xsl:stylesheet> > > ... > ... > </document> > > If you notice, the <stylesheet> element is embedded inside the document > element. > The stylesheet element has an "id" attribute; This "id" attribute is in > turn > used in the processing instruction "xml-stylesheet". > > Additionally, I have defined a template for the "xsl:stylesheet" element, > so > that I can > exclude it from processing by the XSLT engine. > > Hope this helps. > > - Ramesh Pendakur. > > > > -----Original Message----- > From: Toben Taft [mailto:ttaft@xxxxxxxxxxxxxxx] > Sent: Monday, December 04, 2000 11:14 AM > To: xsl-list@xxxxxxxxxxxxxxxx > Subject: Inline (embedded) XSL within XML document > > > I am searching for a working example of an XML document containing an XSL > stylesheet within the document. Note that I do not want to reference the > stylesheet as an external file, the stylesheet must be embedded within the > XML document. I have several references that lead me to believe that this > is > possible, but have yet to see a valid example. > > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list > > > 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: Inline (embedded) XSL within XM, Toben Taft | Thread | RE: Inline (embedded) XSL within XM, Dylan Walsh |
Re: Absolute ordering -- determinin, Steve Muench | Date | Re: Send Us Your Interesting XSLT G, Alexey Gokhberg |
Month |