RE: [xsl] xsl: selecting and copying nodes

Subject: RE: [xsl] xsl: selecting and copying nodes
From: "Sergiu Ignat" <sergiu@xxxxxxxxxx>
Date: Tue, 7 Oct 2003 14:41:06 +0300
You probably want some kind of grouping in your output.
If you want to group like a content table you should write a template that matches like match="ve[not(contains(@pos,'.'))]"
That would select each ve tag with pos like 1,2,3,...9,10,11,... , but not 6.1 .
After you can use the following-sibiling axis to do the rest.


Sergiu

> I have this xml:
> <ve pos="6"></ve>
> <ve pos="6.1"></ve>
> <ve pos="6.1.1"></ve>
> <ve pos="6.1.2"></ve>
> <ve pos="6.2"></ve>
> <ve pos="6.2.1"></ve>
> <ve pos="7"></ve>

> and i wanted to create a new xml with only the nodes which 
> start with pos 6. 
> I would like to copy all the nodes under each <ve> and the 
> conent inbetween 
> any <text> tags e.g. under a <ve> u may get:
> 
> <ve>
> <ed><text>this is the title</text></ed>
> <ed><text>this is a name</text></ed>
> </ve>
> i wasnt sure how to select the nodes which only contain these 
> positions???

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


Current Thread