Question related to conversion of text entities in XML

As per the documentation XPP cannot interpret text or file entities and one needs to use a transformation tool to convert the text entity before importing the instance into the XPP division. Which transformation tool can be used for achieving such a conversion ?

Parents
  • A very simple XSLT V2 stylesheet should do the trick.

    When you run an XSLT stylesheet the XSLT engine will include and expand all the entities provided that it can parse the incoming instance.

    So you will need to either setup your catalog.xml file correctly.

    Note that you will be forced to use the XSLT V2 engine as the catalog.xml file is not supported by the V1 engine that comes with XPP.

    Note also that if you use system declarations that point to the correct files on your XPP system, you could still get away with the XSLT V1 engine.

    Here is a sample V2 stylesheet that will expand both internal and external entities but otherwise does nothing else (but the normal things an XSLT engine does - but that would lead us too far to go into that):

    <xsl:stylesheet version="2.0" xmlns:xsl="www.w3.org/.../Transform" >
    <xsl:output method="xml" version="1.0" />
    <!-- keep all nodes -->
    <xsl:template match="node()">
    <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates/>
    </xsl:copy>
    </xsl:template>

    </xsl:stylesheet>


Reply
  • A very simple XSLT V2 stylesheet should do the trick.

    When you run an XSLT stylesheet the XSLT engine will include and expand all the entities provided that it can parse the incoming instance.

    So you will need to either setup your catalog.xml file correctly.

    Note that you will be forced to use the XSLT V2 engine as the catalog.xml file is not supported by the V1 engine that comes with XPP.

    Note also that if you use system declarations that point to the correct files on your XPP system, you could still get away with the XSLT V1 engine.

    Here is a sample V2 stylesheet that will expand both internal and external entities but otherwise does nothing else (but the normal things an XSLT engine does - but that would lead us too far to go into that):

    <xsl:stylesheet version="2.0" xmlns:xsl="www.w3.org/.../Transform" >
    <xsl:output method="xml" version="1.0" />
    <!-- keep all nodes -->
    <xsl:template match="node()">
    <xsl:copy>
    <xsl:copy-of select="@*"/>
    <xsl:apply-templates/>
    </xsl:copy>
    </xsl:template>

    </xsl:stylesheet>


Children
No Data