[XML-SIG] Metadata in XBEL
Martin v. Loewis
martin@loewis.home.cs.tu-berlin.de
Tue, 27 Mar 2001 23:30:51 +0200
> The specification for metadata is vague, <metadata> elements have a
> "owner" attribute which should be a URI. But what forms of metadata are
> valid? The DTD implies that there can be no children of metadata
> elements (the content is EMPTY).
[...]
> It does seem that the DTD is in error as requiring all metadata to be in
> the owner attribute is rather limiting.
That is clearly not the intent, so I'd agree that the DTD is in error.
You'll have to ask Fred Drake to be sure; I *think* the idea was that
metadata has a content model of ANY. The documentation makes it clear
that "owner" is just to tell apart the various sources which may put
metadata into the bookmark list:
The \element{metadata} element is used as a container for all
auxillary information related to a node which belongs to a
single metadata scheme. The specific contents of
\element{metadata} is highly dependent on the metadata scheme
which applies; XML namespaces should be used to identify
explicit markup used within the element.
So the intent clearly is that content within the metadata element is
possible, and may use XML markup.
That, of course, would mean that a version 1.1 of XBEL needs to be
issued, so perhaps this is the time to think about other pending
improvements.
> This, although allowing more free-form data, is heavier for the
> application. We intent to be "polite" to XBEL data and store any
> unknown metadata so that it can be written out again - if only text
> is allowed this is trivial, otherwise tree fragments have to be
> stored.
You don't necessarily have to store tree fragments; you just need to
find the matching closing tag. I don't know how your parsing
technology works, but it seems that restring it to text cannot be such
a big simplification: you have to do normal XML parsing, otherwise you
won't properly deal with CDATA sections and other XML "features".
Regards,
Martin