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

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   dynamic elements

[ Lists Home | Date Index | Thread Index ]
  • To: XML-Dev <xml-dev@lists.xml.org>
  • Subject: dynamic elements
  • From: James William Pye <flaw@rhid.com>
  • Date: Mon, 25 Oct 2004 11:03:51 -0700
  • Organization: rhid development

Greets,

Developing an XML extension that provides custom sources of entity
declarations seems impossible without a version bump, so I have tried to
work out a solution to provide the same functionality with minimal
impact.

An obvious solution would be to reserve another character denoting
"variable expansion", but I feel that that is rather intrusive, and
perhaps unnecessary.

So, I believe the best solution might be to use element syntax and
namespaces to provide a mechanism to identify 'dynamic elements'. Of
course, the element syntax won't work(nicely) in attributes, so a
special construct would need to be developed to handle that
context(S-Exp like, I figure).

Without further ado, a simple example illustrating the idea:

<xml xmlns="fake"
 xmlns:de="http://rhid.com/~xml/de/0";
 xmlns:char="$(de:src[type='text/xml' href='/iri/to/defs.xml'])">
<!--
 The feature/extension should be enabled by a processor as soon as it
 assigns/binds the http://rhid.com/~xml/de/0 namespace.

 The char namespace is effectively a "blessed" namespace with regards
 to it being a source for dynamic elements. This is how a processor will
 identify elements that need to be evaluated for the production(final
 document).
 
 The char namespace also displays a sort of compact element
 syntax(resembles S-expressions, but with a $ denoting elements).
 de:src being the qualified name, and the optional square brackets
 denoting attributes and everything else that follows is the element
 content(in this case, an empty "element").
 !-->

 <char:amp/>
 <char:lt/>
 <!--
  This works out nicely, I think. It provides entity functionality with
  namespaces, which I find quite attractive, and very interesting.
  !-->
</xml>

This extension is a bit more interesting than entity functionality, as
an extension like this would provide a general framework for XML
functions. Processors would provide the custom source implementations
with the input of the "function"; the input being the contents and/or
the attributes of the dynamic element.

Thinking about it, this seems like a fairly obvious direction. Has this
been explored before(or similar area, save XInclude)? If so, URLs on the
articles/discussions?

(I'm not too sure I like using the term 'dynamic elements' or 'XML
functions', but it seems relatively appropriate, so...)

Comments, criticisms?

-- 
Regards,
        James William Pye

This is a digitally signed message part





 

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

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