2002/ws/desc/wsdl20 build.xml,NONE,1.1 wsdl20-z-1.html,NONE,1.1 zml2html-lines.xsl,NONE,1.1 zml2html-tokens.xsl,NONE,1.1 zml2html-symbols.xsl,NONE,1.1 wsdl20-z.html,1.2,1.3 wsdl20-z.xml,1.1,1.2 zml.css,1.1,1.2 zml2html.xsl,1.1,1.2 wsdl20-z-1.xml,1.1,1.2

Update of /sources/public/2002/ws/desc/wsdl20
In directory hutz:/tmp/cvs-serv21449

Modified Files:
	wsdl20-z.html wsdl20-z.xml zml.css zml2html.xsl wsdl20-z-1.xml 
Added Files:
	build.xml wsdl20-z-1.html zml2html-lines.xsl 
	zml2html-tokens.xsl zml2html-symbols.xsl 
Log Message:
Simplified ZML is make authoring easier and refactored zml2html.xsl.
Added build.xml, an Ant script to transform XML to HTML.

--- NEW FILE: zml2html-symbols.xsl ---
<?xml version="1.0" encoding="UTF-8"?>

<!-- Version: $Id: zml2html-symbols.xsl,v 1.1 2004/10/11 21:58:31 aryman Exp $ -->

<!-- Stylesheet for Z Markup Language (ZML) -->
<!-- Author: Arthur Ryman  <ryman@ca.ibm.com> -->
<!-- Date Created: 2004-09-23 -->

<!-- 
	This stylesheet is copyright (c) 2004 by its authors.  Free
	distribution and modification is permitted, including adding to
	the list of authors and copyright holders, as long as this
	copyright notice is maintained. 
-->

<!-- 
	This stylesheet renders Z Notation as HTML.
	The document must be marked up using ZML
	which is in the namespace http://www.w3.org/2004/zml.
	These tags correspond closely to the LaTeX commands
	defined in the fuzz 2000 document style developed
	by Mike Spivey and which is available at
	http://spivey.oriel.ox.ac.uk/~mike/fuzz/.
-->

