saxon:character-representation="hex" doesn't work?
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 269
- Joined: Sat Jul 10, 2010 4:03 pm
saxon:character-representation="hex" doesn't work?
I'm using Saxon PE 9.3, the version that comes with Oxygen 12.1
I have this near the top of my stylesheet
<xsl:output method="xml"
encoding="us-ascii"
saxon:character-representation="hex"/>
every place where I have a unicode char defined using hex like so
<lb n="0"/><seg>®</seg>
it is transmorgrified into this after running the stylesheet
<lb n="0"/><seg>®</seg>
while yes, that is the same character, I use hex values in all my documents and want to keep them that way.
Is Saxon broke?
Scott
I have this near the top of my stylesheet
<xsl:output method="xml"
encoding="us-ascii"
saxon:character-representation="hex"/>
every place where I have a unicode char defined using hex like so
<lb n="0"/><seg>®</seg>
it is transmorgrified into this after running the stylesheet
<lb n="0"/><seg>®</seg>
while yes, that is the same character, I use hex values in all my documents and want to keep them that way.
Is Saxon broke?
Scott
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Re: saxon:character-representation="hex" doesn't work?
I cannot reproduce this, probably you have a wrong namespace for the saxom prefix. Please try the following stylesheet:
If this works also for you then check that the saxon prefix is bound to the same namespace as in the above sample, that is make sure you have xmlns:saxon="http://saxon.sf.net/".
If you still have problems please post a sample similar with the above that we can use to reproduce the results you get.
Best Regards,
George
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xd="http://www.oxygenxml.com/ns/doc/xsl"
exclude-result-prefixes="xd saxon"
version="2.0" xmlns:saxon="http://saxon.sf.net/">
<xsl:output method="xml"
encoding="us-ascii"
saxon:character-representation="hex"/>
<xsl:template match="/">
<x>
<lb n="0"/><seg>®</seg>
</x>
</xsl:template>
</xsl:stylesheet>
If you still have problems please post a sample similar with the above that we can use to reproduce the results you get.
Best Regards,
George
George Cristian Bina
-
- Posts: 269
- Joined: Sat Jul 10, 2010 4:03 pm
Re: saxon:character-representation="hex" doesn't work?
George,
Excellent!
using xmlns:saxon="http://saxon.sf.net/" for the saxon namespace fixed it!
I don't know where I got the address I was using but it was not correct.
thanks,
Scott
Excellent!
using xmlns:saxon="http://saxon.sf.net/" for the saxon namespace fixed it!
I don't know where I got the address I was using but it was not correct.
thanks,
Scott
george wrote:I cannot reproduce this, probably you have a wrong namespace for the saxom prefix. Please try the following stylesheet:
If this works also for you then check that the saxon prefix is bound to the same namespace as in the above sample, that is make sure you have xmlns:saxon="http://saxon.sf.net/".
Best Regards,
George
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