[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] olink for generating href links
Also FYI, there are two implemented mechanisms for resolving olinks: using entities and using XSL. The first implementation used entities, and is documented in Norm Walsh's "OLink Semantics in the DocBook DSSSL Stylesheets" (and carried over to XSL). Currently this doc seems to only be available here: http://www.lrz-muenchen.de/services/datenhaltung/text/docbook-style-doc/olinksemantics.html (Norm, I can't seem to find this on docbook.org any more). Olinks using XSL make use of the targetdoc and targetptr attributes in olink. This mechanism is what most people use to link between DocBook documents, and it is the one described in my DocBook XSL book. Bob Stayton Sagehill Enterprises DocBook Consulting bobs@sagehill.net ----- Original Message ----- From: "Webmaster" <Webmaster@comtrol.com> To: <docbook-apps@lists.oasis-open.org> Sent: Friday, July 15, 2005 11:49 AM Subject: RE: [docbook-apps] olink for generating href links > FYI to those interested: I did do a test of the non-traditional application > of olink to link to non-xml files and it worked with 1.68.1 stylesheets and > saxon (I used onechunk.xsl). It also worked with a bogus entity and a and/or > a empty targetdocent attribute: > > test_olink.xml: > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE chapter SYSTEM "/docbook/docbookx.dtd" [ > > ]> > > <chapter> > <docinfo> > <modespec id="e1800001">/Drivers/1800001G.exe</modespec> > </docinfo> > <title>Examples of oLink</title> > <para> > <olink linkmode="e1800001">Device Driver</olink> > </para> > </chapter> > > > generated html: > > <p><a href="/Drivers/1800001G.exe" class="olink">Device Driver</a></p> > > -----Original Message----- > From: Webmaster > Sent: Friday, July 15, 2005 1:31 PM > To: docbook-apps@lists.oasis-open.org > Subject: RE: [docbook-apps] olink for generating href links > > > Well, it just so happens that we'll be using Bob's suggestion (thank you > again): the content writer is using Framemaker, and Framemaker doesn't like > the modespec element... > > We'll be using the "type" attribute instead of "role". We're already usign > the role attribute for creating targets in the href. Is it a bad idea to use > the "type"? > > LN > > -----Original Message----- > From: Webmaster > Sent: Friday, July 15, 2005 10:30 AM > To: docbook-apps@lists.oasis-open.org > Subject: RE: [docbook-apps] olink for generating href links > > > Thank you, for the clever suggestion, Bob. Actually one of the list members > responded to me directly and had a clever suggestion that worked in her > case, I'm going to give it a try and maybe it will work for others, so I'm > sharing it: > > 1 st Tag with the DTD declaration: > -------------------------------------------------- > > <?xml version="1.0" encoding="UTF-8"?> > <!DOCTYPE article SYSTEM "file:///C:/docbook44/docbookx.dtd" > [ > <!ENTITY Supplementary_Information.xml SYSTEM > "Supplementary_Information.xml" NDATA SGML> > ]> > > 2 nd Tag: (i gave it just before i closed the <articleinfo> </articleinfo> > tag) > -------------------------------------------------------------------------- -- > ----------------------- > > <modespec id="SUPP_INFO">Supplementary_Information.html</modespec> > > 3 rd Tag: where i wanted to generate the olink: > ---------------------------------------------------------------- > > <para>For further information, refer to > <olink linkmode="SUPP_INFO" > targetdocent="Supplementary_Information.xml">Supplementary > Information</olink>.</para> > > > That generated the following hyperlink: > > <a href="Supplementary_Information.html" class="olink">Supplementary > Information</a> > > > > -----Original Message----- > From: Bob Stayton [mailto:bobs@sagehill.net] > Sent: Friday, July 15, 2005 1:28 AM > To: Webmaster; docbook-apps@lists.oasis-open.org > Subject: Re: [docbook-apps] olink for generating href links > > > Hi, > Actually, your application is not what olinks are for. Olinks are for > linking from one DocBook document to an id in another DocBook document. You > are linking to a zip file, not a DocBook document. > > The element used for linking to non-DocBook documents is ulink. But the > current ulink element's linking mechanism is a url, not an entity reference. > You would have to customize the template that processes ulink to treat the > url attribute as if it were an entityref. Instead of: > > <xsl:value-of select="@url"/> > > you would instead use: > > <xsl:value-of select="unparsed-entity-uri(@url)"/> > > But if the url for one ulink contains an actual url instead of an entity > name, then this simple change will fail. You would need to make it > conditional, perhaps by setting a role attribute. > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- > From: "Webmaster" <Webmaster@comtrol.com> > To: <docbook-apps@lists.oasis-open.org> > Sent: Thursday, July 14, 2005 9:42 AM > Subject: [docbook-apps] olink for generating href links > > > > Hello. > > > > I'm using 1.68.1 stylesheets, and saxon. > > > > I would like to generate HTML href links using the olink element. My paths > > for the target are specified as external entity: > > > > Example (one out of 400): > > <!ENTITY e1800001 SYSTEM "/path/to/file.zip" NDATA SGML> > > > > and I'm calling out the olink: > > <olink targetdocent="e1800001">Device Driver</olink> > > > > and it's generating this: > > <a href="/cgi-bin/olink?sysid=" class="olink">Device Driver</a> > > > > I want this: > > <a href="/path/to/file.zip" class="olink">Device Driver</a> > > > > I don't know if this is what olinks are for, but I didn't want to have to > go > > thru all my xml to update links when they change. Instead, I pull a report > > from our database, and it gives me the about 400+ entities that then I > paste > > into my entitiy section. (the ids won't change). By doing this, it changes > a > > 1 day job into a 5 minute task. > > > > How can I get this to work? > > > > Thanks! > > LN > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > --------------------------------------------------------------------- > To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org > For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org > > --------------------------------------------------------------------- > 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]