[Laszlo-checkins] r3802 - in openlaszlo/branches/legals: WEB-INF/lps/server docs/includes docs/src docs/src/xsl

jgrandy@openlaszlo.org jgrandy at openlaszlo.org
Tue Feb 13 12:01:11 PST 2007


Author: jgrandy
Date: 2007-02-13 12:01:09 -0800 (Tue, 13 Feb 2007)
New Revision: 3802

Modified:
   openlaszlo/branches/legals/WEB-INF/lps/server/build.xml
   openlaszlo/branches/legals/docs/includes/docbook.css
   openlaszlo/branches/legals/docs/src/build.xml
   openlaszlo/branches/legals/docs/src/xsl/conditional-html.xsl
   openlaszlo/branches/legals/docs/src/xsl/html2dbk.xsl
Log:
Change 20070210-jgrandyw-C by jgrandyw at jgrandy-pb.local on 2007-02-10 22:37:51 PST
    in /Users/jgrandyw/dev/svn/openlaszlo/branches/legals

Summary: Hook up conditional text for devguide et al.

Bugs Fixed:

Technical Reviewer: ben
QA Reviewer: frisco
Doc Reviewer: jsundman

Details: Convert @condition attributes to <div class=''></div> wrappers,
add CSS to render conditional text with distinctive formatting. Also add
a top-right-justified label describing the condition, for example "Flash
only".

The formatting is subject to the attentions of a qualified design professional
(or wannabe; I'm not either).

Tests:'ant clean doc', look for the Flash-only paragraph in docs/guide/font.html.

Files:
M      docs/src/xsl/conditional-html.xsl
M      docs/src/xsl/html2dbk.xsl
M      docs/includes/docbook.css


Modified: openlaszlo/branches/legals/WEB-INF/lps/server/build.xml
===================================================================
--- openlaszlo/branches/legals/WEB-INF/lps/server/build.xml	2007-02-13 19:51:42 UTC (rev 3801)
+++ openlaszlo/branches/legals/WEB-INF/lps/server/build.xml	2007-02-13 20:01:09 UTC (rev 3802)
@@ -161,7 +161,7 @@
   </target>
   
   <!--===============  Target [clean]  ==================-->
-  <target name="clean"
+  <target name="clean" depends="init"
      description="Deletes all output files and directories generated by the build process.">
 
     <delete failonerror="false">
@@ -195,6 +195,7 @@
     <delete dir="misc" failonerror="false" />
     <delete dir="cache" failonerror="false" />
     <delete file="manifest.mf" failonerror="false" />
+    <delete file="repository-info.xml" failonerror="false" />
     <delete failonerror="false">
       <fileset dir="." defaultexcludes="no" includes="**/*~"/>
     </delete>

Modified: openlaszlo/branches/legals/docs/includes/docbook.css
===================================================================
--- openlaszlo/branches/legals/docs/includes/docbook.css	2007-02-13 19:51:42 UTC (rev 3801)
+++ openlaszlo/branches/legals/docs/includes/docbook.css	2007-02-13 20:01:09 UTC (rev 3802)
@@ -108,7 +108,26 @@
     font-style:italic;
 }
 
+/* Conditional Text */
 
