Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > reformatting only a part of the XML using XSL

Reply
Thread Tools

reformatting only a part of the XML using XSL

 
 
unaveen unaveen is offline
Junior Member
Join Date: Mar 2008
Posts: 2
 
      03-17-2008
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 by unaveen; 03-17-2008 at 02:12 PM..
Reply With Quote
 
 
 
 
unaveen unaveen is offline
Junior Member
Join Date: Mar 2008
Posts: 2
 
      03-18-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to select only specific rows from xml using xsl anywherenotes@gmail.com XML 1 02-06-2009 06:20 PM
xsl:sort using an xsl:variable as the sort key jobooker@gmail.com XML 2 09-05-2006 03:51 PM
Refreshing part of an XML/XSL page and JS Anthony Javascript 0 01-13-2006 09:02 PM
XML text reformatting Draz XML 0 07-25-2005 09:33 AM
XSL Question tp xsl:for-each and xsl:variable schaf@2wire.ch XML 1 05-27-2005 09:25 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57