John Levon wrote:
> On Mon, Jun 19, 2006 at 08:59:38PM -0700, Dave Nomura wrote:
>>Maynard and I have been working on the XML schema that was proposed
>>several months ago and have made some refinements to it. The opreport
> One initial comment: XML has ways to refer to other document elements,
> but you're not using them, instead you have an integer index. I /think/
> that the libxml APIs make it easier to look up elements based on an
> element id, could you investigate whether the references should be
> XML-like, please?
I won't pretend to be an XML guru, so if anyone on the list has any
suggestions, fire away. One possible mechanism to use for referencing
elements is xpath, which is included with libxml2. However, the syntax
for referencing an entity seems pretty verbose. Adding the xpath into
the xml document wouldn't be absolutely necessary, however. Since the
element type being referenced will be known by the consuming tool (e.g,
when processing a Symbol element, references will be for elements of
type SymbolData), the tool itself could generate the xpath spec.
We got many comments, both on this mailing list and from internal tool
developers who are already developing some XML-based tools, that we
needed to minimize the size of the XML instances. We even removed the
"id" attribute from the referenced elements on the assumption that the
consuming tool could internally store the elements in arrays and then
reference numbers would simply index into those tables. Note: Since
the xml parser returns a tree, this implies the consuming tool would
(for performance reasons) probably create arrays holding pointers to
referenced tree nodes(like SymbolData and DetailData elements).
If we decide to use xpath in one way or another, the "id" attribute can
easily be put back into the referenced elements.
Perhaps we've gone too far in the direction of minimizing the size of
the xml document. Feedback or suggestions from the community would be
> oprofile-list mailing list