xsd

how to validate empty string value tag in xsd

I have an xml file which is having some date values and other datatypes. <Purchasedate Name="purcaseDate" value=""/> and i am validating these xml file with xsd file.I have xsd. In shcema i have written reglarexpression pattern for dd/mm/yyyy format. this is working fine if value attribute having some values.. my pattes is validating...

generate PHP classes from XSD?

Is there in the world analogues of JavaBeans or JAXB for PHP? Is it possible to generate PHP classes from XML schema? It's common practice to publish API's as XSD schemas. Java and C# guys can get advantage of this by generating classes right from XSD. Is there same tool for PHP? ...

XSD: How to restrict enumeration values of a derived complex type?

Given the following example: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt; <xs:complexType name="Book" abstract="true"> <xs:sequence> <xs:element name="titel" type="xs:string"> </xs:element> <xs:element name="bookCode" type="BookEnum"/> </xs:sequence> </xs:complexT...

JAXB IDREF and ID usage?

I'm looking to write an XSD which will be used to generate some Java classes via JAXB. I'd like the resulting XML to look like this: <Appointment> <Patient ref="12345">Bob Smith</Patient> <Type>Some Appointment Type</Type> <Date>2010-02-17</Date> .... </Appointment> So, given this schema I'm wanting it to generate a c...

XSD - how to allow elements in any order any number of times?

I am trying to create an XSD, and trying to write the definition with the following requirement: Allow child element specified to appear any number of times (0 to unbounded) Allow child elements to be in any order I looked around and found various solutions like this: <xs:element name="foo"> <xsl:complexType> <xs:choice minO...

XML schema for a complex type and I want an attribute on it.

In your xml wisdom, have you a idea on how to define the type for “bDead” to be? (type=”xs:Boolean”) <bDead>0 <xdn>state</xdn> <xdv>alive</xdv> </bDead> Here’s the schema. Where/how would I specify the type and ranges for bdead? I don’t think that I can.. <xs:element name="bDead" > <xs:complexType mixed="true"> <xs:sequence> ...

How to write an XML Schema for which this XML document is a valid instance?

<Unit Number="1"> <Identifier Type="ABC" Text="STO0001"/> <Identifier Type="DEF" Text="Some Value"/> <Identifier Type="GHI" Text="20070805"/> <Disposition Unit="Accept"/> </Unit> I need to validate that Type="DEF" Text="Some Value" is not empty Something Like: <xs:complexType name="requiredValue" abstract="true"/> <xs:complexTy...

Schema of an XSD?

I'm looking for the Schema document on basis of which an XSD is created. I need this because I want to transform an XML to XSD using XSL. ...

Tool for converting an XSD to EBNF?

Does anyone know of a tool that will take an XSD file as input and produce EBNF? ...

Fast python XML validator with XPath support

I need to read a large XML (65 Mb), validate it against a xsd, and run XPath queries on it. Below, I've given an lxml version of that. It takes a lot of time (over 5 minutes) to run the query but validation seems to be pretty quick. I've a couple of questions. How would a performance minded Python programmer write the program using lxm...

PHP XML manager/Xquery creator?

Hi, i'm looking for a PHP solution to easily traverse (readonly) XML files (rss feeds) from websites. Other providers have XML feeds with different markups and I want to have an easy PHP (possible self-built) manager to just enter an URI and then immediately be able to 'select' nodes/attributes/nodegroups to create somesort of definitio...

Performance hit when using XmlReaderSettings.Schemas and specifying multiple schemas to be used

I am using XmlReader to validate a XML file as per the supplied schema. For that I am creating an instance of XmlReaderSettings and setting it's ValidationType as ValidationType.Schema and it's Schemas Property as XxmlSchemaSet. A draft code is like XmlReaderSettings rSettings = new XmlReaderSettings(); XmlSchemaSet schemaSet = new Xml...

Generate random xml / web service response based on xsd / wsdl

I've just seen a case of the same old familiar story - we are trying to integrate to an external 3rd party web service, but the development has been done using a simulated web service. Of course as soon as we integrate with the actual web service we find that our code makes assumptions about the web service response, and so everything f...

How do you add an attribute to an xml schema element?

I have a project where a xsd document is loaded, and based on that a editor is created for each element. And then xml that implements that schema is loaded into the editor. This could be a simple textbox for a string, a datepicker for a date or a more complex data like a chapter with associated metadata. The editor is generic so the edit...

Convert xs:Enumerations in XSD to dropdown lists in Excel

I have an XSD file which contains the schema for my XML. The XSD file contains an xs:Enumeration definition, which allows me to choose between 5 options as a value for one of the nodes. Now, we want to be able to generate this data through Excel, so that non-technical people can create it. When I import this XSD file into Excel, i want...

XML Schema (XSD) to Rails ActiveRecord Mapping?

I'm looking for a way to convert an XML Schema definition file into an ActiveRecord modeled database. Does anyone know of a tool that happens to do this? So far the best way I've found is to first load the XSD into an RDBMS like postgres or mysql and then have rails connect to do a rake db:schema:dump. This however, only leaves me wit...

XML Validation XSD problem

Hello! XML: <?xml version="1.0" encoding="UTF-8"?> <data> <ac code="B2" auto="1"> <fee> <if country="RU">35e 50e 50e 80e 15e 10e</if> <else>10e</else> </fee> <comission> <if country="RU">3%</if> <else>5%</else> </comission> </ac> </data> Schema: ...

XML Validation XSD problem

Hello. XML: <?xml version="1.0" encoding="UTF-8"?> <data> <ac code="JL" auto="1"> <fee>10e</fee> <comission> <if country="JP">5%</if> <else>7%</else> </comission> </ac> <ac code="B2" auto="1"> <fee> <if country="RU">35e 50e 50e 80e 15e 10e</if> <...

What is the difference between XML and XSD?

What is the difference between Extensible Markup Language (XML) and XML Schema (XSD)? ...

Reverse engineering java objects into an xsd.

http://stackoverflow.com/questions/607141/what-is-jaxb-and-why-would-i-use-it/607248#607248 This fellow mentions some frameworks that allow you to go from java binding objects and re-create the schema that generated them. Does anyone know if this is possible with the Castor binding tool? We are using version .9 something. Someone mod...