Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > XML > list of posible values for a tag content

Reply
Thread Tools

list of posible values for a tag content

 
 
Sergei
Guest
Posts: n/a
 
      11-19-2005
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

 
Reply With Quote
 
 
 
 
Peter Flynn
Guest
Posts: n/a
 
      11-20-2005
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/

 
Reply With Quote
 
 
 
 
Sergei
Guest
Posts: n/a
 
      11-25-2005
Thanks a lot!
That really helps!
-- Sergei

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
Select text within a div tag by clicking on content of div tag or a button? visu Javascript 4 11-22-2006 06:25 AM
java macros will work in StarOffice?if its posible, How do you edit in StarOffice. koli Java 0 04-10-2006 07:23 AM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
Select text within a div tag by clicking on content of div tag? M Wells Javascript 0 10-06-2004 11:04 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57