dleslie     01/01/11 11:22:48

  Modified:    java/xdocs/style/stylesheets xml2fo.xsl
  Log:
  Fixed variable for resources.xml.
  
  Revision  Changes    Path
  1.2       +8 -7      xml-xalan/java/xdocs/style/stylesheets/xml2fo.xsl
  
  Index: xml2fo.xsl
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/xdocs/style/stylesheets/xml2fo.xsl,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- xml2fo.xsl        2001/01/11 18:33:31     1.1
  +++ xml2fo.xsl        2001/01/11 19:22:42     1.2
  @@ -16,7 +16,10 @@
   <xsl:stylesheet
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; version="1.0"
        xmlns:fo="http://www.w3.org/1999/XSL/Format";>
  -
  +     
  +   <!-- to use document func to get resources.xml -->
  +  <xsl:variable name="resourceFile" 
select="'../../sources/xalan/resources.xml'"/>  
  +              
   <xsl:template match ="/">
        <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format";>
   
  @@ -286,13 +289,11 @@
   
   
   <xsl:template match="resource-ref">
  -  <xsl:variable name="resourceFile" 
  -          select="../../../sources/xalan/resources.xml"/>
     <xsl:variable name="xref" select="@idref"/>
     <xsl:variable name="href"
  -          
select="document('../../sources/xalan/resources.xml')/resources/[EMAIL 
PROTECTED]/@location"/>
  +          select="document($resourceFile)/resources/[EMAIL 
PROTECTED]/@location"/>
     <xsl:variable name="label"
  -          
select="document('../../sources/xalan/resources.xml')/resources/[EMAIL 
PROTECTED]/@title"/>
  +          select="document($resourceFile)/resources/[EMAIL 
PROTECTED]/@title"/>
     <fo:basic-link color="blue">
        <xsl:attribute name="external-destination">
          <xsl:if test="starts-with($href,'apidocs')">
  @@ -312,9 +313,9 @@
             select="./xalan/resources.xml"/>  
       <xsl:variable name="ref"  select="@idref"/>
       <xsl:variable name="mailto"
  -          
select="document('../../sources/xalan/resources.xml')/resources/[EMAIL 
PROTECTED]/@mailto"/>
  +          select="document($resourceFile)/resources/[EMAIL 
PROTECTED]/@mailto"/>
       <xsl:variable name="name"
  -          
select="document('../../sources/xalan/resources.xml')/resources/[EMAIL 
PROTECTED]/@name"/>
  +          select="document($resourceFile)/resources/[EMAIL 
PROTECTED]/@name"/>
     <fo:basic-link color="blue" external-destination="mailto:{$mailto}";>
        <xsl:value-of select="$name"/>
        <!--xsl:apply-templates/--> 
  
  
  

Reply via email to