473,383 Members | 1,925 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,383 software developers and data experts.

How to disallow empty string elements using XML Schema?

Hi.
I want to do something like
<root>
<n>Some text only</n>
</root>

I wan't to define a schema that disallows the following xml-files:
<root>
<n/>
</root>
and
<root>
<n></n>
</root>

where the node 'n' is specified in the schema as xsd:string.

Is this possible? I haven't figured out how to do this.

Anyone know how to do this?

Thanks in advance, Jan-Erik
Jul 20 '05 #1
0 1448

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

Similar topics

0
by: Rich Weed | last post by:
<root> <contact> <name1>Joe Blough</name1> <name2>c/o Blough, Inc</name2> <addr1>123 Happy St</addr1> <addr2>PO Box 1234</addr2> <city>Anywhere</city> <state>GA</state> <zip>12345</zip>...
0
by: Stefan Prange | last post by:
Hi everyone, I have a little problem here and wasn't able to find a proper solution by searching the web. So this newsgroups is my last resort ;-) I have an xml-schema definition of an...
2
by: | last post by:
Hi, Another silly question - by default if I define a specific element as a string (xsd:string) in a schema, if I validate a document against that schema and the element is empty, should it, or...
2
by: craig.wagner | last post by:
I have an element in my schema defined as follows: <xs:element name="BillingDate" type="xs:dateTime" nillable="true" minOccurs="0"/> I use the schema to validate incoming documents using an...
2
by: craig.wagner | last post by:
I have an element in my schema defined as follows: <xs:element name="BillingDate" type="xs:dateTime" nillable="true" minOccurs="0"/> I use the schema to validate incoming documents using an...
5
by: wolf_y | last post by:
My question is simply: under what conditions will empty tags of the form <MOM></MOM> pass schema validation? Of course, the mirror question is: under what conditions will empty tags fail...
1
by: DrDavey | last post by:
What are the advantages/disadvantages of using a choice of a several "sub-"elements with empty content (and no attributes) vs. simple content. Here's an example: Using simple content:...
0
by: sayor | last post by:
Hi, I am writing a schema to check for empty elements in an XML file. I am able to do so for simple elements such as: <xs:element name="authorname" type ="requiredstring"></xs:element> by...
3
by: Arndt Jonasson | last post by:
Let's say we have a schema (maybe expressed in XML Schema, but not necessarily so), that allows this instance document: <top> <txt>This is text</txt> <books> <book>Tarzan</book> <book>Harry...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

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.