xsd-validation

xsd:any + other elements inside choice

半城伤御伤魂 提交于 2021-02-19 11:19:49
问题 How can I achieve something like this: <xs:element name="getSubjectProductsResponse"> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="Products"> <xs:complexType> <xs:sequence> <xs:element name="Date" type="xs:date"/> <xs:element name="Branch" type="xs:date" minOccurs="0"/> <xs:element name="State" type="xs:string"> <xs:element name="ProductDetail"> <xs:complexType> **<xs:choice> <xs:element name="Account" type="ns:TAccount"/> <xs:element name="KK" type="ns

xsd:any + other elements inside choice

泪湿孤枕 提交于 2021-02-19 11:17:55
问题 How can I achieve something like this: <xs:element name="getSubjectProductsResponse"> <xs:complexType> <xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:element name="Products"> <xs:complexType> <xs:sequence> <xs:element name="Date" type="xs:date"/> <xs:element name="Branch" type="xs:date" minOccurs="0"/> <xs:element name="State" type="xs:string"> <xs:element name="ProductDetail"> <xs:complexType> **<xs:choice> <xs:element name="Account" type="ns:TAccount"/> <xs:element name="KK" type="ns

XSD Error: Type is not declared, or is not a simple type

狂风中的少年 提交于 2021-02-19 04:46:26
问题 For this explanation I am using 2 different XSDs: customEntry.xsd : <?xml version="1.0" encoding="utf-8"?> <xs:schema id="customEntry" targetNamespace="http://tempuri.org/customEntry.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/customEntry.xsd" xmlns:mstns="http://tempuri.org/customEntry.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <xs:simpleType name="customEntry"> <xs:restriction base="xs:string"> <xs:pattern value="[A-Za-z0-9_%./]*"/> </xs:restriction> </xs

Should I be using XSD 1.1 to build an open standard?

独自空忆成欢 提交于 2021-02-19 00:55:09
问题 We have been asked to put together a set of schemas for an open XML standard. XSD 1.0 would cope with most of the rules, but it would be a bit messy in places (especially to allow for extensibility) it would also rely on implementers reading free text descriptions of some rules in the form of annotations. Pretty much all of the rules could be implemented using XSD 1.1, however we are not sure if this would limit implementers unduly. So my question, is XSD 1.1 mature enough to be used in the

Error: It was detected that 'sites' has no namespace, but components with no target namespace are not referenceable from schema document

纵饮孤独 提交于 2021-02-18 10:56:05
问题 I have been working on this "advanced" schema for days with the flu and I cannot figure out why it keeps telling me that "sites" is not found. I re-read the chapter and even created a copy to experiment with (which worked before) and I do not understand. I am trying to import and combine schemas and I am not sure how to get it to work properly... Here are the errors: Ln 16 Col 84 - cvc-elt.1: Cannot find the declaration of element 'sites'. 1 Errors [Xerces-J 2.9.1] Validating XML Schema

Dependent naming of XML element in Xml Schema

眉间皱痕 提交于 2021-02-11 08:10:52
问题 Assuming that I have this XML: <parameters> <parameter type="string" isVisible="True" optional="False" id="DealerCode"> <DealerCode>ABCDEF001</DealerCode> </parameter> </parameters> I used a Xml-Schema generator to generate me a basic one. This results in this: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified"> <xs:element name="DealerCode" type="xs:string"/> <xs:element name="parameter"> <xs

Dependent naming of XML element in Xml Schema

半腔热情 提交于 2021-02-11 08:10:24
问题 Assuming that I have this XML: <parameters> <parameter type="string" isVisible="True" optional="False" id="DealerCode"> <DealerCode>ABCDEF001</DealerCode> </parameter> </parameters> I used a Xml-Schema generator to generate me a basic one. This results in this: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified"> <xs:element name="DealerCode" type="xs:string"/> <xs:element name="parameter"> <xs

Dependent naming of XML element in Xml Schema

喜欢而已 提交于 2021-02-11 08:08:49
问题 Assuming that I have this XML: <parameters> <parameter type="string" isVisible="True" optional="False" id="DealerCode"> <DealerCode>ABCDEF001</DealerCode> </parameter> </parameters> I used a Xml-Schema generator to generate me a basic one. This results in this: <?xml version="1.0"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" attributeFormDefault="unqualified" elementFormDefault="qualified"> <xs:element name="DealerCode" type="xs:string"/> <xs:element name="parameter"> <xs

Can I validate polymorphic XML elements based on a child Type element value?

跟風遠走 提交于 2021-02-10 18:48:14
问题 I want to validate polymorphic Shape elements, differentiated by the Type child element ( not attribute) value. Below are sibling Circle and Rectangle Shape elements. Circles have a Radius and only 1 Point . Rectangles don't have Radius and have 4 Point elements: <?xml version="1.0" encoding="UTF-8" ?> <Shapes> <Shape> <Type>Circle</Type> <ID>A1234</ID> <Label>This is round</Label> <Radius>5.4</Radius> <Points> <Point> <X>5.00</X> <Y>2.00</Y> </Point> </Points> </Shape> <Shape> <Type

Can I validate polymorphic XML elements based on a child Type element value?

我与影子孤独终老i 提交于 2021-02-10 18:47:47
问题 I want to validate polymorphic Shape elements, differentiated by the Type child element ( not attribute) value. Below are sibling Circle and Rectangle Shape elements. Circles have a Radius and only 1 Point . Rectangles don't have Radius and have 4 Point elements: <?xml version="1.0" encoding="UTF-8" ?> <Shapes> <Shape> <Type>Circle</Type> <ID>A1234</ID> <Label>This is round</Label> <Radius>5.4</Radius> <Points> <Point> <X>5.00</X> <Y>2.00</Y> </Point> </Points> </Shape> <Shape> <Type