Jump to content

How can I transform xml document that changes namespace names?


groads2

Recommended Posts

Hi: I just started with xsl transformation a couple of days ago. I got assigned a project to handle the display of xml documents, OJT is good but difficult sometimes. I found that the xml document comes to me with different namespace declarations at different times. I am using altova xml spy to test my transformation and It looks like my stylesheet needs the exact namespace names and urls that is in the original xml before it gets transformed correctly. While looking over a variety of the documents samples I noticed that sometimes I will have xmlns;ns5="thisurl" and the next time it could be xmlns:ns5="otherURL" and xmlns:ns6="thisurl". I hope I explained this in a manner that makes sense. I don't now how I can handle this? Any help will be greatly appreciated. <stuff xmlns:ns5="thisurl"> <ns5:morestuff>this is it</ns5:morestuff></stuff> next time it may be like this <stuff xmlns:ns5="otherUrl" xmlns:ns6="thisurl"> <ns6:morestuff> <ns5:littestuff>this bit</ns5:littlestuff></ns6:morestuff><stuff>

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...