|
Subject: Re: [xsl] XSL attribute? From: "Carmelo Montanez" <carmelo@xxxxxxxx> Date: Thu, 1 Nov 2001 13:33:43 -0500 |
You can SELECT elements based on attribute values, for instance you can say
<xsl:template match = "media-Item[@identifier]">, which will select the
Media-Item elements that are children of the current node and which
contains and "identifier" attribute. You can modify it slightly
and have something like
<xsl:template match = "media-Item[@identifier='myValue']", which basically
does
the same thing as above but only for attributes with value equals to
"myValue".
Hope this helps a bit. See section 2 of the XPATH Specifications.
Carmelo Montanez
----- Original Message -----
From: <GF109112@xxxxxxx>
To: <XSL-List@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Thursday, November 01, 2001 1:01 PM
Subject: [xsl] XSL attribute?
> I need help pulling a file name from an element name through an attribute.
My media is listed under a media items section and then referenced in the
text by an attribute. Is there any way of referencing an element from an
attribute?
>
> My XML example
>
>
> Media Section:
> <media_item identifier="medad59010005" category_type_code="3"
file_type_code="gif">
> <media_name>Figure 2-1. </media_name>
> <access_name>ad59010005.gif</access_name>
> </media_item>
>
> Text section
>
> <instruction_content>
> <media_ref media_alias="medad59010005"/>
> </instruction_content>
>
> I need the <access_name> in place of the <media_ref> tag
>
>
>
>
> Thanks
> Greg
>
> 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 |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] XSL attribute?, Jeni Tennison | Thread | Re: [xsl] XSL attribute?, Peter Flynn |
| Re: [xsl] XSL attribute?, Jeni Tennison | Date | Re: [xsl] Continuing problem. &Nota, John Ericson |
| Month |