Re: [xml] Id attribute detection in arbitrary namespace





As a result any library, such as xmlsec as an example,
cannot process such documents using "id()"
XPath expression.

Function xmlIsID can use DTD for Id detection,
but DTD does not allow to describe
the global attributes.

Is there known solution for this issue?

Don't bury the knowledge of the IDness in an external schemas:

 http://www.w3.org/TR/xml-id/

name your id xml:id, libxml2 will detect automatically , the spec
has been around for 8 years, and libxml2 implements it since then.

> Daniel
>
Thank you for reply.

I have already tried to replace attribute "wsu:Id"
with "xml:id" before posting my question,
all works fine.

Unfortunately I do not create xml documents like the one in the example.
And I can't require them to change the format.

I have to handle documents in the form in which they exist.


Is it planned to extend document type definition to cover
some descriptive features of xml schema languages?

Or is it planned to provide means to maintain a list of additional
type definitions, generated by the schema descriptions,
referenced in the document?



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