xsltexpressionlevelup

XSLT ../name() in version 1.0


i wrote as beginner xslt for version 2.0 and it is work

    <xsl:template name="ParamOrTpItem">
            <xsl:param name="prefix"/>
            <xsl:choose>
                <xsl:when test="../name()='or'">
....

this template is for displaying of conditions and it is recursive calling. i would like to generate html over python and lxml, so i switched to version 1.0, because it is nessesary for lxml

xsl:when : could not compile test expression '../name()='or''

i can use in test expression syntax like name() or ../Atribute but combination ../name() is impossible for XSLT 1.0. can you advice me to resolving this situation, i would like to travers level up for name()

3rd party of dll for generating html over python like Saxon work, but is for me impossible thank you


Solution

  • Use name(..) = 'or' or ../self::or. Also for Python there is a now a module to use Saxon 9.9 C with Python.