[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Re: [docbook] Best practices for externalentity references?
----- Original Message ----- From: "Chris Johnson" <cjohnson@capcollege.bc.ca> To: <sina@khakbaz.com> Sent: Tuesday, April 13, 2004 7:40 PM Subject: [docbook-apps] Re: [docbook] Best practices for externalentity references? > Hi Sina, > > Thanks for your email - it's good to see I'm going in *approximately* > the right direction... ; ) > > Have you come across any naming convention for the entity files? I'm > using .dtd as per E. Harold's "XML Bible", but .ent makes more sense to > me. > W3C and a couple of other organizations use '.ent' extension, it's also supported by certain XML Editors. > > Cheers, > > Chris > > > Chris Johnson > > Web Developer > Capilano College > North Vancouver, Canada > > 604.986.1911 ext. 3455 > cjohnson@capcollege.bc.ca > > >>> "Sina K. Heshmati" <sina@khakbaz.com> 04/13/2004 7:14:44 AM >>> > Chris, > > The way I deal with identical cases is to create an entity file > ('ent/repository.ent') and direct all entity references to it. For > example, > you have several XML source files (DocBook doctype in this case); you > should > have something like this: > > <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" > "http://oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ > <!ENTITY % repository SYSTEM "ent/repository.ent"> > %repository; > ]> > > <section id="entRepository"> > <title>This is a test!</title> > <para>Entity Repository Test</para> > ... > </section> > > on the top of each one. So that, all entity references will be > resolved > using 'ent/repository.ent'. > > I recently examined this method on DocBook Website sources with > 'webpage' > doctype. You might find them helpful. > > [1]. http://www.khakbaz.com/javad/misc/humor/index.xml > > This is an XML source that calls a parameter entity after doctype > declaration. > > [2]. http://www.khakbaz.com/javad/ent/ > > This directory contains all entity files I have defined. > > Note that, you definitely need an entity resolver while processing > your > source files. > > Sina > > ----- Original Message ----- > From: Chris Johnson > To: docbook@lists.oasis-open.org > Sent: Tuesday, April 06, 2004 11:33 PM > Subject: [docbook] Best practices for external entity references? > > > Hi, > > I am assembling the portions of a modular docBook document, and was > wondering if here are any resources for best practices for using > entity > references. > > Each section file (meaning the root element is a <section> element) > will reference one or more outcomes, course lists, and / or general > entities, and I would like to manage these entities as centrally as > possible. > > I have Elliotte Harold's XML Bible and have googled this topic, and > have come up with two possibilities: > > 1) Use an 'index' file to point to other files that contain the actual > entity references: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" > "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" > [ > <!ENTITY % ENT_INDEX SYSTEM "../entities/entity_index.dtd"> > %ENT_INDEX; > ]> > > 2) Refer to each external parameter entity as required: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE section PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" > "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" > [ > <!ENTITY % GENERAL SYSTEM "../entities/general.dtd"> > %GENERAL; > <!ENTITY % OUTCOMES SYSTEM "../entities/outcomes.dtd"> > %OUTCOMES; > <!ENTITY % COURSELISTS SYSTEM "../entities/courselists.dtd"> > %COURSELISTS; > ]> > > Any thoughts on 1) vs. 2), or on this method in general? I'm leaning > towards 1), as I can then add other entity sets if needed to > entity_index.dtd. Also, are there any gotchas regarding addressing > (relative / absolute / fully resolved)? Should I be looking at using > Catalogs? > > I have attached copies of the entity files, and I look forward to your > feedback. > > TIA, > > Chris > > > Chris Johnson > > Web Developer > Capilano College > North Vancouver, Canada > > 604.986.1911 ext. 3455 > cjohnson@capcollege.bc.ca > > > > > To unsubscribe from this list, send a post to > docbook-unsubscribe@lists.oasis-open.org, or visit > http://www.oasis-open.org/mlmanage/. > > > To unsubscribe from this list, send a post to > docbook-apps-unsubscribe@lists.oasis-open.org, or visit > http://www.oasis-open.org/mlmanage/. >
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]