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 (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
- XQuery Help and Discussion (2016)
-> - Issue with Processing Instruct... (1)
-> + problem converting json to XML... (2)
-> + Problem base64 decoding string... (3)
-> + Problems posting multipart for... (5)
-> + trouble with download of price... (2)
-> + Problem with http-post not bei... (3)
-> + path problem, xps_file:writeAl... (9)
-> + Xquery update support? (2)
-> + problem with Stylus studio try... (5)
-> + adding dtd reference to xml ou... (4)
-> + xquery escaping ambarsand when... (3)
-> + Whitespace problem when return... (5)
-> + Problem with namespace prefix ... (5)
-> - Sending via SFTP returns unexp... (1)
-> + Query and Sftp clent (4)
-> + xquery and try - catch (3)
-> + Query + ddtek:http-post optio... (5)
-> + Example files referenced in do... (3)
-> + Automatic Error Detection and ... (3)
-> + Working with result of ddtek:h... (2)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
Hans-Juergen RennauSubject: copy-namespaces mode
Author: Hans-Juergen Rennau
Date: 01 Nov 2006 07:26 PM
Hello,

does the stylus XQuery processor implement the copy-namespaces mode strictly according to the W3C recommendation? It seems to me - not quite, at least as far as document constructors are concerned. The query

declare copy-namespaces no-preserve, inherit;
document {
<a xmlns:ns1="example.ns1">
<ns1:b>bla1</ns1:b>
<ns1:b>bla2</ns1:b>
</a>
}

should produce a result in which <a> does not have any in-scope namespaces (thanks to "no-preserve"). However, I get this:

<a xmlns:ns1="example.ns1">
<ns1:b>bla1</ns1:b>
<ns1:b>bla2</ns1:b>
</a>

Or is this to be explained by a serialization process which strives to place namespace declaration attributes intelligently, though not warranted by the actual in-scope namespaces?

The example looks strained, but I want to know exactly what the processor does, rather than guess.

Thank you for information -
Hans-Juergen Rennau

Postnext
(Deleted User) Subject: Re: copy-namespaces mode
Author: (Deleted User)
Date: 02 Nov 2006 06:00 AM
Hi Hans-Juergen,
it looks you have found a bug in the XQuery processor: the
construction of document nodes ignores the copy-namespace directive.
You will get the same results of Saxon if you wrap that node in
another element, e.g.

declare copy-namespaces no-preserve, inherit;
document {
<root><a xmlns:ns1="example.ns1">
<ns1:b>bla1</ns1:b>
<ns1:b>bla2</ns1:b>
</a></root>
}

The bug will be fixed in the next update of Stylus.

Thanks for reporting this,
Alberto

Postnext
Hans-Juergen RennauSubject: copy-namespaces mode
Author: Hans-Juergen Rennau
Date: 05 Nov 2006 06:27 PM
Hello Alberto,

thank you very much for the prompt information!

Unfortunately, I did not quite understand your remark about Saxon, related to the example you gave. At any rate, trying out your example with Saxon (as well as with the built-in processor), I got the correct results, or so it seemed to me. If you wanted to point out something else, it would be kind to let me know.

Kind regards -
Hans-Juergen


Postnext
(Deleted User) Subject: copy-namespaces mode
Author: (Deleted User)
Date: 06 Nov 2006 03:14 AM
Hi Hans-Juergen,
I'm sorry my remark was not clear; I was trying to say that both processors (Stylus and Saxon) return the same result if the <a> element is a children of another element, instead of a children of a document node.
Alternatively, it means that Stylus does support the copy-namespace property, but there was a bug when document nodes were involved.

Hope this helps,
Alberto

Posttop
Hans-Juergen RennauSubject: copy-namespaces mode
Author: Hans-Juergen Rennau
Date: 10 Nov 2006 04:06 PM
Thank you, Alberto!

Hans-Juergen

   
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.