OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   RE: [xml-dev] Pretty Print for schema's

[ Lists Home | Date Index | Thread Index ]

Title: RE: [xml-dev] Pretty Print for schema's


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:documentation>Header, SAC Loop - SAC02</xsd:documentation>

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

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

-----Original Message-----
From: carey [mailto:carey@syrres.com]
Sent: Thursday, September 12, 2002 4:29 PM
To: xml-dev@lists.xml.org; Dare Obasanjo
Subject: RE: [xml-dev] 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.


Lynda Carey

-----Original Message-----
From: Dare Obasanjo [mailto:dareo@microsoft.com]
Sent: Thursday, September 12, 2002 4:13 PM
To: carey; xml-dev@lists.xml.org
Subject: RE: [xml-dev] 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@syrres.com]
        Sent: Thu 9/12/2002 1:05 PM
        To: xml-dev@lists.xml.org
        Subject: [xml-dev] Pretty Print for schema's

        Has anybody attempted to transform an XML Schema into something
        readable"?  We're hoping there's some sort of generic XSLT
        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>


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS