This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

one xsl file for two parsings


Hello...

I want to write an xsl file to process several xml files, and result
(parsing)
would depend on a given field value, and I don't see how to do that.

Example:

xml #1 would be 
===
<?xml version="1.0"?>
<mymsg>
  <qty>123</qty>
  <type>new</type>
  <code>5173</code>
</mymsg>
===
and parsed into 
===
<?xml version="1.0"?>
<new>
  <qty>123</qty>
  <code>5173</code>
</new>
===

when xml #2 would be
===
<?xml version="1.0"?>
<mymsg>
  <qty>123</qty>
  <type>cancel</type>
  <code>5173</code>
</mymsg>
===
and parsed into 
===
<?xml version="1.0"?>
<cancel>
  <code>5173</code>
</cancel>
===


In this example, parsing depend on <type> value.

If somebody could help...

(some pointers to tutorials where I could have find an answer are
welcome !)

Thank you
-- 
Joseph


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]