473,770 Members | 5,284 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Use variables to get unique nodes

Dear Experts,

I got stuck with the following problem and need your help.

What I wnat to do is to get a set of distinct nodes.
Before the distinct I have selected the multiple occourences already
sucsessfully. However , the rest does not work as expected.

Hope someone can help on that.
Rolf

############### ############### # DATA ############### ############### ##

My XML DATA:
<?xml version="1.0" encoding="UTF-8"?>
<Root>
<TEST>
<Pin PinName="A" />
<Pin PinName="B" />
<Pin PinName="B" />
<Pin PinName="C" />
<Pin PinName="X" />
</TEST>
<TEST>
<Pin PinName="A" />
<Pin PinName="D" />
<Pin PinName="C" />
<Pin PinName="X" />
<Pin PinName="A" />
</TEST>
</Root>
My Test XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="text"/>
<xsl:variable name="NewLine" select="'&#x0d; &#x0a;'"/>

<xsl:variable name="TestNodes " select="Root/TEST"/>
<xsl:variable name="MultipleP ins" select="$TestNo des/Pin[@PinName =
preceding::Pin/@PinName]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[@PinName != preceding::*/@PinName]"/>

<xsl:template match="/">
<xsl:value-of select="concat( 'all pins of all test nodes ==>
OK ',$NewLine)"/>
<xsl:for-each select="$TestNo des/Pin">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'multiple pins ==> OK ',$NewLine)"/>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'unique pins ==> NOT GOOD !!
',$NewLine)"/>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>

</xsl:template>

</xsl:stylesheet>

My results (gained by XMLSpy debug mode):

all pins of all test nodes ==> OK
A
B
B
C
X
A
D
C
X
A

multiple pins ==> OK
B
A
C
X
A

unique pins ==> NOT GOOD !!
B
A
C
X
A

( I expected B A C X )
############### ##### End ############### ############### ###
Jul 20 '05 #1
9 2432
Rolf Kemper wrote:
What I wnat to do is to get a set of distinct nodes.
What is "distinct" ? Unique within one TEST node ?
Or Unique within one Root node ?

I wrote a short xmlgawk script, which tries to
reproduce your results. The script even looks
readable to me. Half of it consists of printing
test results:

# distinct_nodes. awk
# comp.text.xml 2004-10-01
# Read all nodes of type pin and find the ones
# which have a unique name attribute.
# JK 2004-10-01

BEGIN {
XMLMODE=1
print "all pins of all test nodes ==>"
}

XMLSTARTELEM == "Pin" {
count[XMLATTR["PinName"]] ++
print XMLATTR["PinName"]
}

END {
print "multiple pins ==>"
for (PinName in count) {
if (count[PinName] > 1)
print PinName, count[PinName]
}
print "unique pins ==>"
for (PinName in count) {
if (count[PinName] == 1)
print PinName, count[PinName]
}
}

all pins of all test nodes ==> OK
A
B
B
C
X
A
D
C
X
A

multiple pins ==> OK
B
A
C
X
A

unique pins ==> NOT GOOD !!
B
A
C
X
A
The results I get are:
all pins of all test nodes ==>
A
B
B
C
X
A
D
C
X
A
multiple pins ==>
A 3
B 2
C 2
X 2
unique pins ==>
D 1
( I expected B A C X )
############### ##### End ############### ############### ###


Why do you expect B A C X ?
No matter how I understand "distinct", I would not
call B A C X "distinct" pins.
BTW: Do the Electrical Engineers at NEC really use XML
for counting their beans .. errhhh pins .. ?
Jul 20 '05 #2
Hi Rolf,

When comparing node-sets it is as well to remember that x != y is not quite
the same as not(x = y).

But anyway, I don't think it's worth trying to do what you want using the
preceding method for obtaining uniques - the Muenchian technique will be
much easier and yield far better performance, e.g.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:key name="kDistinct Pins" match="Pin" use="@PinName"/>

<xsl:variable name="TestNodes " select="Root/TEST/Pin"/>
<xsl:variable name="MultipleP ins"
select="$TestNo des[count(key('kDis tinctPins',@Pin Name)) &gt; 1]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[generate-id() =
generate-id(key('kDistin ctPins',@PinNam e))]"/>

<xsl:template match="/">
<xsl:text>all pins of all test nodes ==> OK </xsl:text>
<xsl:for-each select="$TestNo des">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> mult iple pins ==> OK </xsl:text>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> uniq ue pins ==> OK </xsl:text>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Btw, don't overuse the concat() function - especially not for literal
output... you are just doing concatenation where the transformation engine
will already serialize the output.

HTH
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator
"Rolf Kemper" <Ke*****@ee.nec .de> wrote in message
news:bb******** *************** ***@posting.goo gle.com...
Dear Experts,

I got stuck with the following problem and need your help.

