Support #1645
closedPlease help for xslt 2.0 saxon .net (Index was outside bounds of array)
0%
Description
Hi
My C# codes
Processor xsltProcessor = new Processor();
XdmNode input = xsltProcessor.NewDocumentBuilder().Wrap(doc); XsltTransformer transformer = xsltProcessor.NewXsltCompiler().Compile(new Uri(HttpContext.Current.Server.MapPath(xsltPath))).Load(); transformer.InitialContextNode = input;
Serializer serializer = new Serializer();
MemoryStream stream = new MemoryStream(); serializer.SetOutputStream(stream);
transformer.Run(serializer); stream.Position = 0; StreamReader read = new StreamReader(stream); return read.ReadToEnd();
test.xslt
<xsl:stylesheet version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:fn="fn"
exclude-result-prefixes="xs fn">
<xsl:output method="html" indent="yes"/>
<xsl:template match="/">
id | test 1 | test 2 |
</xsl:template>
<xsl:template match="item">
<xsl:value-of select="replace(id, '1', 'bir')"/>
<xsl:value-of select="customerame"/>
<xsl:value-of select="adres"/>
</xsl:template>
</xsl:stylesheet>
transformer.Run(serializer); line is throwing error : Index was outside bounds of array.
Please help;
Best regards
Updated by Michael Kay almost 11 years ago
- Status changed from New to Resolved
- Priority changed from High to Normal
User has reported this problem resolved, though we don't know the resolution.
Please register to edit this issue