Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

XML, adding booleans

Name: Anonymous 2010-01-27 22:50

Hay /prog/ I'm new to using XML, and it sucks.  But that's neither here nor there.  My question is, is there any way to add boolean values together in it?

For example, <xsl:value-of select="Some/Thing [@id = '7'] != '' + Some/Thing/Else !=''" /> to get a 2, 1 or 0.

Name: Anonymous 2010-01-27 23:34

If you made your DTD properly then it's a cinch.

Name: Anonymous 2010-01-28 0:12

>>2
I just did some quick research on the subject and I'm not sure how it would help.  Could you please elaborate?

Clarification: I have no control over the XML output. I'm just working on a .xsl file to parse it.

Name: Anonymous 2010-01-28 7:49

You are confused. XML doesn't do any computions. XML is used only to markup data. To do what you want, you would need a programming language that uses XML grammar. I'm not sure any exists at the moment.

Name: Anonymous 2010-01-28 12:23

>>4
Heard of XSLT?

Don't change these.
Name: Email:
Entire Thread Thread List