Topics

.NET and XSL processing based on the class attribute

francebaril_ixia <francebaril_ixia@...>
 

Hi,

I have to move my asp application to .NET.

I'm trying to process XML DITA documents with XSLs. Because all
processing is based on the class attribute, I have a lot of templates
that match expressions like this one:

<xsl:template match="*[contains(@class,' pr-d/fragment
')]/groupcomp|*[contains(@class,' pr-d/fragment
')]/groupchoice|*[contains(@class,' pr-d/fragment ')]/groupseq">

This is not recognized by the .NET processor. I have to create 3
different templates, one for each 3 conditions:

<xsl:template match="*[contains(@class,' pr-d/fragment ')]/groupcomp">
...
<xsl:template match="*[contains(@class,' pr-d/fragment ')]/groupchoice">
...
<xsl:template match="*[contains(@class,' pr-d/fragment ')]/groupseq">

Has anyone found another solution to this problem?

I am building from xsl provided with the package and it is taking me a
lot of time to split each template into multiple templates. Moreover,
it will make updating templates a nightmare.

Thanks,

France Baril