XSLT xpath call-template problem with double quotes

This is a discussion on XSLT xpath call-template problem with double quotes within the Framework and Interface Programming forums in category; > Hey boys and girls, > > > > I ran into a bit of a piccle with the mapper. I''m writing a custom xslt > fuctoid and taking in an xpath as a parameter. > > The problem is that when I connect the functoid with an element in the > mapper, it generates double quotes around the > > parameters. Then, when I run a value-of statement on the xpath parameter I > get the xpath statement, not the value of the evaluation! The problem turns > out to be the double quotes. I created an exampel that ...

Go Back   Application Development Forum > Framework and Interface Programming

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #11  
Old 02-28-2007, 01:09 PM
Luogo molto buon:) Buona fortuna! http://www.canaxe.org/racconti
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


Luogo molto buon Buona fortuna! http://www.canaxe.org/racconti

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #12  
Old 02-28-2007, 04:28 PM
Luogo interessante. Info molto importante, grazie molto! http://www.canaxe.org/corsi
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


Luogo interessante. Info molto importante, grazie molto! http://www.canaxe.org/corsi

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #13  
Old 02-28-2007, 07:46 PM
Very valuable information you have here. Thanks.. http://www.canaxe.org/entertainment
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


Very valuable information you have here. Thanks.. http://www.canaxe.org/entertainment

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #14  
Old 02-28-2007, 11:02 PM
Desidero appena dire che e un luogo ben cotto http://www.canaxe.org/trasporti
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


Desidero appena dire che e un luogo ben cotto http://www.canaxe.org/trasporti

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #15  
Old 03-01-2007, 02:18 AM
Stupore! ho una sensibilit molto buona circa il vostro luogo!!!! http://www.canaxe.org/veneto
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


Stupore! ho una sensibilit molto buona circa il vostro luogo!!!! http://www.canaxe.org/veneto

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #16  
Old 03-01-2007, 05:31 AM
E evidente che il luogo e stato fatto dalla persona che realmente conosce il mestiere! http://www.ca
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


E evidente che il luogo e stato fatto dalla persona che realmente conosce il mestiere! http://www.canaxe.org/vetro

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #17  
Old 03-01-2007, 08:41 AM
Very valuable information you have here. Thanks.. http://www.canaxe.org/traduzioni
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


Very valuable information you have here. Thanks.. http://www.canaxe.org/traduzioni

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #18  
Old 03-01-2007, 11:56 AM
Luogo molto buon:) Buona fortuna! http://www.canaxe.org/sexi
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


Luogo molto buon Buona fortuna! http://www.canaxe.org/sexi

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #19  
Old 03-01-2007, 02:50 PM
Interessieren. SEHR interessant! ;) http://www.avwzioni.org/filmati
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


Interessieren. SEHR interessant! http://www.avwzioni.org/filmati

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #20  
Old 03-01-2007, 05:41 PM
Grande sito!! http://www.avwzioni.org/capelli
Guest
 
Default RE: XSLT xpath call-template problem with double quotes


> Hey boys and girls,
>
>
>
> I ran into a bit of a piccle with the mapper. I''m writing a custom xslt
> fuctoid and taking in an xpath as a parameter.
>
> The problem is that when I connect the functoid with an element in the
> mapper, it generates double quotes around the
>
> parameters. Then, when I run a value-of statement on the xpath parameter I
> get the xpath statement, not the value of the evaluation! The problem turns
> out to be the double quotes. I created an exampel that runs in xmlspy and it
> works the same way. It works with single quotes but not with double. I can't
> do anything about the call unfortunately, what I can effect is the
> XpathLookupFunctoid template below.
>
> What I need is a way to convince the value-of statement to evalutate the
> statement instead of just outputting the xpath statemenat by itself.
>
> I tryed all kinds of tricks that I could emagine including substrings and
> variables. It seems that the string becomes a totally different animal once
> it gets double quoted.
>
> Below is the xmlspy sample you can run in xmlspy. If the extra quote sight
> on the xpath parameter in the call-template statement is removed it works
> fine. But since that's generated by Biztalk I cant do anything about it so
> the
> manipulation needs to be done in XpathLookupFunctoid:
>
> Below is the xmlspy compatible example:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
>
>
>
>
> <xsl:template match="/">
> <xsl:call-template name="XpathLookupFunctoid">
> <xsl:with-param name="searchparam" select="9" />
> <xsl:with-param name="targetnodename"
> select="&quot;Name2&quot;" />
> <xsl:with-param name="xpath"
> select="&quot;(//*[local-name()='dtParParty' and
> PartyTypeCode=9]/Shortname)[1]&quot;" />
> <xsl:with-param name="defaultvalue" select="&quot;NPs
> Default value&quot;" />
> </xsl:call-template>
>
> </xsl:template>
>
> <xsl:template name="XpathLookupFunctoid">
> <xslaram name="searchparam" />
> <xslaram name="targetnodename" />
> <xslaram name="xpath" />
> <xslaram name="defaultvalue" />
>
> <xsl:variable name="ren" select="$xpath"/>
>
> <xsl:element name="{$targetnodename}">
> Resultat: <xsl:value-of select="$ren"/>
> </xsl:element>
> </xsl:template>
>
> </xsl:stylesheet>
>
>
>
> Greatfull for all ideas
>
>
> Niklas Pettersson
> Karlstad, Sweden
>
>
>
>
>
>


Grande sito!! http://www.avwzioni.org/capelli

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 03:26 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.