on 05-09-2017 5:02 PM
Hi SDNites,
I am building an XSLT mapping to achieve split functionality. I have written the code to carry out the mapping and is working absolutely fine.
The issue in above mapping is that as soon as I mention ns0 or ns1 in the element tags, it stops working. Can you please guide what could be the issue.
I am using NWDS to build and test XSLT mapping.
Regards,
Abhi
Hi Abhishek!
If you use namespaces in your transformation you should declare it first, either in element definition or in transformation header. So please check if namespaces with used prefixes have already been declared before using it.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evgeniy,
Thanks for the response.
I am able to use the namespace in transformation with above suggestions. Below are some of my findings. Can you please confirm my understanding is correct,
1. Namespace used in XML and XSLT need not be same. For ex. xmlns:t1 (used in XML) and xmls:t2 (Used in XSLT)
2. URL used in XML and XSLT has to be same. For ex. xmlns:t1="http://testurl" (used in XML) and xmlns:t2="http://testurl" (Used in XSLT)
Regards,
Abhi
Hi Arhishek!
Namespaces are used to differentiate elements within XML structure.
Namespace used in XML and XSLT need not be same
Not namesapces but namespace prefixes. You link namespace to prefix using "xmlns:" namespace attributes and further parser qualifies element by combining namespace set for given prefix and element name. So you can use different prefixes in different documents, they just should describe the same namespace. And yes - if element is qualified with any namespace, you should use the same namespace for it in any place you want to refer it (but you can set different prefix for that namespace).
Regards, Evgeniy.
User | Count |
---|---|
89 | |
10 | |
9 | |
9 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.