xsl-list
[Top] [All Lists]

[xsl] changing section of XML file

2008-12-09 15:27:50
I need to change a section of an XML document per a customer's requirements.

The existing section is:

<status>
<security class="01"/>
<rpc>78286</rpc>
<orig>1DXU0</orig> (this section is sometimes 78286 dependnig on date of 
generation)
<applic></applic>
<brexref><refdm><avee><modelic>CH148</modelic><sdc
A</sdc><chapnum>00</chapnum><section>4</section><subsect>0</subsect>
<subject>00</subject><discode>00</discode><discodev>A</discodev><incode
022</incode><incodev>A</incodev><itemloc>D</itemloc></avee></refdm>
</brexref>
<qa>
<unverif/></qa>
</status>

It needs to change to:

<status>
<security class="01"/>
<rpc rpcname="Sikorsky">78286</rpc>
<orig origname="Sikorsky">78286</orig>
<applic><model model="CH148">
<mfc>78286</mfc>
<pnr>CH148</pnr>
<serialno><single>ALL</single></serialno></model></applic>
<brexref><refdm><avee><modelic>CH148</modelic><sdc>A</sdc><chapnum>00</chapnum>
<section>4</section><subsect>0</subsect><subject>00</subject><discode>00</discode>
<discodev>A</discodev><incode>022</incode><incodev>A</incodev><itemloc>D</itemloc>
</avee></refdm></brexref>
<qa><firstver type="tabtop"/></qa>
<rfu>Conversion to S1000D</rfu>
</status>

The file is validated by a schema.

I would like to create an XSLT file to handle this transform to help speed up 
the process. I have on the order of 1000 files that this will need to be done 
to, and currently it is being handled one by one in textpad.

I would like to accomplish this with XSLT 1.0. I am not sure of my processor. I 
will be using XML Spy to work the files, which I believe has a processor built 
in.


Thanks,

Tom Furst
Technical Writer

Phone 401-315-6411
Fax     401-315-6412
tom(_dot_)furst(_at_)rcmt(_dot_)com


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>