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

RE: Namespaces and DTDs

  • From: "Ogievetsky, Nikita" <nikita.ogievetsky@c...>
  • To: "'xml-dev@i...'" <xml-dev@i...>
  • Date: Tue, 9 Mar 1999 16:54:20 -0500

atomic element halloween
Richard L. Goerwitz wrote:
>Ronald Bourret wrote:
>> > I have several DTDs with conflicting definitions of certain elements.
>> > ...Am I going to have to break down and just rewrite the DTDs to use
>> > the qualified names?
>> 
>> If you want to use a namespace-unaware parser, I don't see how you can
>> avoid rewriting the DTDs.
>Maybe I misunderstand, but as far as I can see, namespaces won't help
>you, either. Why? Because even if you can refer to, say, your two TITLE
>elements by different prefixes, you'll still have to declare the prefixed
>elements in the DTD as if they were atomic element names.
>Namespaces, in other words, don't solve your problem. They may make it
>worse, in fact, because you have to know what prefixes you are going to
>declare in a given document to be able to rewrite your DTD to work with
>that document.

I have a similar problem: 
On my web site http://www.cogx.com, I am working on XML driven menu bar (can
be a tree, etc)
The underlying XML uses reusable structures such as months, quarters of the
year,
Tax schedules with zillions of tax lines repeated, etc.
Instead of having just one XML document for the menu bar,
I moved reusable fragments  into a separate file and access them from 
my main XML by  
<group frnms:ref="fx_tax_lines"/>
or 
<group frnms:ref="months_of_the_year"/>
it is also obvious
that I should not keep all fragments in one reusable collection, but rather 
separate them by theme. - Why should I send file with tax schedules to a guy
interested in Opera performances?
So I can have as many reusable collections as I wish: tax related,
publications related, theater related, etc...
It means I should allow freedom in specifying namespace prefixes and still
know
what each prefix means!
I am achieving this by 
declaring my namespaces as follows:
xmlns:ref="groups:www.cogx.com/xmlbar/ref-menu.xml" 
the prefix "groups:" tells me that a namespace of reusable fragments was
defined
Now I can give my prefix any name. 
When parsing I know that it is a namespace of reusable fragments!

Problem here is that <group> element has to be defined with an open model to
allow 
for different namespace prefixes.

I also made a proposal that it would be great to reserve "any" prefix for
this type of situation. This will
save me from using open model, which I do not like, really!

> The most effective responses I saw were
>from people who said, in effect, "Namespaces do far less than you want
>or expect them to."

Exactly! And this is why 
	Namespaces let you do much more then you thought you can!

Best regards,
	Nikita O.




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/ and on CD-ROM/ISBN 981-02-3594-1
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.