You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by sa...@ca.ibm.com on 2002/02/18 23:33:10 UTC

[Xerces-2] Line/column numbers are available for schema errors!!!

Hi folks,

We've all seen so many complains like "Why the location information is for
the instance document, when the error occurs in the schema document?" and
"Why dom.ASBuilder always gives -1;-1 as the error location?" Now we can
put an end it: proper line/column numbers are available for schema errors!

So please try it out, and let us know any further problem you encounter.
(CVS extraction is already updated; jar files will be available tomorrow at
http://gump.covalent.net/jars/latest/xml-xerces2/.)

Cheers,
Sandy Gao
Software Developer, IBM Canada
(1-905) 413-3255
sandygao@ca.ibm.com


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: [Xerces-2] Line/column numbers are available for schema errors!!!

Posted by John Utz <ut...@singingfish.com>.
hi sandy!

i am so pleasantly surprised!

On Mon, 18 Feb 2002 sandygao@ca.ibm.com wrote:

> Hi folks,
> 
> We've all seen so many complains like "Why the location information is for
> the instance document, when the error occurs in the schema document?" and
> "Why dom.ASBuilder always gives -1;-1 as the error location?" Now we can
> put an end it: proper line/column numbers are available for schema errors!
> 
> So please try it out, and let us know any further problem you encounter.
> (CVS extraction is already updated; jar files will be available tomorrow at
> http://gump.covalent.net/jars/latest/xml-xerces2/.)

ok, here's an error and a schema, i am curious as to why it picked the
line/col that it did ( and yes, i am still fiddling with UPA errors :-) :

bash-2.04$ java dom.ASBuilder -f -a Alt4.xsd             
[Error] Alt4.xsd:8:22: cos-nonambig: ("":A) and ("":A){0-1} (or elements
from their substitution group) violate "Unique Particle Attribution".

<?xml version = "1.0" encoding = "UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">

  <xsd:element name='A' type='xsd:anyType'/>
  <xsd:element name='B' type='xsd:anyType'/>

  <xsd:element name='seqAB'>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:group ref='seqABgroup' minOccurs='0' maxOccurs='unbounded'/>
        <xsd:element ref='A' minOccurs='0'/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <xsd:group name='seqABgroup'>
    <xsd:sequence>
        <xsd:element ref='A'/>
        <xsd:element ref='B'/>
    </xsd:sequence>
  </xsd:group>

</xsd:schema>



> Cheers,
> Sandy Gao
> Software Developer, IBM Canada
> (1-905) 413-3255
> sandygao@ca.ibm.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org


Re: [Xerces-2] Line/column numbers are available for schema errors!!!

Posted by John Utz <ut...@singingfish.com>.
hi sandy!

i am so pleasantly surprised!

On Mon, 18 Feb 2002 sandygao@ca.ibm.com wrote:

> Hi folks,
> 
> We've all seen so many complains like "Why the location information is for
> the instance document, when the error occurs in the schema document?" and
> "Why dom.ASBuilder always gives -1;-1 as the error location?" Now we can
> put an end it: proper line/column numbers are available for schema errors!
> 
> So please try it out, and let us know any further problem you encounter.
> (CVS extraction is already updated; jar files will be available tomorrow at
> http://gump.covalent.net/jars/latest/xml-xerces2/.)

ok, here's an error and a schema, i am curious as to why it picked the
line/col that it did ( and yes, i am still fiddling with UPA errors :-) :

bash-2.04$ java dom.ASBuilder -f -a Alt4.xsd             
[Error] Alt4.xsd:8:22: cos-nonambig: ("":A) and ("":A){0-1} (or elements
from their substitution group) violate "Unique Particle Attribution".

<?xml version = "1.0" encoding = "UTF-8"?>
<xsd:schema xmlns:xsd = "http://www.w3.org/2001/XMLSchema">

  <xsd:element name='A' type='xsd:anyType'/>
  <xsd:element name='B' type='xsd:anyType'/>

  <xsd:element name='seqAB'>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:group ref='seqABgroup' minOccurs='0' maxOccurs='unbounded'/>
        <xsd:element ref='A' minOccurs='0'/>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>

  <xsd:group name='seqABgroup'>
    <xsd:sequence>
        <xsd:element ref='A'/>
        <xsd:element ref='B'/>
    </xsd:sequence>
  </xsd:group>

</xsd:schema>



> Cheers,
> Sandy Gao
> Software Developer, IBM Canada
> (1-905) 413-3255
> sandygao@ca.ibm.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-user-help@xml.apache.org
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-user-help@xml.apache.org