Hi
I've made a stylesheet to transform my data into XSL-FO. This
stylesheet used to work with MSXSL 4.0 but I've got some issues in
..NET. First, I changed removed all the "node-set()" function since
they're not used anymore. But now, I used an <xsl:apply-templates/>
and for some reason, it works in some situation but not in others. I
didn't put the whole XSL file since it's quite big. Here's the part
that bugs
<xsl:template match="Status">
<xsl:variable name="Position">
<xsl:number count="/Cahier/*[name()!='Information']"/>
</xsl:variable>
<xsl:element name="fo:block">
<xsl:if test="not($Position=1 and position()=1)">
<xsl:attribute name="break-before">page</xsl:attribute>
</xsl:if>
<fo:marker marker-class-name="Status-Number">Status <xsl:value-of
select="../Status/@ID"/></fo:marker>
<fo:marker marker-class-name="Status-Name">Allo</fo:marker>
<xsl:apply-templates/>
</xsl:element>
</xsl:template>
And here's a sample of the XML going throught it:
<Cahier>
<Actives>
<Status ID="1">
<Name>Actif</Name>
<Participant>
<NAS>123456789</NAS>
<Name>
<Surname>John</Surname>
<Given>Doe</Given>
</Name>
<DOB>1944-09-23T12:00:00</DOB>
<Province />
<SpouseName>
<Surname>Johanne</Surname>
<Given>Doe</Given>
</SpouseName>
<Sexe>1</Sexe>
<DOBduConjoint />
</Participant>
<Participant>
....
</Participant>
</Status>
</Actives>
</Cahier>
So the "apply-templates" tag continu the process to the <Name> and
<Participant> tags but for some reason, I get an "The expression
passed to this method should result in a NodeSet." exception. I
thought it might be my templates for the above mention tags but I
folow my XmlReader step by step and it really stop right there and I
don't see what's wrong with my XSLT. And both XML and XSLT file are
properly formed. Anybody got an idea?
Thx
Blaise Garant