Project

Profile

Help

using MapForce with Saxon

Added by Anonymous about 15 years ago

Legacy ID: #6577232 Legacy Poster: zohar (zohar_amir)

Hello, I just downloaded a trial version of MapForce. I created a mapping between 2 XML schemas and this produced an XSLT (2.0) file. When trying to use this XSLT with Saxon (Saxon-B 9.1) I got errors like: XPST0080: XPath syntax error at char 26 on line 89 in {xs:string(xs:byte(FromDay))}: The type xs:byte is not recognized by a Basic XSLT Processor. XPST0080: XPath syntax error at char 38 on line 145 in {...(xs:long(xs:decimal(txtMapX...}: The type xs:long is not recognized by a Basic XSLT Processor. Why does this happen? How can I overcome this? Thanks, Zohar.


Replies (2)

RE: using MapForce with Saxon - Added by Anonymous about 15 years ago

Legacy ID: #6581599 Legacy Poster: Michael Kay (mhkay)

Following the rules for a Basic XSLT processor defined in the XSLT 2.0 specification, Saxon-B does not allow the use of types such as xs:int and xs:byte; in theory, to use these types you need a schema-aware processor. However, Saxon offers you some respite for your wallet here: you can specify saxon:allow-all-built-in-types="yes" xmlns:saxon="http://saxon.sf.net/" on the xsl:stylesheet element to overcome this restriction.

RE: using MapForce with Saxon - Added by Anonymous about 15 years ago

Legacy ID: #6626232 Legacy Poster: zohar (zohar_amir)

Thank you. I added the attributes to the stylesheet element and it really works... I also corresponded with Altova's support team, and it seems that: 1. MapForce will continue to require a schema-aware XSLT engine 2. It is not possible to add constant attributes (like you "magic" ones) to the generated XSLT's stylsheet element. I was also looking at using Altova's XSLT engine (it is XSLT 2.0, schema-aware, and free), but it only has proprietary API (no JAXP). Are there any downsides to using the above attributes? Thanks again, Zohar.

    (1-2/2)

    Please register to reply