|
From: Stephan C. <cla...@st...> - 2007-04-11 21:22:27
|
Hi Neal
I think I found the bug which caused the rejection of the empty element.
I'll commit the changes right after this mail.
The |= operator will have to wait until the weekend.
greets
Stephan
Neal Lester wrote:
> Hi Stephan,
>
> I've started testing the new xml authoring generation/xml validation code.
>
> I have a rnc which has an element:
>
> level_2_button = element standard_page:level_2_button { name, value,
> display_value, tool_tip?, text_item? }
> display_value = attribute display_value { text }
>
> name and value are attributes declared in goa_common
> tool_tip and text_item are elements declared in goa_common
>
> if I call:
>
> start_level_2_button_element ("Name", "Value", "Display Value")
> end_current_element
>
> I get an exception although this element is permitted to be empty.
> The generated validity statement looks like:
>
> level_2_button_content_validity: GOA_XML_ELEMENT_SCHEMA is
> -- Schema representing valid contents of a(n) level_2_button element
> once
> create Result.make (
> create {GOA_XML_SCHEMA_ELEMENT_CONJUNCTION}.make_required (
> <<
> create {GOA_XML_SCHEMA_ELEMENT}.make_optional (tool_tip_element_code),
> create {GOA_XML_SCHEMA_ELEMENT}.make_optional (text_item_element_code)
> >>)
> )
> end
>
> Shouldn't the conjunction also be make_optional?
>
> Also, it appears that using the |= operator no longer works when
> combining schemas. I noticed the template to deal with that in (I
> think) flatten_2 was commented out. I just removed the only place
> I'm using that operator (you may have noticed todays change in
> goa_common.rnc) so fixing this is a lower priority (if it won't be
> done for a while we should update the documentation accordingly).
>
> Neal
>
>
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Goanna-developers mailing list
> Goa...@li...
> https://lists.sourceforge.net/lists/listinfo/goanna-developers
>
>
|