xsd

What's xmlns:mstns in a XSD?

半城伤御伤魂 提交于 2019-12-22 03:16:46
问题 What do the xml:mstns express in the following xsd-header? <?xml version="1.0" encoding="utf-8"?> <xs:schema id="config" targetNamespace="http:/tempuri.org/config.xsd" elementFormDefault="qualified" xmlns="" xmlns:mstns="http://tempuri.org/config.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <xs:element name="config"> ... 回答1: That's an XML namespace declaration. XML namespaces are really defined by URIs, so that a qualified name consists of a namespace (an arbitrary URI) and a local

Stop Visual Studio 2010 opening XSDs in design mode

假如想象 提交于 2019-12-22 01:23:31
问题 Visual Studio 2010 now opens XSD files in design mode by default. I can't find any option for disabling this. Is there a way to always open XSD files in text mode? 回答1: Right click on an XSD file, choose "Open with..." and select the appropriate option - then click on "Set as Default" before you actually open it. 回答2: Visual Studio 2012, right click XSD file, Advanced, View with. 来源: https://stackoverflow.com/questions/3099304/stop-visual-studio-2010-opening-xsds-in-design-mode

What is the Regular Expression for DD-MM-YYYY date format in XML regex? [duplicate]

匆匆过客 提交于 2019-12-22 01:04:22
问题 This question already has answers here : Regular Expression to match valid dates (15 answers) Closed 6 years ago . I want to know the regex for date dd-mm-yyyy format. And the rule is The ·day· value must be no more than 30 if ·month· is one of 4, 6, 9, or 11, no more than 28 if ·month· is 2 and ·year· is not divisible by 4, or is divisible by 100 but not by 400, and no more than 29 if ·month· is 2 and ·year· is divisible by 400, or by 4 but not by 100. I wanted to do in xml regex in my xsd.

Execute XQuery with BaseX

喜欢而已 提交于 2019-12-22 00:02:13
问题 I am trying to use BaseX to run an XQuery with no success. I have tried typing commands like: doc("Bookstore.xml")//Bookstore //Bookstore XQUERY[//Bookstore] and i am getting these error messages: Stopped at C:/tools/libxml/file, 1/32: Unknown command: doc("Bookstore.xml")//Bookstore. Try HELP. Stopped at C:/tools/libxml/file, 1/12: Unknown command: //Bookstore. Try HELP. Stopped at C:/tools/libxml/file, 1/20: Unknown command: XQUERY[//Bookstore]. Try HELP. whenever i try to hit Execute Query

How to write my XSD in order to match the desired XML and Java format using JAXB and XJC [duplicate]

老子叫甜甜 提交于 2019-12-21 22:17:22
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: How generate XMLElementWrapper annotation with xjc and customized binding I would like to be able to process XML of this format using JAXB ... <configuration> <!-- more content here --> <things> <thing> <name>xx1</name> <value>yy1</value> </thing> <thing> <name>xx2</name> <value>yy2</value> </thing> </things> <!-- more content here --> </configuration> I'd like to marshal the above XML into these Java classes

XSD :integer attribute empty value

杀马特。学长 韩版系。学妹 提交于 2019-12-21 21:47:55
问题 In the xsd , when we have an attribute with type xs:ID or xs:Integer as use:required, can we pass empty string to it? This should not be possible ideally. What needs to be added to achieve this? 回答1: If you need an attribute that is allowed to contain int or empty string you can define custom type and use it as a type for your attribute: <xs:simpleType name="emptyInt"> <xs:union> <xs:simpleType> <xs:restriction base='xs:string'> <xs:length value="0"/> </xs:restriction> </xs:simpleType> <xs

generate xsd from xml [duplicate]

丶灬走出姿态 提交于 2019-12-21 21:39:37
问题 This question already has answers here : Any tools to generate an XSD schema from an XML instance document? [closed] (10 answers) Closed 6 years ago . I need a tool to automatically generate an xsd from an xml file. Are there tools that do this? How does it work? Thanks! 回答1: There are several tools such as Altova. If you would like to do this command line or in code trang is a good option. 回答2: Most "big" XML editors boast this feature but in my experience, none can really deliver. The last

Asserting element Id uniqueness globally with XML 1.1 schema

二次信任 提交于 2019-12-21 21:02:02
问题 Is it possible to use XML 1.1 schema to verify that that no two elements in a document share an id. For example, the attached XML document should fail because the id's 0, 1 and 3 are not unique. <?xml version="1.0" encoding="UTF-8"?> <Item> <c id="0"/> <!-- error: shared id --> <a id="1"/> <!-- error: shared id --> <a id="2"/> <b id="3"/> <!-- error: shared id --> <a id="4"/> <b id="0"/> <!-- error: shared id --> <d id="6"/> <d id="7"/> <b id="3"/> <!-- error: shared id --> <c id="1"/> <!--

How can I generate multiple classes from xsd's with common includes?

岁酱吖の 提交于 2019-12-21 20:59:19
问题 Aloha I received a few nice xsd files which I want to convert to classes (using xsd.exe) All the xsd's have the same includes, like this: <xs:include schemaLocation="kstypes.xsd" /> <xs:include schemaLocation="ksparams.xsd" /> When I generate a class for each xsd the types declared in these files are duplicated for each original xsd. Is there any easy way to 1) only generate the types in the included xsd's once and 2) make sure all other classes use these types? -Edoode 回答1: try the approach

Find an annotation for an xml element in its associated schema-defined type

旧街凉风 提交于 2019-12-21 20:36:55
问题 I have an xml type, USAddress, defined in a schema: <xsd:element name="MyUSAddress" type="USAddress"/> <xsd:complexType name="USAddress"> <xsd:sequence> <xsd:element name="name" type="xsd:string"/> <xsd:element name="street" type="xsd:string"> <xsd:annotation> <xsd:appinfo>Special Metadata</xsd:appinfo> </xsd:annotation> </xsd:element> <xsd:element name="city" type="xsd:string"/> <xsd:element name="state" type="xsd:string"> <xsd:annotation> <xsd:appinfo>Special Metadata</xsd:appinfo> </xsd