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 (1168)
- Stylus Studio Technical Forum (14407)
-> - How do i use *.conv to process... (1)
-> - How do i use *.conv to process... (1)
-> + Not able to configure JVM in ... (5)
-> + Converting Cobol flat file to ... (2)
-> + Problem with uninstall - Windo... (2)
-> - Function current() is not reco... (6)
-> ->Function current() is not...
-> ->Function current() is not...
-> ->Function current() is not...
-> ->Function current() is not...
-> ->Function current() is not...
-> + API or web version (2)
-> + How to use Saxon for X16 on WI... (9)
-> + Error in SS X14 syntax highlig... (2)
-> + Option not available (2)
-> + XML Diff functionality and sor... (3)
-> + Convert Oagis XML file to TXT (4)
-> + DataDirect xqresultsequence is... (2)
-> - xfile Legacy file format suppo... (1)
-> + TPFDF (3)
-> + Help needed with SLSRPT - EDIF... (2)
-> - keeps crashing after I try and... (1)
-> + Can SS do this? (14)
-> - CargoImp support (1)
-> + No Preview Displayed - File is... (3)
-- [1-20] [21-40] [41-60] Next
+ Website Feedback (244)
+ XSLT Help and Discussion (7588)
+ XQuery Help and Discussion (1941)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (363)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Muly IlanSubject: Function current() is not recognized in XPath
Author: Muly Ilan
Date: 28 Nov 2017 05:00 PM
Hi,

The XPath Query Editor does not support the current() function.
See attached error message.

It's true that current() is an XSLT addition to XPath but since Stylus Studio supports XSLT I was expecting the current() function to be supported too.

Is there a workaround?

Best,

Muly

Error message

Postnext
Ivan PedruzziSubject: Function current() is not recognized in XPath
Author: Ivan Pedruzzi
Date: 28 Nov 2017 05:24 PM
As the name implies, the "XPath Query Editor" supports XPath syntax, XPath 2 to be precised.

What you are trying to accomplish with your query?


Ivan Pedruzzi
Stylus Studio Team

Postnext
Muly IlanSubject: Function current() is not recognized in XPath
Author: Muly Ilan
Date: 29 Nov 2017 03:03 PM
Hi,

I'm trying to evaluate and design XPath expressions in YANG models.
Specifically, the expressions in YANG 'When' and 'Must' statements.

Many such XPath expressions use relative format so the issue of context node and current node is important.

Example expression:
count(../../../../../protocol[action/tunnel/mac-change/mac-address!=current()])

I was hoping to use Stylus Studio for this purpose as the many free XPath evaluators out there, don't support setting the context node.

Thanks,

Muly


Postnext
Ivan PedruzziSubject: Function current() is not recognized in XPath
Author: Ivan Pedruzzi
Date: 29 Nov 2017 03:36 PM

Stylus Studio XPath query editor is context aware. If you switch to tree view, select a node and run a relative expression it will more evident.

See the attached screenshot which makes use of the "for" statement.


Does it help?

Ivan Pedruzzi
Stylus Studio Team

Postnext
Muly IlanSubject: Function current() is not recognized in XPath
Author: Muly Ilan
Date: 29 Nov 2017 03:56 PM
Yes, I checked the tree view and played around with setting the context.
This works fine.

So, it's partial help. Since I'm still missing the support of the current() function.
As you can see in my example XPath expression, current() is part of it. I cannot evaluate the expression 'as is'.

Thanks,

Muly

Posttop
Ivan PedruzziSubject: Function current() is not recognized in XPath
Author: Ivan Pedruzzi
Date: 29 Nov 2017 04:22 PM
You either did not pay attention to the screenshot or I failed understanding your goal.

1) variable $t behaves as function current().
You select which node you want as current and run a relative expression.

2) Stylus Studio feature a very powerful XSLT editor, If you need current(), why you are not writing an XSLT?

   
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.