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 "David Green-Lank (JIRA)" <xe...@xml.apache.org> on 2010/09/11 17:55:33 UTC
[jira] Created: (XERCESJ-1467) cvc-elt.4.3: Type
'ns0:localComplexType' is not validly derived from the type definition,
'complexType', of element 'value'.
cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.
----------------------------------------------------------------------------------------------------------------------------
Key: XERCESJ-1467
URL: https://issues.apache.org/jira/browse/XERCESJ-1467
Project: Xerces2-J
Issue Type: Bug
Components: XML Schema 1.0 Structures
Affects Versions: 2.10.0
Environment: Xerces2-J 2.10.0
Reporter: David Green-Lank
Given the schema (dgreen.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
<xs:element name="eComplexType">
<xs:complexType>
<xs:sequence>
<xs:element name="value" minOccurs="0" type="xs:complexType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Parsing the instance document (dgreen.xml):
<?xml version="1.0"?>
<eComplexType>
<value name="foo" xsi:type="ns0:localComplexType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.w3.org/2001/XMLSchema"/>
</eComplexType>
Code to reproduce (Main.java):
import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
import javax.xml.validation.Schema;
import javax.xml.validation.Validator;
import javax.xml.transform.stream.StreamSource;
import java.io.File;
public class Main {
public static void main( String... args ) throws Exception {
XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
Validator validator = schema.newValidator();
validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
}
}
Produces the following:
Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at Main.main(Main.java:11)
I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Assigned: (XERCESJ-1467) cvc-elt.4.3: Type
'xs:localComplexType' is not validly derived from the type definition,
'complexType', of element 'child'.
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich reassigned XERCESJ-1467:
---------------------------------------------
Assignee: Michael Glavassevich
> cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1467
> URL: https://issues.apache.org/jira/browse/XERCESJ-1467
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Structures
> Affects Versions: 2.10.0
> Environment: Xerces2-J 2.10.0
> Reporter: David Green-Lank
> Assignee: Michael Glavassevich
> Attachments: XERCESJ-1467.zip
>
>
> Given the schema (dgreen.xsd):
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="child" type="xs:complexType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> Parsing the instance document (dgreen.xml):
> <?xml version="1.0"?>
> <root>
> <child xsi:type="xs:localComplexType"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
> </root>
> Code to reproduce (Main.java):
> import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
> import javax.xml.validation.Schema;
> import javax.xml.validation.Validator;
> import javax.xml.transform.stream.StreamSource;
> import java.io.File;
> public class Main {
> public static void main( String... args ) throws Exception {
> XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
> Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
> Validator validator = schema.newValidator();
> validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
> }
> }
> Produces the following:
> Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
> at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
> at javax.xml.validation.Validator.validate(Validator.java:127)
> at Main.main(Main.java:11)
> I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1467) cvc-elt.4.3: Type
'ns0:localComplexType' is not validly derived from the type definition,
'complexType', of element 'value'.
Posted by "David Green-Lank (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Green-Lank updated XERCESJ-1467:
--------------------------------------
Description:
Given the schema (dgreen.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="child" type="xs:complexType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Parsing the instance document (dgreen.xml):
<?xml version="1.0"?>
<root>
<child xsi:type="xs:localComplexType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
</root>
Code to reproduce (Main.java):
import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
import javax.xml.validation.Schema;
import javax.xml.validation.Validator;
import javax.xml.transform.stream.StreamSource;
import java.io.File;
public class Main {
public static void main( String... args ) throws Exception {
XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
Validator validator = schema.newValidator();
validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
}
}
Produces the following:
Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at Main.main(Main.java:11)
I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
was:
Given the schema (dgreen.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
<xs:element name="eComplexType">
<xs:complexType>
<xs:sequence>
<xs:element name="value" minOccurs="0" type="xs:complexType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Parsing the instance document (dgreen.xml):
<?xml version="1.0"?>
<eComplexType>
<value name="foo" xsi:type="ns0:localComplexType" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns0="http://www.w3.org/2001/XMLSchema"/>
</eComplexType>
Code to reproduce (Main.java):
import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
import javax.xml.validation.Schema;
import javax.xml.validation.Validator;
import javax.xml.transform.stream.StreamSource;
import java.io.File;
public class Main {
public static void main( String... args ) throws Exception {
XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
Validator validator = schema.newValidator();
validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
}
}
Produces the following:
Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at Main.main(Main.java:11)
I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
> cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1467
> URL: https://issues.apache.org/jira/browse/XERCESJ-1467
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Structures
> Affects Versions: 2.10.0
> Environment: Xerces2-J 2.10.0
> Reporter: David Green-Lank
>
> Given the schema (dgreen.xsd):
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="child" type="xs:complexType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> Parsing the instance document (dgreen.xml):
> <?xml version="1.0"?>
> <root>
> <child xsi:type="xs:localComplexType"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
> </root>
> Code to reproduce (Main.java):
> import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
> import javax.xml.validation.Schema;
> import javax.xml.validation.Validator;
> import javax.xml.transform.stream.StreamSource;
> import java.io.File;
> public class Main {
> public static void main( String... args ) throws Exception {
> XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
> Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
> Validator validator = schema.newValidator();
> validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
> }
> }
> Produces the following:
> Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.
> at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
> at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
> at javax.xml.validation.Validator.validate(Validator.java:127)
> at Main.main(Main.java:11)
> I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1467) cvc-elt.4.3: Type
'xs:localComplexType' is not validly derived from the type definition,
'complexType', of element 'child'.
Posted by "David Green-Lank (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Green-Lank updated XERCESJ-1467:
--------------------------------------
Attachment: XERCESJ-1467.zip
Attached all required files to reproduce as XERCESJ-1467.zip (except for a copy of Xerces 2.10.0 itself)
> cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1467
> URL: https://issues.apache.org/jira/browse/XERCESJ-1467
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Structures
> Affects Versions: 2.10.0
> Environment: Xerces2-J 2.10.0
> Reporter: David Green-Lank
> Attachments: XERCESJ-1467.zip
>
>
> Given the schema (dgreen.xsd):
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="child" type="xs:complexType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> Parsing the instance document (dgreen.xml):
> <?xml version="1.0"?>
> <root>
> <child xsi:type="xs:localComplexType"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
> </root>
> Code to reproduce (Main.java):
> import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
> import javax.xml.validation.Schema;
> import javax.xml.validation.Validator;
> import javax.xml.transform.stream.StreamSource;
> import java.io.File;
> public class Main {
> public static void main( String... args ) throws Exception {
> XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
> Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
> Validator validator = schema.newValidator();
> validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
> }
> }
> Produces the following:
> Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
> at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
> at javax.xml.validation.Validator.validate(Validator.java:127)
> at Main.main(Main.java:11)
> I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1467) cvc-elt.4.3: Type
'ns0:localComplexType' is not validly derived from the type definition,
'complexType', of element 'value'.
Posted by "David Green-Lank (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Green-Lank updated XERCESJ-1467:
--------------------------------------
Description:
Given the schema (dgreen.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="child" type="xs:complexType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Parsing the instance document (dgreen.xml):
<?xml version="1.0"?>
<root>
<child xsi:type="xs:localComplexType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
</root>
Code to reproduce (Main.java):
import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
import javax.xml.validation.Schema;
import javax.xml.validation.Validator;
import javax.xml.transform.stream.StreamSource;
import java.io.File;
public class Main {
public static void main( String... args ) throws Exception {
XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
Validator validator = schema.newValidator();
validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
}
}
Produces the following:
Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at Main.main(Main.java:11)
I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
was:
Given the schema (dgreen.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="child" type="xs:complexType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Parsing the instance document (dgreen.xml):
<?xml version="1.0"?>
<root>
<child xsi:type="xs:localComplexType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
</root>
Code to reproduce (Main.java):
import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
import javax.xml.validation.Schema;
import javax.xml.validation.Validator;
import javax.xml.transform.stream.StreamSource;
import java.io.File;
public class Main {
public static void main( String... args ) throws Exception {
XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
Validator validator = schema.newValidator();
validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
}
}
Produces the following:
Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at Main.main(Main.java:11)
I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
> cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1467
> URL: https://issues.apache.org/jira/browse/XERCESJ-1467
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Structures
> Affects Versions: 2.10.0
> Environment: Xerces2-J 2.10.0
> Reporter: David Green-Lank
>
> Given the schema (dgreen.xsd):
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="child" type="xs:complexType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> Parsing the instance document (dgreen.xml):
> <?xml version="1.0"?>
> <root>
> <child xsi:type="xs:localComplexType"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
> </root>
> Code to reproduce (Main.java):
> import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
> import javax.xml.validation.Schema;
> import javax.xml.validation.Validator;
> import javax.xml.transform.stream.StreamSource;
> import java.io.File;
> public class Main {
> public static void main( String... args ) throws Exception {
> XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
> Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
> Validator validator = schema.newValidator();
> validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
> }
> }
> Produces the following:
> Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
> at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
> at javax.xml.validation.Validator.validate(Validator.java:127)
> at Main.main(Main.java:11)
> I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1467) cvc-elt.4.3: Type
'xs:localComplexType' is not validly derived from the type definition,
'complexType', of element 'child'.
Posted by "David Green-Lank (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Green-Lank updated XERCESJ-1467:
--------------------------------------
Summary: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'. (was: cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.)
> cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1467
> URL: https://issues.apache.org/jira/browse/XERCESJ-1467
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Structures
> Affects Versions: 2.10.0
> Environment: Xerces2-J 2.10.0
> Reporter: David Green-Lank
>
> Given the schema (dgreen.xsd):
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="child" type="xs:complexType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> Parsing the instance document (dgreen.xml):
> <?xml version="1.0"?>
> <root>
> <child xsi:type="xs:localComplexType"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
> </root>
> Code to reproduce (Main.java):
> import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
> import javax.xml.validation.Schema;
> import javax.xml.validation.Validator;
> import javax.xml.transform.stream.StreamSource;
> import java.io.File;
> public class Main {
> public static void main( String... args ) throws Exception {
> XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
> Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
> Validator validator = schema.newValidator();
> validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
> }
> }
> Produces the following:
> Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
> at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
> at javax.xml.validation.Validator.validate(Validator.java:127)
> at Main.main(Main.java:11)
> I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Updated: (XERCESJ-1467) cvc-elt.4.3: Type
'ns0:localComplexType' is not validly derived from the type definition,
'complexType', of element 'value'.
Posted by "David Green-Lank (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
David Green-Lank updated XERCESJ-1467:
--------------------------------------
Description:
Given the schema (dgreen.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="child" type="xs:complexType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Parsing the instance document (dgreen.xml):
<?xml version="1.0"?>
<root>
<child xsi:type="xs:localComplexType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
</root>
Code to reproduce (Main.java):
import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
import javax.xml.validation.Schema;
import javax.xml.validation.Validator;
import javax.xml.transform.stream.StreamSource;
import java.io.File;
public class Main {
public static void main( String... args ) throws Exception {
XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
Validator validator = schema.newValidator();
validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
}
}
Produces the following:
Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at Main.main(Main.java:11)
I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
was:
Given the schema (dgreen.xsd):
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element name="child" type="xs:complexType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
Parsing the instance document (dgreen.xml):
<?xml version="1.0"?>
<root>
<child xsi:type="xs:localComplexType"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
</root>
Code to reproduce (Main.java):
import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
import javax.xml.validation.Schema;
import javax.xml.validation.Validator;
import javax.xml.transform.stream.StreamSource;
import java.io.File;
public class Main {
public static void main( String... args ) throws Exception {
XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
Validator validator = schema.newValidator();
validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
}
}
Produces the following:
Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.
at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
at javax.xml.validation.Validator.validate(Validator.java:127)
at Main.main(Main.java:11)
I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
> cvc-elt.4.3: Type 'ns0:localComplexType' is not validly derived from the type definition, 'complexType', of element 'value'.
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1467
> URL: https://issues.apache.org/jira/browse/XERCESJ-1467
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Structures
> Affects Versions: 2.10.0
> Environment: Xerces2-J 2.10.0
> Reporter: David Green-Lank
>
> Given the schema (dgreen.xsd):
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="XMLSchema.xsd"/>
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="child" type="xs:complexType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> Parsing the instance document (dgreen.xml):
> <?xml version="1.0"?>
> <root>
> <child xsi:type="xs:localComplexType"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
> </root>
> Code to reproduce (Main.java):
> import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
> import javax.xml.validation.Schema;
> import javax.xml.validation.Validator;
> import javax.xml.transform.stream.StreamSource;
> import java.io.File;
> public class Main {
> public static void main( String... args ) throws Exception {
> XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
> Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
> Validator validator = schema.newValidator();
> validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
> }
> }
> Produces the following:
> Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
> at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
> at javax.xml.validation.Validator.validate(Validator.java:127)
> at Main.main(Main.java:11)
> I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org
[jira] Resolved: (XERCESJ-1467) cvc-elt.4.3: Type
'xs:localComplexType' is not validly derived from the type definition,
'complexType', of element 'child'.
Posted by "Michael Glavassevich (JIRA)" <xe...@xml.apache.org>.
[ https://issues.apache.org/jira/browse/XERCESJ-1467?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich resolved XERCESJ-1467.
-------------------------------------------
Resolution: Invalid
It took me awhile to realize what was going on but the reason why you can't use xsi:type here is because of the blockDefault="#all" at the top of XMLSchema.xsd. This blocks type substitutions for "xs:complexType" and other type definitions in the Schema for schemas. Removing blockDefault="#all" from the schema allows the xsi:type, but I'm sure the W3C working group had some reason for defining it the way they did. You would have to check with them as to why.
Thanks.
> cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> ----------------------------------------------------------------------------------------------------------------------------
>
> Key: XERCESJ-1467
> URL: https://issues.apache.org/jira/browse/XERCESJ-1467
> Project: Xerces2-J
> Issue Type: Bug
> Components: XML Schema 1.0 Structures
> Affects Versions: 2.10.0
> Environment: Xerces2-J 2.10.0
> Reporter: David Green-Lank
> Assignee: Michael Glavassevich
> Attachments: XERCESJ-1467.zip
>
>
> Given the schema (dgreen.xsd):
> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
> <xs:import namespace="http://www.w3.org/2001/XMLSchema" schemaLocation="http://www.w3.org/2001/XMLSchema.xsd"/>
> <xs:element name="root">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="child" type="xs:complexType"/>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
> Parsing the instance document (dgreen.xml):
> <?xml version="1.0"?>
> <root>
> <child xsi:type="xs:localComplexType"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"/>
> </root>
> Code to reproduce (Main.java):
> import org.apache.xerces.jaxp.validation.XMLSchemaFactory;
> import javax.xml.validation.Schema;
> import javax.xml.validation.Validator;
> import javax.xml.transform.stream.StreamSource;
> import java.io.File;
> public class Main {
> public static void main( String... args ) throws Exception {
> XMLSchemaFactory schemaFactory = new XMLSchemaFactory();
> Schema schema = schemaFactory.newSchema( new File( "dgreen.xsd" ) );
> Validator validator = schema.newValidator();
> validator.validate( new StreamSource( new File( "dgreen.xml" ) ) );
> }
> }
> Produces the following:
> Exception in thread "main" org.xml.sax.SAXParseException: cvc-elt.4.3: Type 'xs:localComplexType' is not validly derived from the type definition, 'complexType', of element 'child'.
> at org.apache.xerces.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
> at org.apache.xerces.util.ErrorHandlerWrapper.error(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.XMLErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator$XSIErrorReporter.reportError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.reportSchemaError(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.getAndCheckXsiType(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.handleStartElement(Unknown Source)
> at org.apache.xerces.impl.xs.XMLSchemaValidator.emptyElement(Unknown Source)
> at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
> at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
> at org.apache.xerces.jaxp.validation.StreamValidatorHelper.validate(Unknown Source)
> at org.apache.xerces.jaxp.validation.ValidatorImpl.validate(Unknown Source)
> at javax.xml.validation.Validator.validate(Validator.java:127)
> at Main.main(Main.java:11)
> I believe that localComplexType is validly derived from complexType, or am I missing something? I apologize in advance if I filed this bug in error.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org