Lists Home |
Date Index |
- From: Peter Murray-Rust <firstname.lastname@example.org>
- To: email@example.com
- Date: Mon, 04 May 1998 13:43:17
At 08:33 04/05/98 -0400, David Megginson wrote:
>Peter Murray-Rust writes:
>From a logical perspective, your query is simply
> Find all elements in a document where the element or the nearest
> ancestor with a value for the xml:lang attribute specifies "de" as
> the attribute's value.
Absolutely. And with the tools I have written it's trivial (for me). And
for those who have SQDL implementations, it's trivial as well. And so on.
But for the newcomer to XML this is a major concern that they have to address.
>With SDQL, for example, this test is surprisingly simple:
> (equal? (inherited-attribute-string "xml:lang") "de")
>Your point is well-taken, though: fragments of XML documents are often
>tightly bound to their context (similar situations would involve
>attributes for effectivity, security level, revision status, etc.).
The real point is that X*L/W3C approaches require *almost any* application
writer to implement this. If I have to write
(equal? (inherited-attribute-string "xml:lang") "de")
or (as I do)
String lang =
it would be nice if we all had a consistent way of doing it.
Whatever the solution it appears that processing links is significantly
more effort because of this. Respecting confidentiality, I may or may not
have made this point on XML-SIG but the decision has been taken and we have
to find the best way of implementing it. The software not only has to
search for (say) those elements with (say) role attributes, but those which
are 'intended' to have role elements.
It gets more fun with attribute remapping:
xml:attributes CDATA #FIXED "role new-role">
which says that wherever you encounter the attribute "my-role" in a
<molecule> it is *really* a 'role' attribute. So we have:
<reaction xml:link="extended" new-role="reactant">
<molecule xml:link="locator" href="mol1.xml"/>
What is the 'role' of the <molecule>? [BTW it matters getting this right,
since if you get the wrong reactants there might be an unexpected
Implementer 1 says:
"map all molecule|new-role to behave like molecule|role"
"make all locator molecules inherit the value of the parent roles (after
Implementer 2 says:
"make all locator molecules inherit the value of the parent roles (without
I suspect I side with 2, but can I be sure that everyone sees it that way?
In any case there will be lots of times that we want an attribute from an
element. For certain types of element/attribute we may have to ask:
- give me the attributes
- does this also have some 'intended attributes'
- oh, and does it also have some attributes which are mapped by yet
another level of indirection?
The only way that I can see myself offering reliable software is if we
agree communally on what the semantics of this are *and* implement some
software/APIs to help ensure consistency. For the present I suspect I shall
JUMBO does not support attribute remapping. Sorry.
Peter Murray-Rust, Director Virtual School of Molecular Sciences, domestic
VSMS http://www.nottingham.ac.uk/vsms, Virtual Hyperglossary
xml-dev: A list for W3C XML Developers. To post, mailto:firstname.lastname@example.org
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:email@example.com the following message;
To subscribe to the digests, mailto:firstname.lastname@example.org the following message;
List coordinator, Henry Rzepa (mailto:email@example.com)