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
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
ajay shahSubject: Creating or using existing functions
Author: ajay shah
Date: 11 Apr 2006 11:21 PM
I a currenlty evaluating Stylus Studio. Specifically need to use XSLT mapper.

However I have not been able to get functions to work in the stylus Studio

sample code below:

---------------------------------------------------------
<?xml version='1.0' ?>
<xsl:stylesheet xmlns:xsl=".." xmlns:fn="http://www.w3.org/2005/02/xpath-functions">
...

<xsl:function name="dateTime">
</xsl:function>

-------------------------------------------------------

Q1. Does XSLT mapper support such functionlity ?

Q2. I have included certain functions in an external xsl file and imported it into my current stylesheet. However, this is not working in the mapper. Is this supported ?


Postnext
Minollo I.Subject: Creating or using existing functions
Author: Minollo I.
Date: 12 Apr 2006 09:25 AM
About your point #2: if both "main" and included/imported XSLT are XSLT 2.0 stylesheets, you should be able to "see" functions defined in the included/imported XSLT from the main one in mapper mode (under "User Defined Functions" when right clicking on the canvas). Is that not happening for you? What version of Stylus Studio are you running? Can you attach a testcase?

Stylus Studio mapper doesn't support the ability to create such functions.

Thanks,
Minollo

Postnext
ajay shahSubject: Creating or using existing functions
Author: ajay shah
Date: 12 Apr 2006 03:40 PM
I tried using both in-built xslt processor as well as SAXON 8 with version=2.

None functions.

Here is a simple scenario.

<!-- main.xsl -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0" ....>

<xsl:import href="test_functions.xsl"/>
...
..
</xsl:stylesheet>


<!--test_functions.xsl -->
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">

<xsl:function name="test">
<hello1>test</hello1>
</xsl:function>

</xsl:stylesheet>

Both the stylesheets are in the same directory.
When trying to complie main.xsl I receive the following error message

Is this functionality supported ?

"java.lang.RuntimeException: Failed to compile stylesheet. 3 errors detected."

I also wish there was some way I could view the 3 error messages.

many thanks,

Postnext
Ivan PedruzziSubject: Creating or using existing functions
Author: Ivan Pedruzzi
Date: 12 Apr 2006 03:47 PM
Ajay

Which Stylus Studio version/build are you running (Help -> About)?

Thanks
Ivan Pedruzzi
Stylus Studio Team

Postnext
ajay shahSubject: Creating or using existing functions
Author: ajay shah
Date: 12 Apr 2006 04:36 PM
Stylus Studio 6
XML Enterprise Edition

Framework version: Build 377h

Postnext
Ivan PedruzziSubject: Creating or using existing functions
Author: Ivan Pedruzzi
Date: 12 Apr 2006 04:41 PM
Could you try the latest Stylus Studio 2006?
http://www.stylusstudio.com/xml_download.html

Thanks
Ivan Pedruzzi
Stylus Studio Team

Postnext
ajay shahSubject: Creating or using existing functions
Author: ajay shah
Date: 12 Apr 2006 04:54 PM
Ivan,

Before I try the latest stylus studio.

Is this functionality supported in the one I am using or is there any other way to achieve what I am trying to do (i.e include functions in a seperate xsl file) ?

Thanks,

Postnext
Ivan PedruzziSubject: Creating or using existing functions
Author: Ivan Pedruzzi
Date: 12 Apr 2006 05:14 PM

Build 377o the latest update for version 6.x handles named templates only from import/include.
To invoke a template click XSLT Instructions -> call template


http://www.stylusstudio.com/update/ent-63.html

Hope this helps
Ivan Pedruzzi
Stylus Studio Team

Postnext
ajay shahSubject: Creating or using existing functions
Author: ajay shah
Date: 12 Apr 2006 06:13 PM
Functions are not supported in any of the Stylus Studio versions ?

Posttop
Ivan PedruzziSubject: Creating or using existing functions
Author: Ivan Pedruzzi
Date: 12 Apr 2006 06:19 PM
I guess you are asking for support in XSLT mapper.

XSLT 2.0 functions are supported in the latest version: Stylus Studio 2006 release 2.

Ivan Pedruzzi
Stylus Studio Team

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
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.