| Author |
Another XML Conversion Problem
|
Natalie Kopple
Ranch Hand
Joined: May 06, 2003
Posts: 314
|
|
I am converting on another XML file using XSL. All the values within the <PreviewCareCoordinatorProfile> cannot be picked up. I am posting "part" of my input XML file, my XSL conversion file, and my output file below. If anybody would kindly point out my mistake. Thank you.
Input XML file (Part of it):
My XSL conversion file:
My output file:
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 13842
|
|
|
Your namespace URI for the "vler" prefix in your XLST doesn't match the namespace URI for the "vler" prefix in the input XML. Since it's the URIs which are used for matching and not the prefixes, you don't match anything with that prefix.
|
 |
Natalie Kopple
Ranch Hand
Joined: May 06, 2003
Posts: 314
|
|
I tried what your suggested; for example, instead of , I changed it to . But, it did not work.
Maybe I do not understand what you suggested.
|
 |
Paul Clapham
Bartender
Joined: Oct 14, 2005
Posts: 13842
|
|
No, apparently you have completely not understood the reason why you declare namespaces.
In your XSLT you declare the "vler" prefix to have the namespace URI of "http://mynamespace.com/schemas/vcp/0.1/health/UnstructuredC62/0.1/subset/vler/". So when you look
for a "vler:ServiceProvider" element, you are looking for a ServiceProvider element with that namespace URI.
In your input XML you do indeed have ServiceProvider elements. They also happen to use the "vler" prefix, but in that XML the "vler" prefix is declared to have the namespace URI
of "http://mynamespace.com/schemas/vcp/0.1/otherAdmin/CareCoordinatorProfile/0.2/subset/vler/0.2". Your XSLT code will not find those elements because it is not looking for
elements with that namespace URI.
|
 |
Natalie Kopple
Ranch Hand
Joined: May 06, 2003
Posts: 314
|
|
|
Now I see. I have fixed my XSL file and see all the output that I expected. Thank you.
|
 |
 |
|
|
subject: Another XML Conversion Problem
|
|
|