maxOccurs setting with no minOccurs specified

B

bruce_phipps

If I have an <element name="test" maxOccurs="unbounded">
with no minOccurs attribute specified
does this mean I can have 0..unbounded occurences of <test>?
Or 1..unbounded occurences of test?

Thanks
Bruce
 
P

Pavel Lepin

If I have an <element name="test" maxOccurs="unbounded">
with no minOccurs attribute specified
does this mean I can have 0..unbounded occurences of
<test>? Or 1..unbounded occurences of test?

Read XML Schema Part 1: Structures 2E, 3.3.2.
 
U

usenet

If I have an <element name="test" maxOccurs="unbounded">
with no minOccurs attribute specified
does this mean I can have 0..unbounded occurences of <test>?
Or 1..unbounded occurences of test?

The default for both minOccurs and maxOccurs is 1.

Conversely, attributes are optional by default!

HTH,

Pete Cordell
Codalogic
Visit http://www.codalogic.com/lmx/
for XML Schema to C++ data binding
 
U

usenet

Pavel said:
Read XML Schema Part 1: Structures 2E, 3.3.2.

Or, if you value your sanity, you might want to buy a book! There are
some listed at:

http://amazon.com/s/ref=nb_ss_gw/10...h-alias=aps&field-keywords=xml+schema&x=0&y=0

I personally get on well with Eric van der Vlist's XML Schema book
even though it doesn't rate too well on Amazon. It's got an appendix
at the back that's particularly good at answering this sort of
question.

I haven't read Priscilla's book. I keep meaning to buy a copy to see
whether it's worth recommending. She should know what she's talking
about though and has a lot of experience in XML schema in particular
and W3C in general.

Or, if you want a really basic introduction which aims to get you
started, but not teach you everything, there's my guide at:

http://www.codalogic.com/lmx/xsd-overview.html !!!

HTH,

Pete Cordell
Codalogic
Visit http://www.codalogic.com/lmx/
for XML Schema to C++ data binding
 
P

Pavel Lepin

in
Or, if you value your sanity...

I think I don't. I started to find a perverse pleasure in
trying to make any sense out of W3C recommendations. Sure,
it's mind-boggling. But the sheer sense of achievement in
it is priceless.
you might want to buy a book!

'Buy a book', they say. Well, maybe I would, but where the
heck is an electronic version, huh? Huh? I don't read stuff
printed on paper as a matter of principle these days.
Or, if you want a really basic introduction which aims to
get you started, but not teach you everything, there's my
guide at:

http://www.codalogic.com/lmx/xsd-overview.html !!!

Actually, the Original Old Authentic W3C Primer seems just
fine to me. A bit chewy, perhaps, but nothing a healthy
mind couldn't deal with.
 
U

usenet

in



I think I don't. I started to find a perverse pleasure in
trying to make any sense out of W3C recommendations. Sure,
it's mind-boggling. But the sheer sense of achievement in
it is priceless.

I'm not sure whether to give you my respect, or my sympathy :)
Actually, the Original Old Authentic W3C Primer seems just
fine to me. A bit chewy, perhaps, but nothing a healthy
mind couldn't deal with.

Yes, I meant to mention that in my original answer.

My view is that learning schema should be like climbing a mountain.
You go up one level, and then spend a while there acclimatizing.
Then, when your really comfortable with the principles you've learnt
go up another level and so on. Jumping straight into the Schema part
1 spec is a bit like going straight into the death zone. It'll
certainly give you a headache, and you might loose the will to live!

That's why I did my baby guide as a first step. I keep meaning to
write the next step! But then maybe schema part 0 is the next step.

My 2 cents!!!

Pete Cordell
Codalogic
Visit http://www.codalogic.com/lmx/
for XML Schema to C++ data binding
 
P

Pavel Lepin

I'm not sure whether to give you my respect, or my
sympathy :)

Oh, sympathy. Sympathy for sure.
That's why I did my baby guide as a first step. I keep
meaning to write the next step!

I know the feeling. On the other hand, you went ahead and
wrote that guide...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top