Subject: [xsl] RE: From: "Stuart Celarier" <stuart@xxxxxxxxxxx> Date: Wed, 16 Jan 2002 10:56:25 -0800 |
Giro, XML processing instructions do not have attributes. See the XML specification, section 2.6 (http://www.w3.org/TR/REC-xml#sec-pi) They only have a target (name) followed by data. The data may appear to be attributes, but this is purely by convention of the processing instruction, and these pseudo-attributes do not appear in the infoset or the DOM. Conversely, you cannot use <xsl:attribute> to add an attribute to an element, since a processing is not an element. To answer your question, create the pseudo-attribute as you would any other content for the processing instruction (see the XSLT specification, section 7.3, http://www.w3.org/TR/xslt#section-Creating-Processing-Instructions) <xsl:processing-instruction name="xml-stylesheet"> type="text/css" href="toto.xsl" </xsl:processing-instruction> BTW, be sure to use the Subject line. Cheers, Stuart -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Cornelia Stratulat Sent: Tuesday, January 15, 2002 08:24 To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: Hi, Could someone tell me how to create a xsl processing instruction with an attribut using xslt? XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] RE: processing instructions, Michael Kay | Thread | [xsl] embedded stylesheets (long po, Chris Pearson |
Re: [xsl] newbie - comparing attrib, G. Ken Holman | Date | RE: [xsl] newbie - comparing attrib, Michael Kay |
Month |