You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@xml.apache.org by Mohd Saifullah <sa...@lantana.tenet.res.in> on 2002/04/21 19:25:10 UTC

DTD help


Hi,
    Greetings!

I want to include one DTD in another DTD, is it possible? I am trying to
do this using ENTITY. I wrote as follows:

<!ENTITY % param1 SYSTEM "filepath/file.dtd">
<!ELEMENT Adding (%param1;)>

But when i tried to load this DTD in IBM xmlgenerator tool, it says
invalid DTD. What i missed out? Any idea, please?

Thanks and Regards,
Saif



---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: DTD help

Posted by "Thomas B. Passin" <tp...@mitretek.org>.
The dtd you import must not have any DOCTYPE statements.  It may contain
only declarations.  In your overall document, you would have the DOCTYPE
declaration.  Using an entity this way essentially brings in text, and the
complete xml document has to follow the rules once the entity has been
imported and expanded.

Therefore, you want your files to be like this:

======= dtd to be imported (to_be_imported.dtd) ======
<!ELEMENT element_to_be_imported (#PCDATA)>

======= Your main xml file ===========
<!DOCTYPE importing_document [
<!ENTITY %imports SYSTEM "to_be_imported.dtd">
%imports;
<!ELEMENT document (element_to_be_imported)>
]>

Cheers,

Tom P

[Mohd Saifullah]

>
>
> This is also not working, any other idea, please?
>
> Regards,
> Saif
>
> On Sun, 21 Apr 2002, Paul Libbrecht wrote:
>
> > This is almost not more complicated.
> > Instead of your Element, you should simply use the entity:
> >
> > <!ENTITY % param1 SYSTEM "filepath/file.dtd">
> > %param1;
> >



---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: DTD help

Posted by Mohd Saifullah <sa...@lantana.tenet.res.in>.

This is also not working, any other idea, please?

Regards,
Saif

On Sun, 21 Apr 2002, Paul Libbrecht wrote:

> This is almost not more complicated.
> Instead of your Element, you should simply use the entity:
> 
> <!ENTITY % param1 SYSTEM "filepath/file.dtd">
> %param1;
> 
> Paul
> 
> On Dimanche, avril 21, 2002, at 07:25 , Mohd Saifullah wrote:
> 
> >
> >
> > Hi,
> >     Greetings!
> >
> > I want to include one DTD in another DTD, is it possible? I am trying to
> > do this using ENTITY. I wrote as follows:
> >
> > <!ENTITY % param1 SYSTEM "filepath/file.dtd">
> > <!ELEMENT Adding (%param1;)>
> >
> > But when i tried to load this DTD in IBM xmlgenerator tool, it says
> > invalid DTD. What i missed out? Any idea, please?
> >
> > Thanks and Regards,
> > Saif
> >
> >
> >
> > ---------------------------------------------------------------------
> > In case of troubles, e-mail:     webmaster@xml.apache.org
> > To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> > For additional commands, e-mail: general-help@xml.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
> 

-- 


       ______________________________________________
     _ |  Saifulla M.A., IV sem M.S.                | _
    / )|  Dept. of Comp. Science,IIT,Madras.        |( \
   / / |      address  : 203,Krishna Hostel,IIT,    | \ \
 _( (  |  _   *******    Madras,T.N.-600036      _  |  ) )_
(((\ \ | / / also @:saif@lantana.iitm.ernet.in  < \ | / /)))
(\ \|/ /   Phone: (044) 445 - 9079, Room 203.    \ \|/ ////)
 \       /----------------------------------------\       /
  \     /                                          \     /
   \   /                                            \    \
===============================================================





---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Re: DTD help

Posted by Paul Libbrecht <pa...@activemath.org>.
This is almost not more complicated.
Instead of your Element, you should simply use the entity:

<!ENTITY % param1 SYSTEM "filepath/file.dtd">
%param1;

Paul

On Dimanche, avril 21, 2002, at 07:25 , Mohd Saifullah wrote:

>
>
> Hi,
>     Greetings!
>
> I want to include one DTD in another DTD, is it possible? I am trying to
> do this using ENTITY. I wrote as follows:
>
> <!ENTITY % param1 SYSTEM "filepath/file.dtd">
> <!ELEMENT Adding (%param1;)>
>
> But when i tried to load this DTD in IBM xmlgenerator tool, it says
> invalid DTD. What i missed out? Any idea, please?
>
> Thanks and Regards,
> Saif
>
>
>
> ---------------------------------------------------------------------
> In case of troubles, e-mail:     webmaster@xml.apache.org
> To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
> For additional commands, e-mail: general-help@xml.apache.org
>
>


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org