You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by dm...@locus.apache.org on 2000/12/16 02:15:29 UTC
cvs commit: xml-xalan/test/tests/conf/impincl/fragments ss5.xsl imp17all.xsl ss2.xsl ss3.xsl ss4.xsl imp16all.xsl
dmarston 00/12/15 17:15:28
Added: test/tests/conf/impincl/fragments ss5.xsl imp17all.xsl
ss2.xsl ss3.xsl ss4.xsl imp16all.xsl
Log:
Copy of tests in Lotus/IBM repository
Revision Changes Path
1.1 xml-xalan/test/tests/conf/impincl/fragments/ss5.xsl
Index: ss5.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:param name="pParam" select="string('!From ss5!')"/>
<xsl:template match="publisher">
p-publisher:
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/fragments/imp17all.xsl
Index: imp17all.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Purpose: To be imported by ../ImpIncl17. -->
<xsl:key name="id" use="@id" match="LAMBDA"/>
<xsl:key name="annid" use="@of" match="Annotation"/>
<xsl:template match="a">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="Definition"/><!-- Don't handle the LAMBDAs now -->
<!-- Alternate template for Definition...
Usual "apply" looping, which means we will visit the LAMBDAs -->
<!--
<xsl:template match="Definition">
<xsl:apply-templates/>
</xsl:template>
-->
<xsl:template match="LAMBDA">
<xsl:choose>
<xsl:when test="key('annid',@id)">
<xsl:text>NO BUG</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text>Found one whose id has no annotation!</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="node">
<xsl:variable name="id" select="@id"/>
<xsl:text>On node whose id is </xsl:text>
<xsl:value-of select="$id"/>
<xsl:text> -nodes to apply: </xsl:text>
<xsl:value-of select="count(key('id',$id))"/><xsl:text>
</xsl:text>
<xsl:apply-templates select="key('id',$id)"/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/fragments/ss2.xsl
Index: ss2.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:include href="ss3.xsl"/>
<xsl:param name="mParam" select="string('!From ss2!')"/>
<xsl:template match="author">
m-author:
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/fragments/ss3.xsl
Index: ss3.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:import href="ss4.xsl"/>
<xsl:param name="nParam" select="string('!From ss3!')"/>
<xsl:template match="chapter[@num='1']">
n-contents of first chapter:
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/fragments/ss4.xsl
Index: ss4.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:include href="ss5.xsl"/>
<xsl:param name="oParam" select="string('!From ss4!')"/>
<xsl:template match="overview">
o-overview:
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
1.1 xml-xalan/test/tests/conf/impincl/fragments/imp16all.xsl
Index: imp16all.xsl
===================================================================
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!-- Purpose: To be imported by ../ImpIncl16. -->
<xsl:template match="doc">
<out>
<xsl:apply-templates/>
</out>
</xsl:template>
<xsl:template match="aac|llh|oop|aah|ssb|iii|rre|eek|xxo|aar|sst|bbd|eeo|xxi|ddg|nne">
<!-- Template for big union -->
<xsl:value-of select="."/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="//yyj">
<!-- Template for Absolute Location Path covering whole document. -->
<xsl:text>Middle: </xsl:text><xsl:value-of select="."/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="aaa[@val]">
<!-- Template for attribute -->
<xsl:text>@val=</xsl:text><xsl:value-of select="@val"/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="*[.=117]">
<!-- Template for element's value -->
<xsl:text>The node containing 117 is </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="*[(not(.=117) and ((position() > 225) and (position() < 375))) and ((@century='yes') or (@foo='nope'))]">
<!-- Template for compound boolean expression -->
<xsl:text>A century node is </xsl:text><xsl:value-of select="name(.)"/><xsl:text>
</xsl:text>
</xsl:template>
<xsl:template match="text()"/><!-- suppress extraneous text -->
</xsl:stylesheet>