|
Re: Unique Particle Attribution [message #46650 is a reply to message #46630] |
Wed, 02 June 2004 10:54 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
--------------574DD4982E3CFB6498A84D5F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Joachim,
The XSD model does validate this rule. The sample in org.eclipse.xsd.test/test
supports
xsd-test.bat -validate <*.xsd>
that will produce messages for all the problems in the schema. You can also
call validate() programmatically on an XSDComplexTypeDefinition to just check
it. You can even call XSDParticle.getDFA to look at the state machine itself.
Joachim Lusiardi wrote:
> Hey folks,
> is there a simple way of checking wether a schema violates this rule or not?
> Thanks for your answers in advance
> greets Joachim Lusiardi
--------------574DD4982E3CFB6498A84D5F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Joachim,
<p>The XSD model does validate this rule. The sample in org.eclipse.xsd.test/test
supports
<blockquote>xsd-test.bat -validate <*.xsd></blockquote>
that will produce messages for all the problems in the schema. You
can also call validate() programmatically on an XSDComplexTypeDefinition
to just check it. You can even call XSDParticle.getDFA to look at
the state machine itself.
<br>
<p>Joachim Lusiardi wrote:
<blockquote TYPE=CITE>Hey folks,
<br>is there a simple way of checking wether a schema violates this rule
or not?
<br>Thanks for your answers in advance
<br>greets Joachim Lusiardi</blockquote>
</html>
--------------574DD4982E3CFB6498A84D5F--
|
|
|
|
Re: Unique Particle Attribution [message #46682 is a reply to message #46667] |
Wed, 02 June 2004 12:11 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Joachim,
That's not what I see. Can you provide more details?
Joachim Lusiardi wrote:
> Ok this works, i get diagnotic messages from a schema via
> schema.validate();
> EList diags = schema.getAllDiagnostics();
> but in this EList all message appear twice. what do i do wrong?
> greets joachim
>
> Ed Merks wrote:
> > Joachim,
> >
> > The XSD model does validate this rule. The sample in
> > org.eclipse.xsd.test/test supports
> >
> > xsd-test.bat -validate <*.xsd>
> >
> > that will produce messages for all the problems in the schema. You can
> > also call validate() programmatically on an XSDComplexTypeDefinition to
> > just check it. You can even call XSDParticle.getDFA to look at the
> > state machine itself.
> >
> >
> > Joachim Lusiardi wrote:
> >
> >> Hey folks,
> >> is there a simple way of checking wether a schema violates this rule
> >> or not?
> >> Thanks for your answers in advance
> >> greets Joachim Lusiardi
> >
|
|
|
|
Re: Unique Particle Attribution [message #46786 is a reply to message #46751] |
Wed, 02 June 2004 13:46 |
Eclipse User |
|
|
|
Originally posted by: merks.ca.ibm.com
Joachim,
Each "b" overlaps with the other "b". It's hard to give good locations for these errors because
by using model group references or element references, it's possible that none of the stuff that
causes a problem actually appears nested in the complex type but rather is only referenced and
appears elsewhere.
Joachim Lusiardi wrote:
> ok i have the following XSD:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.w3.org/2001/XMLSchema
> file:/home/shing19m/bin/Exchanger%20XML%20Editor/types/XML%2 0Schema/Validation/XMLSchema.xsd ">
> <!--
> Definition eines Elements mit Verweis auf den SimpleType
> -->
> <xs:element name="Name" type="MyComplexType" />
> <!--
> Definition eines simplen Typs
> -->
> <xs:complexType name="MyComplexType">
> <!--minOccurs="2" maxOccurs="3"-->
> <xs:sequence>
> <xs:element name="a" type="xs:string" />
> <xs:choice minOccurs="1" maxOccurs="2">
> <xs:sequence>
> <xs:element name="b" type="xs:string" />
> <xs:element name="f" type="xs:string" />
> </xs:sequence>
> <xs:sequence>
> <xs:element name="b" type="xs:string" />
> <xs:element name="d" type="xs:string" />
> </xs:sequence>
> <!--
> <xs:sequence>
> <xs:element name="t3" type="xs:byte" />
> </xs:sequence>
> -->
> </xs:choice>
> </xs:sequence>
> <xs:attribute name="att" type="xs:string" />
> </xs:complexType>
> </xs:schema>
>
> and the following code here:
>
> private void validateSchema(XSDSchema schema) {
> schema.validate();
> EList diags = schema.getAllDiagnostics();
> int count = diags.size();
> for (int i = 0; i < count; i++) {
> XSDDiagnostic diag = (XSDDiagnostic) diags.get(i);
> System.out.println(i
> + " "
> + diag.getMessage()
> + " "
> + diag.getLocation()
> + " "
> + diag.getLine()
> + " "
> + diag.getColumn()
> + " "
> + diag.getAnnotationURI());
> }
>
> }
>
> if i call the code i get as result these 2 lines:
>
> 0 XSD: The element '#b' may not overlap with another element ll1.xsd 15
> 4 null
>
> 1 XSD: The element '#b' may not overlap with another element ll1.xsd 15
> 4 null
>
> the XSDDiagnostic Objects are not equal (hashvalue different)
>
> tell me what details you need and i will try to get them.
> greets joachim
> Ed Merks wrote:
> > Joachim,
> >
> > That's not what I see. Can you provide more details?
> >
> > Joachim Lusiardi wrote:
> >
> >
> >>Ok this works, i get diagnotic messages from a schema via
> >> schema.validate();
> >> EList diags = schema.getAllDiagnostics();
> >>but in this EList all message appear twice. what do i do wrong?
> >>greets joachim
> >>
> >>Ed Merks wrote:
> >>
> >>>Joachim,
> >>>
> >>>The XSD model does validate this rule. The sample in
> >>>org.eclipse.xsd.test/test supports
> >>>
> >>> xsd-test.bat -validate <*.xsd>
> >>>
> >>>that will produce messages for all the problems in the schema. You can
> >>>also call validate() programmatically on an XSDComplexTypeDefinition to
> >>>just check it. You can even call XSDParticle.getDFA to look at the
> >>>state machine itself.
> >>>
> >>>
> >>>Joachim Lusiardi wrote:
> >>>
> >>>
> >>>>Hey folks,
> >>>>is there a simple way of checking wether a schema violates this rule
> >>>>or not?
> >>>>Thanks for your answers in advance
> >>>>greets Joachim Lusiardi
> >>>
> >
|
|
|
Re: Unique Particle Attribution [message #587957 is a reply to message #46630] |
Wed, 02 June 2004 10:54 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
--------------574DD4982E3CFB6498A84D5F
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Joachim,
The XSD model does validate this rule. The sample in org.eclipse.xsd.test/test
supports
xsd-test.bat -validate <*.xsd>
that will produce messages for all the problems in the schema. You can also
call validate() programmatically on an XSDComplexTypeDefinition to just check
it. You can even call XSDParticle.getDFA to look at the state machine itself.
Joachim Lusiardi wrote:
> Hey folks,
> is there a simple way of checking wether a schema violates this rule or not?
> Thanks for your answers in advance
> greets Joachim Lusiardi
--------------574DD4982E3CFB6498A84D5F
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Joachim,
<p>The XSD model does validate this rule. The sample in org.eclipse.xsd.test/test
supports
<blockquote>xsd-test.bat -validate <*.xsd></blockquote>
that will produce messages for all the problems in the schema. You
can also call validate() programmatically on an XSDComplexTypeDefinition
to just check it. You can even call XSDParticle.getDFA to look at
the state machine itself.
<br>
<p>Joachim Lusiardi wrote:
<blockquote TYPE=CITE>Hey folks,
<br>is there a simple way of checking wether a schema violates this rule
or not?
<br>Thanks for your answers in advance
<br>greets Joachim Lusiardi</blockquote>
</html>
--------------574DD4982E3CFB6498A84D5F--
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Unique Particle Attribution [message #587978 is a reply to message #46667] |
Wed, 02 June 2004 12:11 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Joachim,
That's not what I see. Can you provide more details?
Joachim Lusiardi wrote:
> Ok this works, i get diagnotic messages from a schema via
> schema.validate();
> EList diags = schema.getAllDiagnostics();
> but in this EList all message appear twice. what do i do wrong?
> greets joachim
>
> Ed Merks wrote:
> > Joachim,
> >
> > The XSD model does validate this rule. The sample in
> > org.eclipse.xsd.test/test supports
> >
> > xsd-test.bat -validate <*.xsd>
> >
> > that will produce messages for all the problems in the schema. You can
> > also call validate() programmatically on an XSDComplexTypeDefinition to
> > just check it. You can even call XSDParticle.getDFA to look at the
> > state machine itself.
> >
> >
> > Joachim Lusiardi wrote:
> >
> >> Hey folks,
> >> is there a simple way of checking wether a schema violates this rule
> >> or not?
> >> Thanks for your answers in advance
> >> greets Joachim Lusiardi
> >
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
Re: Unique Particle Attribution [message #587994 is a reply to message #46751] |
Wed, 02 June 2004 13:46 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Joachim,
Each "b" overlaps with the other "b". It's hard to give good locations for these errors because
by using model group references or element references, it's possible that none of the stuff that
causes a problem actually appears nested in the complex type but rather is only referenced and
appears elsewhere.
Joachim Lusiardi wrote:
> ok i have the following XSD:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="http://www.w3.org/2001/XMLSchema
> file:/home/shing19m/bin/Exchanger%20XML%20Editor/types/XML%2 0Schema/Validation/XMLSchema.xsd ">
> <!--
> Definition eines Elements mit Verweis auf den SimpleType
> -->
> <xs:element name="Name" type="MyComplexType" />
> <!--
> Definition eines simplen Typs
> -->
> <xs:complexType name="MyComplexType">
> <!--minOccurs="2" maxOccurs="3"-->
> <xs:sequence>
> <xs:element name="a" type="xs:string" />
> <xs:choice minOccurs="1" maxOccurs="2">
> <xs:sequence>
> <xs:element name="b" type="xs:string" />
> <xs:element name="f" type="xs:string" />
> </xs:sequence>
> <xs:sequence>
> <xs:element name="b" type="xs:string" />
> <xs:element name="d" type="xs:string" />
> </xs:sequence>
> <!--
> <xs:sequence>
> <xs:element name="t3" type="xs:byte" />
> </xs:sequence>
> -->
> </xs:choice>
> </xs:sequence>
> <xs:attribute name="att" type="xs:string" />
> </xs:complexType>
> </xs:schema>
>
> and the following code here:
>
> private void validateSchema(XSDSchema schema) {
> schema.validate();
> EList diags = schema.getAllDiagnostics();
> int count = diags.size();
> for (int i = 0; i < count; i++) {
> XSDDiagnostic diag = (XSDDiagnostic) diags.get(i);
> System.out.println(i
> + " "
> + diag.getMessage()
> + " "
> + diag.getLocation()
> + " "
> + diag.getLine()
> + " "
> + diag.getColumn()
> + " "
> + diag.getAnnotationURI());
> }
>
> }
>
> if i call the code i get as result these 2 lines:
>
> 0 XSD: The element '#b' may not overlap with another element ll1.xsd 15
> 4 null
>
> 1 XSD: The element '#b' may not overlap with another element ll1.xsd 15
> 4 null
>
> the XSDDiagnostic Objects are not equal (hashvalue different)
>
> tell me what details you need and i will try to get them.
> greets joachim
> Ed Merks wrote:
> > Joachim,
> >
> > That's not what I see. Can you provide more details?
> >
> > Joachim Lusiardi wrote:
> >
> >
> >>Ok this works, i get diagnotic messages from a schema via
> >> schema.validate();
> >> EList diags = schema.getAllDiagnostics();
> >>but in this EList all message appear twice. what do i do wrong?
> >>greets joachim
> >>
> >>Ed Merks wrote:
> >>
> >>>Joachim,
> >>>
> >>>The XSD model does validate this rule. The sample in
> >>>org.eclipse.xsd.test/test supports
> >>>
> >>> xsd-test.bat -validate <*.xsd>
> >>>
> >>>that will produce messages for all the problems in the schema. You can
> >>>also call validate() programmatically on an XSDComplexTypeDefinition to
> >>>just check it. You can even call XSDParticle.getDFA to look at the
> >>>state machine itself.
> >>>
> >>>
> >>>Joachim Lusiardi wrote:
> >>>
> >>>
> >>>>Hey folks,
> >>>>is there a simple way of checking wether a schema violates this rule
> >>>>or not?
> >>>>Thanks for your answers in advance
> >>>>greets Joachim Lusiardi
> >>>
> >
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.08110 seconds