[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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.)
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|