Differences calling Saxon8B (outof Oxygen/Java-Application)
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 4
- Joined: Fri Dec 02, 2005 5:55 pm
- Location: Cologne
- Contact:
Differences calling Saxon8B (outof Oxygen/Java-Application)
Hello,
I try to convert xml to rtf and have problems converting unicode characters to ansi (rtf allows only ansi chars).
For that purpose I have to convert any char above codepoint 255 into its numeric value (string-to-codepoints) and write it (under the rules of rtf) into my target document.
The problem is, when I use Saxon8B out of Oxygen everything works fine, but if I call the same template out of my Java-Application also using Saxon8B, umlauts are not translated correct.
E.g.
With Saxon out of Oxygen Ä remains "Ä" (Decimal code points 196)
With Saxon out of my Application Ä becomes "Ä" (Decimal code points 195 8222)
Are there any 'special' settings or parameters set for the saxon engine in oxygen that could be accountable for that differences?
Any idea? I would be thankful for any suggestion.
I try to convert xml to rtf and have problems converting unicode characters to ansi (rtf allows only ansi chars).
For that purpose I have to convert any char above codepoint 255 into its numeric value (string-to-codepoints) and write it (under the rules of rtf) into my target document.
The problem is, when I use Saxon8B out of Oxygen everything works fine, but if I call the same template out of my Java-Application also using Saxon8B, umlauts are not translated correct.
E.g.
With Saxon out of Oxygen Ä remains "Ä" (Decimal code points 196)
With Saxon out of my Application Ä becomes "Ä" (Decimal code points 195 8222)
Are there any 'special' settings or parameters set for the saxon engine in oxygen that could be accountable for that differences?
Any idea? I would be thankful for any suggestion.
-
- Posts: 4
- Joined: Fri Dec 02, 2005 5:55 pm
- Location: Cologne
- Contact:
Ha!
I fixed the problem today.
The problem was the way I read the xml.
When I use StreamSource to read the xmlFile I get the mentioned problem.
--> Source source = new StreamSource(xmlFile);
The Solution was to use a SAXSource to read the xml
--> Source source = new SaxSource(xmlFile);
So long,
Toralion
I fixed the problem today.
The problem was the way I read the xml.
When I use StreamSource to read the xmlFile I get the mentioned problem.
--> Source source = new StreamSource(xmlFile);
The Solution was to use a SAXSource to read the xml
--> Source source = new SaxSource(xmlFile);
So long,
Toralion
-
- Posts: 4
- Joined: Fri Dec 02, 2005 5:55 pm
- Location: Cologne
- Contact:
Ah yes, I kind of thought that also I expected that the encoding would be the one I safed the file with... never mind. It works!george wrote:That was an encoding problem. When you use StreamSource you will get the default platform encoding. When you use SaxSource the encoding will be detected from the file.
Best Regards,
George

Thanks for the info George!
Best Regards,
Toralion
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service