]> granicus.if.org Git - docbook-dsssl/commitdiff
Added support for profiling based on xml:lang and status attributes.
authorJirka Kosek <jirka@kosek.cz>
Thu, 21 Sep 2006 12:42:15 +0000 (12:42 +0000)
committerJirka Kosek <jirka@kosek.cz>
Thu, 21 Sep 2006 12:42:15 +0000 (12:42 +0000)
xsl/fo/param.ent
xsl/fo/param.xweb
xsl/html/param.ent
xsl/html/param.xweb
xsl/params/profile.status.xml [new file with mode: 0644]
xsl/profiling/profile-mode.xsl
xsl/profiling/profile.xsl

index 22dc361a9efd35a3cd7b48bd8864b7ac8a27396f..aa3e51b3d893ac870541e3334c6f3a24f129ec12 100644 (file)
 <!ENTITY profile.role SYSTEM "../params/profile.role.xml">
 <!ENTITY profile.security SYSTEM "../params/profile.security.xml">
 <!ENTITY profile.separator SYSTEM "../params/profile.separator.xml">
+<!ENTITY profile.status SYSTEM "../params/profile.status.xml">
 <!ENTITY profile.userlevel SYSTEM "../params/profile.userlevel.xml">
 <!ENTITY profile.value SYSTEM "../params/profile.value.xml">
 <!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml">
index 8873eb9f8cceb84896774439740a91f08430da58..bf5a5b85cbade05491166bee38b27f6c53730629 100644 (file)
@@ -504,6 +504,7 @@ url="http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html">http:
 &profile.revisionflag;
 &profile.role;
 &profile.security;
+&profile.status;
 &profile.userlevel;
 &profile.vendor;
 &profile.attribute;
@@ -765,6 +766,7 @@ around all these parameters.</para>
 <src:fragref linkend="profile.role.frag"/>
 <src:fragref linkend="profile.security.frag"/>
 <src:fragref linkend="profile.separator.frag"/>
+<src:fragref linkend="profile.status.frag"/>
 <src:fragref linkend="profile.userlevel.frag"/>
 <src:fragref linkend="profile.value.frag"/>
 <src:fragref linkend="profile.vendor.frag"/>
index af7d0f5f8d49670acdbc81345bf7ceddc976c291..be00c6594a95b3adfabd379fe06205d8a3338568 100644 (file)
 <!ENTITY profile.role SYSTEM "../params/profile.role.xml">
 <!ENTITY profile.security SYSTEM "../params/profile.security.xml">
 <!ENTITY profile.separator SYSTEM "../params/profile.separator.xml">
+<!ENTITY profile.status SYSTEM "../params/profile.status.xml">
 <!ENTITY profile.userlevel SYSTEM "../params/profile.userlevel.xml">
 <!ENTITY profile.value SYSTEM "../params/profile.value.xml">
 <!ENTITY profile.vendor SYSTEM "../params/profile.vendor.xml">
index 379d93bed41f266d8f075963adade0a2f0901869..8efa8955d3325ae85ef4f1faa5414ab31020fc76 100644 (file)
@@ -367,6 +367,7 @@ url="http://docbook.sourceforge.net/projects/xsl/doc/tools/profiling.html">http:
 &profile.revisionflag;
 &profile.role;
 &profile.security;
+&profile.status;
 &profile.userlevel;
 &profile.vendor;
 &profile.attribute;
@@ -689,6 +690,7 @@ around all these parameters.</para>
 <src:fragref linkend="profile.role.frag"/>
 <src:fragref linkend="profile.security.frag"/>
 <src:fragref linkend="profile.separator.frag"/>
+<src:fragref linkend="profile.status.frag"/>
 <src:fragref linkend="profile.userlevel.frag"/>
 <src:fragref linkend="profile.value.frag"/>
 <src:fragref linkend="profile.vendor.frag"/>