What I wnat to do is to get a set of distinct nodes.
Before the distinct I have selected the multiple occourences already
sucsessfully. However , the rest does not work as expected.

Hope someone can help on that.
Rolf

############### ############### # DATA ############### ############### ##

My XML DATA:
<?xml version="1.0" encoding="UTF-8"?>
<Root>
<TEST>
<Pin PinName="A" />
<Pin PinName="B" />
<Pin PinName="B" />
<Pin PinName="C" />
<Pin PinName="X" />
</TEST>
<TEST>
<Pin PinName="A" />
<Pin PinName="D" />
<Pin PinName="C" />
<Pin PinName="X" />
<Pin PinName="A" />
</TEST>
</Root>
My Test XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="text"/>
<xsl:variable name="NewLine" select="'&#x0d; &#x0a;'"/>

<xsl:variable name="TestNodes " select="Root/TEST"/>
<xsl:variable name="MultipleP ins" select="$TestNo des/Pin[@PinName =
preceding::Pin/@PinName]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[@PinName != preceding::*/@PinName]"/>

<xsl:template match="/">
<xsl:value-of select="concat( 'all pins of all test nodes ==>
OK ',$NewLine)"/>
<xsl:for-each select="$TestNo des/Pin">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'multiple pins ==> OK ',$NewLine)"/>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'unique pins ==> NOT GOOD !!
',$NewLine)"/>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>

</xsl:template>

</xsl:stylesheet>

My results (gained by XMLSpy debug mode):

all pins of all test nodes ==> OK
A
B
B
C
X
A
D
C
X
A

multiple pins ==> OK
B
A
C
X
A

unique pins ==> NOT GOOD !!
B
A
C
X
A

( I expected B A C X )
############### ##### End ############### ############### ###

Jul 20 '05 #3
Hi Jürgen,

thank you for zour feedback.
Let me explain it once again, because my text was a bit weak.
What I need is a list of pins which occour more than once.
As a small hurdle I have to do some preselection by some other
properties before. Therefore the TestNodes.

So, the output should be the opposit of yours.

I have not tried the code provided by Marrow yet, but it explains
somehow what I have done wrong.

However, can you drop me some lines on xmlgawk ?
Can I use this within MSXML4 processor ?
How about schema check ?

As you stated, YES , the example is like counting some beans, but just
for the sake of demonstration. It addresses a very tiny problem of an
5M mixed data set. So my real world is a farm of beans , fruits ,
nuts, vegitables and many other things.
Myself is just creating different dishes out of it. XLST in
combination with XPATH is a great help, as I have to present the same
dish in differrent restaurants (HTML , Text , Exel , Spice ) too.
Finally, just for your valid comment and interest, we do a lot of PERL
scripting usually.

Thanks a lot
Rolf
Jürgen Kahrs <Ju************ *********@vr-web.de> wrote in message news:<2s******* ******@uni-berlin.de>...
Rolf Kemper wrote:
What I wnat to do is to get a set of distinct nodes.


What is "distinct" ? Unique within one TEST node ?
Or Unique within one Root node ?

I wrote a short xmlgawk script, which tries to
reproduce your results. The script even looks
readable to me. Half of it consists of printing
test results:

# distinct_nodes. awk
# comp.text.xml 2004-10-01
# Read all nodes of type pin and find the ones
# which have a unique name attribute.
# JK 2004-10-01

BEGIN {
XMLMODE=1
print "all pins of all test nodes ==>"
}

XMLSTARTELEM == "Pin" {
count[XMLATTR["PinName"]] ++
print XMLATTR["PinName"]
}

END {
print "multiple pins ==>"
for (PinName in count) {
if (count[PinName] > 1)
print PinName, count[PinName]
}
print "unique pins ==>"
for (PinName in count) {
if (count[PinName] == 1)
print PinName, count[PinName]
}
}

all pins of all test nodes ==> OK
A
B
B
C
X
A
D
C
X
A

multiple pins ==> OK
B
A
C
X
A

unique pins ==> NOT GOOD !!
B
A
C
X
A


The results I get are:
all pins of all test nodes ==>
A
B
B
C
X
A
D
C
X
A
multiple pins ==>
A 3
B 2
C 2
X 2
unique pins ==>
D 1
( I expected B A C X )
############### ##### End ############### ############### ###


Why do you expect B A C X ?
No matter how I understand "distinct", I would not
call B A C X "distinct" pins.
BTW: Do the Electrical Engineers at NEC really use XML
for counting their beans .. errhhh pins .. ?

Jul 20 '05 #4
Dear Marrow,

thank you for your good input. Your code is basically working.
But my real world is much more complex, and on top of that my
understanding about match seems to be wrong.
1) I guess macth="Pin" will match Pin at any level of what is
currently selected.
Right ?
2) I still have some problem when I have a kind of preselection and
the node NOT selected has also a Pin which would normally match.
So I have made a more complex code to demonstrate that. Please find it
below.
(have a look to ... select="Root/x/TEST[44 >= @Index and @Index >=
43]" )
Maybe you can explain why this happens.

