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 4174 - [UPD] Revalidation and non-globally defined elements
Summary: [UPD] Revalidation and non-globally defined elements
Status: CLOSED WONTFIX
Alias: None
Product: XPath / XQuery / XSLT
Classification: Unclassified
Component: Update Facility (show other bugs)
Version: Working drafts
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-09 18:47 UTC by John Snelson
Modified: 2007-01-30 20:48 UTC (History)
0 users

See Also:


Attachments

Description John Snelson 2007-01-09 18:47:24 UTC
In section 3.2.3 of the XQuery Update specification, revalidation is defined in terms of the XQuery "validate" expression. I understand why the specification does this, but it seems like this could be a problem since "validate" can only validate an element which has a globally defined schema element for it. This effectively means that with a revalidation mode of "strict", you could not successfully modify any element that didn't have a globally defined schema element for it.

Would there be any merit in storing the original type of the element when upd:setToUntyped() is called, and using that somehow for validation?
Comment 1 Jonathan Robie 2007-01-30 15:44:24 UTC
Hi John,

On behalf of the XML Query Working Group, I'd like to thank you for this comment, which generated a rather long and interesting discussion. In the end, we decided to make no change for the following reasons:

- If we keep the original type of the element then we encounter some difficult corner cases; for instance, do we keep that type if the element is renamed?

- Local types are not designed for use in root level elements. Arguably, the schema itself identifies which types should be allowed at the root level.

- There is an easy workaround. Although you can not do a transform in strict mode to create elements with local types at the top level, you can certainly do this in other validation modes, and you can certainly validate the result as long as the query result places all locally declared types in a context where they are allowed to exist in a validated document.

So we do not feel this needs to be fixed.