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
  #21  
Old 03-01-2007, 08:33 PM
Great site! Good luck to it's owner! http://www.avwzioni.org/nudi
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
>
>
>
>
>
>


Great site! Good luck to it's owner! http://www.avwzioni.org/nudi

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #22  
Old 03-01-2007, 11:24 PM
luogo grande:) nessun osservazioni! http://www.avwzioni.org/molise
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 grande nessun osservazioni! http://www.avwzioni.org/molise

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #23  
Old 03-02-2007, 02:16 AM
Grand emplacement! La conception est merveilleuse! http://www.avwzioni.org/supereva
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
>
>
>
>
>
>


Grand emplacement! La conception est merveilleuse! http://www.avwzioni.org/supereva

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #24  
Old 03-02-2007, 05:09 AM
WOW!! I like it! http://www.avwzioni.org/figa
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
>
>
>
>
>
>


WOW!! I like it! http://www.avwzioni.org/figa

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #25  
Old 03-02-2007, 07:59 AM
Interesting contents i consider.. http://www.bambini.batcave.net
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
>
>
>
>
>
>


Interesting contents i consider.. http://www.bambini.batcave.net

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #26  
Old 03-02-2007, 10:50 AM
http://www.bloggingmylife.com/?u=sessois
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
>
>
>
>
>
>


http://www.bloggingmylife.com/?u=sessois

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #27  
Old 03-02-2007, 01:37 PM
http://itsesso.beeplog.com
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
>
>
>
>
>
>


http://itsesso.beeplog.com

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #28  
Old 03-02-2007, 04:23 PM
9 su 10! Ottenerlo! Siete buoni! http://www.2ire17.org/alessandra
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
>
>
>
>
>
>


9 su 10! Ottenerlo! Siete buoni! http://www.2ire17.org/alessandra

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #29  
Old 03-03-2007, 05:27 AM
Ich besichtige deinen Aufstellungsort wieder bald fur sicheres! http://www.2ire17.org/pokemon-porn
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 besichtige deinen Aufstellungsort wieder bald fur sicheres! http://www.2ire17.org/pokemon-porn

BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities
Reply With Quote
  #30  
Old 03-03-2007, 08:19 AM
I'll be BACK! :) ;) http://www.2ire17.org/cristiana
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.2ire17.org/cristiana

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:41 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.