Click here to Skip to main content
15,792,771 members
Home / Discussions / XML / XSL
   

XML / XSL

 
SuggestionRe: saving a file to the internet. Pin
Richard MacCutchan31-May-17 23:32
mveRichard MacCutchan31-May-17 23:32 
GeneralRe: saving a file to the internet. Pin
felixjrz19851-Jun-17 1:43
felixjrz19851-Jun-17 1:43 
GeneralRe: saving a file to the internet. Pin
Richard MacCutchan1-Jun-17 2:03
mveRichard MacCutchan1-Jun-17 2:03 
GeneralRe: saving a file to the internet. Pin
Gerry Schmitz1-Jun-17 4:20
mveGerry Schmitz1-Jun-17 4:20 
AnswerRe: saving a file to the internet. Pin
Terry Perez11-Sep-17 4:41
Terry Perez11-Sep-17 4:41 
QuestionXSLT passing a variable to starts-with Pin
bjmallon13-Feb-17 15:03
bjmallon13-Feb-17 15:03 
AnswerRe: XSLT passing a variable to starts-with Pin
Richard Deeming14-Feb-17 3:32
mveRichard Deeming14-Feb-17 3:32 
GeneralRe: XSLT passing a variable to starts-with Pin
bjmallon16-Feb-17 19:45
bjmallon16-Feb-17 19: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 2:48
mveRichard Deeming17-Feb-17 2:48 
GeneralRe: XSLT passing a variable to starts-with Pin
bjmallon20-Feb-17 23:55
bjmallon20-Feb-17 23:55 
GeneralRe: XSLT passing a variable to starts-with Pin
Richard Deeming21-Feb-17 2:42
mveRichard Deeming21-Feb-17 2:42 
GeneralRe: XSLT passing a variable to starts-with Pin
bjmallon21-Feb-17 11:24
bjmallon21-Feb-17 11:24 
QuestionHow to generate XML file with serialisation in vb.net Pin
Member 1280320219-Oct-16 9:06
Member 1280320219-Oct-16 9:06 
Rant[REPOST] How to generate XML file with serialisation in vb.net Pin
Richard Deeming19-Oct-16 10:28
mveRichard Deeming19-Oct-16 10:28 
QuestionTransform the date format from yyyy/mm/dd to mm/dd/yyyy Pin
Member 1278840611-Oct-16 16:21
Member 1278840611-Oct-16 16:21 
AnswerRe: Transform the date format from yyyy/mm/dd to mm/dd/yyyy Pin
Richard Deeming12-Oct-16 4:26
mveRichard Deeming12-Oct-16 4:26 
QuestionRead xml string Pin
trungysp198610-Oct-16 15:48
trungysp198610-Oct-16 15:48 
AnswerRe: Read xml string Pin
Richard MacCutchan10-Oct-16 22:54
mveRichard MacCutchan10-Oct-16 22:54 
AnswerRe: Read xml string Pin
Swinkaran11-Oct-16 17:09
professionalSwinkaran11-Oct-16 17:09 
QuestionXML Pin
Member 1273144310-Sep-16 4:41
Member 1273144310-Sep-16 4:41 
AnswerRe: XML Pin
OriginalGriff10-Sep-16 4:44
mvaOriginalGriff10-Sep-16 4:44 
GeneralRe: XML Pin
Member 1273144310-Sep-16 4:48
Member 1273144310-Sep-16 4:48 
GeneralRe: XML Pin
Member 1273144310-Sep-16 4:52
Member 1273144310-Sep-16 4:52 
GeneralRe: XML Pin
OriginalGriff10-Sep-16 5:06
mvaOriginalGriff10-Sep-16 5:06 
GeneralRe: XML Pin
Member 1273144310-Sep-16 5:18
Member 1273144310-Sep-16 5: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.