In case of fail, the $UniqueMultiple Pins node set is empty !!

BTW, you stated that my concat is somehow ineffective. Does this mean
that several TEXT and VALUE-OF elements would be better ?

Thank you very much for your kind help
Rolf
######### new data ############### ##############
<?xml version="1.0" encoding="UTF-8"?>
<Root>
<E>
<!-- If we have the key match with pin only
the xslt does not work. If the maych is at least TEST/Pin
it is OK
-->
<Pin PinName="A" PinClass="T"/>
<!--<Pin PinName="AX" PinClass="T"/> -->
</E>
<x>
<!-- in case the TEST node below is not selected by Index
AND PinName="A" and CellType="M" matches
the result is wrong
-->
<TEST Index="42" CellType="M">
<Pin PinName="z" PinClass="R"/>
<!--<Pin PinName="AX" PinClass="T"/>-->
<Pin PinName="A" PinClass="T"/>
</TEST>
<TEST Index="43" CellType="M">
<Pin PinName="A" PinClass="T"/>
<Pin PinName="D" PinClass="R"/>
<Pin PinName="C" PinClass="R"/>
<Pin PinName="X" PinClass="R"/>
</TEST>
<TEST Index="44" CellType="M">
<Pin PinName="D" PinClass="R"/>
<Pin PinName="C" PinClass="R"/>
<Pin PinName="X" PinClass="R"/>
<Pin PinName="A" PinClass="T"/>
</TEST>
<TEST Index="45" CellType="M">
<Pin PinName="z" PinClass="R"/>
</TEST>
</x>
</Root>

############# new xslt ############### ############### ##############

<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:key name="kDistinct Pins" match="TEST/Pin" use="@PinName"/>

<!-- @Index >= 43 fails , @Index >= 42 OK -->
<xsl:variable name="Selected" select="Root/x/TEST[44 >= @Index and
@Index >= 43]"/>
<xsl:variable name="Macros" select="$Select ed[@CellType='M']"/>
<xsl:variable name="TopNetPin s"
select="$Macros/Pin[@PinClass='T']"/>
<xsl:variable name="MultipleP ins"
select="$TopNet Pins[count(key('kDis tinctPins',@Pin Name)) &gt; 1]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[generate-id() =
generate-id(key('kDistin ctPins',@PinNam e))]"/>

<xsl:template match="/">
<xsl:text>all pins of all test nodes ==> OK </xsl:text>
<xsl:for-each select="$TopNet Pins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> mult iple pins ==> OK </xsl:text>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> uniq ue pins ==> OK </xsl:text>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

########## end ############### ####
"Marrow" <ma****@somewhe re.so.fu> wrote in message news:<Fu******* *********@newsf e1-gui.ntli.net>.. .
Hi Rolf,

When comparing node-sets it is as well to remember that x != y is not quite
the same as not(x = y).

But anyway, I don't think it's worth trying to do what you want using the
preceding method for obtaining uniques - the Muenchian technique will be
much easier and yield far better performance, e.g.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:key name="kDistinct Pins" match="Pin" use="@PinName"/>

<xsl:variable name="TestNodes " select="Root/TEST/Pin"/>
<xsl:variable name="MultipleP ins"
select="$TestNo des[count(key('kDis tinctPins',@Pin Name)) &gt; 1]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[generate-id() =
generate-id(key('kDistin ctPins',@PinNam e))]"/>

<xsl:template match="/">
<xsl:text>all pins of all test nodes ==> OK </xsl:text>
<xsl:for-each select="$TestNo des">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> mult iple pins ==> OK </xsl:text>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> uniq ue pins ==> OK </xsl:text>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Btw, don't overuse the concat() function - especially not for literal
output... you are just doing concatenation where the transformation engine
will already serialize the output.

HTH
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator
"Rolf Kemper" <Ke*****@ee.nec .de> wrote in message
news:bb******** *************** ***@posting.goo gle.com...
Dear Experts,

I got stuck with the following problem and need your help.

What I wnat to do is to get a set of distinct nodes.
Before the distinct I have selected the multiple occourences already
sucsessfully. However , the rest does not work as expected.

Hope someone can help on that.
Rolf

############### ############### # DATA ############### ############### ##

My XML DATA:
<?xml version="1.0" encoding="UTF-8"?>
<Root>
<TEST>
<Pin PinName="A" />
<Pin PinName="B" />
<Pin PinName="B" />
<Pin PinName="C" />
<Pin PinName="X" />
</TEST>
<TEST>
<Pin PinName="A" />
<Pin PinName="D" />
<Pin PinName="C" />
<Pin PinName="X" />
<Pin PinName="A" />
</TEST>
</Root>
My Test XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="text"/>
<xsl:variable name="NewLine" select="'&#x0d; &#x0a;'"/>

