This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 3051 - [Ser] undeclare-prefixes=no unspecified
Summary: [Ser] undeclare-prefixes=no unspecified
Status: CLOSED FIXED
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Serialization 1.0 (show other bugs)
Version: Candidate Recommendation
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Scott Boag
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-27 10:44 UTC by David Carlisle
Modified: 2006-04-25 16:24 UTC (History)
0 users

See Also:


Attachments

Description David Carlisle 2006-03-27 10:44:57 UTC
http://www.w3.org/TR/xslt-xquery-serialization/#xml-undeclare-NS

only specifies the behaviour if undeclare-prefixes=yes. The behaviour if this parameter is set to no is unspecified.

One interpretation is that if it is no, XML Namespaces 1.1 prefix undeclarations should not be used. However if the version parameter is greater than 1.0, another interpretation would be that namespace undeclarations MAY or MAY NOT be used, depending on the implementation, as this is unspecified.

I think that it would be least confusing if the undeclare-prefixes section specified that if the parameter is set to no then prefix undeclarations may not be used.

This report is prompted by Constr-namespace-13 in the XQuery test suite which has an expected result file using prefix undeclarations even though the test suite is specified as using serialisation options including undeclare-prefixes=no  
see bug #3409

David
Comment 1 David Carlisle 2006-04-04 09:56:25 UTC
I wrote: see bug #3409
sorry, I meant bug #3049
Comment 2 Joanne Tong 2006-04-24 20:39:10 UTC
I suggest the following modifications to existing text in section 5.1.7 (XML Output Method: the undeclare-prefixes Parameter):

The Data Model allows an element node that binds a non-empty prefix to have a child element node that does not bind that same prefix. In Namespaces in XML 1.1 ([XML Names 1.1]), this can be represented accurately by undeclaring <remove>namespaces</remove> <new>prefixes</new>. <new>For the undeclaring prefix of the child element node,  if</new> the undeclare-prefixes parameter has the value yes, the output method is XML <new> or XHTML</new>, and the version parameter value is greater than 1.0, the serializer MUST undeclare <remove>namespaces</remove> <new>its namespace</new>.  <new>If the undeclare-prefixes parameter has the value no and the output method is XML or XHTML, then undeclaring prefixes MUST NOT occur. </new>

In Namespaces in XML <new>1.0<new> ([XML Names]), <remove>namespace</remove> <new>prefix</new> undeclaration is not possible. If the output method is XML <new> or XHTML</new>, the value of the undeclare-prefixes parameter is yes, and the value of the version parameter is 1.0, a serialization error [err:SEPM0010] results; the serializer MUST signal the error.

(not yet approved by WG)

thanks,
Joanne Tong
Comment 3 Joanne Tong 2006-04-25 16:09:45 UTC
The XSL and XQuery working groups approved the suggested resolution in message #2 on the April 25th telcon.  Please post a response within one week if this resolution is unsatisfactory.  Otherwise, please close this bug.  Thank-you for posting this comment.  

Joanne Tong
(on behalf of XSL and XQuery WG)
Comment 4 David Carlisle 2006-04-25 16:24:33 UTC
Thanks, I approve of the sentiment of the proposed resolution but was going to comment (before your followup saying the text was WG approved) that perhaps
it could be reworded slightly, in particular the last phrase of the first para

then undeclaring prefixes MUST NOT occur. 

reads slightly strangely to me. Perhaps:
then the  undeclaration of prefixes MUST NOT occur. 

In any case this is minor editorial wordsmithing and I leave it to your discretion, and am closing the report.