[sr-dev] git:master: xhttp_pi: update pi_framework_mod. xsl to generate new pi_http samples

Ovidiu Sas osas at voipembedded.com
Wed Apr 2 01:47:46 CEST 2014


Module: sip-router
Branch: master
Commit: cfce181526d1686aa431eb358ea35d793f7df12f
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=cfce181526d1686aa431eb358ea35d793f7df12f

Author: Ovidiu Sas <osas at voipembedded.com>
Committer: Ovidiu Sas <osas at voipembedded.com>
Date:   Tue Apr  1 19:46:41 2014 -0400

xhttp_pi: update pi_framework_mod.xsl to generate new pi_http samples
 - add link_cmd to the primary key for DB_UPDATE commands

---

 .../dbschema_k/xsl/pi_framework_mod.xsl            |   15 ++++++++++++---
 1 files changed, 12 insertions(+), 3 deletions(-)

diff --git a/doc/stylesheets/dbschema_k/xsl/pi_framework_mod.xsl b/doc/stylesheets/dbschema_k/xsl/pi_framework_mod.xsl
index 211ad7a..330f736 100644
--- a/doc/stylesheets/dbschema_k/xsl/pi_framework_mod.xsl
+++ b/doc/stylesheets/dbschema_k/xsl/pi_framework_mod.xsl
@@ -52,9 +52,18 @@
 		<xsl:text>&#x9;&#x9;&#x9;<cmd_type>DB1_QUERY</cmd_type>&#xa;</xsl:text>
 		<xsl:text>&#x9;&#x9;&#x9;<query_cols>&#xa;</xsl:text>
 		<xsl:for-each select="column">
-			<xsl:text>&#x9;&#x9;&#x9;&#x9;<col><field></xsl:text>
-			<xsl:call-template name="get-name"/>
-			<xsl:text></field></col>&#xa;</xsl:text>
+			<xsl:choose>
+				<xsl:when test="primary">
+					<xsl:text>&#x9;&#x9;&#x9;&#x9;<col><field></xsl:text>
+					<xsl:call-template name="get-name"/>
+					<xsl:text></field><link_cmd>update</link_cmd></col>&#xa;</xsl:text>
+				</xsl:when>
+				<xsl:otherwise>
+					<xsl:text>&#x9;&#x9;&#x9;&#x9;<col><field></xsl:text>
+					<xsl:call-template name="get-name"/>
+					<xsl:text></field></col>&#xa;</xsl:text>
+				</xsl:otherwise>
+			</xsl:choose>
 		</xsl:for-each>
 		<xsl:text>&#x9;&#x9;&#x9;</query_cols>&#xa;</xsl:text>
 		<xsl:text>&#x9;&#x9;</cmd>&#xa;</xsl:text>




More information about the sr-dev mailing list