<xsl:variable name="TestNodes " select="Root/TEST"/>
<xsl:variable name="MultipleP ins" select="$TestNo des/Pin[@PinName =
preceding::Pin/@PinName]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[@PinName != preceding::*/@PinName]"/>

<xsl:template match="/">
<xsl:value-of select="concat( 'all pins of all test nodes ==>
OK ',$NewLine)"/>
<xsl:for-each select="$TestNo des/Pin">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'multiple pins ==> OK ',$NewLine)"/>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'unique pins ==> NOT GOOD !!
',$NewLine)"/>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>

</xsl:template>

</xsl:stylesheet>

My results (gained by XMLSpy debug mode):

all pins of all test nodes ==> OK
A
B
B
C
X
A
D
C
X
A

multiple pins ==> OK
B
A
C
X
A

unique pins ==> NOT GOOD !!
B
A
C
X
A

( I expected B A C X )
############### ##### End ############### ############### ###

Jul 20 '05 #5
Marrow,

sorry I forgot one important thing. The constants 44,43 etc. used in
the preselection are actually variables in my case and must probaly
also be used in the key. But I think it is not allowed to have
variables in the match attribute!
This make it probably even more difficult.

Thanks
Rolf
"Marrow" <ma****@somewhe re.so.fu> wrote in message news:<Fu******* *********@newsf e1-gui.ntli.net>.. .
Hi Rolf,

When comparing node-sets it is as well to remember that x != y is not quite
the same as not(x = y).

But anyway, I don't think it's worth trying to do what you want using the
preceding method for obtaining uniques - the Muenchian technique will be
much easier and yield far better performance, e.g.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:key name="kDistinct Pins" match="Pin" use="@PinName"/>

<xsl:variable name="TestNodes " select="Root/TEST/Pin"/>
<xsl:variable name="MultipleP ins"
select="$TestNo des[count(key('kDis tinctPins',@Pin Name)) &gt; 1]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[generate-id() =
generate-id(key('kDistin ctPins',@PinNam e))]"/>

<xsl:template match="/">
<xsl:text>all pins of all test nodes ==> OK </xsl:text>
<xsl:for-each select="$TestNo des">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> mult iple pins ==> OK </xsl:text>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> uniq ue pins ==> OK </xsl:text>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Btw, don't overuse the concat() function - especially not for literal
output... you are just doing concatenation where the transformation engine
will already serialize the output.

HTH
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator
"Rolf Kemper" <Ke*****@ee.nec .de> wrote in message
news:bb******** *************** ***@posting.goo gle.com...
Dear Experts,

I got stuck with the following problem and need your help.

What I wnat to do is to get a set of distinct nodes.
Before the distinct I have selected the multiple occourences already
sucsessfully. However , the rest does not work as expected.

Hope someone can help on that.
Rolf

############### ############### # DATA ############### ############### ##

My XML DATA:
<?xml version="1.0" encoding="UTF-8"?>
<Root>
<TEST>
<Pin PinName="A" />
<Pin PinName="B" />
<Pin PinName="B" />
<Pin PinName="C" />
<Pin PinName="X" />
</TEST>
<TEST>
<Pin PinName="A" />
<Pin PinName="D" />
<Pin PinName="C" />
<Pin PinName="X" />
<Pin PinName="A" />
</TEST>
</Root>
My Test XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="text"/>
<xsl:variable name="NewLine" select="'&#x0d; &#x0a;'"/>

<xsl:variable name="TestNodes " select="Root/TEST"/>
<xsl:variable name="MultipleP ins" select="$TestNo des/Pin[@PinName =
preceding::Pin/@PinName]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[@PinName != preceding::*/@PinName]"/>

<xsl:template match="/">
<xsl:value-of select="concat( 'all pins of all test nodes ==>
OK ',$NewLine)"/>
<xsl:for-each select="$TestNo des/Pin">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'multiple pins ==> OK ',$NewLine)"/>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'unique pins ==> NOT GOOD !!
',$NewLine)"/>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>

</xsl:template>

</xsl:stylesheet>

My results (gained by XMLSpy debug mode):

all pins of all test nodes ==> OK
A
B
B
C
X
A
D
C
X
A

multiple pins ==> OK
B
A
C
X
A

unique pins ==> NOT GOOD !!
B
A
C
X
A

( I expected B A C X )
############### ##### End ############### ############### ###

Jul 20 '05 #6
Hi Rolf,

First off...
BTW, you stated that my concat is somehow ineffective. Does this mean
that several TEXT and VALUE-OF elements would be better ?
Yes, it is actually more efficient during execution (in all transformation
engines i have come across) to do several <xsl:text>'s and <xsl:value-of>'s
than one <xsl:value-of> with a concat(). The reason is that concat() is an
operation that takes time - and an operation that the transformation was
intending to do anyway... so you are almost doing the same thing twice by
having things like <xsl:value-of select="concat( 'literal',value ,...)"/>.
Much the same as in many computer lanuguages - where you would avoid
concatenations - especially repeated concantenations of literal/static text.

