combined singleport pci cards into one xsl stylesheet

This commit is contained in:
Nadi Sarrar 2006-12-14 15:10:59 +00:00
parent 183941be8c
commit 7fd00bc1bb
3 changed files with 7 additions and 81 deletions

View File

@ -1,62 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
<!--
Card Type: hfcpci
Ports: 1
Port Attributes: mode=(te|nt), link=(ptp|ptmp), capi=(yes|no)
-->
<xsl:template name="hfcpcicard">
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template name="hfcpciport">
<xsl:text> layermask:</xsl:text>
<xsl:choose>
<xsl:when test="@mode='nt'">
<xsl:text>3</xsl:text>
</xsl:when>
<xsl:when test="@capi='yes'">
<xsl:text>0</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>15</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:text> protocol:</xsl:text>
<xsl:call-template name="if-match">
<xsl:with-param name="val" select="@mode" />
<xsl:with-param name="match-true">te</xsl:with-param>
<xsl:with-param name="match-false">nt</xsl:with-param>
<xsl:with-param name="val-true">34</xsl:with-param>
<xsl:with-param name="val-false">18</xsl:with-param>
<xsl:with-param name="val-default">34</xsl:with-param>
</xsl:call-template>
<xsl:if test="@mode!='nt'">
<xsl:text>+</xsl:text>
<xsl:call-template name="if-match">
<xsl:with-param name="val" select="@link" />
<xsl:with-param name="match-true">ptp</xsl:with-param>
<xsl:with-param name="match-false">ptmp</xsl:with-param>
<xsl:with-param name="val-true">0</xsl:with-param>
<xsl:with-param name="val-false">(-32)</xsl:with-param>
<xsl:with-param name="val-default">(-32)</xsl:with-param>
</xsl:call-template>
</xsl:if>
<xsl:text> capi:</xsl:text>
<xsl:call-template name="if-match">
<xsl:with-param name="val" select="@capi" />
<xsl:with-param name="val-true">yes</xsl:with-param>
<xsl:with-param name="val-false">no</xsl:with-param>
<xsl:with-param name="val-default">no</xsl:with-param>
</xsl:call-template>
<xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>

View File

@ -3,16 +3,16 @@
<xsl:output method="text" version="1.0" encoding="UTF-8" indent="yes"/>
<!--
Card Type: avmfritz
Card Type: hfcmulti, avmfritz, w6692pci
Ports: 1
Port Attributes: mode=(te|nt), link=(ptp|ptmp), capi=(yes|no)
-->
<xsl:template name="avmfritzcard">
<xsl:template name="singlepcicard">
<xsl:text>
</xsl:text>
</xsl:template>
<xsl:template name="avmfritzport">
<xsl:template name="singlepciport">
<xsl:text> layermask:</xsl:text>
<xsl:choose>
<xsl:when test="@mode='nt'">

View File

@ -6,8 +6,7 @@
<xsl:include href='mISDN.conf.mISDN_dsp.xsl' />
<xsl:include href='mISDN.conf.hfcmulti.xsl' />
<xsl:include href='mISDN.conf.bnx.xsl' />
<xsl:include href='mISDN.conf.hfcpci.xsl' />
<xsl:include href='mISDN.conf.avmfritz.xsl' />
<xsl:include href='mISDN.conf.singlepci.xsl' />
<!--
Main mISDNconf Template
@ -84,25 +83,14 @@
</xsl:for-each>
</xsl:when>
<xsl:when test="@type='hfcpci'">
<xsl:when test="@type='hfcpci' or @type='avmfritz' or @type='w6692pci'">
<xsl:value-of select="concat('CARD:',@type)" />
<xsl:call-template name="hfcpcicard" />
<xsl:call-template name="singlepcicard" />
<xsl:for-each select="port">
<xsl:sort data-type="number" />
<xsl:text>PORT:</xsl:text>
<xsl:value-of select="." />
<xsl:call-template name="hfcpciport" />
</xsl:for-each>
</xsl:when>
<xsl:when test="@type='avmfritz'">
<xsl:value-of select="concat('CARD:',@type)" />
<xsl:call-template name="avmfritzcard" />
<xsl:for-each select="port">
<xsl:sort data-type="number" />
<xsl:text>PORT:</xsl:text>
<xsl:value-of select="." />
<xsl:call-template name="avmfritzport" />
<xsl:call-template name="singlepciport" />
</xsl:for-each>
</xsl:when>