473,326 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Schema 0 or more

sk
For the following xml document, schema is going to be like the following
but i am not sure how I can define meta_attribute in the schema so that
meta_attribute can be 0 or more.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="iims11526672557483110">
<xs:complexType>
<xs:sequence>
<xs:element name="iims11526672678667402">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50">
</xs:maxLength></xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="iims11526672818165646">
<xs:simpleType>
<xs:restriction base="xs:integer">
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
=======XML DOC=================
<?xml version="1.0" encoding="UTF-8"?>
<ms11526672557483110>
<ms11526672678667402><![CDATA[This is my xml.]]></ms11526672678667402>
<ms11526672818165646>45</ms11526672818165646>
<meta_attribute>
<item1>11:45:07</item2>
<item2>11:47:10</item2>
</meta_attribute>
</ms11526672557483110>

Jul 13 '06 #1
1 1041
<xs:sequence>
<xs:element name="iims11526672678667402">
...
</xs:element>
<xs:element name="iims11526672818165646">
...
</xs:element>
<xs:element minOccurs="0" maxOccurs="unbounded"
name="meta_attribute">
...
</xs:element>
</xs:sequence>

Best Regards,
George
---------------------------------------------------------------------
George Cristian Bina
<oXygen/XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com
sk wrote:
For the following xml document, schema is going to be like the following
but i am not sure how I can define meta_attribute in the schema so that
meta_attribute can be 0 or more.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="iims11526672557483110">
<xs:complexType>
<xs:sequence>
<xs:element name="iims11526672678667402">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="50">
</xs:maxLength></xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="iims11526672818165646">
<xs:simpleType>
<xs:restriction base="xs:integer">
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
=======XML DOC=================
<?xml version="1.0" encoding="UTF-8"?>
<ms11526672557483110>
<ms11526672678667402><![CDATA[This is my xml.]]></ms11526672678667402>
<ms11526672818165646>45</ms11526672818165646>
<meta_attribute>
<item1>11:45:07</item2>
<item2>11:47:10</item2>
</meta_attribute>
</ms11526672557483110>
Jul 14 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Gregg Williams | last post by:
Hi--I am having a problem designing a schema to fit my XML data, and I'm hoping that someone can help. Essentially, I have a schema in mind and two target vocabularies for it, where one vocabulary...
6
by: Pieter | last post by:
I've read a lot of posts on "why relax ng is so very good" and on "why w3c xml schema should be the only schema language". I'm, however, still not clear on why I should prefer one over the other. ...
4
by: Ian | last post by:
I would like to set a path to a schema where both the xml file and the schema are on my local hard drive (e.g. c:\XML\auto.xml and c:\XML\auto.xsd) Thank you, Ian
0
by: Philippe Poulard | last post by:
People familiar with DTD, Relax NG, W3C XML Schema, Schematron, and that are aware of more recent works such as DSDL should recognize all of them in the Active Schema Language. Anyway, ASL...
0
by: Steve Jorgensen | last post by:
In a schema I've been working on recently, a convention I evolved was to use a consistent naming pattern such that, for instance, a Resident could appear in a ResidentSet, and could be referred to...
3
by: farseer | last post by:
Hello, i have a schema which also imports the XHTML schema: <xsd:import namespace="http://www.w3.org/1999/xhtml" schemaLocation="http://www.w3.org/2002/08/xhtml/xhtml1-strict.xsd"/> This...
4
by: cmc | last post by:
I need some clarification to help me understand the DB2 strucure more. The questions are about "implicit schema" 1. This is a very interest concpet that DB2 let every user to create new schema...
9
by: mstilli | last post by:
Hi, I am trying to use schema for server side validation using xerces to catch the validation errors. validating this XML: <Content4> <textarea13></textarea13>...
0
by: rautsmita | last post by:
hello friends , i am using to jdk6 and JAXB2.0, i have geomtry.xsd file i am trying to compile this file using jaxb but i got some error i.e.The particle of the type is not a valid restriction of...
3
by: Kai Schlamp | last post by:
Hello! In my schema I have the following: <xs:complexType name="textareaType"> <xs:simpleContent> <xs:restriction base="xs:string"> <xs:attribute ref="label" use="required" />...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.