xml-xalan-j-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joseph Kesselman <kesh...@us.ibm.com>
Subject Re: XPath to generate XML
Date Tue, 01 Oct 2002 15:53:15 GMT
Uhm. Just realized there's a problem with this concept. Maybe not a fatal 
one, but enough to weaken its usefulness.

The problem is that -- unlike directory names -- element names are not 
guaranteed to be unique in a given context, and in fact often aren't. So 
if you ask the tool to create the XPath /foo/bar/baz, that could be 
satisfied correctly as long as foo has at least one child named bar which 
has at least one child named baz. There may be lots of other content 
before you reach that particular "bar", but it isn't relevant to this 

So you're only going to create _a_ matching document, and not necessarily 
the one you had in mind... especially as the XPath becomes more complex 
and/or you want to apply several of these create calls in succession to 
build up the document you're interested in. (If I attempt to create that 
same XPath again, do I reuse the existing bar and/or baz or create new 

I think it's still an idea worth exploring a bit, simply because it's the 
first attempt I've seen to use a path as a construction tool rather than a 
query tool.... but I'm starting to think that XPath isn't the right 
metaphor for this operation.

Joe Kesselman  / IBM Research

View raw message