OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] xml:base and DocBook stylesheets


> -----Original Message-----
> From: Bob Stayton 
> In 1.70.1, Norm added a template named 'add-xml-base' to to 
> common/stripns.xsl do that.  That template is called only 
> when processing a 
> DocBook 5 document because it gets put into a nodeset before 
> applying the 
> regular templates.  But there is no standard function in XSLT 1.0 for 
> identifying the xml:base of the current document. However, 
> there is a Saxon 
> extension function saxon:systemId that can do that.  So 
> add-xml-base checks 
> to see if that function exists, and if it does, it computes 
> the xml:base of 
> the document and adds that attribute to the root element in 
> the internal 
> nodeset. 


Perhaps a warning message should be emitted if you don't use Saxon. 

It is possible to add support for Xalan-Java, which has a systemId extension
function too. The function can be used in a stylesheet like this:

 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
    xmlns:NodeInfo="org.apache.xalan.lib.NodeInfo">
   ...
   <xsl:value-of select="NodeInfo:systemId()"/>

See http://xml.apache.org/xalan-j/extensionslib.html#nodeinfo.

/MJ





[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]