XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
- Stylus Studio Technical Forum (14621)
-> - Stylus Studio - Registrar en o... (1)
-> + Stylus Studio - Registrar en o... (2)
-> + Can a pipeline send a file by ... (2)
-> + After Updateing WIN10 to WIN11... (12)
-> + Where do I add the custom java... (3)
-> + Where is the Diagram tab? (5)
-> + Applying XSLT to Word DOCX/XML (2)
-> - CSV conversion via ConvertToXM... (1)
-> + Text symbols in SS not same as... (4)
-> + Exposing xquery as webservice ... (6)
-> + Syntax Identifier (2)
-> + Saving a Converted XML as an X... (5)
-> + Output document cannot be pars... (4)
-> - Archiving output from conversi... (1)
-> + EDIFACT guideline from Stylus ... (3)
-> + CSV file putting all the data ... (5)
-> + Can't install Home version 64b... (5)
-> + presale - Can I covers this sc... (5)
-> + Problem with UNB (5)
-> + Splitting EDIFACT files pipeli... (4)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Manikandan SurendranathSubject: XSL does not work with Saxon 7
Author: Manikandan Surendranath
Date: 22 Apr 2005 01:53 AM
Hi,

I have written an xslt that work well with MSXML processor, but if i choose "Saxon 7" the templates are not getting applied. What could be the problem?

mani

Postnext
(Deleted User) Subject: XSL does not work with Saxon 7
Author: (Deleted User)
Date: 22 Apr 2005 03:33 AM
Hi Mani,
are you sure you are not using some MSXML-specific instructions (like msxml:script) or even an old WD-XSL namespace in the xmlns:xsl attribute?

Hope this helps,
Alberto

Postnext
Manikandan SurendranathSubject: XSL does not work with Saxon 7
Author: Manikandan Surendranath
Date: 22 Apr 2005 06:53 AM
Yes I have used msxsl:node-set. Is there a way to transform a string to node set which works for both msxml and saxon?

Postnext
(Deleted User) Subject: XSL does not work with Saxon 7
Author: (Deleted User)
Date: 22 Apr 2005 08:20 AM
Hi Mani,
XSLT 1.0 didn't specify a node-set() function, so every vendor implemented their own version. In the case of Saxon, it's called saxon:node-set.
If you need to have a single XSLT that is processable by both engines you will need to use function-available() to test which function is supported by the engine before invoking it.

Hope this helps,
Alberto

Postnext
Manikandan SurendranathSubject: XSL does not work with Saxon 7
Author: Manikandan Surendranath
Date: 25 Apr 2005 06:57 AM
I have remove this dependancy on msxsl and changed the node transformation using xpath condition. Now it works fine for both msxsl and saxon. BTW, is there a way to sniff the processor, can I write an XSLT like ,

if processor is saxon
do saxon:function
else if processor is msxsl
do msxsl:function
otherwise
do xsl:message
fi

Postnext
(Deleted User) Subject: XSL does not work with Saxon 7
Author: (Deleted User)
Date: 25 Apr 2005 08:23 AM
Hi Mani,
you can use function-available, like in this example

<xsl:choose>
<xsl:when test="function-available(msxml:node-set)">
<xsl:for-each select="msxml:node-set($foo)">
<xsl:call-template name="$foo-template"/>
</xsl:for-each>
</xsl:when>
<xsl:when test="function-available(saxon:node-set)">
<xsl:for-each select="saxon:node-set($foo)">
<xsl:call-template name="$foo-template"/>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>Sorry, this processor does not support node-set()</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>

Alternatively, you can test the name of the processor itself, by using system-property('xsl:vendor-url'), like in this example

<xsl:choose>
<xsl:when test="system-property('xsl:vendor-url')='http://www.saxonica.com/'">
Running under Saxon 8
</xsl:when>
<xsl:when test="system-property('xsl:vendor-url')='http://saxon.sf.net/'">
Running under Saxon 6
</xsl:when>
<xsl:when test="system-property('xsl:vendor-url')='http://xml.apache.org/xalan-j'">
Running under Xalan-J
</xsl:when>
<xsl:when test="system-property('xsl:vendor-url')='http://www.microsoft.com'">
Running under MSXSL
</xsl:when>
<xsl:otherwise>
<xsl:message terminate="yes">
<xsl:text>Unsupported processor</xsl:text>
</xsl:message>
</xsl:otherwise>
</xsl:choose>

Hope this helps,
Alberto

Posttop
Manikandan SurendranathSubject: XSL does not work with Saxon 7
Author: Manikandan Surendranath
Date: 25 Apr 2005 08:40 AM
Thanks a lot. Its very helpful.

   
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.