character-map
Posted: Mon May 23, 2005 6:10 pm
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