[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Why doesn't this solve this namepaces problem?
Rick Jelliffe wrote: > > Where I am moderating my position is in the case where the data provider > only has a single resource available. Perhaps you only have an HTML > document, or a Schematron Schema, or an RDF Schema or an XML Schema, or > RELAX. In that case, the related-resource document is a null layer (and > therefore undesirable for the WWW) : it just redirects to a > single resource. > > So in that case, I think simplicity and efficiency both dictate that the > null layer be omitted, and the ultimate single resource be directly > retrieved from the namespace name. > > So namespace!=schema. Instead, the namespace resource is always a > directory > of related resources, but if dereferencing a namespace URIref returns a > document that is not a directory of related resources then the > directory of > related resources can (i.e. must) be *implied*, with no violence to the > conceptual model. > I've coded the start of an implementation that does exactly this. (see http://www.rddl.org/org/rddl/ ) This is roughly how it works. A url is resolved. An attempt to parse it as XML is made. The root element is examined, its namespace URI is stored and if its namespace isn't XHTML an exception is thrown. (so either non-XML or non-XHTML documents are identified as non-RDDL). If XHTML, parsing continues and the rddl:resource elements are used to form a set of maps but in particular the xlink:arcrole's are mapped to the Resource. For non-RDDL documents a Resource is created and mapped using: xlink:arcrole='root element namespace URI' xlink:href='namespace URI' xlink:role='#resource' and the software proceeds ... the overhead of doing this is minimal with no extra network roundtrips and just a few client side cycles for non-RDDL URIs. For example, a client that wants an XSD: RDDLURL rurl = new RDDLURL( namespaceURI, "http://www.w3.org/2000/10/XMLSchema" ); InputStream is = rurl.getInputStream(); This would be the same for 'direct' or RDDL URIs. -Jonathan
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|