qiuwei / jing-trang

Automatically exported from code.google.com/p/jing-trang
Other
1 stars 1 forks source link

Namespaces are reported as competing when they are not #86

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This is caused by a wrong rewrite in
http://code.google.com/p/jing-trang/source/detail?r=2157 where line 93 was
added with a logical or instead of a logical and:

  || matchPrefix(parts[parts.length - 1], otherParts[otherParts.length - 1]);
instead of 
  && matchPrefix(parts[parts.length - 1], otherParts[otherParts.length - 1]);

The result is that on an NVDL script like

<?xml version="1.0" encoding="UTF-8"?>
<rules xmlns="http://purl.oclc.org/dsdl/nvdl/ns/structure/1.0">
    <namespace ns="http://example.com/officeDocument/2006/*">
        <attach/>
    </namespace>
    <namespace ns="http://something.else/*">
        <attach/>
    </namespace>
</rules>

we get a false error:

/Users/george/Documents/workspace/jing/build/test.nvdl:6:45: error: rule
for elements from namespace "http://something.else/*" already specified in
this mode

Original issue reported on code.google.com by georgebina76 on 20 Sep 2009 at 8:20

GoogleCodeExporter commented 8 years ago
Fixed in r2332.

Original comment by georgebina76 on 20 Sep 2009 at 8:26