If you reduce it to a simple test...

<?xml version="1.0"?>
<root>
<item>xxxxxxxxx xxxx</item>
<item>xxxxxxxxx xxxx</item>
<item>xxxxxxxxx xxxx</item>
<item>xxxxxxxxx xxxx</item>
<item>xxxxxxxxx xxxx</item>
<item>xxxxxxxxx xxxx</item>
<item>xxxxxxxxx xxxx</item>
<item>xxxxxxxxx xxxx</item>
<item>xxxxxxxxx xxxx</item>
<item>xxxxxxxxx xxxx</item>
<!-- repeat a few thousand times -->
</root>

and run these two stylesheets as comparisons...

<?xml version="1.0"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="root/item">
<xsl:text>Ite m: </xsl:text>
<xsl:value-of select="."/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

and...

<?xml version="1.0"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:for-each select="root/item">
<xsl:value-of select="concat( 'Item: ',.,' ')"/>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

on MSXML 4.0, which you mentioned, the first stylesheet only takes only
about 30% of the time it takes for the second stylesheet.
And the main problem...
1) I guess macth="Pin" will match Pin at any level of what is
currently selected.
Right ?
Correct - so as with any match pattern you keep specifying it from right to
left until it matches the required nodes. As you have done.
2) I still have some problem when I have a kind of preselection and
the node NOT selected has also a Pin which would normally match.
So I have made a more complex code to demonstrate that. Please find it
below.
(have a look to ... select="Root/x/TEST[44 >= @Index and @Index >=
43]" )
Maybe you can explain why this happens.
You need to have a pretty good understanding of how the Muenchian technique
works... it works by saying "is this node the same as the first occurence of
these nodes with this specific value". Therefore, any filtering needs to be
applied consistently for it to work correctly.

Filtering whilst trying to distincts can be tricky at the best of times -
and would be far more tricky (with hideously complex XPaths) if trying to
persue the preceding method of finding distincts.

If you use keys, you will be able to do some of the filtering within the
keys - by making the selection filter part of the key selection value. And
it is as well to learn keys and become very familiar with them - as they are
extremely powerful and useful.
The down side to keys is that you cannot use variables in the @select -
which means any selective filtering needs to be placed as a value in the
select and then passed into the key() value. Which means you could do your
@CellType and @PinClass filtering within the keys - but the comparator on
@Index would be impossible... so that would need to be added consistently as
a predicate filter.

Something like...
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:param name="idx_from" select="43"/>
<xsl:param name="idx_to" select="44"/>
<xsl:param name="cell_type " select="'M'"/>
<xsl:param name="pin_class " select="'T'"/>
<xsl:output method="text"/>

<!-- define a key that is capable of doing some of the filtering by
passing in key selection values -->
<xsl:key name="kSelectPi ns" match="TEST/Pin"
use="concat(../@CellType,'|',@ PinClass)"/>

<!-- define the key that will filter and be used for finding distincts
with that filtering applied -->
<xsl:key name="kDistinct Pins" match="TEST/Pin"
use="concat(../@CellType,'|',@ PinClass,'|',@P inName)"/>

<xsl:variable name="TopNetPin s"
select="key('kS electPins',conc at($cell_type,' |',$pin_class))[../@Index &gt;=
$idx_from and ../@Index &lt;= $idx_to]"/>
<xsl:variable name="MultipleP ins"
select="$TopNet Pins[count(key('kDis tinctPins',conc at(../@CellType,'|',@ PinCl
ass,'|',@PinNam e))[../@Index &gt;= $idx_from and ../@Index &lt;= $idx_to])
&gt; 1]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[generate-id() =
generate-id(key('kDistin ctPins',concat( ../@CellType,'|',@ PinClass,'|',@P inNa
me))[../@Index &gt;= $idx_from and ../@Index &lt;= $idx_to])]"/>

<xsl:template match="/">
<xsl:text>all pins of all test nodes ==> OK </xsl:text>
<xsl:for-each select="$TopNet Pins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> mult iple pins ==> OK </xsl:text>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> uniq ue pins ==> OK </xsl:text>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
And yes, I have used concat() a fair bit - but not for serializing output.
;)

HTH
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator

"Rolf Kemper" <Ke*****@ee.nec .de> wrote in message
news:bb******** *************** ***@posting.goo gle.com... Dear Marrow,

thank you for your good input. Your code is basically working.
But my real world is much more complex, and on top of that my
understanding about match seems to be wrong.
1) I guess macth="Pin" will match Pin at any level of what is
currently selected.
Right ?
2) I still have some problem when I have a kind of preselection and
the node NOT selected has also a Pin which would normally match.
So I have made a more complex code to demonstrate that. Please find it
below.
(have a look to ... select="Root/x/TEST[44 >= @Index and @Index >=
43]" )
Maybe you can explain why this happens.

