OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: Attributes with Intent (and namespaces)

[ Lists Home | Date Index | Thread Index ]
  • From: james anderson <James.Anderson@mecomnet.de>
  • To: "xml-dev@ic.ac.uk" <xml-dev@ic.ac.uk>
  • Date: Mon, 06 Jul 1998 12:32:25 +0200

let's take this a step further:

MURATA Makoto wrote:
> ...
> i wrote:
> > 6. to accomplish this, the application will depend on functions of the form
> >    (UniversalName) -> (Declaration + Behaviour)
> 
> I think we diverge here.  To implement this *function*, application programs
> have to know URI's specified in the namespace declaration.  In other words,
> developers of namespace-aware programs write:
> 
oops. i neglected an operator. please exclude the oversight. i was preoccupied
with 'behaviour' in the sense of validation - which is declared via schema and
thus adequately supported with the one operator. please allow me to extend '6'
as follows

6. to accomplish this, the application will depend on functions of the form
   (UniversalName x Behaviour) -> (UniversalName)
   and
   (UniversalName) -> (Declaration + Behaviour)

the application should not implement this mechanism. this is important. it is
an operation which is so basic as to be integral with the dom. it's on the
level with dereferencing a variable in c, or symbol-value and get in lisp. the
application should not have to write a single line of code to make these
functions work. (in order to do anything useful, the functions will be
'feature-qualified' - more like get than symbol-value, but that's a side point.)

the distinction you note below is a distinction in behaviour. read 'behaviour'
as 'function' or  'continuation'. the browser or search engine 'behaviour' is
a computation which is named implicitly by the respective symbol or (symbol X property)

> (XML Browser)
> 
>         "If I encounter an element of the MathML URI, I invoke techexplorer".
> 
> (Search Engine)
> 
>         "I search for the first element of the DublinCore URI, and then examine
>         the author and title described in its subordinate elements."
> 

i'll take the second example. please excuse my uncertainty wrt dublin core
encoding, but i find only examples which do not propose an element hierarchy
within the d-c space. in any case, i believe you will understand the point. if
i paraphrase an example from the rdf m&s wd (WD-rdf-syntax-19980216) as follows,

<?xml:namespace ns="-//purl.org/metadata/dublin_core//Schema Dublin Core//en"
prefix="DC"?> 
<?xml:namespace ns="-//www.w3.org/TR/WD-rdf-syntax//Schema RDF//en" prefix="RDF"?>

 <RDF:RDF>
  <RDF:Description RDF:HREF="http://www.bar.com/some.doc"
                   RDF:BAGID="Statement_001"> 
   <DC:Creator>John Smith</DC:Creator> 
   <DC:Title>A Book Which John Wrote</DC:Title> 
   </RDF:Description> 
  </RDF:RDF>

my application would do something like:

(defNamespaceRegion "-//purl.org/metadata/dublin_core//Schema Dublin Core//en"
  :nicknames (list "dc"))
(defNamespaceRegion "-//www.w3.org/TR/WD-rdf-syntax//Schema RDF//en"
  :nicknames (list "rdf"))

and then either

(defElementProcessor rdf:Description (element)
	(let-element-content (dc:Creator dc:Title) element
      (examine dc:Creator)
      (examine dc:Title)))

or 

(dolist (element
         (xptr.find-elements (make-xpointer "root().descendant(all,rdf:Description)")
                             *document*))
  (let-element-content (dc:Creator dc:Title) element
      (examine dc:Creator)
      (examine dc:Title))


none of which requires that the symbols be examined. it is not even required
that the application proper "know URI's specified in the namespace
declaration" for a region with which it is concerned. in a case in which the
application did not even know the exact name of the namespace region until the
document was decoded, but wanted to do something for identifiers from all
regions for which the URI matched a given pattern would be better handled by
one of the suggested dom constructions functions than by munging namespace
names within the application. for example
 8. ... (URI X UniversalName ) -> UniversalName
would enable the application to map symbols from a region of its choosing to
any region necessary. for example,

(defNamespaceRegion "rdf")
(defParameter *dc-pointer* (make-xpointer "root().descendant(all,rdf:Description)"))
(defParameter *my-rdf-names* '(rdf:Description))
(defMethod bind-namespace-region :after
	((prefix string) (region namespace-region) &aux (ns (namespace-region.uri region)))
  (when (search "Schema RDF" ns :test #'char-equal)
    (import-universal-names *my-rdf-names* region)))


> Just in case you think that namespace declaration describes behavior:
> A namespace declaration does not describe behavior.  (DTD's do not either,
> and probably schemas won't.)  It only provides a URI.  The rest is the task
> of application programmers.

please note the remark on behaviour above. while namespace regions do not
'describe' behaviour, they do avail the application of unique names to which
it can ascribe behaviour. inif the en/decoding layer constructs universal
names as 'first class objects' and the dom provides means to manipulate them,
the application writers are much better off.

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS