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

RE: Pretty Print for schema's


xsd pretty print
Title: RE: Pretty Print for schema's

Lynda,

Welcome to XML!  Since you're referencing design and interface documents, you may want to know about the "documentation" element in W3C Schema (XS3P may already cover this, so I apologize if this is duplicate information).  Basically, one can add documentation to a schema that describes the purpose of each element (i.e. you can add a "documentation" element for each element in the schema), its relationship to a database table/field, or anything else you see fit.

For example (note the third line):

        <xsd:element name = "AllowanceCode" type = "AllowanceOrChargeCodeType"/>
               <xsd:annotation>
                              <xsd:documentation>Header, SAC Loop - SAC02</xsd:documentation>
                   </xsd:annotation>

This is from a schema that I wrote as a representation of an EDI transaction.  In this example, the "documentation" element indicates the section of the EDI transaction (Header), the loop (SAC loop), and the element (SAC02).  It could just as easily have indicated a table and field name that the element is associated with (i.e. for the origin or destination of its data).

The beauty of this is that because the "documentation" and "annotation" elements above are themselves XML (and not comments delimited by a certain character as in classic programming languages), one can write a style sheet that takes the schema as input and produces - for example - a cross-reference report of the documentation information and the element name (to answer the question "what EDI element does this schema element map to?").

Hope that helps.

Joe Chiusano
LMI

> **************************************************************************
>   Joseph M. Chiusano
>   Logistics Management Institute
>   2000 Corporate Ridge
>   McLean, VA 22102
>   Email: jchiusano@l...
>   Tel: 571.633.7722
> **************************************************************************
>


-----Original Message-----
From: carey [mailto:carey@s...]
Sent: Thursday, September 12, 2002 4:29 PM
To: xml-dev@l...; Dare Obasanjo
Subject: RE: Pretty Print for schema's



Here is the tasking I was given:

"What we need in the ability to transform the XML Schemas that we are
producing into a human readable format.  We should be able to come up
with something with having to reinvent the wheel."

The idea is to generate something human readable for inclusion in a design
and/or interface document.  I've never worked with the XML technology before
so I'm finding myself getting lost.  I've read about XML, Schema's, DTDs,
XSLT, FOP ...  but I haven't been able to tie it all together.

The XS3P looks interesting.  I'm going to look into that some more.   Any
other ideas you may have would be greatly appreciated.

Thanks,

Lynda Carey

-----Original Message-----
From: Dare Obasanjo [mailto:dareo@m...]
Sent: Thursday, September 12, 2002 4:13 PM
To: carey; xml-dev@l...
Subject: RE: Pretty Print for schema's


Do you mean the generation of HTML documentation like XS3P[0] or just some
code that indents generic XML?
 
[0] http://titanium.dstc.edu.au/xml/xs3p/

        -----Original Message-----
        From: carey [mailto:carey@s...]
        Sent: Thu 9/12/2002 1:05 PM
        To: xml-dev@l...
        Cc:
        Subject: Pretty Print for schema's




        Has anybody attempted to transform an XML Schema into something
"human
        readable"?  We're hoping there's some sort of generic XSLT
stylesheet
        somewhere that we can  use.

        Lynda Carey



        -----------------------------------------------------------------
        The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
        initiative of OASIS <http://www.oasis-open.org>

        The list archives are at http://lists.xml.org/archives/xml-dev/

        To subscribe or unsubscribe from this list use the subscription
        manager: <http://lists.xml.org/ob/adm.pl>





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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.