In case of fail, the $UniqueMultiple Pins node set is empty !!

BTW, you stated that my concat is somehow ineffective. Does this mean
that several TEXT and VALUE-OF elements would be better ?

Thank you very much for your kind help
Rolf
######### new data ############### ##############
<?xml version="1.0" encoding="UTF-8"?>
<Root>
<E>
<!-- If we have the key match with pin only
the xslt does not work. If the maych is at least TEST/Pin
it is OK
-->
<Pin PinName="A" PinClass="T"/>
<!--<Pin PinName="AX" PinClass="T"/> -->
</E>
<x>
<!-- in case the TEST node below is not selected by Index
AND PinName="A" and CellType="M" matches
the result is wrong
-->
<TEST Index="42" CellType="M">
<Pin PinName="z" PinClass="R"/>
<!--<Pin PinName="AX" PinClass="T"/>-->
<Pin PinName="A" PinClass="T"/>
</TEST>
<TEST Index="43" CellType="M">
<Pin PinName="A" PinClass="T"/>
<Pin PinName="D" PinClass="R"/>
<Pin PinName="C" PinClass="R"/>
<Pin PinName="X" PinClass="R"/>
</TEST>
<TEST Index="44" CellType="M">
<Pin PinName="D" PinClass="R"/>
<Pin PinName="C" PinClass="R"/>
<Pin PinName="X" PinClass="R"/>
<Pin PinName="A" PinClass="T"/>
</TEST>
<TEST Index="45" CellType="M">
<Pin PinName="z" PinClass="R"/>
</TEST>
</x>
</Root>

############# new xslt ############### ############### ##############

<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:key name="kDistinct Pins" match="TEST/Pin" use="@PinName"/>

<!-- @Index >= 43 fails , @Index >= 42 OK -->
<xsl:variable name="Selected" select="Root/x/TEST[44 >= @Index and
@Index >= 43]"/>
<xsl:variable name="Macros" select="$Select ed[@CellType='M']"/>
<xsl:variable name="TopNetPin s"
select="$Macros/Pin[@PinClass='T']"/>
<xsl:variable name="MultipleP ins"
select="$TopNet Pins[count(key('kDis tinctPins',@Pin Name)) &gt; 1]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[generate-id() =
generate-id(key('kDistin ctPins',@PinNam e))]"/>

<xsl:template match="/">
<xsl:text>all pins of all test nodes ==> OK </xsl:text>
<xsl:for-each select="$TopNet Pins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> mult iple pins ==> OK </xsl:text>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> uniq ue pins ==> OK </xsl:text>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>

########## end ############### ####
"Marrow" <ma****@somewhe re.so.fu> wrote in message

news:<Fu******* *********@newsf e1-gui.ntli.net>.. .
Hi Rolf,

When comparing node-sets it is as well to remember that x != y is not quite the same as not(x = y).

But anyway, I don't think it's worth trying to do what you want using the preceding method for obtaining uniques - the Muenchian technique will be
much easier and yield far better performance, e.g.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform">
<xsl:output method="text"/>

<xsl:key name="kDistinct Pins" match="Pin" use="@PinName"/>

<xsl:variable name="TestNodes " select="Root/TEST/Pin"/>
<xsl:variable name="MultipleP ins"
select="$TestNo des[count(key('kDis tinctPins',@Pin Name)) &gt; 1]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[generate-id() =
generate-id(key('kDistin ctPins',@PinNam e))]"/>

<xsl:template match="/">
<xsl:text>all pins of all test nodes ==> OK </xsl:text>
<xsl:for-each select="$TestNo des">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> mult iple pins ==> OK </xsl:text>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:text> uniq ue pins ==> OK </xsl:text>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="@PinNam e"/>
<xsl:text> </xsl:text>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>
Btw, don't overuse the concat() function - especially not for literal
output... you are just doing concatenation where the transformation engine will already serialize the output.

HTH
Marrow
http://www.marrowsoft.com - home of Xselerator (XSLT IDE and debugger)
http://www.topxml.com/Xselerator
"Rolf Kemper" <Ke*****@ee.nec .de> wrote in message
news:bb******** *************** ***@posting.goo gle.com...
Dear Experts,

I got stuck with the following problem and need your help.

What I wnat to do is to get a set of distinct nodes.
Before the distinct I have selected the multiple occourences already
sucsessfully. However , the rest does not work as expected.

Hope someone can help on that.
Rolf

############### ############### # DATA ############### ############### ##

