[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: processing instructions

Subject: RE: processing instructions
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Wed, 16 Jan 2002 11:19:52 -0000
 RE: processing instructions
> Could someone tell me how to create a xsl processing
> instruction with an attribut using xslt?
> Sample:
> I would like to create something like this
> <?xml-stylesheet type="text/css" href="toto.xsl"?>
> I tried to create attributs within
> <xsl:processing-instruction> template but it seems not
> work.

Processing instructions do not contain attributes. Some processing
instructions, like this one, contain "pseudo-attributes", but they are not
recognized as attributes by the XML parser, by the infoset, or by the XPath
data model. They are just text.

So you create them as text:

<xsl:processing-instruction name="xml-stylesheet">
  <xsl:text>type="text/css" </xsl:text>
  <xsl:value-of select="$href"/>

Mike Kay

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

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.