Click here to Skip to main content
15,921,452 members
Home / Discussions / XML / XSL
   

XML / XSL

 
AnswerRe: Unsupported chars? Pin
Anonymous25-Sep-02 2:35
Anonymous25-Sep-02 2:35 
Questionhow to display xml in IE6? Pin
Segal24-Sep-02 19:46
Segal24-Sep-02 19:46 
AnswerRe: how to display xml in IE6? Pin
Anonymous24-Sep-02 22:00
Anonymous24-Sep-02 22:00 
QuestionXML for a starter? Pin
zhoujun24-Sep-02 14:43
zhoujun24-Sep-02 14:43 
AnswerRe: XML for a starter? Pin
Paul Watson24-Sep-02 21:03
sitebuilderPaul Watson24-Sep-02 21:03 
GeneralRe: XML for a starter? Pin
zhoujun25-Sep-02 14:18
zhoujun25-Sep-02 14:18 
Generalxsl:variable Pin
Christian Graus22-Sep-02 12:18
protectorChristian Graus22-Sep-02 12:18 
GeneralRe: xsl:variable Pin
Richard Deeming22-Sep-02 23:46
mveRichard Deeming22-Sep-02 23:46 
I think what you're after is the xsl:param, combined with an xsl:call-tempalte or xsl:apply-templates call. For example, I use the following template to remove duplicates from a deeply nested list [/Body/Details/Item/Ref[@Type='Note']/Identifier]:
<xsl:template name="DeDupe">
    <xsl:param name="list" />
    <xsl:param name="sep" select="', '" />

    <xsl:for-each select="$list">
        <xsl:variable name="curr" select="string(.)" />
        <xsl:variable name="i" select="position()" />

        <xsl:choose>
            <xsl:when test="count($list[$i > position() and string(.) = $curr]) > 0" />
            <xsl:otherwise>
                <xsl:if test="position() != 1"><xsl:copy-of select="$sep" /></xsl:if>
                <xsl:value-of select="$curr" />
            </xsl:otherwise>
        </xsl:choose>
    </xsl:for-each>
</xsl:template>

...

<xsl:call-template name="DeDupe">
    <xsl:with-param name="list" select="XPath expression" />
</xsl:call-template>

GeneralRe: xsl:variable Pin
Christian Graus22-Sep-02 23:47
protectorChristian Graus22-Sep-02 23:47 
GeneralRe: xsl:variable Pin
Richard Deeming23-Sep-02 1:00
mveRichard Deeming23-Sep-02 1:00 
GeneralRe: xsl:variable Pin
Stuart Dootson25-Sep-02 8:12
professionalStuart Dootson25-Sep-02 8:12 
GeneralRe: xsl:variable Pin
Christian Graus25-Sep-02 12:19
protectorChristian Graus25-Sep-02 12:19 
GeneralCopy XML string into a node Pin
Sascha18-Sep-02 7:34
Sascha18-Sep-02 7:34 
GeneralRe: Copy XML string into a node Pin
Paul Watson18-Sep-02 8:06
sitebuilderPaul Watson18-Sep-02 8:06 
GeneralRe: Copy XML string into a node Pin
Sascha18-Sep-02 8:57
Sascha18-Sep-02 8:57 
GeneralRe: Copy XML string into a node Pin
Anders Munk18-Sep-02 9:12
Anders Munk18-Sep-02 9:12 
GeneralXML validation Pin
Hans Ruck18-Sep-02 6:29
Hans Ruck18-Sep-02 6:29 
GeneralRe: XML validation Pin
Erik Westermann19-Sep-02 3:46
professionalErik Westermann19-Sep-02 3:46 
GeneralRe: XML validation Pin
Hans Ruck19-Sep-02 21:13
Hans Ruck19-Sep-02 21:13 
GeneralXML Schema and circular references Pin
Senkwe Chanda18-Sep-02 2:13
Senkwe Chanda18-Sep-02 2:13 
GeneralRe: XML Schema and circular references Pin
Erik Westermann18-Sep-02 3:22
professionalErik Westermann18-Sep-02 3:22 
GeneralRe: XML Schema and circular references Pin
Senkwe Chanda18-Sep-02 4:44
Senkwe Chanda18-Sep-02 4:44 
GeneralBegginer XML question. Pin
Chagit17-Sep-02 3:13
Chagit17-Sep-02 3:13 
GeneralRe: Begginer XML question. Pin
Christian Graus17-Sep-02 12:45
protectorChristian Graus17-Sep-02 12:45 
GeneralRe: Begginer XML question. Pin
Paul Watson17-Sep-02 21:47
sitebuilderPaul Watson17-Sep-02 21:47 

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.