<!-- 
	ChangeLog:

	2004-10-10: Arthur Ryman <ryman@ca.ibm.com>
	- simplified ZML to make authoring easier
	
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:z="http://www.w3.org/2004/zml" version="1.0">

	<xsl:template match="z:sub">
		<span class="zsmall">
			<sub>
				<xsl:apply-templates />
			</sub>
		</span>
	</xsl:template>

	<xsl:template match="z:u">
		<xsl:text>_</xsl:text>
	</xsl:template>

	<xsl:template match="z:t1">
		<xsl:call-template name="tab" />
	</xsl:template>

	<xsl:template match="z:t2">
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
	</xsl:template>

	<xsl:template match="z:t3">
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
	</xsl:template>

	<xsl:template match="z:t4">
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
	</xsl:template>

	<xsl:template match="z:t5">
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />

		<xsl:call-template name="tab" />
	</xsl:template>

	<xsl:template match="z:t6">
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />

		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
	</xsl:template>

	<xsl:template match="z:t7">
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />

		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
	</xsl:template>

	<xsl:template match="z:t8">
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />

		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
	</xsl:template>

	<xsl:template match="z:t9">
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />

		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />
		<xsl:call-template name="tab" />

		<xsl:call-template name="tab" />
	</xsl:template>

	<xsl:template name="tab">
		<xsl:text>&#160;&#160;&#160;&#160;&#160;&#160;</xsl:text>
	</xsl:template>

	<xsl:template match="z:lquot | z:rquot">
		<xsl:text>&quot;</xsl:text>
	</xsl:template>

	<xsl:template match="z:lapos | z:rapos">
		<xsl:text>'</xsl:text>
	</xsl:template>

	<!-- Schema definition \defs -->

	<xsl:template match="z:defs">
		<span class="zinfix">
			<span
				style="position: relative; left: .2em; bottom: .75ex">
				^
			</span>
			<span style="position: relative; right: .3em">=</span>
		</span>
	</xsl:template>

	<!-- Free type definition \ldata, \rdata -->

	<xsl:template match="z:ldata">
		<span class="symbol">
			<span style="position: relative; left=.2em">&#225;</span>
			<span>&#225;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:rdata">
		<span class="symbol">
			<span style="position: relative; left=.2em">&#241;</span>
			<span>&#241;</span>
		</span>
	</xsl:template>

	<!-- Logic and schema calculus -->

	<xsl:template match="z:lnot">
		<span class="zprefix">
			<span class="symbol">
				<xsl:text>&#216;</xsl:text>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:land">
		<span class="zinfix">
			<span class="mathb">
				<xsl:text>&#46;</xsl:text>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:lor">
		<span class="zinfix">
			<span class="mathb">
				<xsl:text>&#45;</xsl:text>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:implies">
		<span class="zinfix">
			<span class="mathc">
				<xsl:text>&#117;</xsl:text>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:iff">
		<span class="zinfix">
			<span class="mathc">&#119;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:forall">
		<span class="zprefix">
			<span class="symbol">&#34;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:exists">
		<span class="zprefix">
			<span class="symbol">&#36;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:exists_1">
		<span class="zprefix">
			<span class="symbol">&#36;</span>
			<span class="zsmall">
				<sub>1</sub>
			</span>
		</span>
	</xsl:template>

	<!-- Special schema operators -->

	<xsl:template match="z:hide">
		<span class="zinfix">
			<span class="mathc">&#66;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:project">
		<span class="zinfix">
			<span class="mathc">&#147;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:pre">
		<span class="zprefix">
			<span class="zs">pre</span>
		</span>
	</xsl:template>

	<xsl:template match="z:semi">
		<span class="zinfix">;</span>
	</xsl:template>

	<xsl:template match="z:pipe">
		<span class="zinfix">
			<span class="mathb">&#112;</span>
		</span>
	</xsl:template>

	<!-- Basic expressions -->

	<xsl:template match="z:neq">
		<span class="zinfix">
			<span class="mathb">&#103;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:IF">
		<span class="zprefix">
			<span class="zbs">
				<xsl:text>if</xsl:text>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:THEN">
		<span class="zinfix">
			<span class="zbs">
				<xsl:text>then</xsl:text>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:ELSE">
		<span class="zprefix">
			<span class="zbs">
				<xsl:text>else</xsl:text>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:theta">
		<span class="zprefix">
			<span class="zi">
				<span class="symbol">&#113;</span>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:mu">
		<span class="zprefix">
			<span class="zi">
				<span class="symbol">m</span>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:LET">
		<span class="zprefix">
			<span class="zbs">
				<xsl:text>let</xsl:text>
			</span>
		</span>
	</xsl:template>


	<!-- Sets -->

	<xsl:template match="z:in">
		<span class="zinfix">
			<span class="symbol">&#206;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:notin">
		<span class="zinfix">
			<span class="symbol">&#207;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:emptyset">
		<span class="symbol">&#198;</span>
	</xsl:template>

	<xsl:template match="z:subseteq">
		<span class="zinfix">
			<span class="symbol">&#205;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:subset">
		<span class="zinfix">
			<span class="symbol">&#204;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:power">
		<span class="zprefix">
			<span class="doublestruck">P</span>
		</span>
	</xsl:template>

	<xsl:template match="z:power_1">
		<span class="zprefix">
			<span class="doublestruck">P</span>
			<span class="zsmall">
				<sub>1</sub>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:cross">
		<span class="zinfix">
			<span class="symbol">&#180;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:cup">
		<span class="zinfix">
			<span class="mathb">&#52;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:cap">
		<span class="zinfix">
			<span class="mathb">&#51;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:setminus">
		<span class="zinfix">
			<span class="mathc">&#66;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:bigcup">
		<span class="zprefix">
			<span class="zbig">
				<span class="mathb">&#52;</span>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:bigcap">
		<span class="zprefix">
			<span class="zbig">
				<span class="mathb">&#51;</span>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:finset">
		<span class="zprefix">
			<span class="doublestruck">F</span>
		</span>
	</xsl:template>

	<xsl:template match="z:finset_1">
		<span class="zprefix">
			<span class="doublestruck">F</span>
			<span class="zsmall">
				<sub>1</sub>
			</span>
		</span>
	</xsl:template>


	<!-- Relations -->

	<xsl:template match="z:rel">
		<span class="zinfix">
			<span class="mathc">&#118;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:mapsto">
		<span class="zinfix">
			<span class="mathc">&#120;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:dom | z:ran | z:id">
		<span class="zprefix">
			<span class="zs">
				<xsl:value-of select="local-name()" />
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:comp">
		<span class="zinfix">;</span>
	</xsl:template>

	<xsl:template match="z:circ">
		<span class="zinfix">
			<span class="mathb">&#219;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:dres">
		<span class="zinfix">
			<span class="mathb">&#169;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:rres">
		<span class="zinfix">
			<span class="mathb">&#168;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:ndres">
		<span class="mathb" style="position: relative; left: .25em">
			&#169;
		</span>
		<span class="symbol"
			style="position: relative; right: .25em; bottom: .9ex">
			&#95;
		</span>
	</xsl:template>

	<xsl:template match="z:nrres">
		<span class="symbol"
			style="position: relative; left: .25em; bottom: .9ex">
			&#95;
		</span>
		<span class="mathb" style="position: relative; right: .25em">
			&#168;
		</span>
	</xsl:template>

	<xsl:template match="z:inv">
		<sup>~</sup>
	</xsl:template>

	<xsl:template match="z:limg">
		<span style="position: relative; left: .2em">(</span>
		<span>|</span>
	</xsl:template>

	<xsl:template match="z:rimg">
		<span style="position: relative; left: .2em">|</span>
		<span>)</span>
	</xsl:template>

	<xsl:template match="z:oplus">
		<span class="zinfix">
			<span class="mathb">&#47;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:plus">
		<sup>+</sup>
	</xsl:template>

	<xsl:template match="z:star">
		<sup>*</sup>
	</xsl:template>

	<xsl:template match="z:sup">
		<sup>
			<xsl:apply-templates />
		</sup>
	</xsl:template>


	<!-- Functions -->

	<xsl:template match="z:lambda">
		<span class="zprefix">
			<span class="symbol">l</span>
		</span>
	</xsl:template>

	<xsl:template match="z:pfun">
		<span class="zpostfix">
			<span class="mathc">&#116;</span>
			<span class="mathb"
				style="position: relative; right: .7em; top: .1ex">
				&#200;
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:fun">
		<span class="zinfix">
			<span class="mathc">&#116;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:pinj">
		<span class="zpostfix">
			<span class="mathc">&#152;</span>
			<span class="mathb"
				style="position: relative; right: .55em; top: .1ex">
				&#200;
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:inj">
		<span class="zinfix">
			<span class="mathc">&#152;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:psurj">
		<span class="zpostfix">
			<span class="mathc">&#137;</span>
			<span class="mathb"
				style="position: relative; right: .6em; top: .1ex">
				&#200;
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:surj">
		<span class="zinfix">
			<span class="mathc">&#137;</span>
		</span>
	</xsl:template>

	<!-- use normal symbol since Z symbol is not available -->
	<xsl:template match="z:bij">
		<span class="zinfix">
			<span class="mathb">&#123;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:ffun">
		<span class="zpostfix">
			<span class="mathc">&#116;</span>
			<span class="mathb"
				style="position: relative; right: .8em;">
				&#201;
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:finj">
		<span class="zpostfix">
			<span class="mathc">&#152;</span>
			<span class="mathb"
				style="position: relative; right: .65em;">
				&#201;
			</span>
		</span>
	</xsl:template>


	<!-- Numbers and arithmetic -->

	<xsl:template match="z:nat">
		<span class="doublestruck">N</span>
	</xsl:template>

	<xsl:template match="z:num">
		<span class="doublestruck">Z</span>
	</xsl:template>

	<xsl:template match="z:div | z:mod">
		<span class="zinfix">
			<span class="zss">
				<xsl:value-of select="local-name()" />
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:leq">
		<span class="zinfix">
			<span class="mathb">
				<xsl:text>&#91;</xsl:text>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:geq">
		<span class="zinfix">
			<span class="mathb">
				<xsl:text>&#109;</xsl:text>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:nat_1">
		<span class="doublestruck">N</span>
		<span class="zsmall">
			<sub>1</sub>
		</span>
	</xsl:template>

	<xsl:template match="z:upto">
		<span class="zinfix">
			<xsl:text>..</xsl:text>
		</span>
	</xsl:template>


	<!-- Sequences -->

	<xsl:template match="z:seq | z:iseq">
		<span class="zprefix">
			<span class="zs">
				<xsl:value-of select="local-name()" />
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:seq_1">
		<span class="zprefix">
			<span class="zs">seq</span>
			<span class="zsmall">
				<sub>1</sub>
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:langle">
		<span class="zprefix">
			<span class="symbol">&#225;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:rangle">
		<span class="zpostfix">
			<span class="symbol">&#241;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:cat">
		<span class="zinfix">
			<span class="mathb"
				style="position: relative; bottom: 1ex">
				&#102;
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:extract">
		<span class="zinfix">
			<span class="mathc">&#150;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:filter">
		<span class="zinfix">
			<span class="mathc">&#147;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:prefix | z:suffix | z:partition">
		<span class="zinfix">
			<span class="zss">
				<xsl:value-of select="local-name()" />
			</span>
		</span>
	</xsl:template>

	<xsl:template match="z:inseq">
		<span class="zinfix">
			<span class="zss">in</span>
		</span>
	</xsl:template>

	<xsl:template match="z:dcat">
		<span class="zprefix">
			<span class="mathb"
				style="position: relative; bottom: 1ex">
				&#102;
			</span>
			<span>/</span>
		</span>
	</xsl:template>

	<xsl:template match="z:disjoint">
		<span class="zprefix">
			<span class="zss">
				<xsl:value-of select="local-name()" />
			</span>
		</span>
	</xsl:template>


	<!-- Bags -->

	<xsl:template match="z:bag">
		<span class="zprefix">
			<span class="zs">bag</span>
		</span>
	</xsl:template>

	<xsl:template match="z:lbag">
		<span class="mathb">&#223;</span>
	</xsl:template>

	<xsl:template match="z:rbag">
		<span class="mathb">&#224;</span>
	</xsl:template>

	<xsl:template match="z:bcount">
		<span class="zinfix">
			<span class="mathc">&#204;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:otimes">
		<span class="zinfix">
			<span class="mathb">&#49;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:inbag">
		<span class="zinfix">
			<span class="zss">inbag</span>
		</span>
	</xsl:template>

	<xsl:template match="z:subbageq">
		<span class="zinfix">
			<span class="mathb">&#98;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:uplus">
		<span class="zinfix">
			<span class="mathb">&#53;</span>
		</span>
	</xsl:template>

	<xsl:template match="z:uminus">
		<span class="zpostfix">
			<span class="mathb">&#52;</span>
			<span style="position: relative; right: .4em; top: .1em">
				-
			</span>
		</span>
	</xsl:template>

