Project

Profile

Help

Support #1645

closed

Please help for xslt 2.0 saxon .net (Index was outside bounds of array)

Added by kubix kenan over 11 years ago. Updated about 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
.NET API
Sprint/Milestone:
-
Start date:
2012-11-13
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

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="/">

<xsl:apply-templates select="//item"></xsl:apply-templates>

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

Actions #1

Updated by kubix kenan over 11 years ago

resolved

Actions #2

Updated by Michael Kay almost 11 years ago

  • Tracker changed from Bug to Support
Actions #3

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.

Actions #4

Updated by Michael Kay about 7 years ago

  • Status changed from Resolved to Closed

Please register to edit this issue

Also available in: Atom PDF