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

Utility methods on DOM elements for key/keyref/unique

  • From: "Sjoerd Visscher" <sjoerd@x...>
  • To: <xml-dev@l...>
  • Date: Wed, 29 Aug 2007 19:39:21 +0200

Utility methods on DOM elements for key/keyref/unique
Hello,

For Xopus I am building support for the key, keyref and unique
declarations, and I was wondering if there are DOM methods defined
somewhere that allows a programmer to use this extra structure in an XML
document.

I have found the XML Schema API, which is great for validation, but not
for anything more.

I was thinking of at least two methods:

Element.getElementByKey(String keyName, 
  Object fieldValue [, Object fieldValue]*): Element
Works on instances of elements which have a declaration with a "key" or
"unique" ID constraint with the name keyName.
Returns the element that has the fieldValue(s) as key sequence or null
otherwise.

Element.resolveKeyReference(String keyName): Element
Works on elements which are matched by a selector of the "keyref"
declaration with the name keyName.
Returns the element that matches the key sequence of the key reference.

Does anyone know of such or similar methods? If not, would such methods
be useful? (I have never worked with XML documents with key/keyrefs
myself.) Are there any other methods that could be useful?

Greetings,

Sjoerd Visscher
Xopus: http://xopus.com
+31 (0)70 - 3699563
http://maps.google.com/?q=xopus+den+haag+nederland&z=18&t=h



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.