3 lines of XSL

K

Kasp

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: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>
 
D

Dimitre Novatchev

Kasp said:
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
 
D

Dimitre Novatchev

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
 
K

Kasp

Dimitre Novatchev said:
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! :)
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top