Subject: Re: [xsl] Constructing documents from many sources From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Wed, 23 Aug 2006 10:08:55 -0400 |
Then <xsl:variable name="v2B" select="document(concat($source-module,'2B','&startDate=',$startDate,'&endDate=',$endDate))"/>
<xsl:variable name="v2B" select="document(concat($source-module,'2B',$date-params))"/>
<xsl:variable name="vP2records" select="document(concat($source-module,'2B',$date-params))/Record/Records"/>
Cheers, Wendell
I'll keep it brief so as to actually get an answer. The XML examples are quite long. Sorry.
I have a very long gov't document which has a plethora of questions. I set up all of the variables in the beginning (calling a script with a code that tells it which SQL statement to execute and serve up as XML).
The whole thing is just starting to seem insane to me. I wonder if the below looks amateurish to anyone else.
Any comments are much appreciated
*Sample of initial database calls* ========
<xsl:variable name="v2B" select="document(concat($root,'/Consumers/Reports/performance.asp?module=','2B','&startDate=',$startDate,'&endDate=',$endDate))" />
<xsl:variable name="vP2" select="document(concat($root,'/Consumers/Reports/performance.asp?module=','P2','&startDate=',$startDate,'&endDate=',$endDate))" />
<xsl:variable name="vP2age" select="document(concat($root,'/Consumers/Reports/performance.asp?module=','P2age','&startDate=',$startDate,'&endDate=',$endDate))" /> <xsl:variable name="vP2county" select="document(concat($root,'/Consumers/Reports/performance.asp?module=','P2county','&startDate=',$startDate,'&endDate=',$endDate))" /> <xsl:variable name="vP2disab" select="document(concat($root,'/Consumers/Reports/performance.asp?module=','P2disab','&startDate=',$startDate,'&endDate=',$endDate))" />
*Sample application of above variables* ==========
<h3>Section D - IL Plans and Waivers</h3>
<table summary="" border="1">
<tr>
<td>ILP Waived</td>
<td><xsl:value-of
select="count($vP2/Records/Record[ILPwaiver='False'])" /></td>
</tr>
<tr>
<td>ILP Developed</td>
<td><xsl:value-of
select="count($vP2/Records/Record[ILPwaiver!='False'])" /></td>
</tr>
<tr>
<td>Total</td>
<td><xsl:value-of
select="count($vP2/Records/Record[ILPwaiver='False']) +
count($vP2/Records/Record[ILPwaiver!='False'])" /></td>
</tr>
</table>
<h3>Section E - Age</h3>
<table summary="" border="1">
<tr>
<td>Under 5 years old</td>
<td><xsl:value-of select="$vP2age/Records/Record[cat = 'Under 5
years old']/count" /></td>
</tr>
<tr>
<td>Ages 5 - 19</td>
<td><xsl:value-of select="$vP2age/Records/Record[cat = '5 -
19']/count" /></td>
</tr>
<tr>
<td>Ages 20 - 24</td>
<td><xsl:value-of select="$vP2age/Records/Record[cat = '20 -
24']/count" /></td>
</tr>
<tr>
<td>Ages 25 - 59</td>
<td><xsl:value-of select="$vP2age/Records/Record[cat = '25 -
59']/count" /></td>
</tr>
<tr>
<td>Ages 60 and older</td>
<td><xsl:value-of select="$vP2age/Records/Record[cat = '60 and
older']/count" /></td>
</tr>
<tr>
<td>Total</td>
<td><xsl:value-of select="sum($vP2age/Records/Record[prior='']/count)" /></td>
</tr>
</table>
<h3>Section F - Sex</h3>
<table border="1">
<tr>
<td>(1) Number of females served</td>
<td><xsl:value-of select="count($vP2/Records/Record[gender =
'female' or gender = 'F'])" /></td>
</tr>
<tr>
<td>(2) Number of males served</td>
<td><xsl:value-of select="count($vP2/Records/Record[gender =
'male'or gender = 'M'])" /></td>
</tr>
</table>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Constructing documents from m, Steve | Thread | [xsl] Problem with sort order, Per Åberg |
Re: [xsl] metrics for evaluating xs, Tony Graham | Date | Re: [xsl] An XSL strategy for mixin, Wendell Piez |
Month |