This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Hot to get names ??
- From: "Khalid"<k_ali at telusplanet dot net>
- To: XSL-List at lists dot mulberrytech dot com
- Date: Tue, 26 Feb 2002 18:39:16 GMT
- Subject: [xsl] Hot to get names ??
- Reply-to: xsl-list at lists dot mulberrytech dot com
Hello All,
How do I get the names of each element and then do some processing accordingly,I
can't seem to find a way to use name() appropriately,any help is appreciated,
below is the chunk of xml that I am using,I want to be able to get all the
elements which are after last-modified and before start-date,so I would like
to get some condition that checks for the elements names that begin with 'udt',but
there are other elements attached to this element and the have the same structure,and
what I want is only get the values at each level from between the last-modified
and start-date.
<product>
<system-id>4</system-id>
<last-modified>22 January, 2002 09:26</last-modified>
<udt-product-id>DMD</udt-product-id>
<udt-product-name>Daily Mail Monday to Friday</udt-product-name>
<start-date>7 January, 2002</start-date>
<end-date />
<publishing-frequency>Weekly</publishing-frequency>
<editions>
<edition>
<system-id>71</system-id>
<last-modified>22 January, 2002 09:21</last-modified>
<udt-product-code>DMD</udt-product-code>
<udt-edition-name>Anglia1</udt-edition-name>
<udt-print-centre-code>HQP</udt-print-centre-code>
<udt-descriptor>Edition</udt-descriptor>
<start-date>8 January, 2002</start-date>
<end-date />
</editions>
</produict>
</products>
in the above example the tree contains multiple subroot elements that has the
same structure as product.I need to get only the elements which start with udt
at each level.,say first I would like to get all the elements that start-with
'udt' from the product level,at this point I do not want to get any element
which may appear at lower level of heirarchy such as editions.I would only want
edition related values on descretion.
please guide,thanks
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list