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
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Klarinda GWSubject: Bug in Stylus XQuery Mapper (the order of how the elements are added/removed affect the XQuery source generated)
Author: Klarinda GW
Date: 18 Apr 2006 02:28 AM
Hi, I found a little bug in Stylus XQuery Mapper.

The order of how the elements are added/removed affect the XQuery source generated, such as the binding of the variables, for example “add A, add B, delete A” and “add B” may yield different result.

Let's take for example W3C Query 1.1.9.5 Q5 (http://www.w3.org/TR/xquery-use-cases/#xmp-queries-results-q5)

- Add bib/book/title to FOR and add reviews/entry/title to FOR (Stylus will generate $title and $title1)

- Add conditional block = where the inputs are bib/book/title and reviews/entry/title and the output is to WHERE (Stylus will generate $title = $title1)

- Link the FLWOR output to book-with-prices

- Create Copy Link bib/book/title to child of “book-with-prices” (Stylus will generate <book...> $title </book...>)

Look at first figure

- After that delete edges between bib/book/title--FOR and reviews/entry/title--FOR and replace them with bib/book--FOR and reviews/entry--FOR (Stylus will generate “for $book in... , $entry in... where $title=$title1 return <book...>$title</book...>"; Note that variable $title and $title1 do not exist as there is no binding for $title and $title1

Look at second figure


ImageStylus_Q5_error01.jpg
Bug step 01

ImageStylus_Q5_error02.jpg
Bug step 02

Posttop
Minollo I.Subject: Bug in Stylus XQuery Mapper (the order of how the elements are added/removed affect the XQuery source generated)
Author: Minollo I.
Date: 18 Apr 2006 09:03 AM
This is a current limitation of the XQuery mapper implementation; you will have to remove/recreate the "where" and "copy" links to get a fully updated XQuery.

Minollo

 
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.