kszbcss / xspec

Private backup of the xspec project at google code, as google code is going to disappear.
MIT License
1 stars 0 forks source link

Nested namespace changes get stripped in the result document #70

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When you have elements of different namespaces nested in an expect, ie:

            <detail xmlns="http://ns.electronichealth.net.au/ci/requirements/information">
                <div xmlns="http://ns.electronichealth.net.au/ci/requirements/information/xhtml2"><p style="text-align: left;">The document SHALL contain the individual's date of birth or approximated date of birth.</p><ol>
                    <li style="text-align: left;">one,</li>
                    <li style="text-align: left;">two,</li>
                    <li style="text-align: left;">three</li>
                </ol><br/></div>
            </detail>

If the namespace of the result doesn't match, XSPec will report them so, but it 
strips the namespace from the resulting output, showing the two results which 
are the same.

Result:
<detail xmlns="http://ns.electronichealth.net.au/ci/requirements/information"
         xmlns:pkg="http://expath.org/ns/pkg"
         xmlns:impl="urn:x-xspec:compile:xslt:impl"
         xmlns:ci-model="urn:xml-gov-au:nehta:ci:model"
         xmlns:xi="http://www.w3.org/2001/XInclude"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:dbk="http://docbook.org/ns/docbook"
         xmlns:ci-common="http://ns.electronichealth.net.au/ci/common"
         xmlns:ci-ir="http://ns.electronichealth.net.au/ci/requirements/information"
         xmlns:ci-xhtml="http://ns.electronichealth.net.au/ci/requirements/information/xhtml"
         xmlns:reqif="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"
         xmlns:functx="http://www.functx.com"
         xmlns:xhtml="http://www.w3.org/1999/xhtml"
         xmlns:xlink="http://www.w3.org/1999/xlink">
   <div>
      <p style="text-align: left;">The document SHALL contain the individual's date of birth or approximated date of birth.</p>
      <ol>
         <li style="text-align: left;">one,</li>
         <li style="text-align: left;">two,</li>
         <li style="text-align: left;">three</li>
      </ol>
      <br />
   </div>
</detail>

Expecting:
<detail xmlns="http://ns.electronichealth.net.au/ci/requirements/information"
         xmlns:pkg="http://expath.org/ns/pkg"
         xmlns:impl="urn:x-xspec:compile:xslt:impl"
         xmlns:ci-model="urn:xml-gov-au:nehta:ci:model"
         xmlns:xi="http://www.w3.org/2001/XInclude"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xmlns:dbk="http://docbook.org/ns/docbook"
         xmlns:ci-common="http://ns.electronichealth.net.au/ci/common"
         xmlns:ci-ir="http://ns.electronichealth.net.au/ci/requirements/information"
         xmlns:ci-xhtml="http://ns.electronichealth.net.au/ci/requirements/information/xhtml"
         xmlns:reqif="http://www.omg.org/spec/ReqIF/20110401/reqif.xsd"
         xmlns:functx="http://www.functx.com"
         xmlns:xhtml="http://www.w3.org/1999/xhtml"
         xmlns:xlink="http://www.w3.org/1999/xlink">
   <div>
      <p style="text-align: left;">The document SHALL contain the individual's date of birth or approximated date of birth.</p>
      <ol>
         <li style="text-align: left;">one,</li>
         <li style="text-align: left;">two,</li>
         <li style="text-align: left;">three</li>
      </ol>
      <br />
   </div>
</detail>

Notice how the namespace on the <div> is missing.

Original issue reported on code.google.com by vpereto...@gmail.com on 17 Sep 2014 at 6:47