W3C home > Mailing lists > Public > www-forms@w3.org > February 2006

Generic unique path to root?

From: Flinton Adam <Adam.Flinton@cfh.nhs.uk>
Date: Mon, 13 Feb 2006 11:40:17 -0000
Message-ID: <595299DD7F30014BBCE48B93DCB6065203AB3501@EXCHAQ2.nhsia.nhs.uk>
To: <www-forms@w3.org>

Dear All,

We have a system which involves a servlet which renders an XML model to
a piece of XHTML with a link put into every editable point which
consists of the url of the popup/xform used to edit that sort of chunk &
an Xpath to the relevant element in the actual XML file (i.e. prior to
rendering with XSLT).

i.e. the Xpath gives the unique position of the piece of text/xml which
I want to throw into an xform as it's model & this is provided to the
form (i.e. the form receives the contents of that Xpath (as string), the
Xpath string itself & the url of the document being edited) 

On submiting the form, the model + this Xpath & the name of the orginal
xml file are sent back to the servlet which then sets the xml in the
original document to match the new/editied xml & then render is called
once more.

At the moment this is a fairly specific piece of XSLT for a given sort
of document, but we'd like to be able to use this in other places.

Basically what we're needing is a function which can write out an xpath
from the current node back to the root with all attributes present
expressed (to give us guaranteed uniqueness).

The reason for the all attribs expressed are that sometimes the unique
attrib value is in the current node & sometimes it's on the parent &
obviously the name of the the unique attrib will differ between models
/xml files.

I can do this very easily in JDOM but we have a requirement to be pure
XSLT/XML wherever possible.


Any ideas?

TIA

Adam

This e-mail is confidential and privileged. If you are not the intended recipient please accept our apologies; please do not disclose, copy or distribute information in this e-mail or take any action in reliance on its contents: to do so is strictly prohibited and may be unlawful. Please inform us that this message has gone astray before deleting it. Thank you for your co-operation.
Received on Monday, 13 February 2006 11:40:29 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:03 GMT