diff --git a/xsl/params/profile.status.xml b/xsl/params/profile.status.xml
new file mode 100644 (file)
index 0000000..03b9af9
--- /dev/null
@@ -0,0 +1,35 @@
+<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"\r
+          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"\r
+          id="profile.status">\r
+<refmeta>\r
+<refentrytitle>profile.status</refentrytitle>\r
+<refmiscinfo role="type">string</refmiscinfo>\r
+</refmeta>\r
+<refnamediv>\r
+<refname>profile.status</refname>\r
+<refpurpose>Target profile for <sgmltag class="attribute">status</sgmltag>\r
+attribute</refpurpose>\r
+</refnamediv>\r
+\r
+<refsynopsisdiv>\r
+<src:fragment id='profile.status.frag'>\r
+<xsl:param name="profile.status" select="''"/>\r
+</src:fragment>\r
+</refsynopsisdiv>\r
+\r
+<refsect1><title>Description</title>\r
+\r
+<para>Value of this parameter specifies profiles which should be\r
+included in the output. You can specify multiple profiles by\r
+separating them by semicolon. You can change separator character by\r
+<parameter>profile.separator</parameter>\r
+parameter.</para>\r
+\r
+<para>This parameter has effect only when you are using profiling\r
+stylesheets (<filename>profile-docbook.xsl</filename>,\r
+<filename>profile-chunk.xsl</filename>, &#x2026;) instead of normal\r
+ones (<filename>docbook.xsl</filename>,\r
+<filename>chunk.xsl</filename>, &#x2026;).</para>\r
+\r
+</refsect1>\r
+</refentry>\r
index 4d549e1893439abea4e76f227c6a44e563e68ec5..a0e927e3bd29695074db7dddfa05a30d4b2b01c8 100644 (file)
                                               $conformance.content != '' or @conformance = ''"/>
 
   <xsl:variable name="lang.content">
-    <xsl:if test="@lang">
+    <xsl:if test="@lang | @xml:lang">
       <xsl:call-template name="cross.compare">
         <xsl:with-param name="a" select="$profile.lang"/>
-        <xsl:with-param name="b" select="@lang"/>
+        <xsl:with-param name="b" select="(@lang | @xml:lang)[1]"/>
       </xsl:call-template>
     </xsl:if>
   </xsl:variable>
-  <xsl:variable name="lang.ok" select="not(@lang) or not($profile.lang) or
-                                       $lang.content != '' or @lang = ''"/>
+  <xsl:variable name="lang.ok" select="not(@lang | @xml:lang) or not($profile.lang) or
+                                       $lang.content != '' or @lang = '' or @xml:lang = ''"/>
 
   <xsl:variable name="os.content">
     <xsl:if test="@os">
   <xsl:variable name="security.ok" select="not(@security) or not($profile.security) or
                                            $security.content != '' or @security = ''"/>
 
+  <xsl:variable name="status.content">
+    <xsl:if test="@status">
+      <xsl:call-template name="cross.compare">
+        <xsl:with-param name="a" select="$profile.status"/>
+        <xsl:with-param name="b" select="@status"/>
+      </xsl:call-template>
+    </xsl:if>
+  </xsl:variable>
+  <xsl:variable name="status.ok" select="not(@status) or not($profile.status) or
+                                           $status.content != '' or @status = ''"/>
+
   <xsl:variable name="userlevel.content">
     <xsl:if test="@userlevel">
       <xsl:call-template name="cross.compare">
 
   <xsl:if test="$arch.ok and $condition.ok and $conformance.ok and $lang.ok and $os.ok 
                 and $revision.ok and $revisionflag.ok and $role.ok and $security.ok
-                and $userlevel.ok and $vendor.ok and $attribute.ok">
+               and $status.ok and $userlevel.ok and $vendor.ok and $attribute.ok">
     <xsl:copy>
       <xsl:copy-of select="@*"/>
 
index 4f5029688cfe25237d80ec781a72d2c67e2ceca6..a7b8cb2fcf97b4955fe2e8fa2c0cd4388ca85000 100644 (file)
@@ -31,6 +31,7 @@
 <xsl:param name="profile.revisionflag" select="''"/>
 <xsl:param name="profile.role" select="''"/>
 <xsl:param name="profile.security" select="''"/>
+<xsl:param name="profile.status" select="''"/>
 <xsl:param name="profile.userlevel" select="''"/>
 <xsl:param name="profile.vendor" select="''"/>
 <xsl:param name="profile.attribute" select="''"/>