I'm not sure I completely understand what you want. If you just want to
include bits of markup declarations in another DTD, you just can just
external entities. But that has nothing to do with namespaces. Namespaces
in general don't have anything to do with DTDs, and DTDs don't understand
anything about namespaces.
Can you explain in more detail what you want to do?
----------------------------------------
Dean Roddey
Software Weenie
IBM Center for Java Technology - Silicon Valley
[EMAIL PROTECTED]
Thomas Conradi <[EMAIL PROTECTED]> on 02/21/2000 12:14:30 AM
Please respond to [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
cc:
Subject: Question: Namespaces/DTD
Hello!
I`m trying to include Elements of another Namespace (another DTD) in my
current DTD.
I also would like the XML-Parser to validate this element (including its
successors).
Can anyone help me out with a piece of simple code?
Or perhaps my understanding of Namespaces is simply wrong?
Thanks in advance, Thomas
test.dtd:
-----------
<?xml encoding="UTF-8"?>
<!ELEMENT test (elem*)>
<!ELEMENT elem EMPTY>
<!ATTLIST elem id ID #REQUIRED
name CDATA #IMPLIED>
testNS.dtd
-------------
<?xml encoding="UTF-8"?>
<!ELEMENT testNS (elem1*)>
<!ELEMENT elem1 (test:test*,test:elem*)>
<!ATTLIST elem1 xmlns:test CDATA 'test.dtd' <!-- here is the reference
to the other namespace-->
id ID #REQUIRED
xxx CDATA #IMPLIED>
testNS.xml
-------------
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE testNS SYSTEM "testNS.dtd">
<testNS>
<elem1 id="#id1" xxx="hallo">
<test:elem id="id1" name="#1"/>
<test:elem id="id2" name="#2"/>
<test:elem id="id3" name="#3"/>
</elem1>
</testNS>
--
___________________________________________________________________________
ProSTEP GmbH Phone: +49-6151-9287381
Thomas Conradi Fax: +49-6151-9287381
Julius-Reiber Str. 15 Email: [EMAIL PROTECTED]
D-64293 Darmstadt
___________________________________________________________________________