javajoemorgan Posted May 13, 2008 Share Posted May 13, 2008 I need to know how to write a generic transform that may include elements having different namespaces. For example, consider this SOAP Request: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cat="http://www.kingkongco.com/category"> <soapenv:Header/> <soapenv:Body> <cat:getCategory> <cat:categoryId>-1</cat:categoryId> <cat:maxDepth>2</cat:maxDepth> <cat:type>A</cat:type> <cat:type>L</cat:type> <cat:type>REC</cat:type> </cat:getCategory> </soapenv:Body></soapenv:Envelope> Now, consider this one: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:part="http://www.kingkongco.com/part"> <soapenv:Header/> <soapenv:Body> <part:findItemsByCategory> <part:orderType>4</part:orderType> <part:category>-1</part:category> <part:type>A</part:type> <part:type>S</part:type> <part:type>T</part:type> </part:findItemsByCategory> </soapenv:Body></soapenv:Envelope> Note the "type" elements in both. In one case, the "type" element is "cat:type", in the other, it is "part:type". There are others as well. What I need to do is to write a generic XSLT that processes this "type" element with the same rules for all documents, regardless of its namespace.How???? Link to comment Share on other sites More sharing options...
javajoemorgan Posted May 14, 2008 Author Share Posted May 14, 2008 Never mind... I found the answer here: http://www.xml.com/pub/a/2001/05/02/trxml.html Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.