xsd

Define an element with attribute and optional value

你说的曾经没有我的故事 提交于 2020-01-07 04:59:07
问题 How do I create an xsd that can validate either of the following two examples? <element attribute="attribute-value" /> and <element attribute="attribute-value">element-value</element> 回答1: <?xml version="1.0" encoding="utf-8"?> <xs:schema id="test" targetNamespace="http://tempuri.org/test.xsd" elementFormDefault="qualified" xmlns="http://tempuri.org/test.xsd" xmlns:mstns="http://tempuri.org/test.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" > <xs:complexType name="element_type"> <xs

The same table 'name' cannot be the child table in two nested relations

て烟熏妆下的殇ゞ 提交于 2020-01-07 03:38:10
问题 Several time already asked here and there, some answers relate to old VS versions (this on is using V.S. 2012). I present the problem again: given an xsd: <xs:schema elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:complexType name="LocationType"> <xs:attribute name="X" type="xs:integer" /> <xs:attribute name="Y" type="xs:integer" /> </xs:complexType> <xs:complexType name="AlphaNumericType"> <xs:sequence> <xs:element name="AlphaNumericLocation" type=

Defining assertions depending on both attributes and elements in xsd 1.1

人走茶凉 提交于 2020-01-07 02:25:45
问题 I need to define the following situation in my XSD Schema. This is an example of my XML: <initialization> <stat name="SelfActualization" range="" init="" tickValue="" colorR="" colorG="" colorB=""/> <stat name="Social" range="" init="" tickValue="" colorR="" colorG="" colorB=""/> <staticAction name="Study" > <SelfActualization reqPoints="0" gainedPoints="0" /> <Social reqPoints="0" gainedPoints="0" /> </staticAction> <staticAction name="Greetings" > <SelfActualization reqPoints="0"

Defining assertions depending on both attributes and elements in xsd 1.1

馋奶兔 提交于 2020-01-07 02:25:29
问题 I need to define the following situation in my XSD Schema. This is an example of my XML: <initialization> <stat name="SelfActualization" range="" init="" tickValue="" colorR="" colorG="" colorB=""/> <stat name="Social" range="" init="" tickValue="" colorR="" colorG="" colorB=""/> <staticAction name="Study" > <SelfActualization reqPoints="0" gainedPoints="0" /> <Social reqPoints="0" gainedPoints="0" /> </staticAction> <staticAction name="Greetings" > <SelfActualization reqPoints="0"

Jaxb classes from schema generates getter setter method in uppercase

Deadly 提交于 2020-01-07 02:24:28
问题 I'm generating a top down web service with JAX-WS. In the wsdl I'm importing a xsd containing all necessary elements. I need all the xml nodes to be displayed in uppercase in soap request and hence I kept the element names in the xsd to upper case. But while generating the classes from the wsdl, I am able to see the getter and setter method are named in upper case as well but not the variables. For ex., if I use 'SOURCE' as an element in xsd, i'm getting the corresponding getter method as

20200106 Spring官方文档(Core 9)

萝らか妹 提交于 2020-01-07 01:24:21
9.附录 9.1。XML模式 9.1.1。util模式 util 标记处理常见的实用程序配置问题,例如配置集合,引用常量等。 util schema: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:util="http://www.springframework.org/schema/util" xsi:schemaLocation=" http://www.springframework.org/schema/beans https://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/util https://www.springframework.org/schema/util/spring-util.xsd"> <!-- bean definitions here --> </beans> 使用 <bean id="..." class="..."> <property

Why DBMS_XMLSCHEMA fails to validate a valid xs:dateTime?

不想你离开。 提交于 2020-01-06 21:05:03
问题 I'm going to validate and process XML provided by a third party. The XML conforms a standardized XML schema also provided by a third party. For validation I use DBMS_XMLSCHEMA essentially this way: -- pseudocode follows declare xmldoc xmltype; begin dbms_xmlschema.registerschema(schemaurl => name, schemadoc => xmltype(schema), local => true, gentypes => false, gentables => false ); xmldoc := xmltype(xml).createSchemaBasedXML(schema_name); xmldoc.schemavalidate; end; Validation seems to work

xml document having external references

此生再无相见时 提交于 2020-01-06 20:06:46
问题 Is there a way wherein an xml document can refer to a variable/element which is defined in some other xml file on the same machine? 回答1: Sure, like this: outer.xml: <!DOCTYPE outer [ <!ELEMENT outer ANY> <!ENTITY inner SYSTEM "inner.xml" > ]> <outer> &inner; &inner; </outer> inner.xml <inner/> 来源: https://stackoverflow.com/questions/10780482/xml-document-having-external-references

xml integration from different xml schemas

一曲冷凌霜 提交于 2020-01-06 18:36:48
问题 I want to add products to my system from different suppliers. They will send me their XML files and i will integrate them. The problem is XML files are schema different and tags are different but they serve the same information. I want to make a generic structure so that when a new XML comes out, i can easily add these products to my system, with few changes. My project is Asp.net and coding language C#. Is it possible to make this? What approach should i take ? Here are sample XML files

Underscore not accepting in xml schema for email address

纵然是瞬间 提交于 2020-01-06 18:07:25
问题 Hi I have created a schema and the following pattern to check for email id: \w+([-+._]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*. However it is not accepting email id's containing underscore like bob_t@example.com . Can you please modify this pattern so that it accepts _ too. Thanks 回答1: Something like the following should work (I removed some other apparent errors or idiosyncrasies): \w[-+._\w]+@\w[-.\w]+\.\w[-.\w]+ however, be aware that whatever pattern you choose, you'll always exclude some valid