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 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Michel DuronSubject: Java Built-in processor no longer working since upgrade to Enterprise 2008 R2
Author: Michel Duron
Date: 23 May 2008 03:49 PM
We have been developing XSLT transforms with Stylus Studio for almost 2 years now and have always used the built-in java processor because our code needs calls to java date fucntions.

However, the R2 upgrade means the same sourcesafe forms and XML samples that used to work no longer work.

We have build 1147c.

Do i need to downgrade?

The following code used to work:

XML (fragment):
<EntitlementTimeLicenseModelAttributes>
<Attribute>
<Name>LANGUAGE</Name>
<Value>en</Value>
</Attribute>
</EntitlementTimeLicenseModelAttributes>

XSL FRAGMENT:

<xsl:for-each select="EntitlementTimeLicenseModelAttributes/Attribute/Value[preceding-sibling::Name='LANGUAGE']">
<item>
<date>9999</date>
<lang>
<xsl:value-of select="."/>
</lang>
</item>
</xsl:for-each>

WHERE the result would be:
<item>
<date>9999</date>
<lang>
en
</lang>
</item>

Since 2008R2, we have the following instead:
<item>
<date>9999</date>
<lang>
LANGUAGE
en

</lang>
</item>

and, doing a copy-of instead of the value-of:
<item>
<date>9999</date>
<lang>
<Attribute>
<Name>LANGUAGE</Name>
<Value>en</Value>
</Attribute>
</lang>
</item>

Basically, the context instead in the for-each loop is totally wrong now...

Postnext
Michel DuronSubject: Java Built-in processor no longer working since upgrade to Enterprise 2008 R2
Author: Michel Duron
Date: 23 May 2008 03:56 PM
One more thing...

I checked the standard built-in parser (by removing all the java dependencies), and the code works perfectly in that case.

So, this is really a critical regression bug with Stylus Studio when using the java built-in processor.

Postnext
Alberto MassariSubject: Java Built-in processor no longer working since upgrade to Enterprise 2008 R2
Author: Alberto Massari
Date: 26 May 2008 08:58 AM
Hi Michel,
Stylus should not be involved in the generation of the output of the Java built-in XSLT engine, so the difference could be in the Java engine itself. By chance, did the new installation of Stylus Studio pick a different JRE, maybe embedding a different version of Xalan-J? (you can see the JRE version in the About box dialog)

Alberto

Postnext
Michel DuronSubject: Java Built-in processor no longer working since upgrade to Enterprise 2008 R2
Author: Michel Duron
Date: 26 May 2008 12:05 PM
Hello Alberto,

Indeed, after checking the JDK used for the built-in Java, it had switched to 1.5 instead of 1.4.2. I changed it back and all is working again.

So, you are saying then that the axis context problem is on the Sun side and not Stylus Studio IDE? I will look on the sun forum.

Thank you again,

Michel

Postnext
Alberto MassariSubject: Java Built-in processor no longer working since upgrade to Enterprise 2008 R2
Author: Alberto Massari
Date: 26 May 2008 12:29 PM
Hi Michel,
when Stylus Studio runs an XSLT processor different from the "Built-in" (i.e. the Java built-in, Saxon, MSXML) it simply installs hooks to intercept the generation of the output in order to provide debugging and backmapping. So, a difference in the serialization format could be a bug of ours, but a change like having a different node as the context of a xsl:for-each is too deep in the engine to be caused by Stylus Studio, and almost certainly is a bug in the engine itself.

BTW, which 1.5 version were you running? Was it the latest Update 15?

Alberto

Posttop
Michel DuronSubject: Java Built-in processor no longer working since upgrade to Enterprise 2008 R2
Author: Michel Duron
Date: 26 May 2008 02:36 PM
Thank you Alberto for the clarification.

For 1.5, it picked up 1.5.0_03.

I checked with update 15 of 1.5 (the current one) has the same problem plus additional ones elsewhere.

And 1.6.0_03 and 1.6.0_06 also do not work, with results consistent with 1.5.0_15, i.e. the node context within the for-each look is erroneously one level above where it should be. Go figure...

Right now, our production environment uses 1.4.2 so this is not a problem as of yet.

Anyhow, I was able to resolve the problem finally with 1.6 (probably would work with 1.5 as well) by using the java "Endorsed Standards Override Mechanism" and copying the latest Xalan and Xerces jars (from xml.apache.org) in the "C:\Program Files\Java\jre1.6.0_06\lib\endorsed" folder. After that, everything is good.

Thanks again for the help.

Michel


 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 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.