Re: [xml] make XPointer( id(XX) ) and C14n work without DTD

Daniel Veillard wrote:

On Mon, Feb 23, 2004 at 06:29:23PM +0800, Andrew Fan wrote:

I have a xml file like,
<content Id="target">
  Hello, World!
<Reference URI="#target">

And I parsed it as DOM tree and want to use XPointer( id( "target" ) ) to get the content. Because of the absence of DTD, I have to hack the DOM with "xmlAddID", which make the XPointer work. And then, I want to make a C14n transform over the DOM, I can not get the correct result. What alse must I do in order to get the correct C14n?

 XPointer id() is actually XPath id() and only works if you can assert
IDness of an attribute, and that requires a DTD per the spec. Trying to
make what you suggest would simply make the library not conformant to the
specifications. Sorry that's not possible. Use a different XPointer
expression not based on id().

Which XPointer expression can I used to express the above URI?  Thanks.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]