3 lines of XSL

Discussion in 'XML' started by Kasp, Oct 16, 2003.

  1. Kasp

    Kasp Guest

    Below is a XSL that I can barely understand being a newbie to XSL world.
    Can someone let me know what do these 3 lines do exactly?
    - <xsl:attribute name="MemberKey">
    <xsl:number level="multiple"
    count="Hierarchy/HierarchyMember|Hierarchy/HierarchyMember/HierarchyMember"
    format="-1-1" />
    </xsl:attribute>

    Also, if you can tell me how I can implement this in VB using DOM (MSXML).

    Many Thanks.
    Below is "a part of" XSL that I have to decode and understand....:(

    - <xsl:choose>

    - <xsl:when test="parent::Hierarchy">
    <xsl:attribute name="Level">1</xsl:attribute>
    - <xsl:attribute name="FullName">
    <xsl:value-of select="@MemberName" />
    </xsl:attribute>
    - <xsl:attribute name="MemberKey">
    <xsl:number level="multiple" count="Hierarchy/HierarchyMember"
    format="-1"/>
    </xsl:attribute>
    </xsl:when>

    - <xsl:when test="../parent::Hierarchy">
    <xsl:attribute name="Level">2</xsl:attribute>
    - <xsl:attribute name="FullName">
    <xsl:value-of select="../@MemberName" /> >
    <xsl:value-of select="@MemberName" />
    </xsl:attribute>
    - <xsl:attribute name="MemberKey">
    <xsl:number level="multiple"
    count="Hierarchy/HierarchyMember|Hierarchy/HierarchyMember/HierarchyMember"
    format="-1-1" />
    </xsl:attribute>
    </xsl:when>
    - <xsl:when test="../../parent::Hierarchy">
    <xsl:attribute name="Level">3</xsl:attribute>
    - <xsl:attribute name="FullName">
    <xsl:value-of select="../../@MemberName" />
    >

    <xsl:value-of select="../@MemberName" />
    >

    <xsl:value-of select="@MemberName" />
    </xsl:attribute>
    - <xsl:attribute name="MemberKey">
    <xsl:number level="multiple"
    count="Hierarchy/HierarchyMember|Hierarchy/HierarchyMember/HierarchyMember|H
    ierarchy/HierarchyMember/HierarchyMember/HierarchyMember" format="-1-1-1" />
    </xsl:attribute>
    </xsl:when>
     
    Kasp, Oct 16, 2003
    #1
    1. Advertising

  2. Kasp

    Kasp Guest

    > Are you a Masochist?

    No. Just desperate to meet my deadline.
     
    Kasp, Oct 16, 2003
    #2
    1. Advertising

  3. "Kasp" <> wrote in message
    news:bmmho8$gvi$...
    > Below is a XSL that I can barely understand being a newbie to XSL world.
    > Can someone let me know what do these 3 lines do exactly?
    > - <xsl:attribute name="MemberKey">
    > <xsl:number level="multiple"
    >

    count="Hierarchy/HierarchyMember|Hierarchy/HierarchyMember/HierarchyMember"
    > format="-1-1" />
    > </xsl:attribute>
    >
    > Also, if you can tell me how I can implement this in VB using DOM (MSXML).


    Are you a Masochist?


    =====
    Cheers,

    Dimitre Novatchev.
    http://fxsl.sourceforge.net/ -- the home of FXSL
     
    Dimitre Novatchev, Oct 16, 2003
    #3
  4. I don't think it is easy to explain xsl:number in a single message, and it
    would be quite difficult to implement something like it in VB.

    Trying to simulate XSLT in a language without tree-processing capabilities
    is a very flawed approach.

    Sometimes deadlines cannot be met due because of lack of right
    instruments -- VB is definitely not the instrument to solve tasks XSLT was
    created for.


    =====
    Cheers,

    Dimitre Novatchev.
    http://fxsl.sourceforge.net/ -- the home of FXSL


    "Kasp" <> wrote in message
    news:bmmj63$j10$...
    > > Are you a Masochist?

    >
    > No. Just desperate to meet my deadline.
    >
    >
     
    Dimitre Novatchev, Oct 16, 2003
    #4
  5. Kasp

    Kasp Guest

    "Dimitre Novatchev" <> wrote in message
    news:bmmnon$ntofp$-berlin.de...
    > I don't think it is easy to explain xsl:number in a single message, and it
    > would be quite difficult to implement something like it in VB.
    >
    > Trying to simulate XSLT in a language without tree-processing capabilities
    > is a very flawed approach.
    >
    > Sometimes deadlines cannot be met due because of lack of right
    > instruments -- VB is definitely not the instrument to solve tasks XSLT was
    > created for.



    My client wants it that way. Previously this piece of code was using XSLT
    but he wants it in VB itself due to some memory considerations. And the
    golden saying "Client is always right" has to be followed diligently!

    Anyway, I got the hang of it after a good night's sleep
    Might need to send some desperate queries again here later in the night
    today! :)
    --
    "Accept that some days you are the pigeon and some days the statue."
    "A pat on the back is only a few inches from a kick in the butt." - Dilbert.
     
    Kasp, Oct 17, 2003
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jack
    Replies:
    9
    Views:
    2,738
  2. Replies:
    1
    Views:
    3,687
    A. Bolmarcich
    May 27, 2005
  3. Joe Wright
    Replies:
    0
    Views:
    554
    Joe Wright
    Jul 27, 2003
  4. lovecreatesbeauty

    How to know two lines are a pare parallel lines

    lovecreatesbeauty, Apr 27, 2006, in forum: C Programming
    Replies:
    11
    Views:
    693
    Old Wolf
    Apr 28, 2006
  5. Replies:
    1
    Views:
    486
    Jonathan Mcdougall
    Dec 6, 2005
Loading...

Share This Page