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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
+ XSLT Help and Discussion (7625)
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
- Stylus Studio Code Samples & Utilities (364)
-> + Legacy File (2)
-> + XSD to XML Creation with all O... (2)
-> - How XML to X12 be converted an... (1)
-> - Encode and decode XML to and f... (1)
-> + Evaluating StylusStudio - .cnv... (2)
-> - Build safe NCName (1)
-> - generating .Net dataset (1)
-> + Converters for .NET (2)
-> + TRADACOMS - Code Generation (2)
-> - Flat File Custom XML conversio... (1)
-> - Need help in Generate a checkb... (1)
-> + Evaluation period for the buil... (2)
-> + Reports with ifs (2)
-> + Need Help Creating Custom XML ... (6)
-> + Need help with unique particle... (10)
-> + In need for help on converting... (3)
-> - import xml into an access (1)
-> + jaxb support (3)
-> + Large XML sample file (2)
-> + Stylus Studio 2008 R2 - From X... (2)
-- [1-20] [21-40] [41-60] Next
+ Stylus Studio Announcements (113)
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
(Deleted User) 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.

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

   
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.