Bug #3889

Updated by Michael Kay over 5 years ago


 When an element node is copied from a TinyTree, and the element is in a namespace but has a descendant that is in no namespace, and the node is copied to another tree where a default namespace is in scope, then no namespace undeclaration is added to the target tree and the no-namespace element therefore ends up incorrectly being in the default namespace of the target tree. 


 an xslt script pricuces a document which is invalid. This is not detected, although the template states validation='strict'. Pleas see attached files. 

 I have a schema a.xsd for targetNamespace a with elementFormDefault="unqualified". It defines a global type with a header element. 

 b.xsd is imported in an schema b.xsd with targetNamespace b.xsd. There is a global b:request element defined. Valid instance is a b:request element with header as a child element from the schema a. header is in no namespace. 

 There is another schema c.xsd in the c namespace which imports b.xsd. It has a global element form which may have an optional b:request child element.    A valid instance is a form element with c as default namespace. 
 `<form xmlns="" 

 There is a simple xstl script which takes a c:form Element and adds a valid b:request element. The result should b a valid c:form element. However, when i accidentialy ust xsl:sequence instead of xsl:copy-of, the result is an invalid document, because the header element is in the default namespace c 

 Bug report: the transformation script says validation=strict, so that this error should be detected. But it is not detected. Script runs without any problems, but the result is indeed invalid. 

 This Happens with Saxon EE within Oxygen 20.1 

  Sincelery, Frank Steimke