From 2427616490fa36edca2e3379c991c6785fbb0a33 Mon Sep 17 00:00:00 2001 From: Bob Stayton Date: Fri, 5 Jul 2002 08:34:12 +0000 Subject: [PATCH] New parameter in support of stylesheet olink system. --- xsl/params/collect.xref.targets.xml | 26 +++++++++++++++++++++++ xsl/params/current.docid.xml | 22 +++++++++++++++++++ xsl/params/olink.base.uri.xml | 18 ++++++++++++++++ xsl/params/olink.doctitle.xml | 22 +++++++++++++++++++ xsl/params/target.database.document.xml | 28 +++++++++++++++++++++++++ xsl/params/targets.filename.xml | 28 +++++++++++++++++++++++++ xsl/params/use.local.olink.style.xml | 24 +++++++++++++++++++++ 7 files changed, 168 insertions(+) create mode 100644 xsl/params/collect.xref.targets.xml create mode 100644 xsl/params/current.docid.xml create mode 100644 xsl/params/olink.base.uri.xml create mode 100644 xsl/params/olink.doctitle.xml create mode 100644 xsl/params/target.database.document.xml create mode 100644 xsl/params/targets.filename.xml create mode 100644 xsl/params/use.local.olink.style.xml diff --git a/xsl/params/collect.xref.targets.xml b/xsl/params/collect.xref.targets.xml new file mode 100644 index 000000000..9f61fc740 --- /dev/null +++ b/xsl/params/collect.xref.targets.xml @@ -0,0 +1,26 @@ + + + +collect.xref.targets +string + + +collect.xref.targets +Controls whether cross reference data is +collected + + + + + + +Description + +In order to resolve olinks efficiently, the stylesheets can +generate an external data file containing information about +all potential cross reference endpoints in a document. +This parameter determines whether the collection process is run when the document is processed by the stylesheet. The default value is no, which means the data file is not generated during processing. The other choices are yes, which means the data file is created and the document is processed for output, and only, which means the data file is created but the document is not processed for output. +See also targets.filename. + + + diff --git a/xsl/params/current.docid.xml b/xsl/params/current.docid.xml new file mode 100644 index 000000000..52440fbf5 --- /dev/null +++ b/xsl/params/current.docid.xml @@ -0,0 +1,22 @@ + + + +current.docid +string + + +current.docid +targetdoc identifier for the document being +processed + + + + + +Description +When olinks between documents are resolved for HTML output, the stylesheet can compute the relative path between the current document and the target document. The stylesheet needs to know the targetdoc identifiers for both documents, as they appear in the target.database.document database file. This parameter passes to the stylesheet +the targetdoc identifier of the current document, since that +identifier does not appear in the document itself. +This parameter can also be used for print output. If an olink's targetdoc id differs from the current.docid, then the stylesheet can append the target document's title to the generated olink text. That identifies to the reader that the link is to a different document, not the current document. See also olink.doctitle to enable that feature. + + diff --git a/xsl/params/olink.base.uri.xml b/xsl/params/olink.base.uri.xml new file mode 100644 index 000000000..93d78e422 --- /dev/null +++ b/xsl/params/olink.base.uri.xml @@ -0,0 +1,18 @@ + + + +olink.base.uri +uri + + +olink.base.uri +Base URI used in olink hrefs + + + + + +Description +When cross reference data is collected for resolving olinks, it may be necessary to prepend a base URI to each target's href. This parameter lets you set that base URI when cross reference data is collected. This feature is needed when you want to link to a document that is processed without chunking. The output filename for such a document is not known to the XSL stylesheet; the only target information consists of fragment identifiers such as #idref. To enable the resolution of olinks between documents, you should pass the name of the HTML output file as the value of this parameter. Then the hrefs recorded in the cross reference data collection look like outfile.html#idref, which can be reached as links from other documents. + + diff --git a/xsl/params/olink.doctitle.xml b/xsl/params/olink.doctitle.xml new file mode 100644 index 000000000..20dadce3c --- /dev/null +++ b/xsl/params/olink.doctitle.xml @@ -0,0 +1,22 @@ + + + +olink.doctitle +boolean + + +olink.doctitle +show the document title for external olinks? + + + + + + +Description +When olinks between documents are resolved for print output, the generated text may not make it clear that the reference is to another document. It is possible for the stylesheets to append the other document's title to external olinks. For this to happen, two parameters must be set. The olink.doctitle parameter should be set to nonzero to enable this +feature. And you should set the current.docid parameter to the document id for the document currently +being processed for output. If an olink's targetdoc id differs from the current.docid, then the stylesheet can append the target document's +title to the generated olink text. + + diff --git a/xsl/params/target.database.document.xml b/xsl/params/target.database.document.xml new file mode 100644 index 000000000..90e3cdf96 --- /dev/null +++ b/xsl/params/target.database.document.xml @@ -0,0 +1,28 @@ + + + +target.database.document +uri + + +target.database.document +Name of master database file for resolving +olinks + + + + + + +Description + +To resolve olinks between documents, the stylesheets use +a master database document that identifies the target datafiles for all the documents within the scope +of the olinks. This parameter value is the URI of +the master document to be read during processing to resolve olinks. +The default value is targetdb.xml. +The data structure of the file is defined in the targetdatabase.dtd DTD. The database file provides the high level elements to record the identifiers, locations, and relationships of documents. The cross reference data for individual documents is generally pulled into the database using system entity references or XIncludes. See also targets.filename. + + + + diff --git a/xsl/params/targets.filename.xml b/xsl/params/targets.filename.xml new file mode 100644 index 000000000..f7f67cb56 --- /dev/null +++ b/xsl/params/targets.filename.xml @@ -0,0 +1,28 @@ + + + +targets.filename +string + + +targets.filename +Name of cross reference targets data file + + + + + + +Description + +In order to resolve olinks efficiently, the stylesheets can +generate an external data file containing information about +all potential cross reference endpoints in a document. +This parameter lets you change the name of the generated +file from the default name target.db. +The name must agree with that used in the target database +used to resolve olinks during processing. +See also target.database.document. + + + diff --git a/xsl/params/use.local.olink.style.xml b/xsl/params/use.local.olink.style.xml new file mode 100644 index 000000000..fca6d8dcf --- /dev/null +++ b/xsl/params/use.local.olink.style.xml @@ -0,0 +1,24 @@ + + + +use.local.olink.style +boolean + + +use.local.olink.style +Process olinks using xref style of current +document + + + + + +Description +When cross reference data is collected for use by olinks, the data for each potential target includes one field containing a completely assembled cross reference string, as if it were an xref generated in that document. Other fields record the separate title, number, and element name of each target. When an olink is formed to a target from another document, the olink resolves to that preassembled string by default. If the use.local.olink.style parameter is set to non-zero, then instead the cross +reference string is formed again from the target title, number, and +element name, using the stylesheet processing the targeting document. +Then olinks will match the xref style in the targeting document +rather than in the target document. If both documents are processed +with the same stylesheet, then the results will be the same. + + -- 2.40.0