[xquery-talk] someone who has stylus studio

Tony Lavinio xml1 at lavinio.net
Sun Feb 12 23:05:38 PST 2006


On 02-12-2006 2:39 PM, fatma helmy wrote:

 > i got this code , it does not work on stylus studio
 > xquery but works on other processor , can any one has
 > stylus studio run it and tell me whether it gives
 > error or not

Running this code on the internal engine of Stylus Studio
produces the same output for me as running it on Saxon 8.6.1,
and neither produces an error message (note that Stylus Studio
includes Saxon 8.6.1 -B and -SA).

I used the current release that is available on our website
for free evaluation at http://www.stylusstudio.com/xml_download.html

Perhaps you are running an old version of Stylus Studio
which supports an older edition of XQuery?

Since you didn't say what the error is, it's hard to help you
further, other than reminding you that we offer free support to
all users of Stylus Studio at http://www.stylusstudio.com/SSDN

> let $bookstore :=
>   <bookstore>
>     <book >
>       <title>seven years in trenton</title>
>       <price>12</price>
>     </book>
>     <book >
>       <title> history of trenton</title>
>       <price> 55</price>
>     </book>
>     <book >
>       <title> trenton today, trenton tomorrow 
> </title>  
>       <price> 55</price>
>       <author> </author>
>     </book>
>   </bookstore>
>   
> for $path in
> ("bookstore/book/title","bookstore/book/price",
> "bookstore/book/author")
> let $leafs :=
> $bookstore//text()[string-join(ancestor-or-self::element()/node(),'/')
> eq $path]
> return
>   <attr-per-path path='{$path}'>{
>     for $val in distinct-values($leafs)  
>     return <value-per-path value='{$val}'
> count='{count($leafs[. eq
> $val])}'/>
>   }</attr-per-path>

-- 
Sincerely,
Tony Lavinio
Stylus Studio Principal Software Architect
http://www.stylusstudio.com/


More information about the talk mailing list