support for namespaces on attribute value

admin

Administrator
Staff member
Suppose I want to create the following XML document:<books xmlns:p="myLibraryNS"><p:book>All my sons</p:book></books>And suppose I want to create a schema that describes it:<schema xmlns="Xml-Schema namespace" xmlns:p="myLibraryNS"><element name="books"><complexType>....<element name="p:book" type="string" maxOccurs="unbounded">.....<schema>Now, suppose I want to load and parse the schema. Iwould use a DOM xml parser(unless there is a schema parser you know off, which is compatible with thelast version of XML-Schema).When I read that attribute "name", I would like to know that it's value comesfrom another namespace.My questions are:1) Do you know of any parser that supports namespaces on attribute value?2) If not - can you think of another way to write an XML-Schema that wouldbest describe the aboce XML Document, a way that doesn't require namespacesupport for the attribute value?Thanks in advance,Noga.
 
Back
Top