[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: namespaces discussion

  • From: Mark Tucker <mct@f...>
  • To: xml-dev@i...
  • Date: Thu, 10 Sep 1998 14:29:39 -0500 (EST)

doctype xmlns


John Cowan <cowan@l...> 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@r...
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@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/
To (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.