Correction:
My Bad. I meant XSD ( XML Schema Definition). This is an example of one I wrote for something at ISO. It allows you to define how many of a field may exist, if it is required or not. Its pretty flexible ( at least I think).
Matt
<?xml version="1.0" encoding="ISO-8859-1" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
<xsd:element name="LRPMeteringData">
<xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Event" type="EventType"/>
</xsd:sequence>
<xsd:attribute name="Component" type="ComponentType" use="required"/>
<xsd:attribute name="FileType" type="FileTypeType" use="required"/>
<xsd:attribute name="CreateTime" type="xsd:dateTime" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="LRPSummaryData">
<xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Event" type="EventSummaryType" />
</xsd:sequence>
<xsd:attribute name="CreateTime" type="xsd:dateTime" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:element name="MeterReaders">
<xsd:complexType>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="MeterReader" type="MeterReaderType"/>
</xsd:sequence>
<xsd:attribute name="EffectiveDate" type="xsd:date" use="required"/>
</xsd:complexType>
</xsd:element>
<xsd:complexType name="ContactType">
<xsd:sequence>
<xsd:element name="FirstName" type="xsd:string"/>
<xsd:element name="LastName" type="xsd:string"/>
<xsd:element name="Phone" type="xsd:positiveInteger" minOccurs="0"/>
<xsd:element name="PhoneExt" type="xsd:positiveInteger" minOccurs="0"/>
<xsd:element name="Fax" type="xsd:positiveInteger" minOccurs="0"/>
<xsd:element name="Email" type="xsd:string" minOccurs="0"/>
<xsd:element name="Pager" type="xsd:string" minOccurs="0"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="MeterReaderType">
<xsd:sequence>
<xsd:element name="CustomerID" type="xsd:positiveInteger"/>
<xsd:element name="Name" type="xsd:string"/>
<xsd:element name="IbcsProvider" type="YNType"/>
<xsd:sequence minOccurs="0" maxOccurs="unbounded">
<xsd:element name="Contact" type="ContactType"/>
</xsd:sequence>
</xsd:sequence>
</xsd:complexType>
On Mon, 2006-05-08 at 15:42 +0200, Andrew Beekhof wrote:
On 5/8/06, Matthew Soffen <[EMAIL PROTECTED]> wrote: > Has using an XSL been considered instead of a DTD ? > > Matt my understanding is that XSL will let you transform XML from one "format" to another. but that doesn't do validation as far as i can tell. btw. were the extra changes to bootstrap ok for you? I tried to email you directly but it bounced. > On Mon, 2006-05-08 at 15:00 +0200, Andrew Beekhof wrote: > On May 8, 2006, at 2:44 PM, Lars Marowsky-Bree wrote: > > > On 2006-05-08T14:16:15, Andrew Beekhof <[EMAIL PROTECTED]> wrote: > > > >>> Good point. > >> we also need to find a way to have it ignore the order things appear > >> in... thats going to be a major PITA > > > > You mean within the CIB? Well, the order is defined, doesn't matter > > too > > much, or does it? > > the problem is when you replace things (normally by removing the old > and adding the new) you can affect the order things in the CIB occur in. > > the CIB doesn't care, but the DTD will and if you have dtd validation > turned on... > > So instead of: > > <!ELEMENT configuration (nodes, resources, constraints, metadata, > crm_config)> > > You need: > > <!ELEMENT configuration > (nodes|resources|constraints|metadata| > crm_config)+> > > Which no longer ensures you have exactly one of each. > > I just finished reading a thread from 2000 where this problem was > discussed and the response was "tough luck". > It appears nothing has changed in the last 6 years. > > -- > Andrew Beekhof > > "Too much knowledge leads to confusion; Too many guitar lessons lead > to jazz-fusion!" - TISM > > > > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ > > > _______________________________________________________ > Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org > http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev > Home Page: http://linux-ha.org/ > > > _______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/
_______________________________________________________ Linux-HA-Dev: Linux-HA-Dev@lists.linux-ha.org http://lists.linux-ha.org/mailman/listinfo/linux-ha-dev Home Page: http://linux-ha.org/