简体   繁体   中英

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM