Re: BizTalk 2006 :: Mapper problems with XSLT at runtime



It would be nice if one of the MSFT people in the newsgroups can spend some time on this one. I wonder why this behavious occurs.

Thanks!

Hello BA,

Try to change the following line in you custom xslt:

<xsl:output method="xml" indent="yes" />

to:

<xsl:output method="xml" />

in other words remove 'indent="yes".

Let me know if this works!

HTH,

Randal van Splunteren

Nick,

Thanks for the suggestions.

1. Checked

2. I discovered that problem as well. Once I found it I thought
'ah, I got it!' only to see it fail again :-\

3. Version is static

Really frustrating bug, this. I am leaning towards the idea that
there is something wrong in my orchestration because there is no
logical reason it should work on the send port and not the
orchestration.

BA

"NickH" <nickheppleston@xxxxxxxxx> wrote in message
news:1172840178.211505.306220@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Hi BA,
We use XSLT over the mapper and have come across a fair few
problems,
but none where the map works in a send port but not in an
orchestration.
I would suggest you try the following (and I apologise if I'm
telling
you how to suck eggs ;-):
1. Check that the map is actually using the XSLT in the 'Custom XSLT
Path' property of the map - this is normally my root cause of the
'Data at the root level is invalid' error;
2. If you build the map after making changes to the XSLT and deploy
the solution, the map somehow doesn't update itself (even though it
works when using the 'Test Map' functionality in VS). I just create
a
link from the root note of the source map to the root note of the
destination map and delete the link to refresh the map. Deploying
the
map now resolves this issue.
3. Check that the map used in the orchestraion and the send port are
using the same assembly version;
Hope this helps, let us know how you get on!
Regards, Nick.

--
Nick Heppleston | nick@xxxxxxxxxx
www.modhul.com - At the Coalface: A BizTalk Blog.
On Mar 1, 9:03 pm, "BA" <biztalk.archit...@xxxxxxxxx> wrote:

An update on this problem:

If I execute the map on the send port, it works!! No matter what I
try,
it
will not execute in the orchestration. Anyone have a suggestion
why
this
may not be working?
Here is the error message:
Uncaught exception (see the 'inner exception' below) has suspended
an
instance of service
'ProcessSinglePO(fd60999c-8bdb-7255-01b3-9beb7c027905)'.
The service instance will remain suspended until administratively
resumed
or
terminated.
If resumed the instance will continue from its last persisted state
and
may
re-throw the same unexpected exception.
InstanceId: 7d62a6d3-0ea3-4340-a459-1627c0fb8741
Shape name: ThrowException
ShapeId: 4dfb5bbc-b49b-4e33-a8c8-cd7b2252a73e
Exception thrown from: segment 3, progress 7
Inner exception: Data at the root level is invalid. Line 5,
position
7.
Exception type: XmlException
Source: Microsoft.XLANGs.Engine
Target Site: Void ExceptionRaised()
The following is a stack trace that identifies the location where
the
exception occured
at Microsoft.XLANGs.Core.Context.ExceptionRaised()
at
AL.TechSvcs.WalkerBruckner.ProcessSinglePO.segment3(StopConditions
stopOn)
at Microsoft.XLANGs.Core.SegmentScheduler.RunASegment(Segment s,
StopConditions stopCond, Exception& exp)
"BA" <biztalk.archit...@xxxxxxxxx> wrote in message
news:%23q8oLoBXHHA.4180@xxxxxxxxxxxxxxxxxxxxxxx

Hey everyone,

I posted yesterday without being specific enough.

I am having a problem at runtime with a map that contains an xslt
in
the
custom path.
The XSLT removes nodes and I run it before I deliver the document
to
there
trading partner, a copy of the code is below. When I run it in
Visual
Studio (right click, test map) it works fine but at runtime the
map
fails
and returns the error "Data at the root level is invalid" which
usually
means the document is blank.
I'm stumped. I used this exact same XSLT code in a BTS 2004
project
and
it was never a problem.
Can anyone help?
Thanks,
BA
Here is the code... if you test it, change the namespace to
whatever
your
doc type is. I would like to know if anyone else can repeat the
problem.
<xsl:style*** xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
version="1.0" xmlns:ns0="Common.Schemas.Generic.PO">
<xsl:output method="xml" indent="yes" />
<xsl:template match="node()">
<xsl:if
test="count(descendant::text()[string-length(normalize-space(.))>0
]
|@*)">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:if>
</xsl:template>
<xsl:template match="@*">
<xsl:copy />
</xsl:template>
<xsl:template match="text()">
<xsl:value-of select="normalize-space(.)" />
</xsl:template>
</xsl:style***>


.


Quantcast