> From: Detecca Detecca

>Sent: Wednesday, February 13, 2013 1:11 PM
> 
OK.  I believe I have the solution this time.

That was really tough.  I wish I understood my code better.

Actually, the problem is that the attributeGroup code was written
and contributed by someone else.  And, apparently that code requires
an N level intelligence to understand but I only have an N-1
level brain.

More seriously, the specific problem was that there is a section of
code that looks at the attributeGroup references in each element,
and recursively replaces those references with the attributes
defined in the referenced attributeGroup definition.  So, in our
case, the attributes defined in attributeGroup "long.att" (and the
attributes in attributeGroups that *it* references) need to be
inserted into the element that references attributeGroup
"spirit:long.att".

The existing code was failing to do that because the reference (but
not the name of the definition) included a namespace prefix.  I've
fixed that now.

As always, generateDS.py does not really understand namespace
prefixes.  But, as long as no one uses two attributeGroups with the
same name but different namespace prefixes in the same schema, we
are OK.

I did a spot check of the code that we now generate from the Spirit
XML schema.  It does, now, successfully insert the attributes in
attributeGroup "long.att" (and the attributes in the attributeGroup that
it references) into the elements that reference attributeGroup
"spirit:long.att".

As before, a patched version is in a separate email.  Please let me
know if it works for you.

Thanks again for reporting this, and especially for setting me
straight when I went off into the ditch thinking that we could just
throw away those references.

- Dave


--


Dave Kuhlman
http://www.rexx.com/~dkuhlman

------------------------------------------------------------------------------
Free Next-Gen Firewall Hardware Offer
Buy your Sophos next-gen firewall before the end March 2013 
and get the hardware for free! Learn more.
http://p.sf.net/sfu/sophos-d2d-feb
_______________________________________________
generateds-users mailing list
generateds-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/generateds-users

Reply via email to