Hi Michael,
It is really weird and it is not a well-formedness error, or at least I
cannot see it.
I can validate the identical content with an extension of *.xml without
errors, but if I rename the file to *.ixml (that triggers the
validation I am building with Xerces within my environment), I get this
strange behavior. The working validation is also Xerces based
(Eclipse/WST), but I want to get the advantages of grammar caching,
xinclude etc.
And in fact, the working validation method does not allow the
workaround for the buggy validation method like:
<xddl:column-ref name="column">
</xddl:column-ref>
Then I get the error: cvc-complex-type.2.1: Element 'xddl:column-ref'
must have no character or element information item [children], because
the type's content type is empty. This is an error that makes sense to
me.
It must be:
<xddl:column-ref
name="column"></xddl:column-ref>
or, what I want, simply:
<xddl:column-ref name="column"/>
to pass the working validation without errors, but this doesn't work
for the buggy one.
I am already thinking about to call the nearest priest and ask him to
hunt the devil out of my box ;-)
This is the complete file:
<?xml version="1.0" encoding="UTF-8"?>
<xddl:logical-group
xmlns:xddl="http://schemas.ebuconnect.com/xddl"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.ebuconnect.com/xddl xddl.xsd"
name="root">
<xddl:logical-group name="sub1">
<xddl:table name="table1">
<xddl:column name="column1" type="varchar" size="20"/>
<xddl:column name="column2" type="varchar" size="20"/>
<xddl:primary-key name="pk_table1">
<xddl:column-ref name="column1"/>
<xddl:column-ref name="column2"/>
</xddl:primary-key>
</xddl:table>
</xddl:logical-group>
<xddl:logical-group name="sub2">
<xddl:table name="table1">
<xddl:column name="column1" type="varchar" size="20"/>
<xddl:column name="column2" type="varchar" size="20"/>
<xddl:primary-key name="pk_table1">
<xddl:column-ref name="column1"/>
</xddl:primary-key>
<xddl:foreign-key name="fk_table1">
<xddl:constraint-ref contstraint="pk_table1" table="/root/sub1/table1"/>
<xddl:column-ref name="column1"/>
<xddl:column-ref name="column2"/>
</xddl:foreign-key>
</xddl:table>
</xddl:logical-group>
</xddl:logical-group>
I have some key constraints within my Schema that
enforce unique names of several elements. Not globally, but within the
scope of their parent elements and some keyref constraints to ensure
the existence of matching counterparts for some references on those
elements.
Also I am using substitution group constructs like
this:
<xs:element name="constraint" abstract="true"/>
<xs:element name="non-primary-key"
substitutionGroup="xddl:constraint" abstract="true"/>
<xs:element name="index"
substitutionGroup="xddl:non-primary-key">
<!-- ... -->
</xs:element>
<xs:element name="unique"
substitutionGroup="xddl:non-primary-key">
<!-- ... -->
</xs:element>
<xs:element name="foreign-key"
substitutionGroup="xddl:non-primary-key">
<!-- ... -->
</xs:element>
<xs:element name="table">
<xs:complexType>
<xs:sequence>
<xs:element ref="xddl:column" minOccurs="1"
maxOccurs="unbounded"/>
<xs:element ref="xddl:primary-key" minOccurs="0"
maxOccurs="1"/>
<xs:element ref="xddl:non-primary-key" minOccurs="0"
maxOccurs="unbounded"/>
</xs:sequence>
<xs:attribute name="name" type="xs:string"
use="required"/>
<!-- ... -->
<xs:attributeGroup ref="xml:specialAttrs"/>
</xs:complexType>
<!-- ... -->
</xs:element>
But all in all the Schema is neither big nor
complex, just work in progress (unfortunately not so much progress at
the moment).
Thanks for your response, any further ideas/hints/suggestions
will be very appreciated.
Regards, Stefan
Michael Glavassevich schrieb:
Hi Stefan,
Stefan Eder <stefan.eder@xxxxxxxxxxxxx> wrote on 04/18/2007 09:54:33 AM:
Hi All,
Currently I am encountering a pretty strange problem.
<xddl:column-ref name="column1"/>
brings me: The element type "xddl:column-ref" must be terminated by the
matching end-tag "</xddl:column-ref>".
This is a well-formedness error; has nothing to do with schema validation.
Presumably you're actually missing an end-tag somewhere. Can you post the
entire document?
<xddl:column-ref name="column">
</xddl:column-ref>
works fine.
Are you sure this is the only thing you changed?
Related schema spippet:
<xs:element name="column-ref">
<xs:complexType>
<xs:attribute name="name" type="xs:string" use="required"/>
</xs:complexType>
</xs:element>
Product: Xerces2 Java Parser 2.8.1
Using org.apache.xerces.parsers.XMLGrammarCachingConfiguration, one
parent for global configuration, one child to be able to supply a task
specific error reporter.
Explicit feature settings:
NAMESPACES_FEATURE true
SCHEMA_VALIDATION_FEATURE: true
DYNAMIC_VALIDATION_FEATURE: true
HONOUR_ALL_SCHEMALOCATIONS_FEATURE: true
XINCLUDE_FEATURE: true
XINCLUDE_FIXUP_BASE_URIS_FEATURE: true
XINCLUDE_FIXUP_LANGUAGE_FEATURE: true
Creating parent XMLGrammarCachingConfiguration with
org.apache.xerces.util.XMLGrammarPoolImpl and
org.apache.xerces.util.SymbolTable.
Supplying own property for ENTITY_RESOLVER_PROPERTY (parent) inherited
from org.apache.xerces.xni.parser.XMLEntityResolver.
Supplying own property for ERROR_REPORTER_PROPERTY (child) inherited
from org.apache.xerces.impl.XMLErrorReporter.
Both components are working as expected.
Any ideas/hints/suggestions?
Thanks, Stefan
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx
Thanks.
Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@xxxxxxxxxx
E-mail: mrglavas@xxxxxxxxxx
---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx
|
|
Try Searching:
servers, voip, java, networking, microsoft ...
|
|
|
|