XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Daniel PontzerSubject: 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.


Documenticd.doc
Heritage ICD Specification

Documenticd.xml
New ICD Specification

Unknownicd.xsd
Schema for new ICD Specification

Unknownicd.report
Report file to translate XML to HTML

Postnext
Alberto MassariSubject: BIT Fields
Author: Alberto Massari
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.

Hope this helps,
Alberto


Unknownicd(1).report

Posttop
Daniel PontzerSubject: BIT Fields
Author: Daniel Pontzer
Date: 06 Mar 2008 02:53 PM
Thanks, Alberto!
I apprieciate it.
Dan

 
Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.