cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

declaring external file entities in a doctype

fry
1-Newbie
1-Newbie

declaring external file entities in a doctype


Is it possible to declare an external file entity in a doctype using both a
formal PUBLIC identifier -and- a SYSTEM identifier? My intention is to use
use the SYSTEM identifier as a backup in case the FPI cannot be resolved
through the catalog file.

The example below is not syntactically correct but illustrates my point.

PUBLIC "-//OWNER//DTD General Purpose Doc//EN"
SYSTEM "c:/project/doctypes/gendoc/gendoc.dtd"
%doc;


Thanks,

Wayne Fry
Process and Technology
916-684-5200 Ext. 3320


6 REPLIES 6
lhales
1-Newbie
(To:fry)


Wayne,

The answer depends on SGML or XML. If you are using XML, the answer is
yes. The syntax would look something like this.

REV 2.000 20020322//EN"
"productxml.dtd">

I modified my DOCTYPE declaration a bit. The text in the quotes
immediately after the end of the FPI, is the system identifier. This can
be a file name in the current path (my case) out to a URI in webland and
points between.

I haven't ever tried using both a SYSTEM and PUBLIC identifier in SGML, my
guess is that it won't work, but I haven't checked this out.

Lynn E. Hales
Information Technology Consultant
lhales@csc.com
(757) 262-3495


"Fry, Wayne"
<fry to:=" adepters@arbortext.com=" <br="/> @alldata.com> cc:
Sent by: Subject: declaring external file entities in a doctype
owner-adepter
s


04/04/2002
12:56 PM
Please
respond to
adepters



Is it possible to declare an external file entity in a doctype using both a
formal PUBLIC identifier -and- a SYSTEM identifier? My intention is to use
use the SYSTEM identifier as a backup in case the FPI cannot be resolved
through the catalog file.

The example below is not syntactically correct but illustrates my point.

PUBLIC "-//OWNER//DTD General Purpose Doc//EN"
SYSTEM "c:/project/doctypes/gendoc/gendoc.dtd"
%doc;

Thanks,

Wayne Fry
Process and Technology
916-684-5200 Ext. 3320




PUBLIC "-//OWNER//DTD General Purpose Doc//EN"
"c:/project/doctypes/gendoc/gendoc.dtd"
%doc;

-ANdy

"Fry, Wayne" wrote:
>
> Is it possible to declare an external file entity in a doctype using both a
> formal PUBLIC identifier -and- a SYSTEM identifier? My intention is to use
> use the SYSTEM identifier as a backup in case the FPI cannot be resolved
> through the catalog file.
>
> The example below is not syntactically correct but illustrates my point.
>
> > PUBLIC "-//OWNER//DTD General Purpose Doc//EN"
> SYSTEM "c:/project/doctypes/gendoc/gendoc.dtd"
> %doc;
>
>
> Thanks,
>
> Wayne Fry
> Process and Technology
> 916-684-5200 Ext. 3320

--
/* Andy Esslinger - Lockheed Martin Aeronautics Company
(817) 777 3047 LM Aero F-22 TOD (Technical Order Data)
This is a proprietary business e-mail address. Do NOT release
to any other party. #INCLUDE STANDARD DISCLAIMER */


pgrosso
1-Newbie
(To:fry)

Lynn's syntax works fine in both XML and SGML. In SGML, you can
give either a public id, a system id, or both. In XML, you must
give a system id; you can also give an optional public id.

Public ids must be resolved (e.g., via some catalog lookup) to
be useful. Epic supports catalogs for both SGML and XML, but
not all XML tools support such catalogs.

paul

Can you check if all your entity declarations are used?
So that you can remove the ones not used?
Does anybody have some ACL Code for that?

Dirk
ptc-957362
1-Newbie
(To:fry)

Dirk,

you can run through all your entities trying to delete them. Epic will
not allow you to delete used ones. In order to not get any error
messages use catch. A list of all entities you can get using ACL
functions file_entity_names and graphic_entity_names:

graphic_entity_names(entlist, doc);
for (idx in entlist) {
catch(execute("undeclare_entity $$entlist[$$idx]"));
if (!entity_exists(entlist[idx])) {
# ... entity has been successfully removed
} else {
# ... entity still exists
}
}

The same with file entities.

Hope this helps,
Brigitte
--
* Brigitte Kulieva Phone: +49 6221 1486 26 *
* DOSCO Document Systems Consulting GmbH Fax: +49 6221 1486 19 *
* Mannheimer Str. 1 E-Mail: kulieva@dosco.de *
* 69115 Heidelberg, Germany http://www.dosco.de/ *

"WALDENMAIER,DIRK (HP-Germany,ex1)" schrieb:
>
> Can you check if all your entity declarations are used?
> So that you can remove the ones not used?
> Does anybody have some ACL Code for that?
>
> Dirk
>


Thank you Brigitte,

Dirk
Announcements