We have a 5 step procedure for making unique prefixes, then performing
normal validation.
The open issues are:
[Step 4] How do you actually define the URI's for namespace
prefixes used in a DTD?
[Setp 4a] How do we actually __find__ the DTD's we need?
The document instance specifies URI's, but
the URI's are not "de-referencable".
[Question] Several people mentioned
"If Namespaces still used the old PI method
of defining prefixes, there would be no problem."
Can anyone explain the old PI method?
**********************
The algorithm
**********************
There is a (5) step algorithm for validating
a document against a set of DTDS
1. Determine the Expanded the names the way the
Namespace Proposal says. (Section 6.3)
2. Define a unique prefix for each namespace definition URI .
3. Rewrite the element or attribute, prepending the
(possibly generated) unique prefix for the namespace
of the element/attributes Expanded Name.
This give you P1:BOOK, P1:NAME, P3:ADDRESS
if BOOK and NAME come from the same namespace URI.
4. Do the same to the DTD's that you read in.
4.a Find the relevant DTD's
5. Do normal DTD validation of the rewritten instance
document against the rewritten DTD.
The following document instance is legal:
-----------------------------------------------------
A Document Instance
-----------------------------------------------------
<DocumentRoot
xmlns:J1="uri:bibliotheque"
xmlns:J2="uri:locatie">
<J1:BOOK>
<J1:NAME V="Xml Made Easy"/>
<J2:ADDRESS V="Holland"/>
</J1:BOOK>
------------------------------------------------
NOTE:
The J1 and J2 are fine, because the prefix doesn't matter.
Only
This is where there is still a problem.
How do we define the URI's for the prefixes that the DTD uses?
------------------------------------------------
A DTD for defining Address
------------------------------------------------
<!DOCTYPE location_dtd [
xmlns:K="uri:locatie" <<< -- How can we stick this in there?
<!ELEMENT K:ADDRESS >
<!ATTRLIST K:ADDRESS
v #pcdata>
]>
--
------------------------------------------------
A DTD for defining Address
------------------------------------------------
<!DOCTYPE library_dtd [
xmlns:K="uri:bibliotheque" <<< -- How can we stick this in there?
<!ELEMENT K:NAME >
<!ATTRLIST K:NAME
v #pcdata>
]>
--
==============================================================
Mark Tucker tucker_m@regenstrief.iupui.edu
Regenstrief Institute phone: (317) 630-2606
1001 W. 10'th St; Indianapolis, IN; 46202-2859; fax: (317) 630-6962