This is the mail archive of the docbook-apps@lists.oasis-open.org mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [docbook-apps] Entities references vs. XRef as a way to manage changing glossary


On Fri, Aug 01, 2003 at 04:34:58PM -0400, Taro Ikai wrote:
> > The new olink can work for your purposes.  If a target
> > datafile has a matching entry (targetdoc and targetptr)
> > for an olink, and the @href attribute on the entry exists
> > but is empty, then you will get the olink text with no
> > hot link.
> 
> Bob,
> 
> I just tried it, and discovered it's just a little bit
> different from how you described it. It seems as long as I do 
> not specify the @baseuri attribute in the target database 
> document's <document> element, then I get olink text
> substitution without the hot link (<a href>). The @href 
> attribute does not seem to affect the hot link production.

Ah, yes, @baseuri also needs to be null as well.
> 
> My target database document now like this:
> 
>   <!DOCTYPE targetset 
>          SYSTEM 
> "c:/cygwin/usr/share/docbook-xsl/common/targetdatabase.dtd" [
>   <!ENTITY mytargets SYSTEM "mytarget.db"> 
>   ]>
>   <targetset> 
>     <targetsetinfo> 
>       Description of my target target database document.
>     </targetsetinfo>
>     <sitemap> 
>       <dir name="documentation"> 
>         <document targetdoc="glossary"> <!-- * Notice I don't have baseuri 
> attribute here -->
>             &mytargets;
>         </document>
>       </dir>
>     </sitemap>
>   </targetset>
> 
> The same goes for the use of your olink2ulink.xsl. If I don't 
> specify the @baseuri attribute, it just substitutes the olink 
> text without making it a host link.
> 
> I next tried removing some elements and attributes from my target 
> data file. What's 
> 
>   xsltproc --stringparam collect.xref.targets "only" docbook.xsl test.xml 
> 
> is like this:
> 
>   <div element="chapter" href="" number="1" targetptr="dessert">
>     <ttl>Dessert</ttl>
>     <xreftext>Chapter??1, <i>Tiramisu</i></xreftext>
>   </div>

I don't understand why the href attribute is blank.
It should be "#id", where id is either the element's
id value or a generated id.  That was why I thought
it would be necessary to delete those attribute values
that are generated.

> But my data file now looks like:
> 
>   <div targetptr="dessert">
>     <xreftext>tiramisu</xreftext>
>   </div>

Yes, that's all you need for your purposes.
 
> This is simple enough to generate with a script, and easy 
> enough to edit with a text editor, even if I have several thousand
> entries. None of the said tools seem to complain about 
> the stuff I did away with.

Good.  And you can still use normal olinks for other documents,
if you choose to.  You would just include all the data
for the other documents in the collection.

> In my document, all I need to make a reference is:
> 
>   <olink targetdoc="glossary" targetptr="dessert"/>
> 
> I just hope that I won't find it a requirement to import the 
> text parameterization into FrameMaker. If I do, then customizing
> the stylesheet for <xref> might make more sense. At least, 
> I understand the options better now. That said, if there's a 
> better way to maintain text parameterization, I'd still like 
> to know.

One other option might be XInclude.  It will survive
XSL identity transformations if you don't turn on
xinclude processing (omit the --xinclude option to
xsltproc).  If you need to import the parameterization
to FrameMaker, then you could convert the XIncludes
to entities just before import, and then FrameMaker
will handle them.

-- 

Bob Stayton                                 400 Encinal Street
Publications Architect                      Santa Cruz, CA  95060
Technical Publications                      voice: (831) 427-7796
The SCO Group                               fax:   (831) 429-1887
                                            email: bobs@sco.com

---------------------------------------------------------------------
To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]