OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: namespaces discussion

[ Lists Home | Date Index | Thread Index ]
  • From: Mark Tucker <mct@foyt.indyrad.iupui.edu>
  • To: xml-dev@ic.ac.uk
  • Date: Thu, 10 Sep 1998 14:29:39 -0500 (EST)



John Cowan <cowan@locke.ccil.org> wrote:

mct> I must confess that I don't understand the problem, but it doesn't
mct> look hard.  To the naive eye, I would just read in the relevant DTD's,
mct> and perform the same "Fully Prefixing" operation.  Since the DTD's
mct> would all be prefixed consistenly, can't we just toss all the
mct> productions into the pot, and turn the crank?  How do they interact,
mct> if they all have differently named elements and interactions?

jc> Not at all, and that's the point.  You won't be able to place elements
jc> from one DTD inside elements from another, unless the enclosing
jc> element has an ANY content model.  What takes work and thought is
jc> figuring out how the content models of the various elements should be
jc> extended (or not) to incorporate elements from other DTDs.  I don't
jc> see how *any* tools whatever can help you much with this, except in
jc> the mechanical parts.



First a question:

			Can I have a DTD that mentions elements
			defined elsewhere?

If so, then I can easily nest elements from one dtd inside another.

In the example below, the N1:BOOK element will contain N1:NAME elements,
and elements from a different namespace N2:ADDRESS

If DTD1, which is denoted by URI "uri:dtd1" says

<I_m_not_sure_what_to_say_here
	xmlns:N1="uri:biblotheque",
	xmlns:N2="uri:locatie">

<!ELEMENT N1:BOOK  (N1:NAME N2:ADDRESS) >
<!ELEMENT N1:NAME >
<!ATTRLIST N1:NAME
	v #pcdata>


and DTD2 says (notice that the prefix K doesn't matter, only the definition
as "uri:locatie")			

<I_m_not_sure_what_to_say_here
	xmlns:K="uri:locatie">

<!ELEMENT K:ADDRESS >
<!ATTRLIST K:ADDRESS
	v #pcdata>

then an valid instance document could be

<DOCTYPE
   xmlns:J1="uri:bibliotheque"
   xmlns:J2="uri:locatie">

				xm
<J1:BOOK>
    <J1:NAME V="FRED"/>
    <J2:ADDRESS V="Holland"/>
</J1:BOOK>
    
which would conform to DTD1.

    
What's wrong with this picture?.....

For my needs, DTD1 is a perfectly fine DTD. It defines
local stuff (NAME,BOOK), and references other DTD's to define the sub pieces.
(ADDRESS).


-- 
==============================================================
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

xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@ic.ac.uk
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@ic.ac.uk the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@ic.ac.uk the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@ic.ac.uk)





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS