xsl-list
[Top] [All Lists]

[xsl] Extract attribute and make processing instructions (1st instance)

2007-11-25 23:36:16
Hi list-
Is there any technique by which we can extract attribute (first instance) and make it processing instructions and process the tag as well.
Thanks to everyone!!!
Input
<ch pg="1">
   <p pg="1">..</p>
   <p pg="1">..<s pg="1">...</s>...</p>
   <p pg="1">..</p>
   <p pg="1">..<s pg="2">...</s>...</p>
   <p pg="2">..</p>
   <p pg="3">..<m pg="3">...</m>...</p>
</ch>

Output
<?p 1?>
<ch1>
   <p1>..</p1>
   <p1>..<s1>...</s1>...</p1>
   <p1>..</p1>
   <p1>..<?p 2?><s1>...</s1>...</p1>
   <p1>..</p>
   <?p 3?><p1>..<m1>...</m1>...</p1>
</ch1>

...JSR


--~------------------------------------------------------------------
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>