This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
The expected output files copynamespace-3.txt, copynamespace-4.txt, copynamespace-5.txt, and copynamespace-6.txt (for tests copynamespace-3, copynamespace-4, copynamespace-5, and copynamespace-6) contain a spurious spacr before and/or after the actual expected output. The compare mode is "Text" for these files, so they should not have any extra spaces.
Per: Thanks for the comment. I removed the spurious characters from the tests results. Thanks, Carmelo
Could you please explain why this space is spurious. For example, in copynamespaces-4 (below) the in-scope-prefixes($new//child::*) should return a sequence of three strings ("xml", "foo", ""). Either: 1. I'm wrong and the result of in-scope-prefixes should only be ("xml", "foo"). 2. I'm right but the space should be dropped for some reason (why?) - if so, the test doesn't discriminate between the results ("xml", "foo") and ("xml", "foo", ""). declare namespace foo = "http://example.org"; declare copy-namespaces preserve,inherit; (: insert-start :) declare variable $input-context1 external; (: insert-end :) let $existingElement := <existingElement xmlns="www.existingnamespace.com">{"Exi sting Content"}</existingElement> let $new := <foo:newElement xmlns = "www.mynamespace.com">{$existingElement}</fo o:newElement> for $var in (in-scope-prefixes($new//child::*)) order by $var ascending return $var
I think you're right, but it's been over a month and I don't remember clearly. I do remember looking at various testcase, thinking some should start with a space and some should not. If one wanted to test just in-scope-namespaces without at the same time testing serialization one could replace $var by (say) concat("[",$var,"]"). Of course one does want to test serialization, but perhaps those should be separate tests.
I took a look at these testcases, as well as a 3 other copynamespace-X that are (I believe) incorrectly failing. I believe the result for the following should include the empty prefix, so they should start with a space: copynamespace-3 - should return " xml" copynamespace-4 - should be " foo xml" copynamespace-5 - should be " foo xml" copynamespace-6 - should be " foo xml" In copynamespace-9 I believe 'newNamespace' should be inherited, so should be in the result. I.e.: copynamespace-9 - should be "newNamespace xml" For copynamespace-16, I believe when $element2 is copied into the <element3>constructor, the newly copied nodes *including the copied element1 node* inherit the namespace3 binding. So, according to my reading of the specification: copynamespace-16 - should be "namespace3 xml" I believe the same argument applies here: copynamespace-20 - should be "namespace3 xml" Hopefully, some experts can confirm or disconfirm my readings.
Constr-cont-nsmode-2 seems similar to opynamespace-9,c opynamespace-16, and copynamespace-20: It should have the inherited namespace: Constr-cont-nsmode-2 - should return "<z xmlns:inherit="inherit"/>"
I concur with comment #4 that copynamespace-3 - should return " xml" copynamespace-4 - should be " foo xml" copynamespace-5 - should be " foo xml" copynamespace-6 - should be " foo xml" I agree with Per about the results of copynamespace-9, 16, and 20: in each case the result advocated by Per is the same as the result in CVS, so I'm not sure where the issue lies.
(In reply to comment #6) > I agree with Per about the results of copynamespace-9, 16, and 20: in each case > the result advocated by Per is the same as the result in CVS, so I'm not sure > where the issue lies. I think I somehow confused the expected and actual outputs. My apologies. Anyway, they're now the same. :-)
I've made the changes requested in comment #4. Please close this bug report if you agree with this resolution.
(In reply to comment #8) > I've made the changes requested in comment #4. > Please close this bug report if you agree with this resolution. Thanks!