Wrox Programmer Forums
Go Back   Wrox Programmer Forums > XML > XSLT
XSLT General questions and answers about XSLT. For issues strictly specific to the book XSLT 1.1 Programmers Reference, please post to that forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the XSLT section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old April 17th, 2007, 07:08 PM
Registered User
Join Date: Apr 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trying to understand this line of code

Hi gurus,

This might be a very simple question to you guys, but I can't find any example demostrating the following "-" operator infront of an variable from the internet. So I am assuming ResultNumber = 9 which the - operator subtract 1? Please correct my understanding. Thanks

ResNumber = 10.

<ResultNumber><xsl:value-of select="-$ResNumber"/></ResultNumber>

Old April 17th, 2007, 10:09 PM
mhkay's Avatar
Wrox Author
Join Date: Apr 2004
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts

"-" here is a unary minus operator. If $x is 10, then -$x is -10.

Michael Kay
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Old April 17th, 2007, 10:48 PM
Registered User
Join Date: Apr 2007
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks again michael! I gotta buy your book to learn more of XSLT, currently I am working on an integration project which I need to understand what the xslt code do. I don't have any xslt knowledge before this and I only started learning 3 weeks ago.

Similar Threads
Thread Thread Starter Forum Replies Last Post
understand a piece of code in assembler rbulus BOOK: Professional Assembly Language 1 January 10th, 2010 07:45 AM
can't understand this code I downloaded am6019a VB How-To 1 July 7th, 2006 09:11 AM
Can someone help me understand Quake III's code PaRaDoX C++ Programming 2 March 23rd, 2005 08:09 PM
i need to understand this wrox code saudyonline General .NET 2 October 31st, 2004 12:07 PM
Continuing a line of code in C++ kevin777 C++ Programming 5 January 25th, 2004 05:14 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.