From c1b5da16a54583c6a611d1b151016f5a9dd09abb Mon Sep 17 00:00:00 2001
From: Martin Goik <goik@hdm-stuttgart.de>
Date: Thu, 22 Oct 2015 14:50:20 +0200
Subject: [PATCH] FO beta version

---
 Doc/Makefile                                  |  6 +-
 Doc/Sd1/objectsClasses.xml                    | 18 +++---
 Doc/make.rules                                |  2 +-
 Doc/make.video.rules                          |  1 +
 .../webapp/VAADIN/themes/mytheme/styles.css   | 22 +++----
 ws/Docbook/Extensions/Xsl/docbook2docbook.xsl | 17 +++++-
 ws/Docbook/Extensions/Xsl/docbook2print.xsl   | 59 ++++++++++++++-----
 7 files changed, 87 insertions(+), 38 deletions(-)

diff --git a/Doc/Makefile b/Doc/Makefile
index 4773a00fc..eff341c90 100644
--- a/Doc/Makefile
+++ b/Doc/Makefile
@@ -35,13 +35,14 @@ JAVADOCDESTDIR=${BUILDNAVI}/Ref/api
 #
 %.webm.mp4:%.webm
 	avconv -i $< -acodec libx264  -c:a libvorbis -r 10 $<.mp4 || rm -f $<.mp4
