[whatwg] [WF2] Web Forms 2.0: Repetition and type ID
ian at hixie.ch
Sun Jul 3 18:20:45 PDT 2005
On Mon, 4 Jul 2005, Robin Berjon wrote:
> > [things that it is likely schema systems can't check:]
> > * checking the MIME type of the file
> > * there must not be more than one <dfn> per term
> > * some of the more exotic content models, e.g. <ins>, <del>, the
> > distinction between inline-level containers and block-level containers
> > * checking conformance of <meta> elements (requires parsing a profile)
> > ...and of course:
> > * IDs may contain any characters, not just those allowed in XML IDs.
> Amongst the tools that have been mentionned was Schematron. Out of the
> box Schematron can't check a media type, but with a very trivial to
> write extension function it could. All the rest that you mention seems
> very much doable. Schematron is built on XPath, which is a very useful
> and powerful little language.
Cool. In that case I look forward to a Schematron HTML5 conformance
Just out of interest, how would you do the second one above? Making sure
that in any one document, there is only one <dfn> for each term defined?
The relevant part of the spec being:
| Defining term: If the dfn element has a title attribute, then the exact
| value of that attribute is the term being defined. Otherwise, if it
| contains exactly one element child node and no child text nodes, and
| that child element is an abbr element with a title attribute, then the
| exact value of that attribute is the term being defined. Otherwise, it
| is the exact textContent of the dfn element that gives the term being
| defined. [...]
| There must only be one dfn element per document for each term defined
| (i.e. there must not be any duplicate terms).
It's simple to implement that in, e.g., a dedicated perl-based conformance
checker, but I have no idea how you'd do that in Schematron.
> > > Generic XML editors like XXE have support for using a schema to
> > > guide the editing process, but have no knowledge specific to a given
> > > language like XHTML. These tools, and other generic XML tools, will
> > > not be able to recognize the IDness of the 'id' attribute if it's
> > > not possible to express this in a schema.
> > As mentioned, that will be the least of their problems.
> No, fantasai is right, I can see this being a FAQ, for no obvious
> technical reason.
You seriously think that nested templates will be common enough for this
to be a FAQ? Wow. A few months ago people were saying that this would be
so rarely used that we should take it out!
> > I didn't want to use ":" at all because of the way that character has
> > special meaning for namespaces these days.)
> "These days" being six years by now, striving and succesful, I think we
> just have to live with it :)
Oh I have nothing against it, I was just explaining why I didn't use ":".
Ian Hickson U+1047E )\._.,--....,'``. fL
http://ln.hixie.ch/ U+263A /, _.. \ _\ ;`._ ,.
Things that are impossible just take longer. `._.-(,_..'--(,_..'`-.;.'
More information about the whatwg