CellML Discussion List

Text archives Help


[cellml-discussion] Web-based validator for CellML 1.0


Chronological Thread 
  • From: jonathan.cooper at comlab.ox.ac.uk (Jonathan Cooper)
  • Subject: [cellml-discussion] Web-based validator for CellML 1.0
  • Date: Fri, 18 Nov 2005 12:12:31 +0000

On Fri, Nov 18, 2005 at 04:10:42PM +1300, David Nickerson wrote:
> Hi Jonathan,
>
> Great work on the validator - thanks!

Thank you :)

> Just a couple of initial points. Valid models are free to use the full
> range of MathML 2.0 elements - the subset specified in the CellML 1.0
> specification should just be viewed as the minimum set that an
> application need implement to be thought CellML compliant (whatever that
> might mean). Its something that we regret and now and then think about
> removing from the 1.1 specification. So I wouldn't worry too much about
> ensuring that models conform to the subset.

Fair enough. I wouldn't have made it an error if models didn't conform,
but thought giving a warning might be friendly.

> Regarding the first query: Rule 2.5.2 conflicts with the standard
> interpretation of attribute namespaces. Attributes without an explicit
> namespace are considered to be in the null (local) namespace, not the
> namespace of the parent element.
>
> To date we have been writing models using this rule and most software
> that reads CellML also uses this. So all the models currently in the
> CellML model repository are invalid unless this rule is followed. With
> your validator, it would be good if the behaviour implied by rule 2.5.2
> overruled that of the default namespace behaviour for elements in the
> CellML namespace - since these elements should be goverened by the
> CellML specifcation. Do you have any specific arguments for enforcing
> the null namespace rather than the parent element namespace for elements
> in the CellML namespace ??

Well, we can start with the 'Namespaces in XML' Recommendation. Section
5.2 states "Note that default namespaces do not apply directly to
attributes". Further, the second example in section 5.3 "is legal [...]
because the default namespace does not apply to attribute names".
Namespace-aware XML parsers should thus behave in this way.

The RELAX NG book has this to say on the subject:
"[Attributes] get special treatment in that the default namespace
doesn't apply to them and any attributes that have no prefix are
considered to have no namespace URI. They sort of belong to the
namespace of their parent element but not exactly. The reason for
this is that attributes are supposed to provide metadata qualifying
their parent element rather than to contain actual information. Being
qualifiers, it's often considered that by default they belong to the
same vocabulary as their parent elements. [Hence why attributes are
generally kept unprefixed.] Technically, however, these attributes
are in no namespace and have no namespace URI."
In the RELAX NG XML validation language, the default namespace does not
apply to attributes without a namespace prefix, and I use RELAX NG to
check most of the grammar of CellML documents.

This shouldn't cause any problems with existing models - I haven't
noticed any of the models in the repository that I've tested on being
invalid because of this, and they wont be unless they explicitly
associate the CellML namespace with an attribute inside a CellML element
(which would be rather a strange thing to do). Somehow, I doubt that
CellML tools would have a problem with this either, unless they're based
on broken XML parsers.

The CellML specification does still govern the use of unprefixed
attributes within CellML elements; they don't have to be in the CellML
namespace for it to do so. User-defined extension attributes still need
to be in a separate, explicit, namespace, so don't conflict with
attributes defined in the specification.

I hope that clears the issue up a bit.

Jonathan.


> Jonathan Cooper wrote:
> > I've been working on a validation tool for CellML files, since none of
> > the current tools were draconian enough for my purposes, and it's useful
> > for getting to grips with the format. It's now at a stage where I think
> > it would be useful for other people, plus I'd quite like some feedback on
> > anything I've missed.
> >
> > Main features:
> > * Strict adherence to the CellML 1.0 specification.
> > * Validation of MathML 2 based on the W3C's DTD.
> > * Units checking, both of connections and mathematics.
> >
> > The software is currently available online at
> > <https://chaste.ediamond.ox.ac.uk/cellml/>, and has a web-based interface
> > for ease of use as well as a downloadable version which can be used as a
> > command-line tool.
> >
> > Enjoy!
> >
> > Jonathan.
> >
> _______________________________________________
> cellml-discussion mailing list
> cellml-discussion at cellml.org
> http://www.cellml.org/mailman/listinfo/cellml-discussion
>

--
Jonathan Cooper MSN: msn at jonc.me.uk www: jonc.me.uk/

"The problem with the gene pool is there's no lifeguard" - Steven Wright




Archive powered by MHonArc 2.6.18.

Top of page