<?xml version="1.1"?>
<!-- both namespace prefixes are available throughout -->
<bk:book xmlns:bk='urn:loc.gov:books'
xmlns:isbn='urn:ISBN:0-395-36341-6'>
<bk:title>Cheaper by the Dozen</bk:title>
<isbn:number>1568491379</isbn:number>
</bk:book>
My generated XML does have structure like this:
- <office:document-content xmlns:office="http://openoffice.org/2000/office"
- <office:body>
some data
- <table:table table:name="Table1" table:style-name="Table1">
some data
</table:table>
</office:body>
</office:document-content>
<office:document-content xmlns:office="http://openoffice.org/2000/office" xmlns:table="http://openoffice.org/2000/office">
<office:body>
some data
<table:table table:name="Table1" table:style-name="Table1">
some data
</table:table>
</office:body>
</office:document-content>
Try adding the line in bold italics to this and see what happens.
Hi Jim,
I do have all the things below in my generated XML. I did not list all of them because I just want to show you the layout of the XML, and don't want the mail be too long. Sorry for the confusion. Sheping
I've been able to replicate the error you received. It seems that the XSLT that DataStage generates does not include the namespace declarations from the XML document. Here's what I did to get it to run without error.
1. Run the job with tracing (Subroutine Calls) set on the XML input stage.
2. Copy the generated XSLT from the log. It's about the fourth last line and it starts with "<?xml version="1.0" encoding="UTF-8"?>"
3. Select the Output tab of the XML input stage and check the "Use custom stylesheet" box.
4. Copy the generated XSLT (excluding the bit before "<?xml version")
5. Add the namespace declarations to the XSLT
Thanks for your help again. I was busy working on a project with deadline and did not get time to work on this issue these days.
I am able to set the "Transformation error mappings" for fatal, error, and warning to "trace" and set the output to "Use customer stylesheet". However, I am not able to find out where the "generated XSLT" is, or say, where the log is. Can you give me some guidance?
1. Run the job from Director
2. In the job run dialog, select the Tracing tab
3. In the Tracing tab, select the name of the XML stage
4. In trace level, select the Subroutine calls (or all the boxes if you like)
5. Now hit the Run button and wait for the job to finish
6. Now open the job log (still in Director)
7. The 4th last entry should have something like "...<?xml version=..."