[PATCH] XML validity of kcfg files

Christian Mueller cmueller at gmx.de
Sat Oct 30 20:18:48 BST 2004


Am Samstag, 30. Oktober 2004 20:59 schrieb Ingo Klöcker:
> On Saturday 30 October 2004 19:52, Christian Mueller wrote:
> >  <!ELEMENT entry
> > (parameter?,label?,whatsthis?,choices?,code?,default*,min?,max?)>
> >
> > That means that the subelements must appear in exactly that order
> > (if they are present, "?" and "*" allow elements to appear "zero
> > times").
> 
> Is there a valid reason for making this order mandatory, i.e. does 
> changing the order change the semantics? If not, then the DTD is IMO 
> too strict.


Please correct me if I'm wrong, but I don't think this enforced order 
is optional.  To my knowledge that's just how DTDs work. 

From http://www.juicystudio.com/tutorial/xml/multiplicity.asp : 
"The order of the elements is determined by the 
order they are specified with a comma between each element."

You could use constructs like (name,email|email,name) but you certainly
don't want to do that with 10 elements instead of 2 because you'd have 
to list all the permutations.


Christian. 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20041030/c3dd9ee3/attachment.sig>


More information about the kde-core-devel mailing list