On 11/02/2011 05:20 PM, Gregg Reynolds wrote:
> ...
>>> On windows, I get xml.xsd errors (duplicate attributes). The DDI
>>> distro contains xsd files for xhtml; three of those files contain:
>>>
>>> <xs:import namespace="http://www.w3.org/XML/1998/namespace"
>>> schemaLocation="../xml.xsd">
>>>
>>> Changing ../xml.xsd to xml.xsd fixed the problem, but I'd like to
>>> handle it in an xml catalog so I don't have to edit the distro files.
>>> Tried a bunch of stuff but couldn't get it to work; any suggestions?
> ...
>> [2] I don't see why specifying:
>>
>> <uri name="../xml.xsd" uri="COPY_OF_xml.xsd_RELATIVE_TO_YOUR_CATALOG" />
>>
>> in an XML catalog would not work.
>
> The lookup seems to work, based on the catalog lookup log, but I can't
> tell from the log which actual file gets loaded (the message is just
> "resolveURI(xml.xsd)", but we have three xml.xsd files), and I always
> get this error message for xml:lang etc. when using ../xml.xsd for the
> schemaLocation::
>
> * file:/h:/xml/schema/DDI_3_1/XMLSchema/instance.xsd:43:40: duplicate
> attribute declaration "xml:base" [sch-props-correct.2]
>
> Ditto for xml:lang, xml:space, and xml:specialAttrs
>
> I get this no matter what I do in the catalog, e.g.
>
> <!--<uri name="http://www.w3.org/XML/1998/namespace"
> uri="file:///h:/xml/schema/DDI_3_1/XMLSchema/xml.xsd"/> -->
> <!--<uri name="xml.xsd" uri="XMLSchema/xml.xsd"/> -->
> <uri name="xml.xsd"
> uri="file:///D:/opt/xxe-perso-5_0_0/addon/config/common/xsd/xml.xsd"/>
> <uri name="../xml.xsd"
> uri="file:///D:/opt/xxe-perso-5_0_0/addon/config/common/xsd/xml.xsd"/>
> <!--<uri name="xml.xsd"
> uri="file:///D:/opt/xxe-perso-5_0_0/addon/config/dita/schema/v1.1/xsd/xml.xsd"/>
> -->
> <!--<uri name="../xml.xsd" uri="XMLSchema/xml.xsd"/> -->
> <!--<uri name="xml.xsd" uri="XMLSchema/xml.xsd"/> -->
> <!--<uri name="../xml.xsd" uri="xml.xsd"/> -->
>
> There are three xml.xsd files here, one for xxe, one for dita, one for
> ddi, so I tried mapping all refs to a single xml.xsd, still got the
> error. Only way that works is to use xml.xsd instead of ../xml.xsd.
>
I've downloaded DDI_3_1_2009-10-18_Documentation_XMLSchema.zip and tried
to validate instance.xsd by running xmltool (faster than starting XXE)
---
xmltool validate -s instance.xsd
---
I immediately got the same "duplicate attribute declaration "xml:base"
[sch-props-correct.2]" errors as you.
These errors are caused by the fact that our DITA XML catalog contains:
---
<group xml:base="schema/v1.2/base/xsd/">
...
<uri name="xml.xsd"
uri="xml.xsd"/>
...
---
Therefore XXE thinks that you have 2 conflicting xml.xsd:
[1] <XXE_install_dir/>addon/config/dita/schema/v1.2/base/xsd/xml.xsd
[2] DDI_3_1_2009-10-18_Documentation_XMLSchema/XMLSchema/XHTML/../xml.xsd
There is no real bug we can fix here.
Workaround [a] (tested)
-----------------------
Uninstall DITA using "Options|Install Add-ons" if you don't need DITA.
Workaround [b] (tested)
-----------------------
Add this entry to your XML catalog:
---
<uri name="../xml.xsd"
uri="file:///D:/opt/xxe-perso-5_0_0/addon/config/dita/schema/v1.2/base/xsd/xml.xsd"/>
---
Workaround [c] (not tested)
---------------------------
Add *both* the following entries to your XML catalog:
---
<uri name="xml.xsd"
uri="XMLSchema/xml.xsd"/>
<uri name="../xml.xsd"
uri="XMLSchema/xml.xsd"/>
---
Really sorry for all this horrible complexity.
>>
>> [2] Please start XXE with -DXXE_CATALOG_RESOLVER_VERBOSITY=10
>>
>> See
>> http://www.xmlmind.com/xmleditor/_distrib/doc/help/system_properties.html
>
> Thanks, hadn't seen that. FYI when I tried this using xxe.jstart on
> windows, it didn't work; I had to use xxe.bat.
>
The following xxe.jstart works fine for me. Notice that, in addition to
adding "-DXXE_CATALOG_RESOLVER_VERBOSITY=10", I've replaced "javaw.exe"
by "java.exe" ("javaw.exe" has no console).
---
start jre\bin\java.exe
-Xss4m -Xmx512m
-DXXE_CATALOG_RESOLVER_VERBOSITY=10
-DXXE_GUI="%XXE_GUI%"
-DXXE_ADDON_PATH="%XXE_ADDON_PATH%"
-DXXE_USER_PREFERENCES="%XXE_USER_PREFERENCES%"
-classpath
..\class;xxe.jar;xerces.jar;resolver.jar;relaxng.jar;xsc.jar;jh.jar;saxon.jar;saxon9.jar;xxe_help.jar
com.xmlmind.xmleditapp.start.Start
---
--
XMLmind XML Editor Support List
[email protected]
http://www.xmlmind.com/mailman/listinfo/xmleditor-support