Hi,
I am converting names in a schema to new names in another schema.
I have 3 schemas, one imports the next which imports the last. Each has their own namespace and elementFormDefault is qualified.
Here is head of the source schema:
Code:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified"
xmlns="http://../nmitables"
xmlns:nmiTable="http://../nmitable">
<xs:import namespace="http://../nmitable" schemaLocation="nmi-Table.xsd"></xs:import>
and here is what get's written to the result:
Code:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xs:import namespace="http://../nmitable"
schemaLocation="nmi-Table.xsd"/>
It's close, but missing some important namespace declarations, namely xmlns="http://../nmitables" and xmlns:nmiTable="http://../nmitable". The xmlns:xs="http://.../XMLSchema" declaration seems to have copied just fine.
The nmiTable prefix is used in the body of the result schema.
But I cannot figure out how to get the declarations written there as well.
Most of the work is accomplished with a recursive copy template as defined in "XSLT 2.0" 3rd Edition by Mr. Kay, and the liberal use of <apply-templates/> throughout the script.
I am using OxygenXML 11.2 with Saxon-EE 9.2.0.6
What important piece did I forget?