xmlxsltaltovaxmlspy

Want to know Altova XML Spy


Does Altova XMLspy support XSLT 3.0,2.0 and 1.0?

If yes is there an option for backward compatibility? because I saw in their manual that XSLT 2.0 is backward compatible with 1.0 not sure about 3.0. I wanted an option where 3.0 is backward compatible with both 2.0 and 1.0.


Solution

  • First of all, XMLSpy is an XML IDE like Stylus Studio or oXygen, not a pure XSLT and XQuery processor like Saxon 9. I think XSLT and XQuery processing in XMLSpy is provided by Altova's Raptor XSLT and XQuery implementation. As for XSLT 3 support, I think the only mayor feature not supported is streaming.

    http://manual.altova.com/XMLSpy/spyenterprise/index.html?xsxqengine_xslt30.htm says

    The XSLT 3.0 Engine of XMLSpy conforms to the World Wide Web Consortium's (W3C's) XSLT 3.0 Recommendation of 8 June 2017 and XPath 3.1 Recommendation of 21 March 2017.

    The XSLT 3.0 engine has the same implementation-specific characteristics as the XSLT 2.0 engine. Additionally, it includes support for a number of new XSLT 3.0 features: XPath/XQuery 3.1 functions and operators, and the XPath 3.1 specification.

    Note: The optional streaming feature is not supported currently. The entire document will be loaded into memory regardless of the value of the streamable attribute, and will be processed if enough memory is available. In 64-bit apps this should not be a problem. If memory does turn out to be an issue, a solution would be to add more memory to the system.

    Also note that they provide an evaluation license so you could try yourself which of your requirements are met.

    As for the backwards compatibility, when running an XSLT 3.0 stylesheet in XMLSpy 2018 and checking the system-property xsl:supports-backwards-compatibility the result is yes. I am not sure however there is any way to run an XSLT 1 stylesheet with the XSLT 3 engine within the XMLSpy IDE.

    I have however no also tried to run a simple test whether you can switch to XSLT 1.0 backwards compatibility in an version="3.0" stylesheet and both Saxon 9.8 HE as well as XMLSpy 2018 for

    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="3.0">
    
        <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
        
        <xsl:param name="foo-list">
            <foo>1</foo>
            <foo>2</foo>
        </xsl:param>
        
        <xsl:template match="/" name="xsl:initial-template">
            <result>
                <result version="3.0">
                    <xsl:value-of select="$foo-list/foo"/>
                </result>
                <result xsl:version="1.0" version="1.0">
                    <xsl:value-of select="$foo-list/foo"/>
                </result>
            </result>
        </xsl:template>
        
    </xsl:stylesheet>
    

    output

    <result>
        <result version="3.0">1 2</result>
        <result version="1.0">1</result>
    </result>
    

    so based on that they both support switching on xsl:version="1.0" for backwards compatible processing if required.