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
Kurt WaldSubject: Xpath Query Editor
Author: Kurt Wald
Date: 20 Jun 2006 11:03 AM
in Stylus Studio 2006 Rel 3 Enterprise the Xpath Query Editor seems to have replaced the Xpath expression execution Box in the XML editor window.

With this box it was possible to run an xpath expression relative to the element selected in the xml tree. Addidionally it was possible to select xpath version 1.0/2.0 for the query.

This doesn't work with the Xpath Query Editor. Are there any hidden options to get the old behaviour (it is still described in the help system) with release 3 or is it possible to get it with te Xpath query Editor?

Postnext
Minollo I.Subject: Xpath Query Editor
Author: Minollo I.
Date: 20 Jun 2006 11:49 AM
About support of XPath 1.0, that has been discontinued; as XPath 2.0 is able to evaluate XPath 1.0 (with very few differences in the results of some corner cases), we have decided that switching to XPath 2.0 would have kept things simple while guaranteeing flexibility.

About context against which the query is run, we are revising the mechanism to work smoothly across editors (text, tree and grid), and this will become available in a future maintenance update in the next few weeks. Older Stylus Studio releases allowed use of context only when working with tree or grid editors.

Postnext
Geert BormansSubject: Xpath Query Editor
Author: Geert Bormans
Date: 12 Jul 2006 04:10 AM
Let me tell you why I am not so happy with this decission.
I strongly believe the "cornercases" are more common than you make it look like.

Here is a simple (yet very common) pattern for finding the maximum value of bar in a single XPath

<?xml version="1.0" encoding="UTF-8"?>
<foo>
<bar>8</bar>
<bar>5</bar>
<bar>2</bar>
<bar>15</bar>
<bar>2</bar>
</foo>

/foo/bar[. >= preceding-sibling::bar][. >= following-sibling::bar][1]

since XPath 2.0 is a lot trickier with casting of types,
I need to write this as follows

/foo/bar[number(text()) >= preceding-sibling::bar][number(text()) >= following-sibling::bar][1]

Stylus is a development environment.
Lots of development out there is for XSLT 1 and might still be for a long time I guess.
I think it is kind of handy to be able to test XPath statements that work for use in an XSLT1, without thinking about bulletproofing it for XPath2 necessarily.

Cheers

Geert

Postnext
Minollo I.Subject: Xpath Query Editor
Author: Minollo I.
Date: 12 Jul 2006 08:23 AM
We understand the problem; we will evaluate if we can re-introduce support for a pure XPath 1.0 processor in future updates.

Posttop
Geert BormansSubject: Xpath Query Editor
Author: Geert Bormans
Date: 12 Jul 2006 08:49 AM
thanks

 
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.