xsd

Where to place version information in a wsdl?

∥☆過路亽.° 提交于 2019-12-22 08:36:02
问题 I have a web service where the definitions are located in the wsdl-file and the schema in an external xsd-file. In the xsd file, there is the schema tag, which provides an attribute 'version' that I can use to document the current version. Is there something similar in the wsdl format (WSDL 1.1)? If not, what is the best place to store a general version attribute for documentation purposes? Please keep in mind that I do not want to achieve backward compatibility, like it is described in http:

How to format XSD documentation?

六月ゝ 毕业季﹏ 提交于 2019-12-22 08:16:40
问题 The Problem: I have a xsd schema with included documentation, like: <xs:element name="Tag" type="XTag"> <xs:annotation> <xs:documentation> Do like this: - foo - bar </xs:documentation> </xs:annotation> </xs:element> When I view the documentation in Eclipse, the white-spaces are truncated to a single space, so I end up with: Do like this: - foo - bar This naturally limits readability when documentation is more than a little note. In javadoc for instance, one can one html tags to format the

Are there any other frameworks that parse XSD other than XSOM?

…衆ロ難τιáo~ 提交于 2019-12-22 08:13:44
问题 I have a requirement to verify if the constraints imposed by the XSD are in sync with the constraints enforced by the database. I am wondering if there are other frameworks that can help me in this regard other than XSOM. Regards 回答1: Yes, the eclipse XSD project is quite good for this too. Any code you write against it can be used outside eclipse. 回答2: Another library to consider is Apache XmlSchema. You can use it to read a schema for analysis or modification and XmlSchema can also be used

How to group types & subtypes in XSD

爱⌒轻易说出口 提交于 2019-12-22 08:13:02
问题 I have XML like this: <type> <mainType>...</mainType> <subtype>...<subtype> </type> The mainTypes are restricted xs:strings (a list of them). And each mainType has a list of possible subtypes. IE: mainTypeA has possible subtypes of: subtype1, subtype2, subtype3 mainTypeB has possible subtyes of: subtype4, subtype5 How can I represent this in XSD so that each of subtype enumerations are linked specifically to their main type? Is there a better way to represent those 2 fields to make the XSD

Using dom4j DOMDocument to feed validator.validate(DOMSource) fails in java 1.6 (xsi:noNamespaceSchemaLocation is not allowed), works in 1.5

眉间皱痕 提交于 2019-12-22 08:08:16
问题 Using dom4j DOMDocument to feed validator.validate(DOMSource) fails in java 1.6 (with xsi:noNamespaceSchemaLocation is not allowed to appear in root element), works in 1.5 I'm finding the following problem quite intractable (OK, that's an understatement) - any insights will be appreciated. Currently it seems like the best idea is to drop dom4j in favour of e.g. XOM (http://stackoverflow.com/questions/831865/what-java-xml-library-do-you-recommend-to-replace-dom4j). I've been validating in

How to make xsd element extend another

流过昼夜 提交于 2019-12-22 08:07:06
问题 I have three different XML elements that have some common tags. For e.g: Person has name, age, sex Then i have Manager, Employee that would share the three fields the Person has plus Manager, Employee specific fields like managerNo, employeeNo etc. Can i write something in xsd that would be like this 1. Declare Person element <xsd:element name="Person"> <xsd:annotation> <xsd:documentation>Person Request</xsd:documentation> </xsd:annotation> <xsd:complexType> <xsd:sequence> <xsd:element name=

Validate with three xml schemas as one combined schema in lxml?

夙愿已清 提交于 2019-12-22 06:50:09
问题 I am generating an XML document for which different XSDs have been provided for different parts (which is to say, definitions for some elements are in certain files, definitions for others are in others). The XSD files do not refer to each other. The schemas are: http://xmlgw.companieshouse.gov.uk/v2-1/schema/Egov_ch-v2-0.xsd http://xmlgw.companieshouse.gov.uk/v1-1/schema/forms/FormSubmission-v1-1.xsd http://xmlgw.companieshouse.gov.uk/v1-1/schema/forms/CompanyIncorporation-v1-2.xsd Is there

making an element optional using xsd -cvc-length-valid ERROR

好久不见. 提交于 2019-12-22 06:48:06
问题 <xs:element name="CurrencyCode" minOccurs="0"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:length value="3" /> </xs:restriction> </xs:simpleType> </xs:element> But if my value is empty it returns an error cvc-length-valid: Value '' with length = '0' is not facet-valid with respect to length '3' for type '#AnonType_CurrencyCodeServiceServiceList'. So how can i deal with it ? 回答1: Your schema allows to omitt the CurrencyCode element but if it is present its value must be a string with

Defining xml in an xsd where an attribute determines the possible contents

你说的曾经没有我的故事 提交于 2019-12-22 06:47:15
问题 How would one go about defining something like this in an xsd? <start> <request type="typeA"> <elementOnlyFoundInA /> </request> <request type="typeB"> <elementOnlyFoundInB /> </request> </start> I ran xsd.exe just to get an idea of what it might look like, but it does not appear recognize the relationships between the value of type and the contents of the request. Is it even possible to define contents based on an attribute like this in an xsd file? 回答1: XML Schema doesn't currently support

Flattening XSD schema documents (HR-XML 3.0) [closed]

醉酒当歌 提交于 2019-12-22 06:32:28
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . I have several "main" XSD documents, which import "supporting" XSD documents. These schema documents happen to be from the HR-XML 3.0 specification, in particular related to Background Screening. For the purposes of code-generation and convenient single-file schema to reference in my WSDL, I am trying to "flatten"