On Tue, Jan 12, 2010 at 5:00 PM, Chuck Savage <[email protected]> wrote:

> What's the difference between <view> and <include> tags that are child
> tags of <views>?
>

The <view> and <include> elements are synonyms when used as children of the
<views> element.


>
> Scaffolds create child tags to <views> called <view>  Its not in the
> documentation for the views tag here
>
> http://trac.model-glue.com/wiki/ReferenceMaterials/ModelGlueXmlReference#views
> ,
> and they appear to run the same as <include> tags.
>

The <include> element seems to be more widely used than the <view> element,
and the lack of documentation of the latter would account for at least some
of this.

I find the <include> element mildly annoying because it has two different
contexts: as a child of <modelglue> and as a child of <views>. The set of
valid attributes for the element in each context is different, and AFAIK
such validation logic cannot be represented in either a DTD or an XML
schema. I like my XML to be "validatable" even when it is not required by
the program that parses it.

It would be nice to deprecate the use of <include> as a child of <views>,
but that use is far too entrenched to make sense anymore. A more practical
remedy would be to deprecate the use of <include> as a child of <modelglue>
since this use is much rarer, and replace it with a new synonym element. The
equivalent XML element in ColdSpring is <import>, so that would be my first
choice.

Now that you mentioned the Model-Glue XML Reference, I noticed a number of
other minor errors and omissions there. I'll start reviewing it and apply
fixes as I see them.

PS. A peek at the XML parser code in SVN suggests there may not be anything
special about the names of the child elements under <views>. As a fun
experiment, try giving your view tags completely silly names and see if your
application still works.

Cheers,

-- Dennis
-- 
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog

You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en

Reply via email to