|
Home > Archive > BizTalk Server Tools > June 2004 > scripting functoid in line c# using regularexpressions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
scripting functoid in line c# using regularexpressions
|
|
| philrogiers 2004-05-30, 10:47 am |
| I've tried to create an in line c# scripting functoid to
do advanced parsing using the
system.text.regularexpressions regex and match commands.
Unfortunately while validating the map, Biztalk tells me a
reference is missing even when in my Biztalk project
references I have 'system' which normally includes
system.text.regularexpressions.
Can somebody help me?
Should I include something into the script to allow
Biztalk to find regularexpressions (like using system ..).
Thanks a lot!
Philippe
| |
| Tatyana Yakushev [MSFT] 2004-06-03, 11:56 pm |
| The answer to your question can be found in the documentation.
Topic title is "Scripting Using Inline C#, JScript.NET, and Visual Basic.NET"
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
BizTalk saves inline scripts in the Extended Stylesheet Transformations (XSLT) stylesheet defining the map. Because of this, inline scripts may use the same
namespaces as any other XSLT stylesheet script. The following table shows the available namespaces:
Namespace Description
System The System class.
System.Collection The collection classes.
System.Text The text classes.
System.Text.RegularExpressions The regular expression classes.
System.Xml The core XML classes.
System.Xml.Xsl The XSLT classes.
System.Xml.Xpath The XPath classes.
Microsoft.VisualBasic The Visual Basic script classes.
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
This means that you can not use inline C# for your purpose. You can use "external assembly" and implement the function outside of XSLT.
Thanks,
Tatyana
--------------------
>Content-Class: urn:content-classes:message
>From: "philrogiers" <philippe.rogiers@fr.netgrs.com>
>Sender: "philrogiers" <philippe.rogiers@fr.netgrs.com>
>Subject: scripting functoid in line c# using regularexpressions
>Date: Wed, 26 May 2004 09:54:58 -0700
>Lines: 12
>Message-ID: <12dc901c44342$2dd91340$a001280a@phx.gbl>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="iso-8859-1"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
>Thread-Index: AcRDQi3WhMZLywclT7W6eX1KooXStA==
>Newsgroups: microsoft.public.biztalk.tools
>Path: cpmsftngxa10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl microsoft.public.biztalk.tools:3697
>NNTP-Posting-Host: tk2msftngxa08.phx.gbl 10.40.1.160
>X-Tomcat-NG: microsoft.public.biztalk.tools
>
>I've tried to create an in line c# scripting functoid to
>do advanced parsing using the
>system.text.regularexpressions regex and match commands.
>Unfortunately while validating the map, Biztalk tells me a
>reference is missing even when in my Biztalk project
>references I have 'system' which normally includes
>system.text.regularexpressions.
>Can somebody help me?
>Should I include something into the script to allow
>Biztalk to find regularexpressions (like using system ..).
>Thanks a lot!
>Philippe
>
--
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
Note: For the benefit of the community-at-large, all responses to this message are best directed to the newsgroup/thread from which they originated.
| |
|
| Thanks a lot for your answer.
However I am not sure I fully understand.
I want to use the Regex.Match classes which are in
system.text.regularexpressions. So why should this not
work in inline c# since the doc supports
regularexpressions. Or is it because of c# vs XSLT?
Philippe
>-----Original Message-----
>The answer to your question can be found in the
documentation.
>Topic title is "Scripting Using Inline C#, JScript.NET,
and Visual Basic.NET"
>* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * *
>BizTalk saves inline scripts in the Extended Stylesheet
Transformations (XSLT) stylesheet defining the map.
Because of this, inline scripts may use the same
>namespaces as any other XSLT stylesheet script. The
following table shows the available namespaces:
>
>Namespace Description
>System The System class.
>System.Collection The collection classes.
>System.Text The text classes.
>System.Text.RegularExpressions The regular expression
classes.
>System.Xml The core XML classes.
>System.Xml.Xsl The XSLT classes.
>System.Xml.Xpath The XPath classes.
>Microsoft.VisualBasic The Visual Basic script classes.
>
>* * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* * * * * * * * * * * * * * * * * * * * * * * * * * *
>This means that you can not use inline C# for your
purpose. You can use "external assembly" and implement the
function outside of XSLT.
>
>Thanks,
>Tatyana
>
>--------------------
regularexpressions[vbcol=seagreen]
microsoft.public.biztalk.tools:3697[vbcol=seagreen]
a[vbcol=seagreen]
system ..).[vbcol=seagreen]
>
>
>--
>
>This posting is provided "AS IS" with no warranties, and
confers no rights. Use of included script samples are
subject to the terms specified at
>http://www.microsoft.com/info/cpyright.htm
>
>Note: For the benefit of the community-at-large, all
responses to this message are best directed to the
newsgroup/thread from which they originated.
>
>.
>
| |
| Matt Cable 2004-06-09, 5:01 pm |
| I agree. I've run into the same issue trying to do a Regex.Replace( ).
Explanations anyone?
- Matt
<philippe.rogiers@fr.netgrs.com> wrote in message
news:181d101c44a41$45cfc330$a301280a@phx
.gbl...[vbcol=seagreen]
> Thanks a lot for your answer.
> However I am not sure I fully understand.
> I want to use the Regex.Match classes which are in
> system.text.regularexpressions. So why should this not
> work in inline c# since the doc supports
> regularexpressions. Or is it because of c# vs XSLT?
> Philippe
> documentation.
> and Visual Basic.NET"
> * * * * * * * * * * * * * * * * * * * * * * * * * * *
> Transformations (XSLT) stylesheet defining the map.
> Because of this, inline scripts may use the same
> following table shows the available namespaces:
> classes.
> * * * * * * * * * * * * * * * * * * * * * * * * * * *
> purpose. You can use "external assembly" and implement the
> function outside of XSLT.
> regularexpressions
> microsoft.public.biztalk.tools:3697
> a
> system ..).
> confers no rights. Use of included script samples are
> subject to the terms specified at
> responses to this message are best directed to the
> newsgroup/thread from which they originated.
|
|
|
|
|