reformatting only a part of the XML using XSL

Joined
Mar 17, 2008
Messages
2
Reaction score
0
A generic XSL that can re-fromat a given node no matter where it is placed

Hi all ,
The problem is as under :
I can have an XML in which the initial tags can be in any order.
I am just interested in refomatting only a known node..But i do not necessarily know the previous nodes at all.
So kindly tell me a way to do that..
As an example here is a sample XML file:

<nds dtdversion="2.0">
<output>
<instance class-name="TEST_ME" event-id="0" src-dn="P000045">
<association>TST_ME/P000045</association>
<attr attr-name="LAStNAme">
<value>Safin</value>
</attr>
<attr attr-name="PHONES">
<value>
<component name="PHONETYPE">BUSN</component>
<component name="PHONE">12345678</component>
</value>
<value>
<component name="PHONETYPE">CELL</component>
<component name="PHONE">23123412</component>
</value>
<value>
<component name="PHONETYPE">HOME</component>
<component name="PHONE">342345234532</component>
</value>
<value>
<component name="PHONETYPE">PGR</component>
<component name="PHONE">441232352</component>
</value>
</attr>
<attr attr-name="ID">
<value>P000045</value>
</attr>
</instance>
<status level="success" type="general">
<description>Query completed successfully.</description>
</status>
</output>
</nds>


I am just concerned about reformatting the PHONES node and its child nodes and i know how to do that!
I just want the rest of the xml to be just copied normally without hard-coding
any previous or next node values.

So all i want is
<Xsl General copy-code ></Xsl>
<my reformat code>
<Xsl General copy code></Xsl>


Thanks
Naveen
 
Last edited:
Joined
Mar 17, 2008
Messages
2
Reaction score
0
Hi guys,
I dint receive any replies to my previous post..
"Is it so simple a thing to do.
I am relatively new to XSL ( 1 day) and needed some help..
thanks
-naveen
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top