RE: hGRRDL for hCard: test case of a GRDDL transformation to produce RDFa from hCards

> The spec is written only for valid xhtml, and that seems 
> appropriate, but the expectation is that implementations do 
> the right thing with invalid xhtml.

I suppose by "valid", here, we mean "valid with respect to a declared
DTD" as defined in the XML Recommendation[0], and that further this DTD
must be one defined in "one of" the XHTML Recommendations.  If, however,
we could take a step back from that particular precipice, I would find
it far more interesting to think of validity in terms that James Clark
recently used[1]:

  Validity should be treated not as a property of a document
  but as a relationship between a document and a schema.

I think it's useful for the GRDDL spec to talk about "valid" XHTML, as
long as it also provides an appropriate schema that supports GRDDL's
fundamental purpose.  Consider, for example:

<schema language="RelaxNG Compact Syntax">
default namespace = "http://www.w3.org/1999/xhtml"

start = element html
{
  element head { any },
  element body { any }
}

anyElement = element * { any* }

any = (attribute * {text} | text | anyElement)*
</schema>

This would basically say that a valid XHTML document, for GRDDL
purposes, is any document in the XHTML namespace having (at least) a
very skeletal XHTML structure.  This obviously would include many
documents that are not valid against a published XHTML DTD, but so what?
What harm does that do?  If users mix in bits of other languages, should
we care?  Would it affect GRDDL processing on an "XHTML" document?

Importantly, such a schema would validate any document that would also
validate using the first approach, above, while treating XHTML as more
of an envelope than a complete format.  It would be an external
relationship applied by the GRDDL spec meant to be useful only to a
GRDDL-aware agent for providing a (very) rudimentary awareness of XHTML.

Take care,

    John L. Clark

[0] http://www.w3.org/TR/2006/REC-xml-20060816/#dt-valid

[1]
http://blog.jclark.com/2007/04/validation-not-necessarily-harmful.html





Cleveland Clinic is ranked one of the top 3 hospitals in
America by U.S.News & World Report. Visit us online at
http://www.clevelandclinic.org for a complete listing of
our services, staff and locations.


Confidentiality Note:  This message is intended for use
only by the individual or entity to which it is addressed
and may contain information that is privileged,
confidential, and exempt from disclosure under applicable
law.  If the reader of this message is not the intended
recipient or the employee or agent responsible for
delivering the message to the intended recipient, you are
hereby notified that any dissemination, distribution or
copying of this communication is strictly prohibited.  If
you have received this communication in error,  please
contact the sender immediately and destroy the material in
its entirety, whether electronic or hard copy.  Thank you.


===================================

Received on Friday, 20 April 2007 13:51:19 UTC