Hi, I found that the XPointer scheme spec. is not too clear about this, except that the last part relating to the string-range function reads:
"...string-range is useful for locating ranges that are wholly enclosed in other node types as well, such as attributes, processing instructions, and comments" This lead me to hope that I could do this. I am working on the specification of mappings from ontologies to XML schema, and the ability to point to sub-strings in attribute values would be more than useful. I was confused when I could not find a single example of this, since if it is useful to point to sub-strings in an elements content, then it is likely to be useful to be able to do the same for attribute values. Thanks for your help with this, Philip Couch. -----Original Message----- From: Daniel Veillard [mailto:[EMAIL PROTECTED] Sent: 03 February 2005 08:37 To: Couch, PA (Philip) Cc: [email protected] Subject: Re: [xml] xpointer range in attribute node On Wed, Feb 02, 2005 at 05:48:44PM -0000, Couch, PA (Philip) wrote: > Hi, > > Is it possible to use libxml's xpointer implementation to locate ranges that > are completely enclosed in attribute nodes? From my recollection, no it's not possible. Attributes aren't represented on screen and I thing strings in attribute values were not part of the requirement of rendering selection in XPointer. > Using libxml, I get empty location sets from xpointer expressions of the form: > > xpointer(string-range(//node/@attribute,"string",start,length)) > > Thanks for any help that you may be able to give, > > Phil. > Daniel -- Daniel Veillard | Red Hat Desktop team http://redhat.com/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
