This is the mail archive of the xsl-list@mulberrytech.com 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: XSL code for CALS (Oasis) tables



-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

At 09:33 AM 3/13/02, Rick Geimer wrote:
>I am working with a DTD suite that uses CALS/Oasis tables, and I want to 
>put together some stylesheets to transform those documents to HTML and XSL 
>formatting objects. I've looked at the Docbook XSL stylesheets, and it 
>looks like the code in there will do the trick, however, I was wondering 
>if anyone has extracted the table code out of those stylesheets so that it 
>can be used via a simple xsl:include. I'm just trying to save some time. 
>If no one has done that yet, then I guess it is up to me :-).

Just take table.xsl from the stylesheet directory.  I am working on a large 
scientific publishing project with very complex tables, and I thought that 
this would be much more difficult than it was.  xsltproc quickly alerted me 
to the couple of variables that needed to be set, and everything just 
worked; Norm has once again done excellent work here.

   <xsl:import href="table.xsl"/>
   <xsl:variable name="default.table.width" select="'100%'"/>
   <xsl:variable name="use.extensions" select="0"/>
   <xsl:template name="anchor">
     <xsl:param name="conditional" select="1"/>
     <xsl:param name="node" select="."/>
     <xsl:if test="$conditional=0 or $node/@id"/>
     <a>
       <xsl:attribute name="name">
         <xsl:choose>
           <xsl:when test="$node/@id">
             <xsl:value-of select="$node/@id"/>
           </xsl:when>
           <xsl:otherwise>
             <xsl:value-of select="generate-id($node)"/>
           </xsl:otherwise>
         </xsl:choose>
       </xsl:attribute>
     </a>
   </xsl:template>
   <xsl:template name="dbhtml-attribute"/>

~Chris
- -- 
Christopher R. Maden, Principal Consultant, crism consulting
DTDs/schemas - conversion - ebooks - publishing - Web - B2B - training
<URL: http://crism.maden.org/consulting/ >
PGP Fingerprint: BBA6 4085 DED0 E176 D6D4  5DFC AC52 F825 AFEC 58DA
-----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.8

iQA/AwUBPJBeVqxS+CWv7FjaEQLqqACfWxiZ3v+GUQFscLPUVF4HLMLLRZgAoMjf
S3i23TGRrSvIdz8VRPvhC7Cf
=URVX
-----END PGP SIGNATURE-----


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


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