xsl-list
[Top] [All Lists]

Capturing the content of declared entities

2005-10-14 10:59:08
I've looked through the archives but I can't find anything similar to
this problem.  I'm trying to get my XSLT to capture the content of the
entities that are declared in my document.

My XML file has the DOCTYPE declaration with an entity file declared as
follows:

*****

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE task "whatever.dtd" 
[
<!ENTITY % entity_pool SYSTEM "../../entities/entity_pool.ent">
%entity_pool;

]>
<topleveltag>
....
</topleveltag>

*****
The entity_pool.ent file then declares a group of entity files as:

<!ENTITY % file1 SYSTEM "../entities/pools/file1.ent">
<!ENTITY % file2 SYSTEM "../entities/pools/file2.ent">
<!ENTITY % file3 SYSTEM "../entities/pools/file3.ent">
%file1;
%file2;
%file3;
Etc.

This allows me to only use 1 entity declaration at the top of all my
files and not the 10 that I have to use and if I add an entity file, I
only add the declaration into the entity_pool file.

*****
My entity files are broken into subject matter.  For example, file1.ent
may have all of my consumable equipment and is found in the file as:

<!ENTITY towel "paper towel">
<!ENTITY cloth "cleaning cloth">
Etc.

Capturing the content of declared entities

I'm trying to get my XSLT to capture the content of the entities that
are declared in my document.

My XML file has the DOCTYPE declaration with an entity file declared as
follows:

*****

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE task "whatever.dtd" 
[
<!ENTITY % entity_pool SYSTEM "../../entities/entity_pool.ent">
%entity_pool;

]>
<topleveltag>
....
</topleveltag>

*****
The entity_pool.ent file then declares a group of entity files as:

<!ENTITY % file1 SYSTEM "../entities/pools/file1.ent">
<!ENTITY % file2 SYSTEM "../entities/pools/file2.ent">
<!ENTITY % file3 SYSTEM "../entities/pools/file3.ent">
%file1;
%file2;
%file3;
Etc.

This allows me to only use 1 entity declaration at the top of all my
files and not the 10 that I have to use and if I add an entity file, I
only add the declaration into the entity_pool file.

*****
My entity files are broken into subject matter.  For example, file1.ent
may have all of my consumable equipment and is found in the file as:

<!ENTITY towel "paper towel">
<!ENTITY cloth "cleaning cloth">
Etc.

I know that the entities are being processed by the system because when
I had an error in 1 of the files, it stopped the process.  The problem
is that when processor gets through the entities it will not recognize
in the XML where the entity is being referenced.  My XML using the
entities like:

<step>
<para>Using a &towel;, clean the part.</para>
</step>

****
Instead of getting the 'paper towel' from the entity, I get an error
that reads:

"Cannot load file to XMLDomDocument. A name was started with an invalid
character"

*****

My final output is to an FO but I believe this is an XSLT problem.  My
XSL-FO (rendering with Antenna House V3.3) does not use anything
different than <xsl:value-of select="element"> to get the content of the
field, could that be my problem?  Is what I'm trying to do possible?



Sincerely,
Carolyn Oliver
Systems Analyst

O'NEIL & ASSOCIATES, INC.
495 Byers Rd.
Miamisburg, Ohio 45342-3662

Phone: (937) 865-0846 ext. 3024
Fax: (937) 865-5858
E-mail: coliver(_at_)oneil(_dot_)com

REVOLUTIONIZING DOCUMENTATION >>> POWERING PRODUCT SUPPORT


**********************************************************************
Confidentiality Notice
The information contained in this e-mail is confidential and intended for
use only by the person(s) or organization listed in the address. If you have
received this communication in error, please contact the sender at O'Neil &
Associates, Inc., immediately. Any copying, dissemination, or distribution
of this communication, other than by the intended recipient, is strictly
prohibited.
**********************************************************************


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>