Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   XML (http://www.velocityreviews.com/forums/f32-xml.html)
-   -   reformatting only a part of the XML using XSL (http://www.velocityreviews.com/forums/t599448-reformatting-only-a-part-of-the-xml-using-xsl.html)

unaveen 03-17-2008 10:59 AM

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

unaveen 03-18-2008 02:53 AM

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


All times are GMT. The time now is 05:22 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.