Lists Home |
Date Index |
- To: Eric van der Vlist <firstname.lastname@example.org>
- Subject: Re: [xml-dev] find with XPath over file system
- From: Oleg Paraschenko <email@example.com>
- Date: Tue, 1 Feb 2005 15:26:52 +0300
- Cc: firstname.lastname@example.org
- In-reply-to: <1106933391.32308.23.camel@delleric>
- Organization: DataHansa Software
- References: <email@example.com><1106933391.32308.23.camel@delleric>
On Fri, 28 Jan 2005 18:29:51 +0100
Eric van der Vlist <firstname.lastname@example.org> wrote:
> Hi Oleg,
> I like the way you've preferred to match the /bin directory on the
> /bin XPath instead of using some kind of /directory[@name="bin"]
Many XPath tutorials say that "the basic XPath syntax is similar to
filesystem addressing." I decided it was good to keep the analogue.
> However, I am wondering how you deal with filenames that are no valid
> XML names (or that contain colons)...
> Can you elaborate on that point?
The underlying library allows to have anything as XML name, so there
are no problems with the virtual XML tree. More, the name of a file is
duplicated in the "name" attribute, so you can put a test for name into
a predicate: /*[@name='lost+found'].