Subject: Re: [xsl] Fw: Converting to different format From: Mike Trotman <mike.trotman@xxxxxxxxxxxxx> Date: Sun, 22 Aug 2004 11:17:51 +0100 |
<xsl:template match='/'> <xsl:apply-templates select='assets/record[$record_number]'/> </xsl:template>
Hi all,
Since i have not clearly communicated my problem in my earlier post,
i am reposting my problem with xml file..
I am having an XML file (File 1) as given below.
I need to create an output XML of "N" such files of structure similer to File 2
(where N is number of record Node in the xml file 1. in this case 4 such files)
If anybody posts complete xslt codes will be greatly appreciated. since i am a newbie to xslt.
------------------------------------------
File 1:
<?xml version="1.0" ?>
<assets>
<record>
<system>1</system> <asset>a001</asset>
<serial>a01</serial>
<make>HP</make>
<vendor>abc</vendor>
</record>
<record>
<system>2</system> <asset>a002</asset>
<serial>a02</serial>
<make>HP</make>
<vendor>abc</vendor>
</record>
<record>
<system>3</system> <asset>a003</asset>
<serial>a03</serial>
<make>HP</make>
<vendor>abc</vendor>
</record>
<record>
<system>4</system> <asset>a004</asset>
<serial>a04</serial>
<make>HP</make>
<vendor>abc</vendor>
</record>
</assets>
--------------------------------------------- File 2:
<?xml version="1.0" ?> <assets> <record> <desc> system </desc> <detail> 1 </detail>
</record>
<record> <desc> asset </desc> <detail> a001 </detail>
</record>
<record>
<desc>
serial
</desc>
<detail>
a01
</detail>
</record>
<record>
<desc>
make
</desc>
<detail>
HP
</detail>
</record>
<record>
<desc>
vendor
</desc>
<detail>
abc
</detail>
</record>
</assets>
Regards
Eugene
-- Datalucid Limited 8 Eileen Road South Norwood London SE25 5EJ United Kingdom
/ tel :0208-239-6810 mob: 0794-725-9760 email: mike.trotman@xxxxxxxxxxxxx
UK Co. Reg: 4383635 VAT Reg.: 798 7531 60
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Fw: Converting to different f, J_Eugene_Bernard/VML | Thread | [xsl] Fw: Converting to different f, J_Eugene_Bernard/VML |
Re: [xsl] Need help - Getting the v, Mike Trotman | Date | [xsl] Howto generate a list xpath q, Joren Crauwels |
Month |