.NET Framework - XSL Math

Asked By Eric
30-Jan-10 05:41 PM
How do I use XSL to calculate a value relative to other values?
I start with XML fields that look something like this:

Then I start on processing at the A level and process each lower item
recursively:

()" />
$total_amount) * 100,'##0.00')" />

Now, on each I have the amount, and the total for all B, and the
percentage of the total, and the position.
This is the simple version, hopefully enough to figure out what I am
doing.  There is a lot more code in this stylesheet.  Now, I am using
these values to build a pie.  I have the calculated values to draw the
pie, with the start and end points of each percentage around the edge
of the pie.  First, if I take the midpoint of each pie piece, I want
to know which quadrant it is in (0-25%,25-50%,50-75%,75-100%).  Then
the tricky part.  I want to know how many midpoints of other pie
pieces fall before and after the current pie piece in that quadrant
(if quadrant 1 or 3 get count of pieces in quadrant 3 with lower
percentage, if quadrant 2 or 4 get count of pieces in quadrant 2 or 4
with higher percentage).
Mistype
(1)
Midpoint
(1)
Quadrant
(1)
XSL
(1)
XML
(1)
  Martin Honnen replied to Eric
29-Jan-10 12:31 PM
With above XML input, with a template matching "A" elements, the
expression "A/D/text()" does not select anything at all as your "A"
element does not contain any "A" child elements. So the sum would give
zero. Is that what you want to achieve?

--

Martin Honnen --- MVP XML
http://msmvps.com/blogs/martin_honnen/
  Eric replied to Martin Honnen
30-Jan-10 05:41 PM
Mistype:
should be:

(which should have been obvious since I said we are at the A level, and
A does not contain any D elements)
Create New Account
help
OT: Cartesian Coordinate Quadrant Question. .NET Framework Hello Newsgroup, Other than creating an application in C# 3.5 SP1, this question is more mathematical. I have a function that returns the quadrant of an angle (in radians), as a number, being 1, 2, 3, or 4. My question being is what quadrant is the positive x-axis in? Or what is it taken to be in? I it through the cos, sin, calculation test yields; x = 1; y = 0, and Googling "what quadrant is positive x axis", yields multitudes of Geometry, Trigonometry, Cartesian Coordinate, papers none of which to think of, are any of the axis (+x, +y, -x, -y) categorised in a quadrant? My apologies for the off topic. Thanks and regards, - - Db (D Flat) C# Discussions Geometry (1) Coordinates (1) Quadrant (1) Euclid (1) Mike (1) Multitudes (1) Hemisphere (1) Abundance (1) I would say that a given point on an axis is "in" neither quadrant. However, when working on an app that needs something like you are doing, it is probably best to return a point of, for example, (-5, 0) as being both in quadrant II and quadrant III. Think of a mapping application. If your map is showing the
Hyperlink to an a midpoint on an external page .NET Framework How do I hyperlink to a specific point on find that word? Thanx Harmz Expression Web Designer Discussions Symonds (1) Weiss (1) Bookmark (1) Midpoint (1) Glossary (1) Alphabet (1) What you need is a bookmark: This can also be will be deleted unread. http: / / www.rxs-enterprises.org / fp keywords: Hyperlink, to, an, a, midpoint, on, an, external, page description: How do I hyperlink to a specific point on a
button into 4 quadrants so that I can define forecolor, font and text for each quadrant. That would look like this: Dim B1 As VirtKeyboardKey B1.Text = "" (ist immer leer) B1 button into 4 quadrants so that I can define forecolor, font and text for each quadrant. Tha