- From: Murray Altheim <altheim@eng.sun.com>
- Date: Tue, 17 Apr 2001 13:46:32 -0700
- To: Joshua Allen <joshuaa@microsoft.com>
- CC: Seth Russell <seth@robustai.net>, Dan Brickley <danbri@w3.org>, "Sean B. Palmer" <sean@mysterylights.com>, Danny Ayers <danny@panlanka.net>, RDF Interest <www-rdf-interest@w3.org>
Joshua Allen wrote: > > > I have little belief that a general RDF-in-XHTML solution is necessary > > or even a good idea, and the discussions I've heard here have not > > We hear you :-) Some people think it is a fantastic idea, however, and > they haven't been convinced otherwise. Is it possible to treat this is > a general issue, so that we don't have to convince one another? I think I'm being secularized here. Nothing I've said prohibits anyone from developing tools that either describe metadata about an XHTML document or modifying their XHTML to expedite this process. I've only been trying to point out that *embedding* generically-described RDF in XHTML is at the very least problematic, and IMO more likely practically impossible. > > ad hoc basis. Criticisms of XHTML for not being able to XML-validate > > inclusions of any well-formed markup are out of order, insofar as *no* > > XML markup language can do that. It's as I've said a non-sequitor. The > > Well, we could easily validate an XHTML document that had: > > <metadata encoding="N3"> > ..... > </metadata> > > embedded in it, since N3 is not well-formed XML. It is only when we > stick well-formed XML in there that the XML validation tries blindly to > "validate" it according to the XHTML DTD. Perhaps I am simple-minded, > but I am still fascinated by the fact that this block can contain > anything *except* XML. This isn't the fault of XHTML; rather it is a > peculiarity of DTDs. No, not a peculiarity of DTDs but of XML. No, you can't embed N3 in any XML document, as N3 contains characters (like "<") that would cause a parser to choke. It's not an issue of well-formed content but of content that can't appear in XML. Java and JavaScript code can't appear in an XML document either, unless within a CDATA section, or escaped. It may even be that common HTML browsers allow such content, but XML validation would flag an error. The N3 example on the W3C web page would flag an error on line 2 upon encountering the first "<", as well as every other instance of what are considered XML markup characters: 1 @prefix dc: 2 <http://purl.org/dc/elements/1.1/>. 3 @prefix : <http://xmlns.com/foaf/0.1/>. 4 5 [ :givenname "Ora"; surname "Lasilla" ] is dc:author of 6 [ a :Book ; dc:title "Moby Dick" ]. IOW, N3 could be made "XML-safe" by avoiding these characters. > This also is not a problem specific to RDF, > because I can use a: > > <script language="some_well_formed_xml_scripting_language"> > ... > </script> > > and break XHTML validation. So I hope we can avoid treating this as a > "RDF should not exist anyway, so the restriction is fine" problem. I've never advocated that RDF be eliminated. I'm a huge fan of Dublin Core, Mozilla, and other big users of RDF. Sorry if anyone has this impression. While it's possible to convert DC into XTM, there's not a lot of impetus to do so. DC is a perfectly decent design, IMO. > > only solution possible would be to CDATA section the whole thing, but > > then XML processors would treat it as CDATA rather than something with > > a notation of RDF. This would not be useful. External links to RDF is > > Is this really a problem? Maybe this is the best way to do it? Does > anyone have any objections to using: > > <metadata encoding="rdf"> > <!CDATA[ > <rdf:rdf ..namespace declarations..> > <rdf:Description about="" ... /> > <rdf:Description about="#someid" ... /> > </rdf:rdf> > ]]> > </metadata> Well, this works to avoid the validation problem (so long as the CDATA content never includes "]]>") but doesn't *quite* solve the puzzle, because the CDATA node is treated as an opaque block. The content is never processed or validated. If validation of the RDF isn't necessary (even according to an RDF schema) then perhaps this is okay. But my solution would be to add a notation identifier to the <metadata> element so that it would be identified *as* RDF and the node would then be sent off to an RDF processor. [I've always considered it a bit sad and ironic that notations have been summarily ignored in XML, when they're a perfect solution for this type of thing. You hang a notation-based processor onto the XML validation, and nodes identified as being of that notation are sent to the processor.] Murray ........................................................................... Murray Altheim, SGML/XML Grease Monkey <mailto:altheim@eng.sun.com> XML Technology Center Sun Microsystems, 1601 Willow Rd., MS UMPK17-102, Menlo Park, CA 94025 the wood louse sits on a splinter and sings to the rising sap ain't it awful how winter lingers in springtimes lap -- archy
Received on Tuesday, 17 April 2001 16:44:58 UTC