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

RE: How do you get Attributes in Processing Instructi

Subject: RE: How do you get Attributes in Processing Instructions using IE6
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Tue, 30 Apr 2002 17:20:27 +0100
xsl get attribute
Processing instructions don't have attributes. This is just text, you will
have to parse it yourself. (Saxon has an extension function
saxon:pseudo-attribute() to enable you to do this).

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Bolen, Lori
> Contractor/WESTAR CORPORATION
> Sent: 30 April 2002 16:03
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  How do you get Attributes in Processing Instructions
> using IE6
>
>
> 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
>


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

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.
Email
First Name
Last Name
Company
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-2007 All Rights Reserved.