I get a strange behavior with the <optional> element.
It looks like if I declare some attributes of an element as
optional in my schema, I get a "Missing attributes" error
for all the other optional attributes whenever at least one
of the optional attributes is declared in the element.
the *group* is optional, not any one of the group.
As soon as you include one, the parser looks for them all,
hence the error message.
HTH DaveP
The following example should clarify this.
Say I have this definition in my schema where all the
attributes are optional except for cardport and daemonport:
port =
element port {
attribute cardport { xsd:nonNegativeInteger },
attribute daemonport { xsd:nonNegativeInteger },
(attribute internal_name { xsd:Name },
attribute lower_bound { xsd:positiveInteger },
attribute upper_bound { xsd:positiveInteger },
attribute skip { xsd:positiveInteger },
attribute allow { xsd:boolean },
attribute auto_select { xsd:boolean })?,
test*
}
If I have this entry in my xml file...
<port cardport="1" daemonport="5" internal_name="dxxxB2C1">
<test testid="HNE"/>
<test testid="HNE_ANN"/>
<test testid="HNE_ANN_THX"/>
</port>
...I get 'Missing attributes "auto_select", "allow", "skip",
"upper_bound", "lower_bound"
But if I have this entry in my xml file...
<port cardport="1" daemonport="5">
<test testid="HNE"/>
<test testid="HNE_ANN"/>
<test testid="HNE_ANN_THX"/>
</port>
... everything is fine.
Am I missing something here?
Thanks in advance,
Jean
Yahoo! Groups Links
-
DISCLAIMER:
NOTICE: The information contained in this email and any attachments is
confidential and may be privileged. If you are not the intended
recipient you should not use, disclose, distribute or copy any of the
content of it or of any attachment; you are requested to notify the
sender immediately of your receipt of the email and then to delete it
and any attachments from your system.
RNIB endeavours to ensure that emails and any attachments generated by
its staff are free from viruses or other contaminants. However, it
cannot accept any responsibility for any such which are transmitted.
We therefore recommend you scan all attachments.
Please note that the statements and views expressed in this email and
any attachments are those of the author and do not necessarily represent
those of RNIB.
RNIB Registered Charity Number: 226227
Website: http://www.rnib.org.uk
------------------------ Yahoo! Groups Sponsor ---------------------~-->
Buy Ink Cartridges or Refill Kits for your HP, Epson, Canon or Lexmark
Printer at MyInks.com. Free s/h on orders $50 or more to the US & Canada.
http://www.c1tracking.com/l.asp?cid=5511
http://us.click.yahoo.com/mOAaAA/3exGAA/qnsNAA/2U_rlB/TM
---------------------------------------------------------------------~->
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/emacs-nxml-mode/
<*> To unsubscribe from this group, send an email to:
emacs-nxml-mode-unsubscribe@xxxxxxxxxxxxxxx
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|