xsd

XSD to XForms and XForms to XSD conversion

梦想与她 提交于 2020-01-01 05:38:09
问题 Currently I am struggling with two problems: I am receiving from outer server an XSD file and based on this file I have to generate XForm. Usually the XSD file is importing many other XSD files and so on. I am writing a GUI with XForm builder. When the user builds his custom XForm I need to generate from it an XSD file and send it back to the outer server. Major question is: Is it possible to write those two converters which generate files and complies with the standard (XML Schema and XForms

XSD: Cannot resolve the name 'type' to a(n) 'type definition' component

不问归期 提交于 2020-01-01 04:33:04
问题 I am defining the schema but on validating it in eclipse it gives following error. src-resolve: Cannot resolve the name 'common:Name' to a(n) 'type definition' component. My schema looks like following: <?xml version="1.0" encoding="UTF-8"?> <xsd:schema targetNamespace="http://www.mycompany.com/myproject/service/v1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://www.mycompany.com/myproject/service/v1" xmlns:product="http://www.mycompany.com/otherproject/service/products/v1"

Ignore order of elements using xs:extension

≯℡__Kan透↙ 提交于 2020-01-01 04:10:09
问题 How can I design my xsd to ignore the sequence of elements? <root> <a/> <b/> </root> <root> <b/> <a/> </root> I need to use extension for code generation reasons, so I tried the following using all: <?xml version="1.0" encoding="UTF-8"?> <xs:schema targetNamespace="http://www.example.com/test" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:t="http://www.example.com/test" > <xs:complexType name="BaseType"> <xs:all> <xs:element name="a" type="xs:string" /> </xs:all> </xs:complexType> <xs

How to make either of the fields mandatory in XML schema

ぐ巨炮叔叔 提交于 2019-12-31 07:53:09
问题 I have a schema as shown below ,i have a few questions regarding the schema 1.How to make CourierNumber or WorkLocationCoordinate mandatory.I have used one global type shown below EDIT Still no luck as Abel mentioned i modifed schema but it is failing.The input xml is <?xml version="1.0" encoding="utf-8"?> <NOCPlantMapRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <NOCTypeID>0</NOCTypeID> <WorkLocation> <ParcelNumber>4545<

Unable to bind to pyxb classes with nested (anonymous) types

对着背影说爱祢 提交于 2019-12-31 05:08:10
问题 I followed the instructions from this thread, and from this XML: <?xml version="1.0" encoding="UTF-8" ?> <my_report> <something> <foo> Yes </foo> </something> <something_else> <id>4</id> <foo>Finally</foo> <score>0.2</score> </something_else> </my_report> I created the following XSD schema using this tool online. <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="my_report"> <xs:complexType> <xs:sequence>

XSD with Microsoft Visual Studio

拥有回忆 提交于 2019-12-31 05:00:02
环境: xsd3.2 + visual studio 2005 1、安装 xsd-3.2.msi 从 http://www.codesynthesis.com/products/xsd/download.xhtml 下载。我安装在 : C:\Program Files\CodeSynthesis XSD 3.2 安装动作会在系统环境变量 path 项中 添加 " C:\Program Files\CodeSynthesis XSD 3.2\bin" 2、 在 visual studio 中添加 include目录, lib 目录,规则文件(.rules)目录,可执行文件目录 依次 在菜单栏选择"工具"->"选项"->"项目和解决方案",打开“项目和解决方案”窗口。 include 目录和 lib 目录分别是程序在编译、链接时使用的参数。 include 目录中的头文件包含了函数声明 ,lib 目录中的 .lib文件包含了函数的定义 。 include 目录和 lib 目录的设置属于程序级的,在 "vc++目录"。在"显示以下内容的目录"下选"包含文件"以添加 include 路径,选"库路径"以添加 lib 目录。这里,include 目录和 lib 目录 分别 是:" C:\Program Files\CodeSynthesis XSD 3.2\include " 和 " C:

Distribute xml schema without website

十年热恋 提交于 2019-12-31 04:14:20
问题 I am creating an XML schema for a program that will be distributed to multiple computers. These other computers will be making their own xml files to conform to this schema. In order for them to reference the schema, the need to have access to that schema. I do not have a website I can post the schema on like is commonly done. I can package the schema along with the program, but then I am not sure how to make it easy for the users of the other computers to reference the schema in their xml

XSLT: Get enumeration from xsd

人盡茶涼 提交于 2019-12-31 03:52:05
问题 I've this enum in the xsd file: <xs:simpleType name="SO"> <xs:restriction base="xs:string"> <xs:enumeration value="Mac OS X"/> <xs:enumeration value="Windows Server"/> <xs:enumeration value="Windows Vista"/> <xs:enumeration value="Windows XP"/> <xs:enumeration value="Windows 7"/> <xs:enumeration value="Windows 8"/> <xs:enumeration value="Windows 8.1"/> <xs:enumeration value="Ubuntu"/> </xs:restriction> </xs:simpleType> and I need to get it in the XSL to use it in a javascript combobox. There

Why is the XmlDocument Validate event handler not getting hit?

孤街醉人 提交于 2019-12-31 03:31:10
问题 I have this code: // Load the document XmlDocument xmlDocument = new XmlDocument(); // use the stream and have it close when it is finished using ( argInputStream ) { xmlDocument.Load( argInputStream ); xmlDocument.Schemas.Add( XmlSchema.Read( argSchemaStream, null ) ); xmlDocument.Validate( ValidationEventHandler ); } // this is not getting hit void ValidationEventHandler( object sender, ValidationEventArgs e ) { switch ( e.Severity ) { case XmlSeverityType.Error: Console.WriteLine( "Error:

What is the reason for not allowing non-deterministic element declarations in DTDs and XSD schemas?

狂风中的少年 提交于 2019-12-31 03:18:08
问题 The following declaration: <!ELEMENT p ((b, a) | (b, c))> and its XSD equivalent are both invalid because they are not deterministic, according to validators and a quick check of the spec(s). However, since every non-deterministic finite automaton has an equivalent deterministic finite automaton and since there are algorithms for converting NFAs into DFAs, what is the reason for prohibiting non-deterministic declarations? 回答1: There are two classes of possible answer to a question like this: