This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
There does not seem to be any test coverage for upd:propageNamespace. Here are some initial ideas for what the tests should cover: (1) on/off depending if the copy-namespaces mode is inherit/no-inherit (2) each primitive that can mark namespaces for propagation (3) conditions where some namespaces are blocked by existing namespaces as you propagate down the tree (4) propagating the default element/type namespace As there are about 9 primitives that can mark a node, I would expect roughly 15 tests. In the catalog, they would fit nicely in Minimal Conformance -> XML Query Update Operations -> XQuery Update Routines -> upd:propagateNamespace I can write/submit these tests if it is helpful.
upd:propagateNamespace was added in response to Bug #5631. I found some of my notes, indicating that we had test cases for each situation in which upd:propageNamespace was to be invoked. My notes say: The places where namespace bindings are marked for propagation are: * on upd:insertBefore and upd:insertAfter all the namespace bindings of parent($target) are marked for propagation id-insert-expr-084 - before id-insert-expr-085 - after * on upd:insertInto, updInsertIntoAsFirst, and upd:insertIntoAsLast, all the namespace bindings of $target are marked for propagation id-insert-expr-081 - insert into id-insert-expr-082 - as first id-insert-expr-083 - as last * on upd:insertAttributes, any namespace bindings created in step 3b are marked for propagation id-insert-expr-086 * on upd:replaceNode, any namespace bindings created in step 4b are marked for propagation id-replace-expr-045 * on upd:rename, any namespace bindings created in step 1d or 2e is marked for propagation id-rename-expr-033 - rename element id-rename-expr-034 - rename attribute I'm hoping that these test cases adequately test upd:propagateNamespace. By the way, offers to write new test cases are always appreciated.
Andrew, Our implementation does not fail any tests related to upd:propagateNamespaces yet we have not implemented it yet. I have looked at each of the tests in your notes. Each seems to allow result "a" or result "b" where result "b" is empty and allows the test to pass if namespaces are not propagated. For example, consider test "id-insert-expr-084" where the result of the test can be either "http://www.example.com/myco" or empty. This implies it is ok if the inserted <dependents/> element does not get the namespace definition of its parent, myco:employee. In other words, these tests imply that namespace propagation is optional even when the copy-namespaces mode specifies inherit. However, my impression was that it is not optional (e.g. all of the "result b" options in the tests you mentioned are not valid). Could you please clarify? Other than that, these tests would seem to cover item (2) that I mentioned above. Thanks, Josh
I wrote these test cases in December 2008. The propagation of namespaces was not specified in the Update Facility CR at that time, and so I allowed two results. The issue was resolved by the WG in Jan. 2009 in Bug #5631. Apparently, I never revisisted these test cases. I've eliminated the "b" results in id-insert-expr-081 through -086, id-replace-expr-045 and id-rename-expr-033/-034.
Created attachment 850 [details] additional tests
Great. I have attached a few additional tests that I wrote and you are welcome to include them in the XQUTS (or not). I made a "no-inherit" version of each of your tests which covers (1) from the bug description. I also made propagateNamespaces01-06 which cover (3) and (4) from the bug description. Thanks!
I've added the test cases that you provided in comment #4. Please close this bug report if you are happy with this resolution.
I took a look at your change. The catalog additions look good but I think you forgot to add the corresponding query files for propagateNamespaces01-06 to CVS.
Actually, it is the expected result files I think are missing, not the query files.
Apologies. These expected result files have been added and committed.
Works now. Thanks!