CM: DocumentCM.getInternalCM()

Hi there,

I have a question concerning the content model specification, about
getInternalCM defined on DocumentCM. I suppose the content model returned by
this method represents the internal subset of the document (the method is
defined as the 'sole CMModel')?

I wonder how this works out in practice.

If you have a document with both an internal subset and a DTD, and you want
to validate that document, do you have to call isValid() twice, once for the
internal subset and once for the external DTD? Because if isValid() always
validates against the internal subset as well as the active CM, how does
that work out if the active CM represents an XML schema?

What happens when there are extra declarations in the internal subset which
use declarations in the external DTD. E.g.
  <?xml version="1.0"?>
  <!DOCTYPE A SYSTEM "test.dtd"[
    <!ATTLIST B
        attName CDATA "bla">
    <!ELEMENT D (B)>
  ]>
  <A>
    <B/>
  </A>
where test.dtd holds
  <!ELEMENT A (B)>
  <!ELEMENT B ANY>
Both the declarations of the attribute attName and the element D in the
'CM-tree' of the internal subset are related to the element declaration of
B, which is defined in the (CM of the) external DTD. Is a copy of the
element declaration of B made for the internal subset in this case?

(My questions come from some confusion from me about the spec: until today I
thought that in case of a DTD the internal subset and external part would be
one unified CM, until my attention was brought to getInternalCM())

--Sander.

--
X-Hive Corporation (www.x-hive.com)
email: sander@x-hive.com
phone: +31 10 7108625

Received on Monday, 26 February 2001 10:01:37 UTC