character-map
Here should go questions about transforming XML with XSLT and FOP.
-
- Posts: 5
- Joined: Fri Mar 25, 2005 2:04 pm
character-map
Hello,
I need to create files from a multilanguage xml source file with some accented characters and I'm getting the following error message:
"Cannot use character maps in an environment with no Controller"
Can anybody explain this error to me ? Is it an error generated by the Saxon processor (I'm using Saxon8B) or by <oXygen/> ?
The full stylesheet is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet [
<!ENTITY tab "<xsl:text>	</xsl:text>">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="text" encoding="UTF-8" indent="no" use-character-maps="mymap"/>
<xsl:character-map name="mymap">
<xsl:output-character character="é" string="Ž"/>
<xsl:output-character character="Ã " string="ˆ"/>
</xsl:character-map>
<xsl:template match="/">
<xsl:for-each select="//article">
<xsl:variable name="ref" select="Reference"/>
<xsl:variable name="filename" select="concat('pmm/',$ref,'.txt')"/>
<xsl:result-document href="{$filename}"><@Title><a$$><xsl:value-of select="DescriptionFR"/><@$>
<xsl:text>
</xsl:text>
<xsl:value-of select="TailleFR"/>&tab;
<xsl:value-of select="Reference"/>&tab;
<xsl:value-of select="Prix"/>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Thanks,
Ian
I need to create files from a multilanguage xml source file with some accented characters and I'm getting the following error message:
"Cannot use character maps in an environment with no Controller"
Can anybody explain this error to me ? Is it an error generated by the Saxon processor (I'm using Saxon8B) or by <oXygen/> ?
The full stylesheet is:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE stylesheet [
<!ENTITY tab "<xsl:text>	</xsl:text>">
]>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:output method="text" encoding="UTF-8" indent="no" use-character-maps="mymap"/>
<xsl:character-map name="mymap">
<xsl:output-character character="é" string="Ž"/>
<xsl:output-character character="Ã " string="ˆ"/>
</xsl:character-map>
<xsl:template match="/">
<xsl:for-each select="//article">
<xsl:variable name="ref" select="Reference"/>
<xsl:variable name="filename" select="concat('pmm/',$ref,'.txt')"/>
<xsl:result-document href="{$filename}"><@Title><a$$><xsl:value-of select="DescriptionFR"/><@$>
<xsl:text>
</xsl:text>
<xsl:value-of select="TailleFR"/>&tab;
<xsl:value-of select="Reference"/>&tab;
<xsl:value-of select="Prix"/>
</xsl:result-document>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Thanks,
Ian
-
- Posts: 13
- Joined: Tue Jan 14, 2003 12:22 pm
character-map
Hello,
That is a bug in the XSLT Debugger perspective and it will be solved in a future release.
As an workaround please comment all <xsl:character-map> elements in your XSLT 2.0 stylesheets when you debug them and uncomment them when doing the transformation in the Editor perspective.
Regards,
Bogdan
That is a bug in the XSLT Debugger perspective and it will be solved in a future release.
As an workaround please comment all <xsl:character-map> elements in your XSLT 2.0 stylesheets when you debug them and uncomment them when doing the transformation in the Editor perspective.
Regards,
Bogdan
-
- Posts: 5
- Joined: Fri Mar 25, 2005 2:04 pm
ok, the transformation does indeed work in the Editor perspective but the output is not correct. I'm getting some other charater before the ones defined in the character map. Like "Ž ˆ ".
In fact I get the same incorrect output if I define the entities in the xml source file itself.
Any ideas ?
Thanks,
Ian
In fact I get the same incorrect output if I define the entities in the xml source file itself.
Any ideas ?
Thanks,
Ian
-
- Posts: 4141
- Joined: Fri Mar 28, 2003 2:12 pm
Post by sorin_ristache »
Hello,
Maybe the character codes 142 and 136 are wrong. They are Unicode control characters. What do you expect to be displayed for them ? You need the characters é and à ? In that case the codes are 233 and 224. Otherwise please post the characters that you expect to see in the output.
Best regards,
Sorin
Maybe the character codes 142 and 136 are wrong. They are Unicode control characters. What do you expect to be displayed for them ? You need the characters é and à ? In that case the codes are 233 and 224. Otherwise please post the characters that you expect to see in the output.
Best regards,
Sorin
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