Lists Home |
Date Index |
- To: firstname.lastname@example.org
- Subject: Re: [xml-dev] XML and XPATH: How do they work?
- From: Alexander Johannesen <email@example.com>
- Date: Thu, 30 Jun 2005 10:21:23 +1000
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=CCERXtUqNgQsUd16Vfr9BSGk++IaaJ/m9/PwEGh07IjgGhBgMmu6+YWaNAZbzaItfL7QUgsxTQzuiIiLQnKx5PcQgdl9itjsxFwlMU7Jh/npYwbbaHzVX92iaXPjMaACQwa6G+8rMwpB1IYximT4u705vuzYaqFGkSVZJCiaOI4=
- In-reply-to: <42c13779.60d70a65.58d7.ffff8d60SMTPIN_ADDED@mx.gmail.com>
- References: <firstname.lastname@example.org> <42c13779.60d70a65.58d7.ffff8d60SMTPIN_ADDED@mx.gmail.com>
- Reply-to: Alexander Johannesen <email@example.com>
On 6/29/05, Joe Schaffner <firstname.lastname@example.org> wrote:
> XPath looks like some kind of expression language for naming objects, as in
> "pathname", not a "link". (I'm guessing that XML objects, being
> hierarchical, need some kind of name syntax, like a "pathname".)
Not sure what an XML object might be, but xPath is simply a query
language for traversing node-trees, and a very good one as such.
> The 'link' abstraction in XML is a bit more complicated than I expected, so
> I'll need more time to read the documentation.
Of course, that depends on just how you model and want to implement your data.
> My names <prev> and <next> come from linked list programming in C. They are
> unidirectional, so you need one for both directions. They serve as
Navigation should not be part of your datamodel nor dataset, but be a
separate implementation detail. Here's how I'd do your XML stuff;
And when you need a relationship between the two;
<member refid="some.id.x" role="instrument" />
<member refid="some.id.y" role="method" />
Then it makes sense to just create a set of words that describe your
relationships (of.type and role attributes) (also known as an
ontology). This can now all come together in a user interface without
You may want to look at canonical XML for a better understanding of id
and refid attributes and somesuch. xLink is when you need (well,
mostly) cross-document linking, and *especially* cross-domain
cross-linking. Basically my advice would be to keep it simple unless
you really have to.
> But they are also logical, maintaining either alphabetical order, or the
> arbitrary order chosen for the models...
These should be part of the interface logic of your application, not
be an integral part of datamodel nor dataset.
> It looks like there is more than one way to skin a cat.
There are often too many, which makes the simple solution hidden.
"When facing the sunshine, you won't see the shadows" :)
"Ultimately, all things are known because you want to believe you know."
- Frank Herbert
__ http://shelter.nu/ __________________________________________________