Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preserving white-space in XML (xs:string enumeration value) does not work #813

Closed
Tomas-Kraus opened this issue Feb 2, 2011 · 11 comments
Closed

Comments

@Tomas-Kraus
Copy link
Member

Java classes are generated from the attached XSD file (using the attached XJB configuration, i.e. xjc:simple). According to the attached Java file, creating and marshaling an XML document works as expected.

When unmarshaling takes place, the result is not as expected. One of the values (the one with the space character at the end) is not unmarshaled at all. The uncommon thing here is an XSD enumeration with a value that contains the space character at the end.

DOM and SAX parsers handle parsing of the XML file as expected (without the error).

The error was also reproduced on 32-bit Windows and JDK 1.6.

Any feedback or workaround is appreciated.

Environment

JDK 1.5.0_22 64bit, x86_64 GNU/Linux (Kubuntu 2.6.32-21-generic)

Affected Versions

[2.2.3]

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Reported by jiri.patera

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
File: jaxb_bug.zip
Attached By: jiri.patera

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Was assigned to snajper

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
snajper said:
Fixed in trunk/2.2 branch.

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
Marked as fixed on Thursday, April 7th 2011, 12:37:02 am

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
deldim said:
We have the similar problem related to "whitespace" that can be reproduced on jaxb-2.2.4.
See attached tmp.xsd and main.java files.
I'm trying to unmarshall the string value (contains \r chars )of the node defined with <xs:whiteSpace value="preserve" />
The result object contains \n chars in place of \r.
Is this the same bug or i need to issue a new one?

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
File: Main.java
Attached By: deldim

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
File: tmp.xsd
Attached By: deldim

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
snajper said:
Seems like a separate bug. Would you please file a new one?

@Tomas-Kraus
Copy link
Member Author

@glassfishrobot Commented
This issue was imported from java.net JIRA JAXB-813

@Tomas-Kraus
Copy link
Member Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants