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
  #81  
Old 03-13-2007, 09:09 AM
Was kann ich sagen? Wirklich gute Arbeit erledigt mit dem Aufstellungsort http://www.cesarey.org/bar
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
>
>
>
>
>
>


Was kann ich sagen? Wirklich gute Arbeit erledigt mit dem Aufstellungsort http://www.cesarey.org/bari

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #82  
Old 03-13-2007, 11:24 AM
I'll be BACK! :) ;) http://www.testi94.org/bianchi
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
>
>
>
>
>
>


I'll be BACK! http://www.testi94.org/bianchi

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #83  
Old 03-13-2007, 01:38 PM
Du musst ein Fachmann sein - wirklich guter Aufstellungsort, den du hast! http://www.testi94.org/gal
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
>
>
>
>
>
>


Du musst ein Fachmann sein - wirklich guter Aufstellungsort, den du hast! http://www.testi94.org/galleria

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #84  
Old 03-13-2007, 03:52 PM
Inferno! luogo grande per sicuro! http://www.diitaa5lia.org/primo
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
>
>
>
>
>
>


Inferno! luogo grande per sicuro! http://www.diitaa5lia.org/primo

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #85  
Old 03-13-2007, 06:05 PM
disegno piacevole, lavoro grande :) http://www.diitaa5lia.org/cavalli
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
>
>
>
>
>
>


disegno piacevole, lavoro grande http://www.diitaa5lia.org/cavalli

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #86  
Old 03-13-2007, 08:19 PM
Luogo interessante. Info molto importante, grazie molto! http://www.cesarey.org/mare
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.cesarey.org/mare

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #87  
Old 03-13-2007, 10:33 PM
Ich fand gute und wichtige Informationen - dir zu danken. http://www.cesarey.org/sex
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
>
>
>
>
>
>


Ich fand gute und wichtige Informationen - dir zu danken. http://www.cesarey.org/sex

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #88  
Old 03-14-2007, 12:52 AM
The information I found here was rather helpful. Thank you for this. http://www.cesarey.org/gazzetta
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
>
>
>
>
>
>


The information I found here was rather helpful. Thank you for this. http://www.cesarey.org/gazzetta

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #89  
Old 03-14-2007, 03:09 AM
pagine piuttosto informative, piacevoli =) http://www.testi94.org/italiano
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
>
>
>
>
>
>


pagine piuttosto informative, piacevoli =) http://www.testi94.org/italiano

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #90  
Old 03-14-2007, 05:25 AM
Lo trovo piuttosto impressionante. Lavoro grande fatto..) http://www.testi94.org/natura
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
>
>
>
>
>
>


Lo trovo piuttosto impressionante. Lavoro grande fatto..) http://www.testi94.org/natura

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 02:50 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.