Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » dtd
dtd [message #175465] Wed, 26 July 2006 09:52 Go to next message
Juergen Aschenbrenner is currently offline Juergen Aschenbrenner
Messages: 25
Registered: July 2009
Junior Member
Hi,

I am wondering if someone in this forum can help me with the following
problem:
In a workspace I got several dtd's in the SAME folder. One dtd declares
common elements that are used/referenced by other dtd's. However it looks
as if the common declared elements cannot be resolved.

Any hints

Cheers Jürgen
Re: dtd [message #175504 is a reply to message #175465] Wed, 26 July 2006 15:30 Go to previous messageGo to next message
Lawrence Mandel is currently offline Lawrence Mandel
Messages: 486
Registered: July 2009
Senior Member
Hi Jürgen,

Can you provide an example of how you're importing the common DTD in the
other DTDs?

Lawrence
Re: dtd [message #175518 is a reply to message #175465] Wed, 26 July 2006 15:49 Go to previous messageGo to next message
Craig Salter is currently offline Craig Salter
Messages: 169
Registered: July 2009
Senior Member
Juergen wrote:

> ... However it looks as if the common declared elements cannot be resolved.

Try using the DTD validator to see if the error messages give you hints.
If not there's nothing I can suggest other than eyeballing the DTDs.
Considering that most large DTDs degrade quickly into 'macro soup' that
may be a bit of a challenge.
Re: dtd [message #175551 is a reply to message #175504] Thu, 27 July 2006 00:30 Go to previous messageGo to next message
Juergen Aschenbrenner is currently offline Juergen Aschenbrenner
Messages: 25
Registered: July 2009
Junior Member
Hi Imandel,

the example actualy comes from petstore I am trying to build and deploy
from eclipse (does someone tried it?)

The two dtd's are:

the CommonElements.dtd

<!ELEMENT Name (#PCDATA)>
<!ELEMENT Image (#PCDATA)>
<!ELEMENT Description (#PCDATA)>

and CategoryDetails.dtd

<!ELEMENT CategoryDetails (Name, Image?, Description?)>
<!ATTLIST CategoryDetails
xml:lang NMTOKEN #REQUIRED
>

The CategoryDetails.dtd fails to validate because Name, Image and
Description cannot be resolved. Though both dtd's are in the same folder.

Juergen
Re: dtd [message #175644 is a reply to message #175551] Thu, 27 July 2006 20:51 Go to previous messageGo to next message
Lawrence Mandel is currently offline Lawrence Mandel
Messages: 486
Registered: July 2009
Senior Member
Hi Juergen,

If I remember correctly you need to include the definitions from the
CommonElements.dtd in the CategoryDetails.dtd.

So the two dtd's are:

the CommonElements.dtd

<!ELEMENT Name (#PCDATA)>
<!ELEMENT Image (#PCDATA)>
<!ELEMENT Description (#PCDATA)>

and CategoryDetails.dtd

<!ENTITY % commonelements SYSTEM "CommonElements.dtd">
%commonelements;
<!ELEMENT CategoryDetails (Name, Image?, Description?)>
<!ATTLIST CategoryDetails
xml:lang NMTOKEN #REQUIRED
>

Lawrence
Re: dtd [message #175695 is a reply to message #175644] Fri, 28 July 2006 11:15 Go to previous messageGo to next message
Juergen Aschenbrenner is currently offline Juergen Aschenbrenner
Messages: 25
Registered: July 2009
Junior Member
Hi Imandel,

thanks for Your Help. Your suggested solution works up to a certain point.
These two dtd validate. A third dtd that is referencing ( I learned it is
called parametereized entity) the CategoryDetails.dtd fails to validate
because elements are declared more than once. This remeinds me of C/C++
and conditional includes that seems to be the issue here. The
CommonElements.dtd is included via several intermediary parameterized
entities.

Do You have any Idea how this can be done best?

Cheers Juergen
Re: dtd [message #175783 is a reply to message #175695] Mon, 31 July 2006 14:39 Go to previous message
Lawrence Mandel is currently offline Lawrence Mandel
Messages: 486
Registered: July 2009
Senior Member
Hi Juergen,

DTDs do have their limitations. (Actually, similar problems are
encountered using XML schema as wel.) Unfortuantely I don't have a good
suggestion for working around this aside from refactoring your DTDs.
Building a simple and clean import tree is definitely a benefit when
working with DTDs.

Lawrence
Previous Topic:Tomcat publishing problems with WTP / Eclipse 3.2/Callisto
Next Topic:How to control errors and warnings in WTP
Goto Forum:
  


Current Time: Mon Oct 20 04:35:29 GMT 2014

Powered by FUDForum. Page generated in 0.02823 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software