[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] Modular olinks
Hi Robert, First, you don't want to use %, which is a parameter entity which is only used internally to a DTD. You want an entity that is used in your content. So you should be able to declare a general text entity in your document and reference it in the targetdoc attribute. <!DOCTYPE book SYSTEM "docbook.dtd" [ <!ENTITY config "foo"> ]> <book> ... <olink targetdoc="&config;" targetptr="whatever"/> An entity like this is resolved when the file is parsed when the file is opened, so it is already resolved when the stylesheet is applied. So the stylesheet will see: <olink targetdoc="foo" targetptr="whatever"/> If you are using XInclude, you need to pay attention to how entity declarations are merged, so see this reference: http://www.sagehill.net/docbookxsl/ModularDoc.html#XincludeTextEntities You should also be able to declare a similar entity in your olink database file, and use that in the targetdoc attribute of the document element there. It also will be resolved when the olink database is opened and parsed, and will be available when the stylesheet reads the database to look up the olink. If you are having a problem with unresolved olinks, you might try temporarily replacing an entity reference &foo; with the actual text string "config" and see if that is the problem. Most likely there is some other issue with resolving the olink. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Robert Hall" <rhall@vocera.com> To: <docbook-apps@lists.oasis-open.org> Sent: Friday, March 17, 2006 1:27 PM Subject: [docbook-apps] Modular olinks I'm trying to implement a free form collection of topic modules as described in Bob Stayton's book[1]. I put an entity in the targetdoc attribute of the olink element, but I don't understand where to define the entity value or what syntax to use. I've tried defining the value in the book file that xincludes the topic file, and also in the olink database file for the book. For syntax, I've tried <!ENTITY % config SYSTEM "foo"> and variations thereof, omitting the % sign and the SYSTEM keyword, etc. Could someone please give me a gentle shove in the right direction? Below are some (simplified) sample snippets. Thanks in advance, -Robert Topic.xml (resides in \bar) -------------------------- See <olink targetdoc="&config;" targetptr="OtherTopic"/> for details. Foo_Book.xml (resides in \foo) ------------------------------ <!-- I tried defining the config entity in this file --> <xi:include href="../bar/Topic.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> Olink.db (resides in \foo) ------------------------- <!-- I tried defining the config entity in this file --> <sitemap> <dir name="foo"> <document targetdoc="foo"> &foo_targets; </document> </dir> <dir name="bar"> <document targetdoc="bar"> &bar_targets; </document> </dir> </sitemap> [1] http://www.sagehill.net/docbookxsl/modular-olinks.html --------------------------------------------------------------------- To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]