This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Customer Requirements for Developers and have Marcho Behler on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XSLT and JAXB Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Customer Requirements for Developers this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XSLT and JAXB" Watch "XSLT and JAXB" New topic


Nitti Lin
Ranch Hand

Joined: May 15, 2003
Posts: 39
Hi guys,

I'm using XSLT to transform XML and use Jaxb to parse the transformed XML, but received error saying

"The markup declarations contained or pointed to by the document type declaration must be well-formed."

After I traced into it, in Something.xsd file and the line that caused problem is
"<xs:schema xmlns:xs="" xmlns:jaxb="" jaxb:version="1.0">"

That's the xsd file I defined to generate Jaxb classes. I do have a </xs:schema> end tag at the end of Something.xsd.

What I'm doing are....
1) I can use Something.xsd to generate Jaxb classes and this has been working for a while.
2) I used XSLT and Transformer to transform received XML into the same XML format as Something.xsd, and it generated an XML with the same format as Something.xsd. The generated XML has <!DOCTYPE>, which reference Something.xsd.
3) When I pass that transformed XML to my Jaxb classes, the unmarshaller complains about the line below
"<xs:schema xmlns:xs="" xmlns:jaxb="" jaxb:version="1.0">"
saying it's not well-formed.

Does anyone have any ideas what's going on or is there any way that I can make transformed XML without showing "<!DOCTYPE>"?



Nitti Lin
Ranch Hand

Joined: May 15, 2003
Posts: 39

I work it out!

I agree. Here's the link:
subject: XSLT and JAXB
It's not a secret anymore!