[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: adding addressing capabilities to the DOM

  • From: "Julian Reschke" <reschke@m...>
  • To: <aaron@s...>, "Xml-Dev@Xml. Org" <xml-dev@x...>, <www-dom@w...>
  • Date: Sun, 16 Apr 2000 13:06:47 +0200

getnodes
I think that a programmatic way to bind values to variables in the XPath
expression would be extremely useful.

For instance consider:

	String s = "test with ' (single quote) and \" (double quote)";
	NodeList nl = node.getNodes ("xpath", "/foo/bar[@id='" + s + "']");

It is non-trivial to embed s into the XPath expression, because you can't
use single or double quotes to quote the string.

The best solution I have found so far is to construct the string expression
using XPath's concat() function if both types of quotes appear in the
string. I think it would be convenient to have an easier touse interface
where you can do something like

	NodeList nl = node.getNodes (xpath, "/foo/bar[@id=$var]",
variableAssignments);

(where variableAssigments would contain the mapping of variable names to
values). As XSLT processors are able to do this anyway, it should map nicely
into the processing model, right?

Julian


> -----Original Message-----
> From: owner-xml-dev@x... [mailto:owner-xml-dev@x...]On Behalf Of
> Aaron Skonnard
> Sent: Sunday, April 16, 2000 6:05 AM
> To: Paul Tchistopolskii; Xml-Dev@Xml. Org
> Subject: RE: adding addressing capabilities to the DOM
>
>
> If it's added to the Node interface, currentNode is implied.
>
> BTW, if anyone else has comments on this thread please copy www-dom@w...
> (not www-dom-request@w..., which was a mistake). TIA,
>
> -aaron
>
> > -----Original Message-----
> > From: Paul Tchistopolskii [mailto:paul@q...]
> > Sent: Saturday, April 15, 2000 8:42 PM
> > To: aaron@s...; Xml-Dev@Xml. Org
> > Cc: www-dom-request@w...
> > Subject: Re: adding addressing capabilities to the DOM
> >
> >
> >
> >  ----- Original Message -----
> > From: Aaron Skonnard
> > To: Xml-Dev@Xml. Org <xml-dev@x...>
> >
> > > NodeList getNodes(scheme, expression)
> >
> > Should be at least
> >
> > NodeList getNodes(scheme, expression, currentNode),
> >
> > I think.
> >
> > Rgds.Paul.
> >
> >
> >
>
>
> ******************************************************************
> *********
> This is xml-dev, the mailing list for XML developers.
> To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
> List archives are available at http://xml.org/archives/xml-dev/
> ******************************************************************
> *********


***************************************************************************
This is xml-dev, the mailing list for XML developers.
To unsubscribe, mailto:majordomo@x...&BODY=unsubscribe%20xml-dev
List archives are available at http://xml.org/archives/xml-dev/
***************************************************************************

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.