xsd

Error in xsd when trying to validate with infinite sub lists

Given the following xml example: <MyCustomXml> <ClientId>SomeGuid</ClientId> <Contact>[email protected]</Contact> <Data> <Item name="SomeName" type="String"> SomeValue </Item> <Item name="SubList" type="List"> <Data> <Item name="AnotherItem" type="String"> ...

Stop Visual Studio 2010 opening XSDs in design mode

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? ...

How to Create an XmlSchema instance from a String or an .xsd stored as a resource

I have an .xsd file stored as a resource in my vb.net project. I need to create an instance of the XmlSchema class using this resource. Any examples of creating an XmlSchema I can locate do one of the following: Create the xmlschema by adding elements and attributes manually like this example. Create the xmlschema using an XmlTextRea...

Querying and format validation of json (analogous to XSD)

Any good ideas about analogues for XSD (i.e., "schema validation") for JSON? My search engine skills are failing me. (FWIW, I'm coming at it from Python.) ...

schema validation HELP (converted from Biztalk 2004 to 2006 R2)

This schema used to work on our Biztalk 2004 environment but throws an error when compiled in Biztalk 2006 R2. <?xml version="1.0" encoding="utf-16"?> <xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns="http://Project.Schemas.External.ScheduleRepair" attributeFormDefault="unqualified" elementFormDefault="qualified" xml...

Does XSD support validating the contents of an XML element?

I'm currently trying to create an XSD where I have a which can have only on of the following values: <media_type>wmv</media-type> or <media_type>h264</media_type> or <media_type>mov</media_type> I have found the <xs:choice/> element, but if I construct a complex type as such: <xs:element name="media_type" type="xs:string"> ...

Better control of for-each in xsl/xpath possible?

Hey Friends I've got another xsl/xpath problem. Sure a beginners problem, but I'm thinking still too "imperative". <!-- XML --> <Module> <WideTeaserElement> <Headline>Bla bla 1</Headline> </WideTeaserElement> <WideTeaserElement> <Headline>Bla bla 2</Headline> </WideTeaserElement> </Module> <!-- XSL --> <!-- ...

Is there ANY cross-platform way of validating xml against an xsd in javascript?

As far as I can tell, the only way of doing it is to use the Microsoft DOM object, but as far as I'm aware this isn't universally available, if you're browsing with Firefox on Linux for example. For reasons of security and minimizing network traffic I can't pass the xml to an external tool to validate (much as I wish I could). Is there ...

Abstraction in an xsd

I'm working on an XSD. I'd like to have a container element (complex type) which contains any element whose base type is component. One approach is... <complexType name="Container"> <sequence> <element name="Child" type="am:Component"></element> </sequence> </complexType> But the problem there is my components are ca...

backslash in regex in xsd with xjc (ant) and jaxb validation

Hi, I have the following regex type in my xsd file: <xsd:simpleType name="Host"> <xsd:restriction base="xsd:string"> <xsd:pattern value="\b(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\b"> </x...

Resolving XSD's using Ivy

Forgive the double post but I am keen on an answer to this. I would like some advice as to the approach I am taking. I am using Ivy for dependency management and am able to download and use all my jar files no issues. I would like to also run the <schemavalidate> task in Ant and would like to use Ivy to download the xsd's and dtd's as s...

How do I modify my settings to allow VS2010 to load 3rd party XSD files from the "Unauthorized Zone"?

I have opened a 3rd party XSD file in Visual Studio 2010 that imports namespaces from other schema files from the same 3rd party. In the XML editor view of the schema file, the xs:import element is underlined with the following error: Request for the permission of type 'System.Security.Permissions.FileIOPermission', mscorlib, Version=4....

Get version of xsd file generated by Visual Studio

I have a ConfigData.xsd file generated by Visual Studio 2008. What's the best way to read/write its version? ...

generate form key from a XML schema

I want send a message encoded as application/x-www-form-urlencoded, and the message is validated by a XML schema, so i find a way to generate a html form from a XML Schema using XSLT. the xsd is below: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:m="http://dongfang- china.com#" t...

How to link an .xsd file created from a SP to a crystal report correctly

I created a dataset (.xsd) from a stored procedure which takes 2 parameters. The .xsd file is linked to a crystal report. When I load the report no data is displayed. Also I dont want the user to be prompted for the parameters as I know the values in code depending on page that requested the report load. How do I link the parameters to t...

Why is an XSD element of type s:date becoming a string when generating a Service Reference?

I'm trying to create a new Service Reference from a WSDL and all of the properties I expect to be DateTimes are instead strings. For example, this xsd definition for Contact: <s:complexType name="Contact"> <s:sequence> <s:element minOccurs="0" maxOccurs="1" name="Address" type="tns:Address" /> <s:element minOccurs="...

xsd validation using schematron

Hi, I'm trying to add schematron validation to my xsd. This is my new xsd : <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; xmlns:sch="http://www.ascc.net/xml/schematron" elementFormDefault="qualified" &gt; <xs:element name="books"> <xs:complextype> <xs:sequence> ;P <xs:element name="book" type="bo...

How should I go about mocking calls to XSD data access?

Hey guys I'm trying to introduce Unit testing and TDD into my code (working as one of a team within a large pre-existing project). The project I'm working on uses XSDs to do a lot of the data access (often with no abstraction, i.e. database calls from the .aspx.cs pages, which is another issue I wish to address at some point). My ques...

XSD: disallow empty element

I have an XML Schema that looks like this: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:element name="root"> <xs:complexType> <xs:sequence> <xs:element name="A" minOccurs="0" maxOccurs="1"/> <xs:element name="B" minOccurs="0" maxOccurs="1"/> <xs:el...

XSD: How do I import a data type from another XSD?

Hello, I have the following start of an XSD: <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:no="http://www.sychophants.com"&gt; <xs:import namespace="http://www.sychophants.com" schemaLocation="current_obs.xsd"/> ...and then some other definitions... <xs:element name="noI...