+.swf, .swf7, .dhtml, .svg, .jme {
+    border-left: 1px solid #7b839a;
+    border-right: 1px solid #7b839a;
+    border-top: 1px solid #b0b8cf;
+    border-bottom: 1px solid #8E96AD;
+    background-color: #F8F8F8;
+}
+
+.swf:before, .swf7:before, .dhtml:before, .svg:before, .jme:before {
+    content:attr(alt);
+    font-weight:bold;
+    display: block;
+    float: right;
+    text-align: right;
+    margin-right: 5pt;
+    margin-top: 5pt;
+}
+
 /* Live examples */
 
 .example, .informalexample {

Modified: openlaszlo/branches/legals/docs/src/build.xml
===================================================================
--- openlaszlo/branches/legals/docs/src/build.xml	2007-02-13 19:51:42 UTC (rev 3801)
+++ openlaszlo/branches/legals/docs/src/build.xml	2007-02-13 20:01:09 UTC (rev 3802)
@@ -61,9 +61,12 @@
           <pathelement path="${docs.build.dir}" />
       </path>
 
+      <mkdir dir="${docs.build.dir}" />
+
       <!-- TODO [jgrandy 2007-01-16] This needs to be updated for Cygwin. See
            http://docbook.sourceforge.net/outgoing/catalogs-cygwin.txt
         -->
+
       <echo file="${docs.build.dir}/CatalogManager.properties" append="false">
 catalogs=${docbook-xml}/catalog.xml;${docbook-xsl}/catalog.xml
 relative-catalogs=false
@@ -203,11 +206,9 @@
   </target>
   
   <target name="reference.js2doc.build" 
-          depends="lfc.js2doc.generate,components.js2doc.generate"
+          depends="init,lfc.js2doc.generate,components.js2doc.generate"
           unless="reference.skip">
   
-    <mkdir dir="${reference.build.dir}" />
-
     <!-- bundle together the LFC, LZX, and Components js2doc output -->
     
     <style style="xsl/js2doc-append.xsl"
@@ -236,7 +237,7 @@
     
   </target>
         
-  <target name="reference.dbk.build" depends="reference.js2doc.build"
+  <target name="reference.dbk.build" depends="init,reference.js2doc.build"
           unless="reference.skip">
 
     <property name="file.in" value="${reference.build.dir}/lfc+lzx+comps-verbose.js2doc"/>
@@ -929,11 +930,8 @@
   
   <target name="clean-tutorials" depends="init"
       description="clean up generated tutorial files">
-    <mkdir dir="${tutorials.old.output.dir}"/>
-    <chmod dir="${tutorials.old.output.dir}" perm="ugo+w" includes="*.html"/>
     <delete failonerror="false" includeEmptyDirs="true">
       <fileset dir="${tutorials.old.build.dir}"/>
-      <fileset dir="${tutorials.old.output.dir}"/>
       <fileset dir="${tutorials.build.dir}"/>
       <fileset dir="${tutorials.output.dir}"/>
     </delete>
@@ -941,11 +939,8 @@
   
   <target name="clean-dguide" depends="init,clean-tutorials"
       description="clean up generated dguide files">
-    <mkdir dir="${dguide.old.output.dir}"/>
-    <chmod dir="${dguide.old.output.dir}" perm="ugo+w" includes="*.html"/>
     <delete failonerror="false" includeEmptyDirs="true">
       <fileset dir="${dguide.old.build.dir}"/>
-      <fileset dir="${dguide.old.output.dir}"/>
       <fileset dir="${dguide.build.dir}"/>
       <fileset dir="${dguide.output.dir}"/>
     </delete>
@@ -1007,18 +1002,7 @@
 
   <target name="clean" depends="reference.clean,contributors.clean,clean-dguide,clean-deployers,clean-designers,clean-tutorials"
       description="clean up generated files">
-    <delete failonerror="false" includeemptydirs="true">
-      <!-- Old build locations.  These can be removed once the
-           2004-07-04 version of this file has propogated through the
-           branches.  (Please update this date if you add to the list
-           below, or add a new section with a later date.) -->
-      <fileset dir="../developers-guide" includes="**/*"/>
-      <fileset dir="../lzx-reference"/>
-      <fileset dir="${docs.build.dir}/html"/>
-      <fileset dir="${docs.build.dir}">
-        <exclude name="redmond-*" />
-      </fileset>
-    </delete>
+    <delete dir="${docs.build.dir}"/>
   </target>
   
   <target name="test">

Modified: openlaszlo/branches/legals/docs/src/xsl/conditional-html.xsl
===================================================================
--- openlaszlo/branches/legals/docs/src/xsl/conditional-html.xsl	2007-02-13 19:51:42 UTC (rev 3801)
+++ openlaszlo/branches/legals/docs/src/xsl/conditional-html.xsl	2007-02-13 20:01:09 UTC (rev 3802)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2005 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
@@ -10,19 +10,43 @@
 
   <xsl:import href="common-html.xsl"/>
   
-  <xsl:template name="conditiontoclasses">
+  <xsl:template name="conditionclass">
     <xsl:param name="condition"/>
     <xsl:value-of select="$condition"/>
   </xsl:template>
   
+  <xsl:template name="conditionalt">
+    <xsl:param name="condition"/>
+    <xsl:choose>
+      <xsl:when test="$condition='swf'"><xsl:text>Flash Only</xsl:text></xsl:when>
+      <xsl:when test="$condition='swf7'"><xsl:text>Flash 7 Only</xsl:text></xsl:when>
+      <xsl:when test="$condition='swf8'"><xsl:text>Flash 8 Only</xsl:text></xsl:when>
+      <xsl:when test="$condition='dhtml'"><xsl:text>DHTML Only</xsl:text></xsl:when>
+      <xsl:when test="$condition='svg'"><xsl:text>SVG Only</xsl:text></xsl:when>
+      <xsl:when test="$condition='jme'"><xsl:text>JME Only</xsl:text></xsl:when>
+      <xsl:when test="$condition='proxied'"><xsl:text>Proxied Only</xsl:text></xsl:when>
+      <xsl:when test="$condition='solo'"><xsl:text>SOLO Only</xsl:text></xsl:when>
+      <xsl:otherwise><xsl:value-of select="concat(@condition, ' runtime only')"/></xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+  
   <xsl:template match="*[@condition]">
-    <xsl:variable name="classes">
-      <xsl:call-template name="conditiontoclasses">
-        <xsl:with-param name="condition" select="@condition"/>
-      </xsl:call-template>
-    </xsl:variable>
-    <div class="{$classes}">
+    <div>
+
+      <xsl:attribute name="class">
+        <xsl:call-template name="conditionclass">
+          <xsl:with-param name="condition" select="@condition"/>
+        </xsl:call-template>
+      </xsl:attribute>
+
+      <xsl:attribute name="alt">
+        <xsl:call-template name="conditionalt">
+          <xsl:with-param name="condition" select="@condition"/>
+        </xsl:call-template>
+      </xsl:attribute>
+      
       <xsl:apply-imports/>
+      
     </div>
   </xsl:template>
   

Modified: openlaszlo/branches/legals/docs/src/xsl/html2dbk.xsl
===================================================================
--- openlaszlo/branches/legals/docs/src/xsl/html2dbk.xsl	2007-02-13 19:51:42 UTC (rev 3801)
+++ openlaszlo/branches/legals/docs/src/xsl/html2dbk.xsl	2007-02-13 20:01:09 UTC (rev 3802)
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <!-- * X_LZ_COPYRIGHT_BEGIN ***************************************************
-* Copyright 2001-2004 Laszlo Systems, Inc.  All Rights Reserved.              *
+* Copyright 2001-2007 Laszlo Systems, Inc.  All Rights Reserved.              *
 * Use is subject to license terms.                                            *
 * X_LZ_COPYRIGHT_END ****************************************************** -->
 <!--
@@ -143,6 +143,7 @@
   </xsl:template>
   
   <xsl:template match="h:h1|h:h2|h:h3|h:h4|h:h5|h:h6">
+    &condition;
     <title>
       <xsl:apply-templates mode="skip-anchors" select="node()"/>
     </title>
@@ -176,6 +177,7 @@
   
   <xsl:template match="h:code|h:tt">
     <literal>
+      &condition;
       <xsl:if test="@class">
         <xsl:attribute name="role"><xsl:value-of select="@class"/></xsl:attribute>
       </xsl:if>
@@ -185,6 +187,7 @@
   
   <xsl:template match="h:body/h:code|h:pre">
     <programlisting>
+      &condition;
       <xsl:apply-templates/>
     </programlisting>
   </xsl:template>
@@ -205,6 +208,7 @@
       </xsl:choose>
       
       <mediaobject>
+        &condition;
         <imageobject>
           <imagedata fileref="{@src}"/>
         </imageobject>
@@ -222,6 +226,7 @@
   
   <xsl:template match="h:p">
     <para>
+      &condition;
       <xsl:call-template name="id"/>
       <xsl:apply-templates/>
     </para>
@@ -273,6 +278,7 @@
 
   <xsl:template match="h:blockquote">
     <blockquote>
+      &condition;
       <xsl:apply-templates mode="wrap" select="."/>
     </blockquote>
   </xsl:template>
@@ -291,6 +297,7 @@
   <xsl:template match="h:dt">
     <xsl:variable name="item-number" select="count(preceding-sibling::h:dt)+1"/>
     <varlistentry>
+      &condition;
       <term>
         <xsl:apply-templates/>
       </term>
@@ -370,6 +377,7 @@
   
   <xsl:template match="h:ol">
     <orderedlist spacing="compact">
+      &condition;
       <xsl:for-each select="h:li">
         <listitem>
           <xsl:apply-templates mode="wrap" select="."/>
@@ -380,6 +388,7 @@
   
   <xsl:template match="h:ul">
     <itemizedlist spacing="compact">
+      &condition;
       <xsl:for-each select="h:li">
         <listitem>
           <xsl:apply-templates mode="wrap" select="."/>
@@ -390,6 +399,7 @@
   
   <xsl:template match="h:ul[processing-instruction('html2dbk')]">
     <simplelist>
+      &condition;
       <xsl:for-each select="h:li">
         <member type="vert">
           <xsl:apply-templates mode="wrap" select="."/>



More information about the Laszlo-checkins mailing list