xml-schema

Why can't my JAXB Unmarshaller find an element declared in an imported schema?

I have two schemas A and B with a circular dependency (it's an intermediate step). The XML files I'm using as input validate against the schema according to xmllint and Visual Studio. Eclipse is telling me that both schemas contain two global components with the same name. A.xsd: <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"...

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

How to validate string against XML schema entry using .Net

I have a string (source string) and XML schema string. How do I validate this string against the schema entry? I do not need to validate whole XML document, just check if the string matches the certain XML schema entry. I found it extremely cumbersome to wrap the string to XML document and then validate against all the schema, is ther...

Are there XML like Standards to write Sheet music

Hey All, Is there an xml or some form of a text standard that one can write music sheets in? For example: <key= "C" /> <tempo= "90" /> <beat= "4/4" /> <measure id="1"> // some form of music goes here </measure> ...

Extension in XMlSchema, how to?

Hi, I have written a XMLSchema which looks like the one below. The idea is that baseContainer only allows some tags and fullContainer allows all tags in baseContainer + some other tags. The tags may come in any order and there can be multiple of all the tags. In my real sample there is a lot more tags so this method of write XMLSchema t...

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

How can I load .xsd file to track relationships(nesting) between elements?

I know, where is XmlSchema class in dot net, but it does not allow to load file into it. Is there a clean solution to load xsd file and travel between elements? ...

PHP / NuSoap - How can I format the output XML?

Hiya, I'm using PHP and NuSOAP to create a webservice to serve up various bit of my database to an external application. The service works just fine, but I need to tweak the XML output from this: <?xml version="1.0" encoding="ISO-8859-1"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http:/...

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 avoid downloading schema file from internet during spring initialization

I have a web app running on a production server which does not allow public internet access. The initialization fails with error like 2010-02-18 15:21:33,150 **WARN** [SimpleSaxErrorHandler.java:47] Ignored XML validation warning org.xml.sax.SAXParseException: schema_reference.4: Failed to read schema document 'https://jax-ws.dev.java...

Read typed objects from XML using known XSD

I have the following (as an example) XML file and XSD. <?xml version="1.0" encoding="utf-8" ?> <foo> <DateVal>2010-02-18T01:02:03</DateVal> <TimeVal>PT10H5M3S</TimeVal> </foo> and version="1.0" encoding="utf-8"?> <xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSc...

JAXB: Unmarshalling does not always populate certain classes?

Hello, I have a JAXB class generation problem I was hoping to get some help with. Here's the part of the XML that is the source of my problem... Code: <xs:complexType name="IDType"> <xs:choice minOccurs="0" maxOccurs="2"> <xs:element name="DriversLicense" minOccurs="0" maxOccurs="1" type="an..35" /> <xs:element name="SSN"...

How to use attribute value as a discriminator for XML polymorphic type selection?

I am trying to write XML Schema by existing XML format description (i.e. document - free form description of elements multiplicity and types). My final idea is to feed such XSD to code generator and get binding classes. Here is an example I cannot cope with: packet1.xml: <?xml version="1.0" ?> <packet kind="type1"> <field1>value1<...

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

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

java.util.logging XMLFormatter Schema?

What is the formal definition of the schema of messages created by java.util.logging.XMLFormatter? Thanks ...

Serializing java objects with respect to xml schema loaded at runtime

I call an XML document three-layered if its structure is laid out as following: the root element contains some container elements (I'll call them entities), each of them has some simpleType elements inside (I'll call them properties). Something like that: <data> <spaceship> <number>1024</number> <name>KTHX</name> </spaceship> ...

Any way to have a schema use user-defined elements in its structure?

I'm wondering if it's possible to have a schema use user-defined elements (from the XML) for its structure. As in, as a user, I would be able to have something like: <subjectType> <name>plane</name> <name>bird</name> </subjectType> <questionType> <name>organic</name> <name>awesome</name> </questionType> <subjectInterview su...

What is the difference between XML and XSD?

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