Lists Home |
Date Index |
- To: XML-Dev <firstname.lastname@example.org>
- Subject: dynamic elements
- From: James William Pye <email@example.com>
- Date: Mon, 25 Oct 2004 11:03:51 -0700
- Organization: rhid development
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
An obvious solution would be to reserve another character denoting
"variable expansion", but I feel that that is rather intrusive, and
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:
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
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").
This works out nicely, I think. It provides entity functionality with
namespaces, which I find quite attractive, and very interesting.
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
(I'm not too sure I like using the term 'dynamic elements' or 'XML
functions', but it seems relatively appropriate, so...)
James William Pye
This is a digitally signed message part