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

list of posible values for a tag content

Hello everybody,
I need to validate an XML document with a DTD file.
The problem is that <lang> tag is empty some times, (but it should
contain ENG,RUS,SPA...)
which causes en error later in the program. How can I catch this with
DTD validation ?
Is there a way to specify a list of posible values for a tag content ?
Or it only can be done for attributes ?
Any suggestions are greatly appreciated.
--Sergei

Nov 23 '05 #1
2 1203
Sergei wrote:
Hello everybody,
I need to validate an XML document with a DTD file.
See http://xml.silmaril.ie/authors/parsers/
The problem is that <lang> tag
Element. See http://xml.silmaril.ie/authors/makeup/
is empty some times, (but it should
contain ENG,RUS,SPA...)
which causes en error later in the program. How can I catch this with
DTD validation ?
Is this your own DTD that you have written
or someone else's that you have been given?
Is there a way to specify a list of posible values for a tag content ?
No. Not with a DTD. If you need to check element content you can write
an XSLT program that will do this. Or use a Schema.
Or it only can be done for attributes ?


Correct.

///Peter
--
XML FAQ: http://xml.silmaril.ie/

Nov 23 '05 #2
Thanks a lot!
That really helps!
-- Sergei

Nov 25 '05 #3

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

Similar topics

13
by: querypk | last post by:
If this is the list. values = as we can see there are peaks in the list.that is 0,72,0 is a group(triangle) with peak 72.then 0, 4, 9, 2, 0, 0 with peak 9 and 0, 42, 26, 0 with...
4
by: smshahriar | last post by:
Hi, I want to scan from the following string all the hex numbers and populate an array of integers: 0x27 0x00 0x30 0x00 0x33 0x00 0x36 0x00
2
by: ramesh | last post by:
hi, I am using Com+ in my application. It will have InsertRecords,selectRecords,updateRecords function. In the Web Form i have Drop-down list. I want to select records from SQL and add it to this...
59
by: Steve R. Hastings | last post by:
So, Python 2.5 will have new any() and all() functions. http://www.python.org/dev/peps/pep-0356/ any(seq) returns True if any value in seq evaluates true, False otherwise. all(seq) returns...
2
ak1dnar
by: ak1dnar | last post by:
Hi, I have build up a client registration application with HTML/JSP/JS. the form consist with two fields Name,Email. Before insert these values to MySQL table i have done a validation...
2
by: sree reddy | last post by:
..cs using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls;
25
RMWChaos
by: RMWChaos | last post by:
Any JSON experts out there? I'd like to know if it is possible, and if so how, to iterate through a JSON property list so that each iteration selects the next value for each object. Here is an...
15
RMWChaos
by: RMWChaos | last post by:
As usual, an overly-long, overly-explanatory post. Better too much info than too little, right? A couple weeks ago, I asked for some assistance iterating through a JSON property list so that my...
9
by: MP12 | last post by:
I've got a <div class="content"which is within a <div id="main"> I'm finding that the ul and li values for the main div are being inherited into the content div, in particular, the main div has a...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

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.