XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Elias HuterSubject: exclude-result-prefixes
Author: Elias Huter
Date: 30 Mar 2007 06:04 AM
Hi,

I have a problem with "exclude-result-prefixes" and can't see the error. I would expect the function to remove the prefix and the namespace from the output XML but it doenst seem to work.

Mapping:
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:a="http://test"
exclude-result-prefixes="a">

<a:IORDERS1>
<IORDER1>
<MSG_HDR>
<SENDER>9003140000003</SENDER>
...
</MSG_HDR>
</IORDER1>
</a:IORDERS1>

Output:
<a:IORDERS1 xmlns:a="http://test">
<IORDER1>
<MSG_HDR>
<SENDER>9003140000003</SENDER>
<RECEIVER>0000000017284</RECEIVER>
</IORDER1>
</a:IORDERS1>

Postnext
(Deleted User) Subject: exclude-result-prefixes
Author: (Deleted User)
Date: 30 Mar 2007 07:49 AM
Hi Elias,
exclude-result-prefixes removes the *unused* namespace definition from the output; in your case you are generating a node that is in the "a" namespace, so "a" has to be defined.
You will have to decide whether the output node has to be inside a namespace; in this case, if you don't want it to be called "a" you can use namespace-alias to rename it.

Hope this helps,
Alberto

Posttop
Elias HuterSubject: exclude-result-prefixes
Author: Elias Huter
Date: 30 Mar 2007 08:18 AM
Thanks alot!

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.