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

RE: Capturing the content of declared entities

Subject: RE: Capturing the content of declared entities
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 14 Oct 2005 19:36:20 +0100
xsl include entity file
Entities are all swallowed by the XML parser. The only thing XSLT sees is
the expanded text produced by the parser. I'm afraid XSLT is not a good tool
for looking at XML at this "physical" level.

Michael Kay
http://www.saxonica.com/ 

> -----Original Message-----
> From: Carolyn Oliver [mailto:Coliver@xxxxxxxxx] 
> Sent: 14 October 2005 18:59
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Capturing the content of declared entities
> 
> 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@xxxxxxxxx
> 
> 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.
> **********************************************************************

Current Thread

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
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.