- From: Felix Sasaki via cvs-syncmail <cvsmail@w3.org>
- Date: Wed, 02 May 2007 17:07:42 +0000
- To: public-ws-policy-eds@w3.org
Update of /sources/public/2006/ws/policy
In directory hutz:/tmp/cvs-serv15060/policy
Modified Files:
generateBPlist.xsl guidelines-bestpractices.xml
xmlspec-policy.xsl
Log Message:
Updated XSL to allow for using <specref/> to refer to BP.
Index: xmlspec-policy.xsl
===================================================================
RCS file: /sources/public/2006/ws/policy/xmlspec-policy.xsl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- xmlspec-policy.xsl 5 Apr 2007 13:04:53 -0000 1.7
+++ xmlspec-policy.xsl 2 May 2007 17:07:39 -0000 1.8
@@ -372,4 +372,180 @@
</xsl:attribute>
</link>
</xsl:template>
+
+ <!-- Necessary for guidelines document: BP numbering -->
+ <xsl:template mode="number" match="p[@role='practice']">
+ <xsl:number count="p[@role='practice']" level="any" format="1. "/>
+ </xsl:template>
+ <xsl:template match="specref">
+ <xsl:param name="target" select="key('ids', @ref)[1]"/>
+
+ <xsl:choose>
+ <xsl:when test="not($target)">
+ <xsl:message>
+ <xsl:text>specref to non-existent ID: </xsl:text>
+ <xsl:value-of select="@ref"/>
+ </xsl:message>
+ </xsl:when>
+ <xsl:when test="$target[local-name()='p' and @role='practice']">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <b>
+ <xsl:apply-templates select="id(@ref)" mode="number"/>
+ <xsl:apply-templates select="id(@ref)/quote[1]" mode="text"/>
+ </b>
+ </a>
+ </xsl:when>
+ <xsl:when test="local-name($target)='issue'">
+ <xsl:text>[</xsl:text>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <b>
+ <xsl:text>Issue </xsl:text>
+ <xsl:apply-templates select="id(@ref)" mode="number"/>
+ <xsl:text>: </xsl:text>
+ <xsl:for-each select="id(@ref)/head">
+ <xsl:apply-templates/>
+ </xsl:for-each>
+ </b>
+ </a>
+ <xsl:text>]</xsl:text>
+ </xsl:when>
+ <xsl:when test="starts-with(local-name($target), 'div')">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <b>
+ <xsl:apply-templates select="id(@ref)" mode="divnum"/>
+ <xsl:apply-templates select="id(@ref)/head" mode="text"/>
+ </b>
+ </a>
+ </xsl:when>
+ <xsl:when test="starts-with(local-name($target), 'inform-div')">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <b>
+ <xsl:apply-templates select="id(@ref)" mode="divnum"/>
+ <xsl:apply-templates select="id(@ref)/head" mode="text"/>
+ </b>
+ </a>
+ </xsl:when>
+ <xsl:when test="local-name($target) = 'vcnote'">
+ <b>
+ <xsl:text>[VC: </xsl:text>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="id(@ref)/head" mode="text"/>
+ </a>
+ <xsl:text>]</xsl:text>
+ </b>
+ </xsl:when>
+ <xsl:when test="local-name($target) = 'prod'">
+ <b>
+ <xsl:text>[PROD: </xsl:text>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:apply-templates select="$target" mode="number-simple"/>
+ </a>
+ <xsl:text>]</xsl:text>
+ </b>
+ </xsl:when>
+ <xsl:when test="local-name($target) = 'label'">
+ <b>
+ <xsl:text>[</xsl:text>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:value-of select="$target"/>
+ </a>
+ <xsl:text>]</xsl:text>
+ </b>
+ </xsl:when>
+ <!-- MJH added table spec refs -->
+ <xsl:when test="local-name($target) = 'table'">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Table </xsl:text>
+ <xsl:apply-templates select="id(@ref)/caption" mode="divnum"/>
+ <!-- uncomment the following two line to add table captions to references -->
+ <!--<xsl:text>, "</xsl:text>
+ <xsl:apply-templates select="id(@ref)/caption" mode="text"/>
+ <xsl:text>"</xsl:text>
+ -->
+ </a>
+ </xsl:when>
+ <xsl:when test="local-name($target) = 'example'">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Example </xsl:text>
+ <xsl:apply-templates select="id(@ref)/head" mode="divnum"/>
+ </a>
+ </xsl:when>
+ <xsl:when test="local-name($target) = 'graphic'">
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="id(@ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>Figure </xsl:text>
+ <xsl:apply-templates select="id(@ref)" mode="divnum"/>
+ </a>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:message>
+ <xsl:text>Unsupported specref to </xsl:text>
+ <xsl:value-of select="local-name($target)"/>
+ <xsl:text> [</xsl:text>
+ <xsl:value-of select="@ref"/>
+ <xsl:text>] </xsl:text>
+ <xsl:text> (Contact stylesheet maintainer).</xsl:text>
+ </xsl:message>
+ <b>
+ <a>
+ <xsl:attribute name="href">
+ <xsl:call-template name="href.target">
+ <xsl:with-param name="target" select="key('ids', @ref)"/>
+ </xsl:call-template>
+ </xsl:attribute>
+ <xsl:text>???</xsl:text>
+ </a>
+ </b>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:template>
</xsl:stylesheet>
Index: generateBPlist.xsl
===================================================================
RCS file: /sources/public/2006/ws/policy/generateBPlist.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- generateBPlist.xsl 5 Apr 2007 13:04:53 -0000 1.1
+++ generateBPlist.xsl 2 May 2007 17:07:39 -0000 1.2
@@ -1,16 +1,14 @@
<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/">
- <olist>
+ <ulist>
<xsl:for-each select="//p[@role='practice']">
<item>
<p>
- <loc href="{concat('#',@id)}">
- <xsl:value-of select="quote[1]"/>
- </loc>
+ <specref ref="{@id}"/>
</p>
</item>
</xsl:for-each>
- </olist>
+ </ulist>
</xsl:template>
</xsl:stylesheet>
Index: guidelines-bestpractices.xml
===================================================================
RCS file: /sources/public/2006/ws/policy/guidelines-bestpractices.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -d -r1.1 -r1.2
--- guidelines-bestpractices.xml 5 Apr 2007 13:04:53 -0000 1.1
+++ guidelines-bestpractices.xml 2 May 2007 17:07:39 -0000 1.2
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8"?><olist><item><p><loc href="#bp-assertion-specification-parts">Parts of an Assertion Specification</loc></p></item><item><p><loc href="#bp-assertion-semantics">Semantics of Policy Assertions</loc></p></item><item><p><loc href="#bp-semantics-and-form">Semantics of an Assertion and its form</loc></p></item><item><p><loc href="#bp-assertion-start">Starting to Build an Assertion</loc></p></item><item><p><loc href="#bp-unique-qnames">Unique QNames</loc></p></item><item><p><loc href="#bp-assertions-and-message-semantics">Assertions and Message Semantics</loc></p></item><item><p><loc href="#bp-assertion-duplication">Duplication of Assertions</loc></p></item><item><p><loc href="#bp-assertion-definition">Definition of Policy Assertions</loc></p></item><item><p><loc href="#bp-nesting">Nesting of Assertions</loc></p></item><item><p><loc href="#bp-optional-assertions">Optional Assertions</loc></p></item><item><p><loc href="#bp-independent-assertions">Independent Assertions</loc></p</item><item><p><loc href="#bp-assertion-description">Description of Assertions</loc></p></item><item><p><loc href="#bp-tbd">Change of the Policy Subject Over Time</loc></p></item></olist>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8"?><ulist><item><p><specref ref="bp-assertion-specification-parts"/></p></item><item><p><specref ref="bp-assertion-semantics"/></p></item><item><p><specref ref="bp-semantics-and-form"/></p></item><item><p><specref ref="bp-assertion-start"/></p></item><item><p><specref ref="bp-unique-qnames"/></p></item><item><p><specref ref="bp-assertions-and-message-semantics"/></p></item><item><p><specref ref="bp-assertion-duplication"/></p></item><item><p><specref ref="bp-assertion-definition"/></p></item><item><p><specref ref="bp-nesting"/></p></item><item><p><specref ref="bp-assertion-xml-allow-optional"/></p></item><item><p><specref ref="bp-assertion-description-explicitly-allow-optional"/></p></item><item><p><specref ref="bp-limit-optional-assertions"/></p></item><item><p><specref ref="bp-entire-mep-for-optional"/></p></item><item><p><specref ref="bp-indicate-optional-assertion-use"/></p></item><item><p><specref ref="bp-independent-assertions"/></p></item><item><p><specref ref="bp-olicy-subject-change"/></p></item></ulist>
\ No newline at end of file
Received on Wednesday, 2 May 2007 17:07:44 UTC