My XML DATA:
<?xml version="1.0" encoding="UTF-8"?>
<Root>
<TEST>
<Pin PinName="A" />
<Pin PinName="B" />
<Pin PinName="B" />
<Pin PinName="C" />
<Pin PinName="X" />
</TEST>
<TEST>
<Pin PinName="A" />
<Pin PinName="D" />
<Pin PinName="C" />
<Pin PinName="X" />
<Pin PinName="A" />
</TEST>
</Root>
My Test XSLT:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:styleshe et version="1.0"
xmlns:xsl="http ://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format">
<xsl:output method="text"/>
<xsl:variable name="NewLine" select="'&#x0d; &#x0a;'"/>

<xsl:variable name="TestNodes " select="Root/TEST"/>
<xsl:variable name="MultipleP ins" select="$TestNo des/Pin[@PinName =
preceding::Pin/@PinName]"/>
<xsl:variable name="UniqueMul tiplePins"
select="$Multip lePins[@PinName != preceding::*/@PinName]"/>

<xsl:template match="/">
<xsl:value-of select="concat( 'all pins of all test nodes ==>
OK ',$NewLine)"/>
<xsl:for-each select="$TestNo des/Pin">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'multiple pins ==> OK ',$NewLine)"/>
<xsl:for-each select="$Multip lePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>
<xsl:value-of select="$NewLin e"/>

<xsl:value-of select="concat( 'unique pins ==> NOT GOOD !!
',$NewLine)"/>
<xsl:for-each select="$Unique MultiplePins">
<xsl:value-of select="concat( @PinName,$NewLi ne)"/>
</xsl:for-each>

</xsl:template>

</xsl:stylesheet>

My results (gained by XMLSpy debug mode):

all pins of all test nodes ==> OK
A
B
B
C
X
A
D
C
X
A

multiple pins ==> OK
B
A
C
X
A

unique pins ==> NOT GOOD !!
B
A
C
X
A

( I expected B A C X )
############### ##### End ############### ############### ###

Jul 20 '05 #7
Rolf Kemper wrote:
However, can you drop me some lines on xmlgawk ?
xmlgawk currently has the status of an experimental
extension of GNU Awk. You can find more information
about it in my posting in the newsgroup comp.lang.awk:

http://groups.google.de/groups?hl=de...erlin.de#link1

I have just started writing some GNU-like doc about it
but the doc is not ready yet. Until then, Stefan Tramm's
description may be helpful:

http://homepage.mac.com/stefan.tramm...awkMacOSX.html
Can I use this within MSXML4 processor ?
I don't know too much about XML tools in the Microsoft Universe.
How about schema check ?
xmlgawk is not meant to validate XML files.
xmlgawk does not use a DOM representation (although
Manuel Collado has written one in xmlgawk). Are you
sure you need a DOM-representation to do your work ?
My experience is that users often over-estimate the
need for a DOM. But I am ready to be convinced.
As you stated, YES , the example is like counting some beans, but just
for the sake of demonstration. It addresses a very tiny problem of an
5M mixed data set. So my real world is a farm of beans , fruits ,
nuts, vegitables and many other things.
XML files with several MB of data, sounds interesting.
How long does it take your XSL processor to do a run
over these files ? Several seconds or more ? I am asking
because I am interested in finding out typical uses of
XML files (outside web design), including turnaround times.
Myself is just creating different dishes out of it. XLST in
combination with XPATH is a great help, as I have to present the same
dish in differrent restaurants (HTML , Text , Exel , Spice ) too.


Spice ! Is this data-flow typical for industrial environments ?
If so, I would take this as an indication that XML has definitely
broken out of the web design niche.

Thanks for posting such an interesting use-case.
Jul 20 '05 #8
Hi Juergen,

thank you for your info about xmlgawk and sorry for late reply.

Concerning XML in general my imagination is this:

1) XML is much more than just another web technology.
It is a data carrier !

2) As it really separates data from formats it is very helpfull for
data exchange. In my opinion it has the potential to make a lot of
specific conveters obsolete.
Example:
We store a lot of data in just one XML which is about 5M.
Than we compile different 'VIEWS' out of this big data set.
It takes some seconds usually, but this is totally OK as we do not
need realetime web services for thousands of users simultaniously.
If you create an Ecell sheet and store it as xml you will see how you
can easily create such a file with an xslt. Means we select certain
information out of the big xml and prersent it in Ecell.
Onother one may need a top level spice representation of some data. So
we can again select the required information and present this a text
(formated as spice).

3) I'm quite fed up with smal text files which store different values
(parameters , configurations , etc. ) in nearly each format you can
think of.
Doing this small files in XML makes a big progress as you now deal
with a standarized structure.
On top of that you can have a schema file which excactly specifies
what exact structure and data range is allowed. Means if you create a
new config you have a formal check BEFORE you get to the application!
Just now some colleage told me that first EDA tool vendors use XML for
such config files.

Hope that helps to understand our interest in xml

Rolf

Jürgen Kahrs <Ju************ *********@vr-web.de> wrote in message news:<2s******* ******@uni-berlin.de>...
Rolf Kemper wrote:
However, can you drop me some lines on xmlgawk ?


