Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: XML Title Case

  1. #1
    New to the CF scene
    Join Date
    Jun 2010
    Posts
    7
    Thanks
    3
    Thanked 0 Times in 0 Posts

    XML Title Case

    I am trying to implement the following in my own XML:
    http://blog.logiclabz.com/xml-xslt/t...n-in-xslt.aspx

    So I have (from the link above):
    Code:
    <xsl:template name="TitleCase"> 
    ...
    </xsl:template>
    And:
    Code:
    <xsl:template match="trip">
    <xsl:element name="tour">
    ...
    
    <xsl:call-template name="TitleCase">
    <xsl:copy-of select="./title"/>
    </xsl:call-template>
    
    ...
    </xsl:element>
    </xsl:template>
    Visual Studio tells me:
    "Error 'xsl:copy-of' cannot be a child of the 'xsl:call-template' element."

  • #2
    Senior Coder Dormilich's Avatar
    Join Date
    Jan 2010
    Location
    Behind the Wall
    Posts
    3,344
    Thanks
    13
    Thanked 349 Times in 345 Posts
    that’s correct. the only child element allowed in <xsl:call-template> is <xsl:with-param>. (anything else wouldn’t make sense)
    The computer is always right. The computer is always right. The computer is always right. Take it from someone who has programmed for over ten years: not once has the computational mechanism of the machine malfunctioned.
    André Behrens, NY Times Software Developer


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •