This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE:
- From: "Stuart Celarier" <stuart at ferncrk dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Wed, 16 Jan 2002 10:56:25 -0800
- Subject: [xsl] RE:
- Reply-to: xsl-list at lists dot mulberrytech dot com
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@lists.mulberrytech.com
[mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Cornelia
Stratulat
Sent: Tuesday, January 15, 2002 08:24
To: XSL-List@lists.mulberrytech.com
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