Click here to Skip to main content
15,885,278 members
Home / Discussions / XML / XSL
   

XML / XSL

 
SuggestionRe: saving a file to the internet. Pin
Richard MacCutchan31-May-17 22:32
mveRichard MacCutchan31-May-17 22:32 
GeneralRe: saving a file to the internet. Pin
felixjrz19851-Jun-17 0:43
felixjrz19851-Jun-17 0:43 
GeneralRe: saving a file to the internet. Pin
Richard MacCutchan1-Jun-17 1:03
mveRichard MacCutchan1-Jun-17 1:03 
GeneralRe: saving a file to the internet. Pin
Gerry Schmitz1-Jun-17 3:20
mveGerry Schmitz1-Jun-17 3:20 
AnswerRe: saving a file to the internet. Pin
Terry Perez11-Sep-17 3:41
Terry Perez11-Sep-17 3:41 
QuestionXSLT passing a variable to starts-with Pin
bjmallon13-Feb-17 14:03
bjmallon13-Feb-17 14:03 
AnswerRe: XSLT passing a variable to starts-with Pin
Richard Deeming14-Feb-17 2:32
mveRichard Deeming14-Feb-17 2:32 
GeneralRe: XSLT passing a variable to starts-with Pin
bjmallon16-Feb-17 18:45
bjmallon16-Feb-17 18:45 
Richard,

Thanks for your reply.

Yes, if I pass 'A' to the template, I get the correct answer. So that's a good thing.

Now, given a tokenised string stored in a variable (Letters):

XML
<xsl:variable name="Letters">
    <xsl:call-template name="tokenise">
        <xsl:with-param name="string" select ="'A B C D E F G H I J K L M N O P Q R S T U V W X Y Z'"/>
        <xsl:with-param name="delimeters" select="' '"/>
    </xsl:call-template>
</xsl:variable>

And trying to process each token through the template:
XML
<xsl:for-each select="msxsl:node-set($Letters)/token">
  <xsl:variable name="currToken">
    <xsl:value-of select="./node()[1]"/>
  </xsl:variable>
  <xsl:call-template name="ListSurnameStartsWith">
    <xsl:with-param name="character" select="$currToken"/>
  </xsl:call-template>
</xsl:for-each>

What should I be using inside the 'select' attribute to ensure that i get 'A' and not some other value.

Some options I've tried, debugging in Visual Studio 2013, are:
XML
<xsl:variable name="currToken">
  <xsl:value-of select="."/>
</xsl:variable>

This gives me:
$currToken	{Dimension:[1]}
    [1]	/
        node()[1]	A


'select="./node()"' gives me the same answer.
'select="./node()[1]"' gives me the same answer.

I haven't had any help from Google, as I can't seem to ask the right question, or nobody's doing this.

What do I need to put into the select to actually get the character A.
GeneralRe: XSLT passing a variable to starts-with Pin
Richard Deeming17-Feb-17 1:48
mveRichard Deeming17-Feb-17 1:48 
GeneralRe: XSLT passing a variable to starts-with Pin
bjmallon20-Feb-17 22:55
bjmallon20-Feb-17 22:55 
GeneralRe: XSLT passing a variable to starts-with Pin
Richard Deeming21-Feb-17 1:42
mveRichard Deeming21-Feb-17 1:42 
GeneralRe: XSLT passing a variable to starts-with Pin
bjmallon21-Feb-17 10:24
bjmallon21-Feb-17 10:24 
QuestionHow to generate XML file with serialisation in vb.net Pin
Member 1280320219-Oct-16 8:06
Member 1280320219-Oct-16 8:06 
Rant[REPOST] How to generate XML file with serialisation in vb.net Pin
Richard Deeming19-Oct-16 9:28
mveRichard Deeming19-Oct-16 9:28 
QuestionTransform the date format from yyyy/mm/dd to mm/dd/yyyy Pin
Member 1278840611-Oct-16 15:21
Member 1278840611-Oct-16 15:21 
AnswerRe: Transform the date format from yyyy/mm/dd to mm/dd/yyyy Pin
Richard Deeming12-Oct-16 3:26
mveRichard Deeming12-Oct-16 3:26 
QuestionRead xml string Pin
trungysp198610-Oct-16 14:48
trungysp198610-Oct-16 14:48 
AnswerRe: Read xml string Pin
Richard MacCutchan10-Oct-16 21:54
mveRichard MacCutchan10-Oct-16 21:54 
AnswerRe: Read xml string Pin
Swinkaran11-Oct-16 16:09
professionalSwinkaran11-Oct-16 16:09 
QuestionXML Pin
Member 1273144310-Sep-16 3:41
Member 1273144310-Sep-16 3:41 
AnswerRe: XML Pin
OriginalGriff10-Sep-16 3:44
mveOriginalGriff10-Sep-16 3:44 
GeneralRe: XML Pin
Member 1273144310-Sep-16 3:48
Member 1273144310-Sep-16 3:48 
GeneralRe: XML Pin
Member 1273144310-Sep-16 3:52
Member 1273144310-Sep-16 3:52 
GeneralRe: XML Pin
OriginalGriff10-Sep-16 4:06
mveOriginalGriff10-Sep-16 4:06 
GeneralRe: XML Pin
Member 1273144310-Sep-16 4:18
Member 1273144310-Sep-16 4:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.