|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] overwriting certain blocks of output - two queries
Hi
I want to overwrite certain blocks of output (o/p) that I obtain from my first.xsl file with the results from second.xsl. The process flow is such : input.xml (call to first.xsl) --> first.xsl (some processing) --> first.xml (use saxon:next-in-chain) -->second.xsl (target certain o/p areas of first.xml) -->second.xml (final result) first.xml looks such: <Top>
<Parts>
<A>
<Class id="123" type="none">Parts</Class>
<Value id="345" type="CODED_TEXT">Handle</Value>
</A>
<B>
<Class id="none" type="Property">Handle</Class>
<Value id="234" type="Property">hasProperty Bolt</Value>
</B>
</Parts>
<Components>
<A>
<Class id="123" type="none">Components</Class>
<Value id="345" type="CODED_TEXT">Car</Value>
</A>
<B>
<Class id="none" type="none">Not Present</Class>
</B>
</Components>
</Top>Now second.xsl processes first.xml by pulling out all B/Class[.='Not Present']. Then it does some stuff and gets some results so that I finally have second.xml looking like this: <Top>
<Parts>
<A>
<Class id="123" type="none">Parts</Class>
<Value id="345" type="CODED_TEXT">Handle</Value>
</A>
<B>
<Class id="none" type="Property">Handle</Class>
<Value id="234" type="Property">hasProperty Bolt</Value>
</B>
</Parts>
<Components>
<A>
<Class id="123" type="none">Components</Class>
<Value id="345" type="CODED_TEXT">Car</Value>
</A>
<B>
<Class id="none" type="876">CarLocks</Class>
<Value id="909" type="Property">hasProperty Mirror</Value>
</B>
</Components>
</Top>How do I overwrite certain nodes while preserving the remaining structure? Also is it possible to overwrite other blocks of first.xml retrospectively, say the block Top/Parts/A, if a certain condition is met later on ? Will appreciate any suggestions and help Thanks Rahil
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








