473,548 Members | 2,636 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Count of sibling in xml tree

13 New Member
Hii all please help its urgent
i have developed an application in xsl. what i want to do is i m searching the xml file based on a search.and based on that search im creating one tree like structure. in this tree structure i need the count of siblings in each level. im not getting the count exactly the same


the xslt file
-----------------
Expand|Select|Wrap|Line Numbers
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:vml="urn:schemas-microsoft-com:vml">
  3.   <xsl:output method="xml" omit-xml-declaration="yes" />
  4.   <xsl:param name ="param3">DateChkForENT</xsl:param>
  5.  
  6.   <xsl:template match="/">
  7.     <html xmlns:vml="urn:schemas-microsoft-com:vml">
  8.       <head>
  9.         <object id="VMLRender" classid="CLSID:10072CEC-8CC1-11D1-986E-00A0C955B42E">
  10.         </object>
  11.         <style>
  12.           vml\:* { behavior: url(#VMLRender) }
  13.         </style>
  14.       </head>
  15.       <body>
  16.         <xsl:call-template name="object" />
  17.       </body>
  18.     </html>
  19.   </xsl:template>
  20.  
  21.   <xsl:template name="object">
  22.  
  23.     <xsl:for-each select="//objects/object[@businessrule = $param3 and .//macro/param[@name = 'context'or @name = 'objectname'] ]">
  24.       <xsl:choose>
  25.         <xsl:when test="@businessrule = $param3">
  26.          FOR UP BUSINESS RULE
  27.           <xsl:call-template name="uprelatedBR">
  28.             <xsl:with-param  name="referncesToMe" select="//objects/object[.//macro[starts-with(@name, concat('BusinessRule.',$param3) )]]"/>
  29.             <xsl:with-param  name="x">500</xsl:with-param>
  30.             <xsl:with-param  name="y">500</xsl:with-param>
  31.           </xsl:call-template>
  32.  
  33.  
  34.         </xsl:when>
  35.       </xsl:choose>
  36.     </xsl:for-each>
  37.  
  38.   </xsl:template>
  39.  
  40.   <!--Look For UP Relation-->
  41.   <xsl:template name="uprelatedBR">
  42.     <xsl:param name="paramLevelRefCount"/>
  43.     <xsl:param name="referncesToMe"/>
  44.     <xsl:param name="x" />
  45.     <xsl:param name="y" />
  46.  
  47.  
  48.     <!-- calculate the number of references of references-->
  49.     <xsl:variable name="grandParentCount">
  50.       <xsl:call-template name="levelReferences">
  51.         <xsl:with-param name="nodes" select="$referncesToMe"/>
  52.       </xsl:call-template>
  53.  
  54.     </xsl:variable>
  55.  
  56.     <font color="blue">
  57.       <xsl:value-of select="$grandParentCount"/>
  58.     </font>
  59.     <!-- calculate the number of references-->
  60.     <xsl:variable name="levelRefCount">
  61.       <xsl:choose>   
  62.         <xsl:when test="$paramLevelRefCount">
  63.             <xsl:value-of select="$paramLevelRefCount"/>
  64.         </xsl:when>
  65.         <xsl:otherwise>
  66.           <!--this will execute only the first time the template is called-->
  67.             <xsl:value-of select="count($referncesToMe)"/>
  68.         </xsl:otherwise>
  69.       </xsl:choose>
  70.      </xsl:variable>
  71.  
  72.  
  73.     <xsl:call-template name="drawNode">
  74.       <xsl:with-param name="nodesToDraw" select="$referncesToMe"/>
  75.       <xsl:with-param name="currentNodePosition">1</xsl:with-param>
  76.       <xsl:with-param name="levelRefCount" select="$levelRefCount"/>
  77.       <xsl:with-param name="grandParentCount" select="$grandParentCount"/>
  78.       <xsl:with-param name="levelOffset">0</xsl:with-param>
  79.  
  80.       <xsl:with-param name="x" select="$x - (($levelRefCount  * 80) div 2)"/>
  81.       <xsl:with-param name="y" select="$y"/>
  82.     </xsl:call-template>
  83.   </xsl:template>
  84.  
  85.   <xsl:template name="drawNode">
  86.     <xsl:param  name="nodesToDraw"/>
  87.     <xsl:param  name="currentNodePosition"/>
  88.     <xsl:param  name="levelRefCount"/>
  89.     <xsl:param  name="grandParentCount"/>
  90.     <xsl:param  name="levelOffset"/>
  91.  
  92.     <xsl:param name="x" />
  93.     <xsl:param name="y" />
  94.  
  95.     <xsl:variable name="currentBRName" select="$nodesToDraw[position() = $currentNodePosition]/@businessrule"/>
  96.     <xsl:variable name="currentBRReferences" select="//objects/object[.//macro[starts-with(@name, concat('BusinessRule.',$currentBRName) )]]"/>
  97.  
  98.  
  99.     <!--calculate the x position of the current box and print-->
  100.  
  101.     <xsl:variable name="myX" select="$x + (80 * ($currentNodePosition - 1))" />
  102.     <xsl:variable name="myY" select="$y - 80" />
  103.  
  104.     <vml:roundrect arcsize="20%" style="{concat('LEFT:', $myX ,'px;WIDTH:60px;POSITION:absolute;TOP:' , $myY , 'px;HEIGHT:60px')}"
  105.       strokecolor="#F0F3F3" fillcolor="#F0F3F3" coordsize="21600,21600">
  106.       <vml:fill type="gradient" method="linear sigma" angle="180" color2="#CCCCCC" color="#ffffff"></vml:fill>
  107.       <xsl:value-of select="$currentBRName"/>
  108.       <xsl:value-of select="$x"/>
  109.       <br></br>
  110.       <xsl:value-of select="$levelRefCount"/>
  111.     </vml:roundrect>
  112.  
  113.  
  114.     <xsl:if test="$currentNodePosition &lt; count($nodesToDraw)">
  115.  
  116.       <xsl:call-template name="drawNode">
  117.  
  118.         <xsl:with-param name="nodesToDraw" select="$nodesToDraw"/>
  119.         <xsl:with-param name="currentNodePosition" select="$currentNodePosition + 1"></xsl:with-param>
  120.         <xsl:with-param name="levelRefCount" select="$levelRefCount"/>
  121.         <xsl:with-param name="grandParentCount" select="$grandParentCount"/>
  122.         <xsl:with-param name="levelOffset" select="count($currentBRReferences) + $levelOffset"/>
  123.         <xsl:with-param name="x" select="$x"/>
  124.         <xsl:with-param name="y" select="$y"/>
  125.       </xsl:call-template>
  126.  
  127.     </xsl:if>
  128.  
  129.     <xsl:if test="$currentBRReferences">
  130.  
  131.       <xsl:variable name="skipX" select="$levelOffset * 80"/>
  132.  
  133.       <xsl:call-template name="uprelatedBR">
  134.         <xsl:with-param  name="referncesToMe" select="$currentBRReferences"/>
  135.         <xsl:with-param  name="paramLevelRefCount" select="$grandParentCount"/>
  136.  
  137.         <xsl:with-param  name="x" select="500 + $skipX"/>
  138.         <xsl:with-param  name="y" select="$myY"/>
  139.       </xsl:call-template>
  140.  
  141.     </xsl:if>
  142.  
  143.   </xsl:template>
  144.  
  145.   <xsl:template name="levelReferences">
  146.     <xsl:param  name="nodes" />
  147.  
  148.  
  149.     <!--list of businessrule calls-->
  150.  
  151.     <xsl:variable name="set1" select="//objects/object//macro[starts-with(@name, 'BusinessRule.')]"/>
  152.  
  153.     <!--set of business rule calls to look for-->
  154.     <xsl:variable name="set2" select="$nodes"/>
  155.  
  156.     <!--concatenated business rule calls-->
  157.     <xsl:variable name="currentRuleNames">
  158.       <xsl:for-each select="$set2">
  159.           <xsl:value-of select="concat(',',@businessrule)"/>
  160.       </xsl:for-each>
  161.     </xsl:variable>
  162.  
  163.     <!--count for set1 references to currentRuleNames-->
  164.  
  165.     <xsl:value-of select="count($set1[contains($currentRuleNames,concat(',',substring-after(@name, '.')))])"/>
  166.  
  167.   </xsl:template>
  168. </xsl:stylesheet>
  169.  
the xml file
---------------------

Expand|Select|Wrap|Line Numbers
  1. <objects>
  2.   <object businessrule="Time Check" name="ENT" onsave="yes">
  3.     <macro name="BusinessRule.Check">
  4.       <param name="context"></param>
  5.     </macro>
  6.   </object>
  7.   <object businessrule="Chk" name="Patients Information">
  8.     <macro name="BusinessRule.newtest">
  9.       <param name="context"></param>
  10.     </macro>
  11.   </object>
  12.   <object businessrule="DateChkForENT" name="ENT">
  13.  
  14.     <macro name="BusinessRule.e">
  15.       <param name="context"></param>
  16.     </macro>
  17.     <macro name="BusinessRule.f">
  18.       <param name="context"></param>
  19.     </macro>
  20.   </object>
  21.  
  22.   <object businessrule="dddd" name="BED">
  23.  
  24.     <macro name="BusinessRule.DateChkForENT">
  25.       <param name="context"></param>
  26.     </macro>
  27.   </object>
  28.  
  29.   <object businessrule="ss" name="ENT">
  30.     <macro name="BusinessRule.newtest">
  31.       <param name="context"></param>
  32.     </macro>
  33.   </object>
  34.   <object businessrule="q" name="BED">
  35.     <macro name="BusinessRule.ss">
  36.       <param name="context"></param>
  37.     </macro>
  38.   </object>
  39.  
  40.  
  41.   <object businessrule="newtest" name="Doctors Schedule">
  42.  
  43.     <macro name="BusinessRule.DateChkForENT">
  44.       <param name="context"></param>
  45.     </macro>
  46.   </object>
  47.   <object businessrule="Check" name="ENT" onsave="yes">
  48.  
  49.     <macro name="BusinessRule.DateChkForENT">
  50.       <param name="context"></param>
  51.     </macro>
  52.   </object>
  53.  
  54.   <object businessrule="a" name="Doctors Schedule">
  55.     <macro name="BusinessRule.dddd">
  56.       <param name="context"></param>
  57.     </macro>
  58.   </object>
  59.   <object businessrule="b" name="Registered Patients">
  60.     <macro name="BusinessRule.dddd">
  61.       <param name="context"></param>
  62.     </macro>
  63.   </object>
  64.   <object businessrule="u" name="Registered Patients">
  65.     <macro name="BusinessRule.b">
  66.       <param name="context"></param>
  67.     </macro>
  68.   </object>
  69.   <object businessrule="X" name="ENT">
  70.     <macro name="BusinessRule.a">
  71.       <param name="context"></param>
  72.     </macro>
  73.   </object>
  74.   <object businessrule="y" name="">
  75.     <macro name="BusinessRule.a">
  76.       <param name="context"></param>
  77.     </macro>
  78.   </object>
  79.   <object businessrule="p" name="">
  80.     <macro name="BusinessRule.ss">
  81.       <param name="context"></param>
  82.     </macro>
  83.   </object>
  84.   <object businessrule="r" name="">
  85.     <macro name="BusinessRule.p">
  86.       <param name="context"></param>
  87.     </macro>
  88.   </object>
  89. </objects>
  90.  
OUTPUT
-------------
Expand|Select|Wrap|Line Numbers
  1. FOR UP BUSINESS RULE 5dddd380
  2.  
  3. 3newtest380
  4.  
  5. 3Check380
  6.  
  7. 30Time Check620
  8.  
  9. 52Chk460
  10.  
  11. 5ss460
  12.  
  13. 51q420
  14.  
  15. 2p420
  16.  
  17. 20r460
  18.  
  19. 13a300
  20.  
  21. 5b300
  22.  
  23. 50u540
  24.  
  25. 30X380
  26.  
  27. 3y380
  28.  
  29. 3
  30.  
pls help me
Oct 13 '08 #1
9 2970
Dormilich
8,658 Recognized Expert Moderator Expert
I'm not exactly sure, what you want to count (files too long to read), or what it counts what it should not count or vice versa.

Expand|Select|Wrap|Line Numbers
  1. //count the siblings (excluding the actual element):
  2. count(preceding-sibling::*) + count(following-sibling::*)
  3.  
  4. // count all siblings
  5. count(parent::*/child::*)
  6.  
  7. // count all elements of the same level
  8. /*/*/child::* 
  9. // 3rd level elements
if you could describe your problem in more detail, I may be of more help.

regards

PS please use [code] tags when posting code (especially that much code)
Oct 13 '08 #2
jkmyoung
2,057 Recognized Expert Top Contributor
Can you point out specifically the line of code that's not giving you the result you want?
Also, have you considered using templates with match instead of call?
Might make for neater code.
Oct 14 '08 #3
smarttechie
13 New Member
thanks for ur reply
i am describing in details
i am searching for a entity which has refrences to other entities
like in this case Datechkforent has refrences to dddd & newcheck.
and dddd, new check entity is held by other entities. now the search is recursive search.
what i want to achieve is that Datechkforent has two refrences it will give me the count of 2.
2nd step. now dddd and new test has refrences to a , b, ss it will give me count of three.

in this way i want to achive the count of levels


for ur simplicity the code for searching the entity name
--------------------------------------------------------------------------

[code]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" xmlns:vml="urn: schemas-microsoft-com:vml">
<xsl:output method="xml" omit-xml-declaration="ye s" />
<xsl:param name ="param3">DateC hkForENT</xsl:param>

<xsl:template match="/">
<xsl:call-template name="object" />
</xsl:template>

<xsl:template name="object">

<xsl:for-each select="//objects/object[@businessrule = $param3 and .//macro/param[@name = 'context'or @name = 'objectname'] ]">
<xsl:choose>
<xsl:when test="@business rule = $param3">
FOR UP BUSINESS RULE
<xsl:call-template name="uprelated BR">
<xsl:with-param name="refernces ToMe" select="//objects/object[.//macro[starts-with(@name, concat('Busines sRule.',$param3 ) )]]"/>

</xsl:call-template>


</xsl:when>
</xsl:choose>
</xsl:for-each>

</xsl:template>

<!--Look For UP Relation-->
<xsl:template name="uprelated BR">
<xsl:param name="paramLeve lRefCount"/>
<xsl:param name="refernces ToMe"/>



<xsl:variable name="currentBR Name" select="$nodesT oDraw[position() = $currentNodePos ition]/@businessrule"/>
<xsl:variable name="currentBR References" select="//objects/object[.//macro[starts-with(@name, concat('Busines sRule.',$curren tBRName) )]]"/>




<xsl:value-of select="$curren tBRName"/>
<xsl:if test="$currentB RReferences">

<xsl:call-template name="uprelated BR">
<xsl:with-param name="refernces ToMe" select="$curren tBRReferences"/>
</xsl:call-template>

</xsl:if>

</xsl:template>


</xsl:template>

</xsl:stylesheet>



[code]

the xml file
----------------

<objects>

<object businessrule="D ateChkForENT" name="ENT">

<macro name="BusinessR ule.e">
<param name="context"> </param>
</macro>
<macro name="BusinessR ule.f">
<param name="context"> </param>
</macro>
</object>

<object businessrule="d ddd" name="BED">

<macro name="BusinessR ule.DateChkForE NT">
<param name="context"> </param>
</macro>
</object>

<object businessrule="s s" name="ENT">
<macro name="BusinessR ule.newtest">
<param name="context"> </param>
</macro>
</object>
<object businessrule="q " name="BED">
<macro name="BusinessR ule.ss">
<param name="context"> </param>
</macro>
</object>


<object businessrule="n ewtest" name="Doctors Schedule">

<macro name="BusinessR ule.DateChkForE NT">
<param name="context"> </param>
</macro>
</object>

<object businessrule="b " name="Registere d Patients">
<macro name="BusinessR ule.dddd">
<param name="context"> </param>
</macro>
</object>
<object businessrule="u " name="Registere d Patients">
<macro name="BusinessR ule.b">
<param name="context"> </param>
</macro>
</object>
<object businessrule="p " name="">
<macro name="BusinessR ule.ss">
<param name="context"> </param>
</macro>
</object>
<object businessrule="r " name="">
<macro name="BusinessR ule.p">
<param name="context"> </param>
</macro>
</object>


</objects>





Thanks in advance
waiting for ur reply



I'm not exactly sure, what you want to count (files too long to read), or what it counts what it should not count or vice versa.

Expand|Select|Wrap|Line Numbers
  1. //count the siblings (excluding the actual element):
  2. count(preceding-sibling::*) + count(following-sibling::*)
  3.  
  4. // count all siblings
  5. count(parent::*/child::*)
  6.  
  7. // count all elements of the same level
  8. /*/*/child::* 
  9. // 3rd level elements
if you could describe your problem in more detail, I may be of more help.

regards

PS please use [code] tags when posting code (especially that much code)
Oct 14 '08 #4
smarttechie
13 New Member
thanks for ur reply
i am describing in details
i am searching for a entity which has refrences to other entities
like in this case Datechkforent has refrences to dddd & newcheck.
and dddd, new check entity is held by other entities. now the search is recursive search.
what i want to achieve is that Datechkforent has two refrences it will give me the count of 2.
2nd step. now dddd and new test has refrences to a , b, ss it will give me count of three.

in this way i want to achive the count of levels


for ur simplicity the code for searching the entity name
--------------------------------------------------------------------------

[code]
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0" xmlns:xsl="http ://www.w3.org/1999/XSL/Transform" xmlns:vml="urn: schemas-microsoft-com:vml">
<xsl:output method="xml" omit-xml-declaration="ye s" />
<xsl:param name ="param3">DateC hkForENT</xsl:param>

<xsl:template match="/">
<xsl:call-template name="object" />
</xsl:template>

<xsl:template name="object">

<xsl:for-each select="//objects/object[@businessrule = $param3 and .//macro/param[@name = 'context'or @name = 'objectname'] ]">
<xsl:choose>
<xsl:when test="@business rule = $param3">
FOR UP BUSINESS RULE
<xsl:call-template name="uprelated BR">
<xsl:with-param name="refernces ToMe" select="//objects/object[.//macro[starts-with(@name, concat('Busines sRule.',$param3 ) )]]"/>

</xsl:call-template>


</xsl:when>
</xsl:choose>
</xsl:for-each>

</xsl:template>

<!--Look For UP Relation-->
<xsl:template name="uprelated BR">
<xsl:param name="paramLeve lRefCount"/>
<xsl:param name="refernces ToMe"/>



<xsl:variable name="currentBR Name" select="$nodesT oDraw[position() = $currentNodePos ition]/@businessrule"/>
<xsl:variable name="currentBR References" select="//objects/object[.//macro[starts-with(@name, concat('Busines sRule.',$curren tBRName) )]]"/>




<xsl:value-of select="$curren tBRName"/>
<xsl:if test="$currentB RReferences">

<xsl:call-template name="uprelated BR">
<xsl:with-param name="refernces ToMe" select="$curren tBRReferences"/>
</xsl:call-template>

</xsl:if>

</xsl:template>


</xsl:template>

</xsl:stylesheet>



[code]

the xml file
----------------

<objects>

<object businessrule="D ateChkForENT" name="ENT">

<macro name="BusinessR ule.e">
<param name="context"> </param>
</macro>
<macro name="BusinessR ule.f">
<param name="context"> </param>
</macro>
</object>

<object businessrule="d ddd" name="BED">

<macro name="BusinessR ule.DateChkForE NT">
<param name="context"> </param>
</macro>
</object>

<object businessrule="s s" name="ENT">
<macro name="BusinessR ule.newtest">
<param name="context"> </param>
</macro>
</object>
<object businessrule="q " name="BED">
<macro name="BusinessR ule.ss">
<param name="context"> </param>
</macro>
</object>


<object businessrule="n ewtest" name="Doctors Schedule">

<macro name="BusinessR ule.DateChkForE NT">
<param name="context"> </param>
</macro>
</object>

<object businessrule="b " name="Registere d Patients">
<macro name="BusinessR ule.dddd">
<param name="context"> </param>
</macro>
</object>
<object businessrule="u " name="Registere d Patients">
<macro name="BusinessR ule.b">
<param name="context"> </param>
</macro>
</object>
<object businessrule="p " name="">
<macro name="BusinessR ule.ss">
<param name="context"> </param>
</macro>
</object>
<object businessrule="r " name="">
<macro name="BusinessR ule.p">
<param name="context"> </param>
</macro>
</object>


</objects>


Thanks in advance
Waiting for ur reply


Can you point out specifically the line of code that's not giving you the result you want?
Also, have you considered using templates with match instead of call?
Might make for neater code.
Oct 14 '08 #5
Dormilich
8,658 Recognized Expert Moderator Expert
to get the count for one level you can do (basically)
Expand|Select|Wrap|Line Numbers
  1. <xsl:template name="ref">
  2.     <xsl:param name="ref"/>
  3.     <xsl:variable name="BRref">
  4.         <xsl:text>.</xsl:text>
  5.         <xsl:value-of select="$ref"/>
  6.     </xsl:variable>
  7.     <xsl:value-of select="count(//object[macro[contains(@name, $BRref)]])"(>
  8. </xsl:template>
if you want more levels (following search) you need to call that template again on the next references (have to think about it, yet)

regards
Oct 15 '08 #6
smarttechie
13 New Member
Thanks for ur reply
but i need all the level ref count
thanks

to get the count for one level you can do (basically)
Expand|Select|Wrap|Line Numbers
  1. <xsl:template name="ref">
  2.     <xsl:param name="ref"/>
  3.     <xsl:variable name="BRref">
  4.         <xsl:text>.</xsl:text>
  5.         <xsl:value-of select="$ref"/>
  6.     </xsl:variable>
  7.     <xsl:value-of select="count(//object[macro[contains(@name, $BRref)]])"(>
  8. </xsl:template>
if you want more levels (following search) you need to call that template again on the next references (have to think about it, yet)

regards
Oct 15 '08 #7
Dormilich
8,658 Recognized Expert Moderator Expert
Thanks for ur reply
but i need all the level ref count
I know, but this will get you started, with this code working you could concentrate on the "inheritanc e" rather then the counting.

regards
Oct 15 '08 #8
smarttechie
13 New Member
thanks for ur reply
actually i m new to xml
could u tell me in details


I know, but this will get you started, with this code working you could concentrate on the "inheritanc e" rather then the counting.

regards
Oct 15 '08 #9
Dormilich
8,658 Recognized Expert Moderator Expert
thanks for ur reply
actually i m new to xml
could u tell me in details
actually, your problem is not so much an xml problem but a program design problem. once you know how the program/function shall work (also called algorithm), you "only" have to find the matching language constructs your chosen programming language provides.

example:
algorithm (code):
- store the reference's value (<xsl:variable> ...)
- look it up in the <macro>'s name attribute (macro[contains(@name, $BRref)])
- count it (count(//object[macro[contains(@name, $BRref)]]))

regards
Oct 15 '08 #10

Sign in to post your reply or Sign up for a free account.

Similar topics

3
11292
by: Peter Rohleder | last post by:
Hi, I'm using a style-sheet where I make use of the XPATH-"following-sibling"-expression. The part which makes problems looks similar to the following code: --------------------------- <xsl:for-each select="headdata/extension/person">
6
10606
by: M.Kamermans | last post by:
I have an XSLT script that has to operate on some particularly nasty XML to turn it into a SQL databse, but 'entries' in the XML aren't actually unique, so their unique identifier is useless. I need to somehow create crosslinked tables using the XSLT, but can only do this by maintaining a counter for each line I write. Is there a way to...
7
2284
by: Bill Cohagan | last post by:
I have an XSLT transformation that involves a template with match = "w:p]" What I'm matching on is a w:p element that is: 1.) Within a w:body element (at some level). 2.) Immediately preceeded by an aml:annotation element (whose @w:type is 'Word.Bookmark.Start').
0
1099
by: Elaine | last post by:
I have a truly curious problem with HtmlHelp and Sibling Mode in Visual C++ ..Net 2003 in an MFC app. Sibling mode allows the help viewer to display on top of the app, but if the app is clicked, then the app becomes the top most window. The idea is to let the user switch back and forth between the help viewer and the application. For the...
8
4265
by: Invalidlastname | last post by:
Hi, We are developing an asp.net application, and we dynamically created certain literal controls to represent some read-only text for certain editable controls. However, recently we found an issue which is related to the repeater. In the code shown below, if I call Repeater1.Controls.Count in the OnInit (the code fragment was highlighted in...
2
2784
by: mkalyan79 | last post by:
Hi, I was wondering if there is any particular methods to link the sibling nodes in the binary tree? -K
1
13528
by: mad_a | last post by:
I have a question about XSLT. I am trying to count the number of sibblings a parent node has (of a specific name). Say I have <topNode> <page> text in here</page> <page> text in here</page> <page> text in here</page> <page> text in here <image></image>
3
2741
by: patrizio.trinchini | last post by:
Hi, how can remove sibling elements based on the value of an attribute ? For instance, gven the XML document: <root> <parentElment> <testElement name="A"> <removableElement/>
1
1889
by: mishink7 | last post by:
i am trying to count the number of instances of the given key value in a multi set tree, but i am not getting the correct output..my code is: int count( T const& key_value ) const { int count=0; TreeNode<T>*p=root_; if ( !p ) return 0; while(p) {
0
7512
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7438
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7707
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7951
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
7803
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5362
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5082
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1051
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
751
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.