|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] How do you handle namespace prefixes in attribute valu
Taking a wsdl file (only as an example, applies to any namespaces xml file) which looks like this <?xml version="1.0"?> <definitions name="StockQuote" targetNamespace="http://example.com/stockquote.wsdl" xmlns:xsd1="http://example.com/stockquote.xsd" ... <message name="GetLastTradePriceOutput"> <part name="body" element="xsd1:TradePrice"/> </message> and you wish to operate on it using XSLT. If the prefix 'xsd1' is not used in the QName of an element then when operating on the XML the 'xsd1' prefix will be lost unless it is explicitly declared in the XSLT. However as the actual prefix of a namespace is considered irrelevant it cannot be known before being given the XML document to transform. Assuming the namespace and its prefix is not known in advance and therefore not declared in the XSLT the prefix-namespace association will not be present in the destination document which renders the attribute value 'xsd1:TradePrice' incorrect if it is placed in the destination (transformed) docoument. How should this be handled, as I cannot see how to either preseve the prefix-namespace declaration or ensure the namespace is declared and change the prefix to a correct value in the attribute in the destination document? Matt Seaborn Software Engineer Categoric Software The leader in business process event management technology +44 (0)1932 590900 tel +44 (0)1932 590901 fax +44 (0)1932 590907 direct http://www.categoric.com <http://www.categoric.com/> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








