Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
DTD Question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Ioannis Liabotis  
View profile  
 More options Jan 14 2000, 3:00 am
Newsgroups: comp.text.xml, microsoft.public.xml
From: Ioannis Liabotis <i.liabo...@ee.ucl.ac.uk>
Date: 2000/01/14
Subject: DTD Question
Hello everybody,

is it possible to declare a list of values for an element??

e.g.
<!ELEMENT month ( month_name)>
is it possible to restrict month name to one of JAN, FEB,...DEC??

Thank you in advance.
Giannis.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Lance Purple  
View profile  
 More options Jan 14 2000, 3:00 am
Newsgroups: comp.text.xml, microsoft.public.xml
From: lpur...@netcom.com (Lance Purple)
Date: 2000/01/14
Subject: Re: DTD Question
Ioannis Liabotis  <i.liabo...@ee.ucl.ac.uk> wrote:

>is it possible to declare a list of values for an element??
>e.g.  <!ELEMENT month ( month_name)>
>is it possible to restrict month name to one of JAN, FEB,...DEC??

No, but you can declare the them as attribute values or empty tags,

    <!ELEMENT month EMPTY>
    <!ATTLIST month name ( JAN | FEB | MAR ... ) #required>

    --->  <month name="JAN"/>

Or

    <!ELEMENT month ( JAN | FEB | MAR | APR ...) >
    <!ELEMENT JAN EMPTY >
    <!ELEMENT FEB EMPTY >
     ... etc.

    --->  <month><JAN/></month>

Hope that helps.

--
,--------------------------------------------,
| Lance Purple  (lpurple at netcom dot com)  |
'--------------------------------------------'


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joseph Kesselman (yclept Keshlam)  
View profile  
 More options Jan 18 2000, 3:00 am
Newsgroups: comp.text.xml, microsoft.public.xml
From: "Joseph Kesselman (yclept Keshlam)" <kesh...@us.ibm.com>
Date: 2000/01/18
Subject: Re: DTD Question

Ioannis Liabotis wrote:
> <!ELEMENT month ( month_name)>
> is it possible to restrict month name to one of JAN, FEB,...DEC??

Not using DTDs. XML Schemas may add that capabiility. You
_can_ specify sets of legal values for attributes; I'd
suggest you go that route... or test for legal value in your
application code.

--
-----------------------------------------------------------------
Joe Kesselman, kesh...@us.ibm.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bobcat9  
View profile  
 More options Jan 19 2000, 3:00 am
Newsgroups: comp.text.xml, microsoft.public.xml
From: bobc...@my-deja.com
Date: 2000/01/19
Subject: Re: DTD Question
Schemas are definately the way to go but when is the W3 going to release
a solid specification for them?  Until then it seems we'll never be able
to actually validate XML with a schema.
What is your take on this Mr. Kesselman?

In article <3884A27D.4B462...@us.ibm.com>,
  "Joseph Kesselman (yclept Keshlam)" <kesh...@us.ibm.com> wrote:

> Ioannis Liabotis wrote:
> > <!ELEMENT month ( month_name)>
> > is it possible to restrict month name to one of JAN, FEB,...DEC??

> Not using DTDs. XML Schemas may add that capabiility. You
> _can_ specify sets of legal values for attributes; I'd
> suggest you go that route... or test for legal value in your
> application code.

> --
> -----------------------------------------------------------------
> Joe Kesselman, kesh...@us.ibm.com

Sent via Deja.com http://www.deja.com/
Before you buy.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Joseph Kesselman (yclept Keshlam)  
View profile  
 More options Jan 19 2000, 3:00 am
Newsgroups: comp.text.xml, microsoft.public.xml
From: "Joseph Kesselman (yclept Keshlam)" <kesh...@us.ibm.com>
Date: 2000/01/19
Subject: Re: DTD Question

bobc...@my-deja.com wrote:>
> Schemas are definately the way to go but when is the W3 going to release
> a solid specification for them?

I'm not on the Schema WG; I don't know any more about target
dates than the rest of you. I _have_ heard, informally, that
they've made a considerable amount of progress over the past
month in resolving some of the most contentious issues,
which is encouraging.

> Until then it seems we'll never be able
> to actually validate XML with a schema.

Not portably, anyway.

It's the same situation that XSLT has been in until recently
-- the spec was still evolving, so there weren't a lot of
folks willing to invest in pre-standard prototypes and those
prototypes didn't all agree with each other. You could use
them on an experimental basis inside your own shop, but it
was generally a bad idea to assume that the customer's
version would be compatable... or that they had a copy at
all. XSLT is settling down now; schemas will do likewise.

(I'm also hoping it's soon. We'd like to start writing
support for schemas into the DOM APIs...)

Ah, the joys of being on the leading edge of technology...
<smile/>

--
-----------------------------------------------------------------
Joe Kesselman, kesh...@us.ibm.com


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »