This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
How do you get Attributes in Processing Instructions using IE6
- From: "Bolen, Lori Contractor/WESTAR CORPORATION" <Lori dot Bolen at redstone dot army dot mil>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Tue, 30 Apr 2002 10:02:37 -0500
- Subject: [xsl] How do you get Attributes in Processing Instructions using IE6
- Reply-to: xsl-list at lists dot mulberrytech dot com
Sorry if this question has already been answered. I searched the archives
and didn't come across what I was looking for.
I have the following processing instructions throughout my xml file:
<?FRAME LABEL='Introduction to IADS' SHOWNO='N'?>
I need to be able to get the value of the LABEL attribute (Introduction to
IADS). I am using IE 6.0. I can match the processing instruction, but I
can't seem to get the individual attribute values. I have tried
<xsl:value-of select="@label"/>, but this doesn't seem to work.
My template look like:
<xsl:template match="pi('FRAME')">
<xsl:choose>
<xsl:when match="*[@label]">
<B style="color: #ff0000">
<xsl:element name="A">
<xsl:attribute name="name">
<xsl:value-of
select="@label"/>
</xsl:attribute>
<xsl:value-of/>
</xsl:element>
</B>
</xsl:when>
<xsl:otherwise>
VALUE OF:
<xsl:value-of/>
</xsl:otherwise>
</xsl:choose>
<xsl:apply-templates/>
--------------------?frame <xsl:value-of select="."/> ?>------------------
</xsl:template>
The <xsl:valueof> and the <xsl:value-of select="."> both give everything in
the processing instruction except the PI itself.
Does anyone know how to do this in IE 6.0?
Thanks for your help,
Lori Bolen
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list