XSD indicators e.g. <all> or <choice> having no
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 6
- Joined: Thu Nov 13, 2003 5:42 pm
XSD indicators e.g. <all> or <choice> having no
hi,
I have the following XML schema using the <all> indicator but
the xml validation is always succesful even i don't have a
REQID element. The <all> indicator has no effect in this case.
Anyone who can solve this problem?
Thank you very much.
<?xml version="1.0"?>
<xs:schema targetNamespace="dp24" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="SET">
<xs:complexType>
<xs:all>
<!--Request ID, unique and constant for each file-->
<xs:element name="REQID">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:totalDigits value="10"/>
<xs:pattern value="[0-9]{10}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
I have the following XML schema using the <all> indicator but
the xml validation is always succesful even i don't have a
REQID element. The <all> indicator has no effect in this case.
Anyone who can solve this problem?
Thank you very much.
<?xml version="1.0"?>
<xs:schema targetNamespace="dp24" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="SET">
<xs:complexType>
<xs:all>
<!--Request ID, unique and constant for each file-->
<xs:element name="REQID">
<xs:simpleType>
<xs:restriction base="xs:integer">
<xs:totalDigits value="10"/>
<xs:pattern value="[0-9]{10}"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:all>
</xs:complexType>
</xs:element>
</xs:schema>
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
If I remove the REQID element and try to validate:
I get one error:
Make sure you use the validate action and not the well-formed check.
Best Regards,
George
If I remove the REQID element and try to validate:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<SET xmlns="dp24"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="dp24 all.xsd">
</SET>
I get one error:
Code: Select all
E cvc-complex-type.2.4.b: The content of element 'SET' is not complete. One of '{"":REQID}' is expected.
Best Regards,
George
-
- Posts: 6
- Joined: Thu Nov 13, 2003 5:42 pm
Hi George,
I'm sure I'using the right buttons
This my XML file:
It is valid anyway, with:
<?xml version="1.0" ?>
<SOAP:Envelope bpoheader:dp="24" bpoheader:tacode="0077" bpoheader:version="1.0"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bpoheader="bpoheader"
xmlns:dp24="dp24"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="dp24 file:///d:/xmlpilot/dp24.xsd
http://schemas.xmlsoap.org/soap/envelope/ file:///d:/xmlpilot/soaplocal.xsd
bpoheader file:///d:/xmlpilot/bpoheader.xsd">
<SOAP:Body>
<!--Tag Name: rfc:_-BI0_-QI6A[InfoSource]_RFC
xmlns:rfc attribute: urn:sap-com:document:sap:rfc:functions
DATASOURCE tag: 6A[InfoSource]-->
<rfc:_-BI0_-QI6ADUXMLPILOT_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<DATASOURCE>6ADUXMLPILOT</DATASOURCE>
<DATA>
<item>
<SET>
<!--Request ID, unique and constant for each file-->
<dp24:REQID>0000000001</dp24:REQID>
</SET>
</item>
</DATA>
</rfc:_-BI0_-QI6ADUXMLPILOT_RFC>
</SOAP:Body>
</SOAP:Envelope>
or without:
<?xml version="1.0" ?>
<SOAP:Envelope bpoheader:dp="24" bpoheader:tacode="0077" bpoheader:version="1.0"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bpoheader="bpoheader"
xmlns:dp24="dp24"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="dp24 file:///d:/xmlpilot/dp24.xsd
http://schemas.xmlsoap.org/soap/envelope/ file:///d:/xmlpilot/soaplocal.xsd
bpoheader file:///d:/xmlpilot/bpoheader.xsd">
<SOAP:Body>
<!--Tag Name: rfc:_-BI0_-QI6A[InfoSource]_RFC
xmlns:rfc attribute: urn:sap-com:document:sap:rfc:functions
DATASOURCE tag: 6A[InfoSource]-->
<rfc:_-BI0_-QI6ADUXMLPILOT_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<DATASOURCE>6ADUXMLPILOT</DATASOURCE>
<DATA>
<item>
<SET>
</SET>
</item>
</DATA>
</rfc:_-BI0_-QI6ADUXMLPILOT_RFC>
</SOAP:Body>
</SOAP:Envelope>
I'm sure I'using the right buttons

This my XML file:
It is valid anyway, with:
<?xml version="1.0" ?>
<SOAP:Envelope bpoheader:dp="24" bpoheader:tacode="0077" bpoheader:version="1.0"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bpoheader="bpoheader"
xmlns:dp24="dp24"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="dp24 file:///d:/xmlpilot/dp24.xsd
http://schemas.xmlsoap.org/soap/envelope/ file:///d:/xmlpilot/soaplocal.xsd
bpoheader file:///d:/xmlpilot/bpoheader.xsd">
<SOAP:Body>
<!--Tag Name: rfc:_-BI0_-QI6A[InfoSource]_RFC
xmlns:rfc attribute: urn:sap-com:document:sap:rfc:functions
DATASOURCE tag: 6A[InfoSource]-->
<rfc:_-BI0_-QI6ADUXMLPILOT_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<DATASOURCE>6ADUXMLPILOT</DATASOURCE>
<DATA>
<item>
<SET>
<!--Request ID, unique and constant for each file-->
<dp24:REQID>0000000001</dp24:REQID>
</SET>
</item>
</DATA>
</rfc:_-BI0_-QI6ADUXMLPILOT_RFC>
</SOAP:Body>
</SOAP:Envelope>
or without:
<?xml version="1.0" ?>
<SOAP:Envelope bpoheader:dp="24" bpoheader:tacode="0077" bpoheader:version="1.0"
xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" xmlns:bpoheader="bpoheader"
xmlns:dp24="dp24"
xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"
xs:schemaLocation="dp24 file:///d:/xmlpilot/dp24.xsd
http://schemas.xmlsoap.org/soap/envelope/ file:///d:/xmlpilot/soaplocal.xsd
bpoheader file:///d:/xmlpilot/bpoheader.xsd">
<SOAP:Body>
<!--Tag Name: rfc:_-BI0_-QI6A[InfoSource]_RFC
xmlns:rfc attribute: urn:sap-com:document:sap:rfc:functions
DATASOURCE tag: 6A[InfoSource]-->
<rfc:_-BI0_-QI6ADUXMLPILOT_RFC xmlns:rfc="urn:sap-com:document:sap:rfc:functions">
<DATASOURCE>6ADUXMLPILOT</DATASOURCE>
<DATA>
<item>
<SET>
</SET>
</item>
</DATA>
</rfc:_-BI0_-QI6ADUXMLPILOT_RFC>
</SOAP:Body>
</SOAP:Envelope>
-
- Site Admin
- Posts: 2095
- Joined: Thu Jan 09, 2003 2:58 pm
Hi,
The problem in this case is that the SOAP:Body content is defined to allow elements from any namespace and the content processing is set to "lax", that means the validation will be enforced if a schema is specified for those elements, otherwise no validation will be performed. In your case the rfc:_-BI0_-QI6ADUXMLPILOT_RFC element has no schema associated.
Best Regards,
George
The problem in this case is that the SOAP:Body content is defined to allow elements from any namespace and the content processing is set to "lax", that means the validation will be enforced if a schema is specified for those elements, otherwise no validation will be performed. In your case the rfc:_-BI0_-QI6ADUXMLPILOT_RFC element has no schema associated.
Best Regards,
George
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service