xmlgawk currently has the status of an experimental
extension of GNU Awk. You can find more information
about it in my posting in the newsgroup comp.lang.awk:

http://groups.google.de/groups?hl=de...erlin.de#link1

I have just started writing some GNU-like doc about it
but the doc is not ready yet. Until then, Stefan Tramm's
description may be helpful:

http://homepage.mac.com/stefan.tramm...awkMacOSX.html
Can I use this within MSXML4 processor ?


I don't know too much about XML tools in the Microsoft Universe.
How about schema check ?


xmlgawk is not meant to validate XML files.
xmlgawk does not use a DOM representation (although
Manuel Collado has written one in xmlgawk). Are you
sure you need a DOM-representation to do your work ?
My experience is that users often over-estimate the
need for a DOM. But I am ready to be convinced.
As you stated, YES , the example is like counting some beans, but just
for the sake of demonstration. It addresses a very tiny problem of an
5M mixed data set. So my real world is a farm of beans , fruits ,
nuts, vegitables and many other things.


XML files with several MB of data, sounds interesting.
How long does it take your XSL processor to do a run
over these files ? Several seconds or more ? I am asking
because I am interested in finding out typical uses of
XML files (outside web design), including turnaround times.
Myself is just creating different dishes out of it. XLST in
combination with XPATH is a great help, as I have to present the same
dish in differrent restaurants (HTML , Text , Exel , Spice ) too.


Spice ! Is this data-flow typical for industrial environments ?
If so, I would take this as an indication that XML has definitely
broken out of the web design niche.

Thanks for posting such an interesting use-case.

Jul 20 '05 #9
Rolf Kemper wrote:
Hope that helps to understand our interest in xml


Yes, thanks for your detailed report.
I am currently writing the doc for xmlgawk
and I am still searching for some examples
_other_ than web pages or text documents.
Could you send me a trivial example file
which reflects your typical data flow ?
Jul 20 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

15
2195
by: les_ander | last post by:
Hi, I have many set objects some of which can contain same group of object while others can be subset of the other. Given a list of sets, I need to get a list of unique sets such that non of the set is an subset of another or contain exactly the same members. Tried to do the following: s1=set() s2=set() s3=set()
2
5256
by: Brad | last post by:
Hi everyone, I've been using ASP on a few different projects over the past year, either using Javascript or VBScript. During that time, I've made use of session variables, but even then, I've tried to keep those variables to a minimum (which is not always easy). I've also read on many ASP resource sites (such as fuzzysoftware.com, etc) that the use of session variables can be a no-no, while others say that it's perfectly valid to use...
8
2024
by: Derek Fountain | last post by:
I'm having trouble understanding the use of XSLT variables. I'm trying to add up the values from a set of elements. The code currently looks like this: <xsl:variable name="orderTotal"> <xsl:value-of select="0" /> </xsl:variable> <xsl:for-each select="item"> <xsl:variable name="orderTotal">
3
2710
by: Kilroy Programmer | last post by:
Is there a way to store a unique numeric identifier (say, for example, an int) into a TreeNode, so that when the TreeNode is checked (since CheckBoxes is enabled) the eventhandler AfterCheck() can examine the responsible Node's identifier to see which TreeNode triggered the event? Analyzing the Node's Text string is undesirable because it would mean performing a string compare to a set of predefined strings. This is slower and not easily...
5
4478
by: Newton | last post by:
Hi, I got here the following problem. I am programming web application for examing students. After student will log on I need to keep his ID, Privileges, Login, Password for manipulating with other functions. All these information I will keep by Session = "2" Session = "Student"
8
1947
by: Floris van Haaster | last post by:
Hi All! I have a question, i have a web application and I store some member information in a variable i declared in a module like: Public some_info_variable as string in module1.vb But when another user comes to my website he is getting the same values from the variable!!!
9
1738
by: Gary Wessle | last post by:
Hi I am calling a class method on many objects of that class alternately. the class needs to make available "remember" values of variables of said method for each object separetly when the object calls the method again. I can't make those variables static inside the method because it will hold its value for all objects without discrimination.
26
3617
by: BillE | last post by:
Some ASP.NET applications use Session Variables extensively to maintain state. These should be re-written to use viewstate, hidden fields, querystring, etc. instead. This is because if a user opens a new IE window with Ctrl-N or File-New-Window, BOTH WINDOWS SHARE THE SAME SESSION VARIABLES. This cannot be prevented.
1
3655
by: Daniel Hilgarth | last post by:
Hello, I am currently trying to use XSLT for the creation of multiple HTML-files from a single XML-File. This HTML-files need to have links to each other. The following information might be important: There are some special nodes that will start a new HTML-page ("page-nodes"). Those nodes can be nested. Those nodes have an attribute "name" which is not necessarily unique. There are another special nodes that will create a link in one...
0
9591
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9425
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10053
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9867
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6676
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5449
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3969
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3573
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2816
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.