xsd

Why would a schema make an XML column slower?

倾然丶 夕夏残阳落幕 提交于 2019-12-24 19:37:12
问题 I have a table with an XML column. The documents are pretty large and numerous, and I've been trying various ways to improve the performance of basic queries. Because the documentation indicates that applying an XML Schema to the column can help SQL Server to optimize queries — and because one was available — I created a schema collection and applied the type to my XML column. Query performance went off a cliff. I mean, the very simplest tests became intolerably slow. I removed the column

WSDL schemaLocation : Is it possible to import a .xsd into a .wsdl using a relative path?

独自空忆成欢 提交于 2019-12-24 19:03:46
问题 Here is my WSDL : <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://xxx" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="http://xxx/commun/axis" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://xxx" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types> <xsd:schema targetNamespace="http://xxx/commun/axis" xmlns="http://www.w3.org/2001/XMLSchema"> <xsd:include schemaLocation="https://host

Validate descendants of unknown XML elements via XSD?

↘锁芯ラ 提交于 2019-12-24 18:02:07
问题 My XML file looks like : <root> <template> <unknownTag> <anotherUnknownTag/> <anotherKnownTag/> <field name='price'/> </unknownTag> </template> <template> <field name='salary'/> </template> <anothorKnownTag/> </root> I want to apply regex restriction to the attribute name of the tag <field/> whether it's a child or a grandchild or a grand grandchild and so on. I have tried the following code, but the regex only applied to the element field when it's a direct child of the template tag. <xs

overriding minOccurs from a group

元气小坏坏 提交于 2019-12-24 17:13:08
问题 I have a situation where there is a base type that I don't "own" and it allows all child elements to be optional. From a general business perspective this makes sense. For example, say it was: <xs:complexType name="BaseType"> <xs:sequence> <xs:element name="id" type="xs:string" minOccurs="0"/> <xs:element name="name" type="xs:string" minOccurs="0"/> </xs:sequence> </xs:complexType> An instance of this type will be contained in a containing type that my process uses. <xs:complexType name=

How to define a specific number in xsd?

独自空忆成欢 提交于 2019-12-24 17:02:30
问题 i am working on an xsd-specification (for a simple game ;) ) which has that specification: I have an Elem players with an attribute number , which indicates the number of the players(a num between 1 and 4 ). As childelems, it contains elems of zero to four screenname elements. These elements have player screenname text content and attribute, which indicates the end of the game number (a number between 1 and 4 ). My big problems are the screenname and the Intervall in a typ in xsd? So how to

What is on the first line of an XML document?

ぃ、小莉子 提交于 2019-12-24 16:31:22
问题 So before we write the XML Schema, a lot of tutorials use this: <?xml version='1.0'?> or <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <data-set xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> My question is, what is this part for? What is that website specifically and why do we use it? Are there other methods to do this? If it helps, I am doing this to convert an excel worksheet into XML. 回答1: XML Declaration <?xml version='1.0'?> is an XML declaration and is not particular

How do I mark fields as required/optional when reading XML with MOXy?

萝らか妹 提交于 2019-12-24 16:29:28
问题 Having a trivial code like this: @XmlRootElement @XmlAccessorType(XmlAccessType.FIELD) class A { @XmlPath("B/text()") private String b; @XmlPath("C/text()") private Integer c; ... } It works absolutely fine as long as I have apt values in my XML. I'd like to mark the field c as required, so MOXy throw every time I try to read the document where c is either not set, or invalid. What's the easiest solution? Update: Setting default values will also do. 回答1: EclipseLink JAXB (MOXy) or any JAXB

XML::Compile does not find the root element I give it

走远了吗. 提交于 2019-12-24 16:26:58
问题 Goal: generate the Perl data structure needed to populate and write XML output, using an existing XSD schema. What I've done: I've installed XML::Compile, found a tutorial on how to use it, and read through a modified example here. I've processed my XSD file using CAM Template Editor to ensure CAM can generate an example XML file from the template, which it can, and I've compared the XML output to the XSD to ensure the two relate the way I think they should. They do. Next, I've simply pointed

Using XSD files in WinRT Projects

这一生的挚爱 提交于 2019-12-24 15:32:45
问题 I'm trying to use some existing C# code in a WinRT (Windows Store/Metro) project. This code relied on some xml files generated using XSD. Unfortunately it seems the old XmlDocument classes aren't available in WinRT... there are some alternatives, but they don't seem to be quite the same - so I need to generate some new files for WinRT. Is there a way to import an XSD file into a WinRT project so that all the data classes, and enums are generated and can be used in the Metro project? I've

Use datatype directly with in XML

让人想犯罪 __ 提交于 2019-12-24 15:25:47
问题 I'm trying to validate below XML with the below XSD: XML <Device xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Parameter Id="100" Flag="100" xsi:type="xsd:unsignedInt">-100</Parameter> </Device> XSD <?xml version="1.0" encoding="UTF-8" ?> <xsd:schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <xsd:element name="Device"> <xsd:complexType> <xsd:sequence> <xsd:element name='Parameter'