+	avconv -i $< -vframes 1 $<.png || rm -f $<.png
 
 webmSet = $(shell /bin/ls target/*/Ref/Video/*.webm)
 mp4Set  = $(foreach webmFile, $(webmSet), $(webmFile).mp4 )
 
-q:$(mp4Set)
+videoformats:$(mp4Set)
 
-all: ${BUILDROOT}/stage1 $(mp4Set) 
+all: ${BUILDROOT}/stage1
 	cd ${BUILDROOT}; tar c- ${DOCMODULES} | tar -x -C ${BUILDNAVI} 
 
 ${BUILDROOT}/${SCRIPTBASENAME}_print.xml \
@@ -53,6 +54,7 @@ ${BUILDROOT}/${SCRIPTBASENAME}.xml: ${SCRIPTBASENAME}.xml Common/glossary.xml Co
 	for module in ${DOCMODULES}; do \
             tar c- $$module/Ref| tar -x -C ${BUILDROOT}; \
           done;
+	$(MAKE) $(mp4Set)
 	cd ${BUILDROOT}; $(MAKE) -f ../make.rules -j ${numCores} pdf
 
 ${BUILDROOT}/stage1: ${BUILDROOT}/${BUILDNAVI}/printversion.pdf ${BUILDROOT}/${BUILDNAVI}/index.html ${BUILDROOT}/${BUILDNONAVI}/index.html
diff --git a/Doc/Sd1/objectsClasses.xml b/Doc/Sd1/objectsClasses.xml
index 55915a930..2ee06558a 100644
--- a/Doc/Sd1/objectsClasses.xml
+++ b/Doc/Sd1/objectsClasses.xml
@@ -3996,16 +3996,17 @@ Ratio Recursive / Loop: 65554</programlisting></td>
 
                 <para>From a performance point of view this result is quite
                 disillusioning: The loop based implementation is on average
-                ~65000 times faster than the recursive approach.</para>
+                ~65000 times faster compared to the recursive approach.</para>
 
-                <para>This is a frequent result: Albeit providing elegant
-                solutions using recursion in many situations is a <emphasis
-                role="bold">very bad</emphasis> idea and thus strongly
-                discouraged. There are however situations where:</para>
+                <para>This is a typical result: Albeit providing elegant
+                solutions recursion in many situations is a <emphasis
+                role="bold">very bad</emphasis> idea with respect to
+                performance and thus strongly discouraged. There are however
+                situations where:</para>
 
                 <orderedlist>
                   <listitem>
-                    <para>The performance penalty is not that large.</para>
+                    <para>The performance penalty is small.</para>
                   </listitem>
 
                   <listitem>
@@ -4285,8 +4286,9 @@ Ratio Recursive / Loop: 65554</programlisting></td>
                 result?</para>
 
                 <para>Do not forget to provide suitable
-                <command>Javadoc</command> comments and watch the generated
-                documentation.</para>
+                <command>Javadoc</command> comments and check the generated
+                <xref linkend="glo_HTML"/> documentation for
+                correctness.</para>
 
                 <para>Hints:</para>
 
diff --git a/Doc/make.rules b/Doc/make.rules
index 835c2d60c..6bf76d5f3 100644
--- a/Doc/make.rules
+++ b/Doc/make.rules
@@ -1,6 +1,6 @@
 
 %.pdf:%.tex
-	cd $(@D)/..; fig2dev -L pstex $(*F).fig| epstopdf -f >  $(*F).fig.pdf
+	cd $(@D)/..; fig2pdf --nogv $(*F).fig; mv $(*F).pdf $(*F).fig.pdf
 	cd $(@D); fig2mpdf -l -m ../$(*F).fig
 	cd $(@D)/..;pdflatex Generate/$(*F) 
 
diff --git a/Doc/make.video.rules b/Doc/make.video.rules
index f70397176..c7340643c 100644
--- a/Doc/make.video.rules
+++ b/Doc/make.video.rules
@@ -8,6 +8,7 @@ all: $(mp4Set)
 
 %.webm.mp4:%.webm
 	avconv -i $< -acodec libx264 -c:a libvorbis $<.mp4
+	avconv -i $< vframes 1 $<.png
 
 clean:
 	rm -f $(mp4Set)
diff --git a/P/Sda2/forum_1/src/main/webapp/VAADIN/themes/mytheme/styles.css b/P/Sda2/forum_1/src/main/webapp/VAADIN/themes/mytheme/styles.css
index daad9b139..8bcf75fcd 100644
--- a/P/Sda2/forum_1/src/main/webapp/VAADIN/themes/mytheme/styles.css
+++ b/P/Sda2/forum_1/src/main/webapp/VAADIN/themes/mytheme/styles.css
@@ -5,7 +5,7 @@
  * @param {value} $var - the value to search for
  * @param {bool} $recursive (false) - should any contained lists be checked for the value
  * 
- * @return {bool}??true if the value is found from the list, false otherwise
+ * @return {bool}��true if the value is found from the list, false otherwise
  * 
  * @group lists
  */
@@ -258,7 +258,7 @@
  * 
  * @param {color} $color ($v-background-color) - The base color for the gradient color stops
  * @param {list} $gradient ($v-gradient) - Valo-specific gradient value. See the documentation for $v-gradient.
- * @param {color}??$fallback (null) - A fallback color for browser which do not support linear gradients (IE8 and IE9 in particular). If null, the base $color is used instead.
+ * @param {color}��$fallback (null) - A fallback color for browser which do not support linear gradients (IE8 and IE9 in particular). If null, the base $color is used instead.
  * @param {string} $direction (to bottom) - the direction of the linear gradient. The color stops are by default so that a lighter shade is at the start and a darker shade is at the end.
  */
 
@@ -267,7 +267,7 @@
  *
  * @group style
  *
- * @param {list}??$border ($v-border) - CSS border value which can contain any of the color keywords
+ * @param {list}��$border ($v-border) - CSS border value which can contain any of the color keywords
  * @param {color} $color ($v-background-color) - the base color to which the color keywords are applied to
  * @param {color} $context (null) - context/surrounding color where the border is expected to appear. The color of the final border is the darker of the two parameters passed to this function.
  * @param {number} $strength (1) - adjustment for the border contrast
@@ -280,7 +280,7 @@
  * 
  * @param {string} $to-align (()) - The selector to match the elements which you wish to align vertically. The targeted elements should be inline or inline-block elements.
  * @param {string} $align (middle) - The vertical-align value, e.g. top, middle, bottom
- * @param {string}??$pseudo-element (after) - Which pseudo element to use for the vertical align guide
+ * @param {string}��$pseudo-element (after) - Which pseudo element to use for the vertical align guide
  * 
  * @group util
  */
@@ -539,7 +539,7 @@
  * Outputs the selectors and properties for the Accordion component.
  *
  * @param {string} $primary-stylename (v-accordion) - the primary style name for the selectors
- * @param {bool}??$include-additional-styles - should the mixin output all the different style variations of the component
+ * @param {bool}��$include-additional-styles - should the mixin output all the different style variations of the component
  * @group accordion
  */
 
@@ -547,7 +547,7 @@
  * Outputs the selectors and properties for the Button component.
  *
  * @param {string} $primary-stylename (v-button) - the primary style name for the selectors
- * @param {bool}??$include-additional-styles - should the mixin output all the different style variations of the component
+ * @param {bool}��$include-additional-styles - should the mixin output all the different style variations of the component
  *
  * @group button
  */
@@ -570,7 +570,7 @@
  * Outputs the selectors and properties for the CheckBox component.
  *
  * @param {string} $primary-stylename (v-checkbox) - the primary style name for the selectors
- * @param {bool}??$include-additional-styles - should the mixin output all the different style variations of the component
+ * @param {bool}��$include-additional-styles - should the mixin output all the different style variations of the component
  *
  * @group checkbox
  */
@@ -588,7 +588,7 @@
  * Outputs the selectors and properties for the ComboBox component.
  *
  * @param {string} $primary-stylename (v-filterselect) - the primary style name for the selectors
- * @param {bool}??$include-additional-styles - should the mixin output all the different style variations of the component
+ * @param {bool}��$include-additional-styles - should the mixin output all the different style variations of the component
  *
  * @group combobox
  */
@@ -604,7 +604,7 @@
  * Outputs the selectors and properties for the DateField component.
  *
  * @param {string} $primary-stylename (v-datefield) - the primary style name for the selectors
- * @param {bool}??$include-additional-styles - should the mixin output all the different style variations of the component
+ * @param {bool}��$include-additional-styles - should the mixin output all the different style variations of the component
  *
  * @group datefield
  */
@@ -621,7 +621,7 @@
  * Outputs the selectors and properties for the FormLayout component.
  *
  * @param {string} $primary-stylename (v-formlayout) - the primary style name for the selectors
- * @param {bool}??$include-additional-styles - should the mixin output all the different style variations of the component
+ * @param {bool}��$include-additional-styles - should the mixin output all the different style variations of the component
  *
  * @group formlayout
  */
@@ -666,7 +666,7 @@
  * Outputs the selectors and properties for the TextArea component.
  *
  * @param {string} $primary-stylename (v-textarea) - the primary style name for the selectors
- * @param {bool}??$include-additional-styles - should the mixin output all the different style variations of the component
+ * @param {bool}��$include-additional-styles - should the mixin output all the different style variations of the component
  *
  * @group textarea
  */
diff --git a/ws/Docbook/Extensions/Xsl/docbook2docbook.xsl b/ws/Docbook/Extensions/Xsl/docbook2docbook.xsl
index 327463483..cc97ac4fd 100644
--- a/ws/Docbook/Extensions/Xsl/docbook2docbook.xsl
+++ b/ws/Docbook/Extensions/Xsl/docbook2docbook.xsl
@@ -14,7 +14,7 @@
     
     <xsl:template match="@* | node()">
         <xsl:copy>
-            <xsl:apply-templates select="@* | node()"/>
+            <xsl:apply-templates select="@*[name(.) != 'xml:base'] | node()"/>
         </xsl:copy>
     </xsl:template>
     
@@ -32,6 +32,7 @@
     
     <xsl:template match="db:imagedata">
         <db:imagedata>
+            <xsl:copy-of select="@*[name() != 'fileref']"/>
             <xsl:attribute name="fileref">
                 <xsl:call-template name="hdm.get.leftmost.of.seperator">
                     <xsl:with-param name="path" select="ancestor::*/@xml:base"/>
@@ -43,6 +44,20 @@
         </db:imagedata>
     </xsl:template>
     
+    <xsl:template match="db:videodata">
+        <db:videodata>
+            <xsl:copy-of select="@*[name() != 'fileref']"/>
+            <xsl:attribute name="fileref">
+                <xsl:call-template name="hdm.get.leftmost.of.seperator">
+                    <xsl:with-param name="path" select="ancestor::*/@xml:base"/>
+                    <xsl:with-param name="seperator" select="'/'"/>
+                </xsl:call-template>                  
+                <xsl:text>/</xsl:text>
+                <xsl:value-of select="@fileref"/>
+            </xsl:attribute>
+        </db:videodata>
+    </xsl:template>
+    
     <xsl:template match="db:figure[db:mediaobject/db:imageobject]/db:title">
         <xsl:copy>
             <xsl:apply-templates select="@* | node()"/>
diff --git a/ws/Docbook/Extensions/Xsl/docbook2print.xsl b/ws/Docbook/Extensions/Xsl/docbook2print.xsl
index f77358538..703ce6186 100644
--- a/ws/Docbook/Extensions/Xsl/docbook2print.xsl
+++ b/ws/Docbook/Extensions/Xsl/docbook2print.xsl
@@ -7,7 +7,7 @@
     <xsl:variable name="generateIdPrefix">__sdwordm4342cs__</xsl:variable>
     
     <xsl:output indent="no"/>
-
+    
     <xsl:template match="@* | node()">
         <xsl:copy>
             <xsl:apply-templates select="@* | node()"/>
@@ -23,22 +23,51 @@
             </xsl:attribute>
         </imagedata>
     </xsl:template>
-
-   <xsl:template match="db:figure[db:mediaobject/db:videoobject]">
-       <figure>
-           <xsl:copy-of select="@*|db:title"/>
-           <remark>
-               <xsl:text>Video available in the online version of this script </xsl:text>
-           </remark>
-       </figure>
-    
-   </xsl:template>
-
-
-    <!-- dirty hack! -->
+    
+    <xsl:template match="db:mediaobject[db:videoobject]">
+        
+        <mediaobject>
+            <xsl:copy-of select="@*"/>
+            <imageobject>
+                <imagedata scale="20">
+                    <xsl:attribute name="fileref">
+                        <xsl:value-of select="db:videoobject/db:videodata/@fileref"/>
+                        <xsl:text>.png</xsl:text>
+                    </xsl:attribute>
+                </imagedata>
+            </imageobject>            
+            <xsl:variable name="onlineAvailabilityHint">Video available in the online version of this document.</xsl:variable>
+            <xsl:choose>
+                <xsl:when test="db:caption">
+                    <xsl:for-each select="db:caption">
+                        <caption>
+                            <xsl:copy-of select="@* | node()"/>
+                            <remark>
+                                <xsl:value-of select="$onlineAvailabilityHint"/>
+                            </remark>
+                        </caption>
+                    </xsl:for-each>
+                </xsl:when>
+                
+                <xsl:otherwise>
+                    <caption>
+                        <remark>
+                            <xsl:value-of select="$onlineAvailabilityHint"/>
+                        </remark>
+                    </caption>
+                    
+                </xsl:otherwise>
+                
+            </xsl:choose>
+            
+        </mediaobject>
+        
+    </xsl:template>
+            
+    <!-- dirty hack, should better not be generated in the first place! -->
     <xsl:template match="db:para[db:uri/text()='(Animated PDF Version)']"/>
     
     
     
-
+    
 </xsl:stylesheet>
-- 
GitLab