Subject:BIT Fields Author:Daniel Pontzer Date:06 Mar 2008 06:03 AM
Good Morning,
I'm spearheading an effort to replace our MS Word Interface Control Documents with XML files. I've attached an example of what those Word documents look like (icd.doc). Essentially, they specify fields and their location in a 32 bit message.
I'm attempting to use your XML Publisher to recreate, in HTML, the visual representation shown in the Word document. I think I can handle everything except the 'Data Format' Field which shows the position of the fields in the word. I've attached XSD, XML, and REPORT files.
How would I 'build' the text shown in the 'Data Format' field of the Word document.
Thanks
Dan
P.S. If you know of any other public effort to do something similar to what I'm doing, please let me know. I'm always happy to build on other's work.
Subject:BIT Fields Author:(Deleted User) Date:06 Mar 2008 12:20 PM
Hi Daniel,
you can try the attached report; in short, I added a repeater having an XPath expression of "0 to 31" sorted in descending order in order to iterate the bit numbers. Inside the loop, a "if" tests if there is a Field whose definition covers the current bit; if it does, the LetterID is printed, otherwise a "x" is printed. After this there is a second "if" that prints a "-" when the index is divisible by 4.
Unfortunately the preview engine doesn't understand the main loop, so you will have to generate the XSL and run it; also, by default Report generates some extra <div> nodes that prevents the letters to be grouped as desired, so you will have to remove all the ones located inside the <xsl:for-each select="0 to 31"> XSL instruction.