</xsl:stylesheet>
--- NEW FILE: zml2html-tokens.xsl ---
<?xml version="1.0" encoding="UTF-8"?>

<!-- Version: $Id: zml2html-tokens.xsl,v 1.1 2004/10/11 21:58:31 aryman Exp $ -->

<!-- Stylesheet for Z Markup Language (ZML) -->
<!-- Author: Arthur Ryman  <ryman@ca.ibm.com> -->
<!-- Date Created: 2004-10-10 -->

<!-- 
	This stylesheet is copyright (c) 2004 by its authors.  Free
	distribution and modification is permitted, including adding to
	the list of authors and copyright holders, as long as this
	copyright notice is maintained. 
-->

<!-- 
	This stylesheet renders Z Notation as HTML.
	The document must be marked up using ZML
	which is in the namespace http://www.w3.org/2004/zml.
	These tags correspond closely to the LaTeX commands
	defined in the fuzz 2000 document style developed
	by Mike Spivey and which is available at
	http://spivey.oriel.ox.ac.uk/~mike/fuzz/.
-->

<!-- 
	ChangeLog:

	2004-10-10: Arthur Ryman <ryman@ca.ibm.com>
	- simplified ZML to make authoring easier
	
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">

	<!--
		A text node contains a sequence of zero or more words separated by whitespace.
		Leading and trailing whitespace is insignificant.
		A sequence of 1 or more whitespace characters is equivalent to a single space.
		
		A word is a sequence of identifiers, numbers, and operators.
		
		An identifier is a sequence of 1 or more letters and digits, beginning with a letter
		and ending at a punctuation character or the end of the word.
		
		A number is a sequence of 1 or more digits, ending at a punctuation
		character, or the end of the word.
		
		An operator is a sequence of 1 or more punctuation characters, ending at a letter,
		digit, or the end of the word.
	-->

	<xsl:template match="text()" mode="latex">
		<xsl:call-template name="parse-words">
			<xsl:with-param name="words" select="normalize-space()" />
		</xsl:call-template>
	</xsl:template>

	<!-- 
		Outputs the sequence of identifiers, numbers, operators and spaces
		contained in a string in which the whitespace has been normalized.
		
		$words - the input string
	-->

	<xsl:template name="parse-words">
		<xsl:param name="words" />
		<xsl:choose>
			<xsl:when test="contains($words,' ')">
				<xsl:call-template name="parse-word">
					<xsl:with-param name="word" select="substring-before($words,' ')" />
				</xsl:call-template>
				<xsl:value-of select="' '" />
				<xsl:call-template name="parse-words">
					<xsl:with-param name="words" select="substring-after($words,' ')" />
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="parse-word">
					<xsl:with-param name="word" select="$words" />
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!-- All letters are folded into the letter 'A'. -->
	<xsl:variable name="ABC">ABCDEFGHIJKLMNOPQRSTUVWXYZ</xsl:variable>
	<xsl:variable name="abc">abcdefghijklmnopqrstuvwxyz</xsl:variable>
	<xsl:variable name="AAA">AAAAAAAAAAAAAAAAAAAAAAAAAA</xsl:variable>

	<!-- All digits are folded into the digit '0'. -->
	<xsl:variable name="digits">0123456789</xsl:variable>
	<xsl:variable name="zeroes">0000000000</xsl:variable>

	<!-- All punctuation characters are folded into the character '.'. -->
	<xsl:variable name="punctuation">`-=~!@#$%^*()_+[]\{}|;:,./?&amp;&lt;&gt;&quot;&apos;</xsl:variable>
	<xsl:variable name="dots">................................</xsl:variable>

	<!-- Characters get folded from the source string to the dest string -->
	<xsl:variable name="source" select="concat($ABC,$abc,$digits,$punctuation)" />
	<xsl:variable name="dest" select="concat($AAA,$AAA,$zeroes,$dots)" />

	<!-- 
		Outputs the sequence of identifiers, numbers, and operators
		contained in a word.
		
		$word - the word
	-->
	<xsl:template name="parse-word">
		<xsl:param name="word" />
		<xsl:if test="$word">
			<xsl:variable name="folded" select="translate($word,$source,$dest)" />
			<xsl:call-template name="parse-word2">
				<xsl:with-param name="word" select="$word" />
				<xsl:with-param name="folded" select="$folded" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>

	<!-- 
		Outputs the sequence of identifiers, numbers, and operators
		contained in a word.
		
		$word - the word
		$folded - the folded word
	-->
	<xsl:template name="parse-word2">
		<xsl:param name="word" />
		<xsl:param name="folded" />
		<xsl:choose>
			<xsl:when test="starts-with($folded,'A')">
				<xsl:call-template name="parse-identifier-word2">
					<xsl:with-param name="word" select="$word" />
					<xsl:with-param name="folded" select="$folded" />
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="starts-with($folded,'0')">
				<xsl:call-template name="parse-number-word2">
					<xsl:with-param name="word" select="$word" />
					<xsl:with-param name="folded" select="$folded" />
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="parse-operators-word2">
					<xsl:with-param name="word" select="$word" />
					<xsl:with-param name="folded" select="$folded" />
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

	<!--
		Outputs the sequence of identifiers, numbers, and operators
		contained in a word that begins with an identifier.
		
		$word - the word
		$folded - the folded word
	-->

	<xsl:template name="parse-identifier-word2">
		<xsl:param name="word" />
		<xsl:param name="folded" />
		<xsl:variable name="idlen">
			<xsl:choose>
				<xsl:when test="contains($folded,'.')">
					<xsl:value-of select="string-length(substring-before($folded,'.'))" />
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="string-length($folded)" />
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:call-template name="output-identifier">
			<xsl:with-param name="identifier" select="substring($word, 1, $idlen)" />
		</xsl:call-template>
		<xsl:if test="$idlen &lt; string-length($word)">
			<xsl:call-template name="parse-word2">
				<xsl:with-param name="word" select="substring($word,$idlen+1)" />
				<xsl:with-param name="folded" select="substring($folded,$idlen+1)" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>

	<!--
		Outputs the sequence of identifiers, numbers, and operators
		contained in a word that begins with a number.
		
		$word - the word
		$folded - the folded word
	-->

	<xsl:template name="parse-number-word2">
		<xsl:param name="word" />
		<xsl:param name="folded" />
		<xsl:variable name="numlen">
			<xsl:choose>
				<xsl:when test="contains($folded,'.')">
					<xsl:value-of select="string-length(substring-before($folded,'.'))" />
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="string-length($folded)" />
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:call-template name="output-number">
			<xsl:with-param name="number" select="substring($word,1, $numlen)" />
		</xsl:call-template>
		<xsl:if test="$numlen &lt; string-length($word)">
			<xsl:call-template name="parse-word2">
				<xsl:with-param name="word" select="substring($word,$numlen+1)" />
				<xsl:with-param name="folded" select="substring($folded,$numlen+1)" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>

	<!--
		Outputs the sequence of identifiers, numbers, and operators
		contained in a word that begins with operators.
		
		$word - the word
		$folded - the folded word
	-->

	<xsl:template name="parse-operators-word2">
		<xsl:param name="word" />
		<xsl:param name="folded" />
		<xsl:variable name="oplen">
			<xsl:choose>
				<xsl:when test="contains($folded,'A')">
					<xsl:variable name="alen" select="string-length(substring-before($folded,'A'))" />
					<xsl:choose>
						<xsl:when test="contains($folded,'0')">
							<xsl:variable name="nlen" select="string-length(substring-before($folded,'0'))" />
							<xsl:choose>
								<xsl:when test="$alen &lt; $nlen">
									<xsl:value-of select="$alen" />
								</xsl:when>
								<xsl:otherwise>
									<xsl:value-of select="$nlen" />
								</xsl:otherwise>
							</xsl:choose>
						</xsl:when>
						<xsl:otherwise>
							<xsl:value-of select="$alen" />
						</xsl:otherwise>
					</xsl:choose>
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="string-length($folded)" />
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:call-template name="output-operators">
			<xsl:with-param name="operators" select="substring($word,1,$oplen)" />
		</xsl:call-template>
		<xsl:if test="$oplen &lt; string-length($word)">
			<xsl:call-template name="parse-word2">
				<xsl:with-param name="word" select="substring($word,$oplen+1)" />
				<xsl:with-param name="folded" select="substring($folded,$oplen+1)" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>

	<!-- 
		Outputs an identifier string. 
		
		$identifier - the identifier string
	-->

	<xsl:template name="output-identifier">
		<xsl:param name="identifier" />
		<span class="zi">
			<xsl:value-of select="$identifier" />
		</span>
	</xsl:template>

	<!--
		Outputs an operator string.
		
		$operators - the operator string
	-->

	<xsl:template name="output-operators">
		<xsl:param name="operators" />
		<xsl:if test="$operators">
			<xsl:choose>
				<xsl:when test="starts-with($operators,'::=')">
					<span class="zinfix">::=</span>
					<xsl:call-template name="output-operators">
						<xsl:with-param name="operators" select="substring($operators,4)" />
					</xsl:call-template>
				</xsl:when>
				<xsl:when test="starts-with($operators,'==')">
					<span class="zinfix">
						<span class="zdefa">==</span>
					</span>
					<xsl:call-template name="output-operators">
						<xsl:with-param name="operators" select="substring($operators,3)" />
					</xsl:call-template>
				</xsl:when>
				<xsl:otherwise>
					<xsl:call-template name="output-operators1">
						<xsl:with-param name="operators" select="$operators" />
					</xsl:call-template>
				</xsl:otherwise>
			</xsl:choose>
		</xsl:if>
	</xsl:template>

	<xsl:template name="output-operators1">
		<xsl:param name="operators" />
		<xsl:variable name="op" select="substring($operators,1,1)" />
		<xsl:choose>
			<xsl:when test="$op = '~'">
				<xsl:text>&#160;</xsl:text>
			</xsl:when>
			<xsl:when test="$op = '@'">
				<span class="zinfix">
					<span class="symbol">&#183;</span>
				</span>
			</xsl:when>
			<xsl:when test="$op = ':' or $op = '|' or $op = '=' or $op = '+' or $op = '-' or $op = '*' or $op = '&lt;' or $op = '&gt;'">
				<span class="zinfix">
					<xsl:value-of select="$op" />
				</span>
			</xsl:when>
			<xsl:when test="$op = ','">
				<span class="zprefix">
					<xsl:value-of select="$op" />
				</span>
			</xsl:when>
			<xsl:otherwise>
				<xsl:value-of select="$op" />
			</xsl:otherwise>
		</xsl:choose>
		<xsl:call-template name="output-operators">
			<xsl:with-param name="operators" select="substring($operators,2)" />
		</xsl:call-template>
	</xsl:template>

	<!--
		Outputs a number string.
		
		$number - the number string
	-->

	<xsl:template name="output-number">
		<xsl:param name="number" />
		<xsl:value-of select="$number" />
	</xsl:template>

</xsl:stylesheet>

--- NEW FILE: wsdl20-z-1.html ---
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language</title><style type="text/css">
code           { font-family: monospace; }

div.constraint,
div.issue,
div.note,
div.notice     { margin-left: 2em; }

dt.label       { display: run-in; }

li, p           { margin-top: 0.3em;
                 margin-bottom: 0.3em; }

.diff-chg	{ background-color: yellow; }
.diff-del	{ background-color: red; text-decoration: line-through;}
.diff-add	{ background-color: lime; }

table          { empty-cells: show; }
[...8079 lines suppressed...]
    </tr>
    <tr>
       <td rowspan="1" colspan="1">20020620</td>
       <td rowspan="1" colspan="1">SW</td>
       <td rowspan="1" colspan="1">Started adding abstract model</td>
    </tr>
    <tr>
       <td rowspan="1" colspan="1">20020406</td>
       <td rowspan="1" colspan="1">SW</td>
       <td rowspan="1" colspan="1">Created document from WSDL 1.1</td>
    </tr>
  </tbody>
</table><br>

      </div>
    </div>

  </div>

</body></html>
--- NEW FILE: build.xml ---
<?xml version="1.0" encoding="UTF-8"?>

<!-- Version: $Id: build.xml,v 1.1 2004/10/11 21:58:31 aryman Exp $ -->

<!-- Ant build script for Z Markup Language (ZML) -->
<!-- Author: Arthur Ryman  <ryman@ca.ibm.com> -->
<!-- Date Created: 2004-10-11 -->

<!-- 
	This Ant build script is copyright (c) 2004 by its authors.  Free
	distribution and modification is permitted, including adding to
	the list of authors and copyright holders, as long as this
	copyright notice is maintained. 
-->

<!-- 
	This Ant script builds Z Notation as HTML.
	The document must be marked up using ZML
	which is in the namespace http://www.w3.org/2004/zml.
	These tags correspond closely to the LaTeX commands
	defined in the fuzz 2000 document style developed
	by Mike Spivey and which is available at
	http://spivey.oriel.ox.ac.uk/~mike/fuzz/.
-->

<!-- 
	ChangeLog:

	2004-10-11: Arthur Ryman <ryman@ca.ibm.com>
	- added task to transform XML to HTML
	
-->

<project name="wsdl20" default="main" basedir=".">

	<target name="html" description="Transforms xml into html.">
		<xslt in="wsdl20-z.xml" out="wsdl20-z.html" style="xmlspec-wsdl-z.xsl"/>
		<xslt in="wsdl20-z-1.xml" out="wsdl20-z-1.html" style="xmlspec-wsdl-z.xsl"/>
	</target>

	<target name="main" depends="html" description="Creates all output files."/>

</project>
Index: zml.css
===================================================================
RCS file: /sources/public/2002/ws/desc/wsdl20/zml.css,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** zml.css	23 Sep 2004 16:16:53 -0000	1.1
--- zml.css	11 Oct 2004 21:58:31 -0000	1.2
***************
*** 1,4 ****
  span.zi {
! 	font-family: Palatino;
  	font-style: italic
  }
--- 1,33 ----
+ /* 
+ 	Version: $Id$
+ 
+ 	CSS for Z Markup Language (ZML) 
+ 	Author: Arthur Ryman  <ryman@ca.ibm.com> 
+ 	Date Created: 2004-09-23 
+ 
+ 	This stylesheet is copyright (c) 2004 by its authors.  Free
+ 	distribution and modification is permitted, including adding to
+ 	the list of authors and copyright holders, as long as this
+ 	copyright notice is maintained. 
+ 
+ 	This CSS formats Z Notation as HTML.
+ 	It is used in conjuction with an XSLT that
+ 	transform XML source to HTML.
+ 	The document must be marked up using ZML
+ 	which is in the namespace http://www.w3.org/2004/zml.
+ 	These tags correspond closely to the LaTeX commands
+ 	defined in the fuzz 2000 document style developed
+ 	by Mike Spivey and which is available at
+ 	http://spivey.oriel.ox.ac.uk/~mike/fuzz/.
+ 
+ 	ChangeLog:
+ 
+ 	2004-09-23: Arthur Ryman <ryman@ca.ibm.com>
+ 	- created
+ 	
+ */
+ 
  span.zi {
! 	font-family: serif;
  	font-style: italic
  }

Index: zml2html.xsl
===================================================================
RCS file: /sources/public/2002/ws/desc/wsdl20/zml2html.xsl,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** zml2html.xsl	23 Sep 2004 16:16:53 -0000	1.1
--- zml2html.xsl	11 Oct 2004 21:58:31 -0000	1.2
***************
*** 1,9 ****
  <?xml version="1.0" encoding="UTF-8"?>
! <!-- Stylesheet for rendering Z Notation as HTML -->
! <!-- Author: Arthur Ryman  (ryman@ca.ibm.com) -->
  <!-- Date Created: 2004-09-23 -->
- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:z="http://www.w3.org/2004/zml" version="1.0">
  
! <!-- <xsl:output method="html" encoding="UTF-8" />  -->	
  
  	<xsl:template match="z:zed">
--- 1,41 ----
[...1070 lines suppressed...]
! 
! 	<xsl:template match="z:uplus">
! 		<span class="zinfix">
! 			<span class="mathb">&#53;</span>
! 		</span>
! 	</xsl:template>
! 
! 	<xsl:template match="z:uminus">
! 		<span class="zpostfix">
! 			<span class="mathb">&#52;</span>
! 			<span style="position: relative; right: .4em; top: .1em">-</span>
! 		</span>
! 	</xsl:template>
! 
! </xsl:stylesheet>
--- 258,260 ----
  	</xsl:template>
  
! </xsl:stylesheet>
\ No newline at end of file

Index: wsdl20-z-1.xml
===================================================================
RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20-z-1.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** wsdl20-z-1.xml	30 Sep 2004 14:48:17 -0000	1.1
--- wsdl20-z-1.xml	11 Oct 2004 21:58:31 -0000	1.2
***************
*** 415,423 ****
  
  <schema xmlns="http://www.w3.org/2004/zml" name="DefinitionsComponent">
! <line>	<i>interfaces</i> : <finset/> <i>InterfaceComponent</i> </line>
! <line>	<i>bindings</i> : <finset/> <i>BindingComponent</i> </line>
! <line>	<i>services</i> : <finset/> <i>ServiceComponent</i> </line>
! <line>	<i>elementDeclarations</i> : <finset/> <i>ElementDeclarationComponent</i> </line>
! <line>	<i>typeDefinitions</i> : <finset/> <i>TypeDefinitionComponent</i> </line>
  </schema>
  
--- 415,423 ----
  
  <schema xmlns="http://www.w3.org/2004/zml" name="DefinitionsComponent">
! 	interfaces : <finset/> InterfaceComponent <nl/>
! 	bindings : <finset/> BindingComponent <nl/>
! 	services : <finset/> ServiceComponent <nl/>
! 	elementDeclarations : <finset/> ElementDeclarationComponent <nl/>
! 	typeDefinitions : <finset/> TypeDefinitionComponent
  </schema>
  
***************
*** 469,488 ****
  
  <schema xmlns="http://www.w3.org/2004/zml" name="DefinitionsComponent1">
! <line>	<i>DefinitionsComponent</i> </line>
  <where/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>interfaces</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  <also/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>bindings</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  <also/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>services</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  <also/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>elementDeclarations</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  <also/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>typeDefinitions</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  </schema>
  
--- 469,488 ----
  
  <schema xmlns="http://www.w3.org/2004/zml" name="DefinitionsComponent1">
! 	DefinitionsComponent
  <where/>
! 	<forall/> x, y : interfaces @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  <also/>
! 	<forall/> x, y : bindings @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  <also/>
! 	<forall/> x, y : services @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  <also/>
! 	<forall/> x, y : elementDeclarations @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  <also/>
! 	<forall/> x, y : typeDefinitions @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  </schema>
  

Index: wsdl20-z.xml
===================================================================
RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20-z.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** wsdl20-z.xml	23 Sep 2004 16:16:53 -0000	1.1
--- wsdl20-z.xml	11 Oct 2004 21:58:31 -0000	1.2
***************
*** 415,438 ****
  
  <schema xmlns="http://www.w3.org/2004/zml" name="DefinitionsComponent">
! <line>	<i>interfaces</i> : <finset/> <i>InterfaceComponent</i> </line>
! <line>	<i>bindings</i> : <finset/> <i>BindingComponent</i> </line>
! <line>	<i>services</i> : <finset/> <i>ServiceComponent</i> </line>
! <line>	<i>elementDeclarations</i> : <finset/> <i>ElementDeclarationComponent</i> </line>
! <line>	<i>typeDefinitions</i> : <finset/> <i>TypeDefinitionComponent</i> </line>
  <where/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>interfaces</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  <also/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>bindings</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  <also/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>services</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  <also/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>elementDeclarations</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  <also/>
! <line>	<forall/> <i>x</i>, <i>y</i> : <i>typeDefinitions</i> <spot/> </line>
! <line>	<t1/>	<i>x</i>.<i>qName</i> = <i>y</i>.<i>qName</i> <implies/> <i>x</i> = <i>y</i> </line>
  </schema>
  
--- 415,438 ----
  
  <schema xmlns="http://www.w3.org/2004/zml" name="DefinitionsComponent">
! 	interfaces : <finset/> InterfaceComponent <nl/>
! 	bindings : <finset/> BindingComponent <nl/>
! 	services : <finset/> ServiceComponent <nl/>
! 	elementDeclarations : <finset/> ElementDeclarationComponent <nl/>
! 	typeDefinitions : <finset/> TypeDefinitionComponent
  <where/>
! 	<forall/> x, y : interfaces @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  <also/>
! 	<forall/> x, y : bindings @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  <also/>
! 	<forall/> x, y : services @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  <also/>
! 	<forall/> x, y : elementDeclarations @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  <also/>
! 	<forall/> x, y : typeDefinitions @ <nl/>
! 	<t1/>	x.qName = y.qName <implies/> x = y
  </schema>
  

Index: wsdl20-z.html
===================================================================
RCS file: /sources/public/2002/ws/desc/wsdl20/wsdl20-z.html,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** wsdl20-z.html	29 Sep 2004 17:02:25 -0000	1.2
--- wsdl20-z.html	11 Oct 2004 21:58:31 -0000	1.3
***************
*** 1,5 ****
! <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"><html lang="en"><head>
! <META http-equiv="Content-Type" content="text/html">
! <title>Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language</title><style type="text/css">
  code           { font-family: monospace; }
  
--- 1,4 ----
! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
! <html lang="en"><head><META http-equiv="Content-Type" content="text/html; charset=utf-8"><title>Web Services Description Language (WSDL) Version 2.0 Part 1: Core Language</title><style type="text/css">
  code           { font-family: monospace; }
  
[...10655 lines suppressed...]
!     <tr>
!        <td rowspan="1" colspan="1">20020620</td>
!        <td rowspan="1" colspan="1">SW</td>
!        <td rowspan="1" colspan="1">Started adding abstract model</td>
!     </tr>
!     <tr>
!        <td rowspan="1" colspan="1">20020406</td>
!        <td rowspan="1" colspan="1">SW</td>
!        <td rowspan="1" colspan="1">Created document from WSDL 1.1</td>
!     </tr>
!   </tbody>
! </table><br>
! 
!       </div>
!     </div>
! 
!   </div>
! 
! </body></html>
\ No newline at end of file

--- NEW FILE: zml2html-lines.xsl ---
<?xml version="1.0" encoding="UTF-8"?>

<!-- Version: $Id: zml2html-lines.xsl,v 1.1 2004/10/11 21:58:31 aryman Exp $ -->

<!-- Stylesheet for Z Markup Language (ZML) -->
<!-- Author: Arthur Ryman  <ryman@ca.ibm.com> -->
<!-- Date Created: 2004-10-10 -->

<!-- 
	This stylesheet is copyright (c) 2004 by its authors.  Free
	distribution and modification is permitted, including adding to
	the list of authors and copyright holders, as long as this
	copyright notice is maintained. 
-->

<!-- 
	This stylesheet renders Z Notation as HTML.
	The document must be marked up using ZML
	which is in the namespace http://www.w3.org/2004/zml.
	These tags correspond closely to the LaTeX commands
	defined in the fuzz 2000 document style developed
	by Mike Spivey and which is available at
	http://spivey.oriel.ox.ac.uk/~mike/fuzz/.
-->

<!-- 
	ChangeLog:

	2004-10-10: Arthur Ryman <ryman@ca.ibm.com>
	- simplified ZML to make authoring easier
	
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:z="http://www.w3.org/2004/zml" version="1.0">

	<!--
		Outputs the nodes in a Zed box as a sequence of lines.
		
		$box - the Zed box type (zed, schema, axdef, gendef)
	-->

	<xsl:template name="output-lines">
		<xsl:param name="box" />
		<xsl:call-template name="output-rows">
			<xsl:with-param name="box" select="$box" />
			<xsl:with-param name="break" select="1" />
			<xsl:with-param name="start" select="0" />
			<xsl:with-param name="breaks" select="z:nl | z:also | z:where" />
			<xsl:with-param name="nodes" select="node()" />
		</xsl:call-template>
	</xsl:template>

	<!--
		Outputs a node-set as a sequence of rows.
		
		$box - the Zed box type (zed, schema, axdef, gendef)
		$nodes - the node-set
		$breaks - the row breaks in the node-set
		$start - the index of the previous row break in the node-set
		$break - the index of the current break in the breaks node-set
	-->

	<xsl:template name="output-rows">
		<xsl:param name="box" />
		<xsl:param name="nodes" />
		<xsl:param name="breaks" />
		<xsl:param name="start" />
		<xsl:param name="break" />
		<xsl:variable name="newStart">
			<xsl:choose>
				<xsl:when test="$break &gt; count($breaks)">
					<xsl:value-of select="count($nodes) + 1" />
				</xsl:when>
				<xsl:otherwise>
					<xsl:value-of select="count($breaks[$break]/preceding-sibling::node()) + 1" />
				</xsl:otherwise>
			</xsl:choose>
		</xsl:variable>
		<xsl:call-template name="output-row">
			<xsl:with-param name="box" select="$box" />
			<xsl:with-param name="before" select="$breaks[$break - 1]" />
			<xsl:with-param name="row" select="$nodes[$start &lt; position() and position() &lt; $newStart]" />
			<xsl:with-param name="after" select="$breaks[$break]" />
		</xsl:call-template>
		<xsl:if test="$break &lt;= count($breaks)">
			<xsl:call-template name="output-rows">
				<xsl:with-param name="box" select="$box" />
				<xsl:with-param name="nodes" select="$nodes" />
				<xsl:with-param name="breaks" select="$breaks" />
				<xsl:with-param name="start" select="$newStart" />
				<xsl:with-param name="break" select="$break + 1" />
			</xsl:call-template>
		</xsl:if>
	</xsl:template>

	<xsl:template name="output-row">
		<xsl:param name="box" />
		<xsl:param name="before" />
		<xsl:param name="row" />
		<xsl:param name="after" />
		<xsl:choose>
			<xsl:when test="$box = 'axdef'">
				<xsl:call-template name="axdef-row">
					<xsl:with-param name="before" select="$before" />
					<xsl:with-param name="row" select="$row" />
					<xsl:with-param name="after" select="$after" />
				</xsl:call-template>
			</xsl:when>
			<xsl:when test="$box = 'zed'">
				<xsl:call-template name="zed-row">
					<xsl:with-param name="row" select="$row" />
					<xsl:with-param name="after" select="$after" />
				</xsl:call-template>
			</xsl:when>
			<xsl:otherwise>
				<xsl:call-template name="schema-row">
					<xsl:with-param name="row" select="$row" />
					<xsl:with-param name="after" select="$after" />
				</xsl:call-template>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

</xsl:stylesheet>

Received on Monday, 11 October 2004 21:58:34 UTC