Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Copy certain nodes >Thread Next - Re: Copy certain nodes Re: Copy certain nodesTo: NULL Date: 10/1/2006 1:20:00 PM
mark wrote:
> Hi,
> Does anyone could help me to prepare xsl file which copies xml document
> with list of nodes as parameters
> Source xml file:
> <root>
> <file name = "AAA">
> <size>12</size>
> <modified>2</modified>
> <owner>Tom</owner>
> <mode>read</mode>
> </file>
> <file name = "BBB">
> <size>23</size>
> <modified>6</modified>
> <owner>Al</owner>
> <mode>write</mode>
> </file>
> <file name = "CCC">
> <size>15</size>
> <modified>6</modified>
> <owner>Jack</owner>
> <mode>read</mode>
> </file>
> <file name = "DDD">
> <size>12</size>
> <modified>4</modified>
> <owner>Jane</owner>
> <mode>write</mode>
> </file>
> </root>
> And I would like to get nodes with eg. <size> and <mode> subnodes:
You're asking two different things here. Do you want:
a) all <file> elements which contain <size> and <mode> elements,
reproducing only those elements;
or
b) all <file> elements regardless, but reproducing only <size>
and <mode> if they have them.
Your data and query is ambiguous in this regard.
///Peter
--
XML FAQ: http://xml.silmaril.ie/
> <root>
> <file name = "AAA">
> <size>12</size>
> <mode>read</mode>
> </file>
> <file name = "BBB">
> <size>23</size>
> <mode>write</mode>
> </file>
> <file name = "CCC">
> <size>15</size>
> <mode>read</mode>
> </file>
> <file name = "DDD">
> <size>12</size>
> <mode>write</mode>
> </file>
> </root>
> Any example of xsl would be appreciated
>
> Mark
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
