[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Newbie: Extracting and evaluating partial values from

Subject: Newbie: Extracting and evaluating partial values from elements
From: Jeff Hooker <jeff@xxxxxxxxxxxx>
Date: Mon, 22 Oct 2007 09:32:03 -0700 (PDT)
 Newbie: Extracting and evaluating partial values from
Hi all,

I'm trying to take 32-bit registers that have been documented as
follows:

<?xml version="1.0" encoding="UTF-8"?>
<register>
<bit_postion>31:12</bit_postion>
    <bit_postiont>11:9</bit_postion>
<bit_postion>8</bit_postion>
    <bit_postion>7</bit_postion>
<bit_postion>6:1</bit_postion>
    <bit_postion>0</bit_postion>
</register>
and turn them into a 32-column table where the number of bits in each
<bit_position> element is popluated into the a colspan tag. This means that
the first bit element would result in <td colspan="19">, the third
bit_position element would result in <colspan='1'>, etc. 

Getting the values
out of the single-entry elements is easy; if there's no colon, I know it only
contains a single bit. Getting the values when there IS a colon is driving me
nuts. I need to to extract the values, determine the difference, and populate
the colspan, and XSL's handling of variables/parameters is very new and
unfamiliar to me. Any pointers on a good approach would be much apprecitated;
everything I've tried so far has ended up chasing its tail, logically
speaking. 

I'm using Saxon 6.5.5, but would prefer to avoid using extensions
if possible.

Thanks in advance for any guidance.

(Yes, I know that that
could have been avoided by adding something like optional <high_value> and
<low_value> elements to the <bit_position> element, but the horses left the
barn on that one 6 years ago.)

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.