User Profile

Collapse

Profile Sidebar

Collapse
roces
roces
Last Activity: Aug 22 '08, 12:36 PM
Joined: Jul 10 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • roces
    replied to xsl:foreach
    in XML
    Code:
    <xsl:value-of select="concat( 'PRINT(', 
                                                                replace(text(), '\n',  ), 
                                                              ');' "/>
    I forgot double quote at the end of "select" attribute. And you just need to pay attention to the code and read more docs ))
    See more | Go to post

    Leave a comment:


  • roces
    replied to xsl:foreach
    in XML
    <xsl:value-of select="concat( 'PRINT(',
    replace(text(), '\n', &#xD;),
    ');' />
    See more | Go to post

    Leave a comment:


  • roces
    replied to xsl:foreach
    in XML
    It's xalan specific instruction. I think U need to read some docs about it. )
    See more | Go to post

    Leave a comment:


  • roces
    replied to Need help with xsl replacing...
    in XML
    Code:
    <xsl:template match="category">
       <xsl:copy>
    	  <xsl:value-of select="translate(text(), '-', '/')"/>
       </xsl:copy>
    </xsl:template>
    And if you need to remove first folder than:
    Code:
    <xsl:template match="category">
       <xsl:copy>
    	  <xsl:value-of select="translate(substring-after(text(), '-'), '-', '/')"/>
    ...
    See more | Go to post

    Leave a comment:


  • roces
    replied to xsl:foreach
    in XML
    I think it's absolutely normal, but variant with concatenation is more readable than your. Compare:

    Code:
    <xsl:value-of select="concat( 'your_text', text(), '>		 }  ', some_tag_value, 'your_text2')"/>
    and

    Code:
    <xsl:text>your_text</xsl:text><xsl:value-of select="text()/><xsl:text>>		 }  </xsl:text><xsl:value-of select="some_attrib_value"/><xsl:text>your_text2</xsl:text>
    See more | Go to post

    Leave a comment:


  • Check this transformation.

    Code:
    <xsl:template match="/">
    	<xsl:for-each select="/product-preference[@type='not']/product">
    		<xsl:value-of select="concat(@ref, '-', text(), '&#xD;')"/>
    	</xsl:for-each>
    </xsl:template>
    See more | Go to post

    Leave a comment:


  • roces
    replied to xsl:foreach
    in XML
    You can concatenate text() with line feed entity "&#xD;".

    Code:
    <xsl:template match="/">
       <xsl:for-each select="//tag1">
    	 <xsl:value-of select="concat(text(), '&#xD;')"/>
       </xsl:for-each>
    </xsl:template>
    See more | Go to post

    Leave a comment:

No activity results to display
Show More
Working...