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

RE: Creating a valid document, schema driven.

  • From: w3c@drrw.info
  • To: "David" <dlee@calldei.com>
  • Date: Thu, 24 Jun 2010 09:49:20 -0700

RE:  Creating a valid document
David,

I cannot offer you this in Java - but I do have this functionally equivalent capabilities in XSLT and the CAM toolkit Eclipse UI.

Essentially you can view the XML structure outline in Eclipse editor (built by import from your target schema) - exclude portions of the result tree, add content hinting - so you get realistic test instances - and then run the xslt to actually produce XML instances desired.

See:

 http://wiki.oasis-open.org/cam/CAM_Tutorials 

And the CAM toolkit:

 http://www.sourceforge.net/projects/camprocessor

Since this is open source - you can inspect the xslt - cam-2-example.xsl - just download it from the svn branch for source xsl

Thanks, DW
 


-------- Original Message --------
Subject: Creating a valid document, schema driven.
From: David <dlee@calldei.com>
Date: Thu, June 17, 2010 8:26 am
To: xml-dev@lists.xml.org

Suppose in my Left Hand I have a Schema (Any format, DTD, XSD , RNG ...
I dont care because presumably I can convert to the right format
beforehand).
And in my Right Hand I am constructing an XML document using some
document creation library (ideally in Java).

At any given node, I should presumably know "where I'm at" in the
output, and also in the schema.
I would like to inspect the correct schema node at this point and given
some magic rules I may have (In my Other Left Hand) pick one of the
allowable valid set of attributes and nodes and write them (Using
values from my Other Right Hand).

I have seen this done in some form in varous GUI tools. For example
this is a form of content completion or auto-suggest.
Its also a form of "Generate an example XML from a Schema".

What I am missing, and would love suggestions, is what library or
combination of libraries would make this easiest or facilitate this.
I belive I need

* A library for constructing XML which lets me "know where I'm at" in
some fashion (xpath?)
*** Or do I have to manually keep track of this somehow ?

* A library for reading a schema and accessing its contents
** Must be able to be queried so that I can have a list of valid
nodes/attributes at any 'point'
** Must be able to be queried to find that 'point' given 'where I'm At'
in the output generation.

Any suggestions or ideas on tools or approaches that together might most
easily be used to accomplish this ?

I can provide more detail about what I'm trying to do if desired but I
suggest the general question is simpler (less constraining).
Thanks for any ideas !



--
-------------------------
David A. Lee
dlee@calldei.com
http://www.calldei.com
http://www.xmlsh.org


_______________________________________________________________________

XML-DEV is a publicly archived, unmoderated list hosted by OASIS
to support XML implementation and development. To minimize
spam in the archives, you must subscribe before posting.

[Un]Subscribe/change address: http://www.oasis-open.org/mlmanage/
Or unsubscribe: xml-dev-unsubscribe@lists.xml.org
subscribe: xml-dev-subscribe@lists.xml.org
List archive: http://lists.xml.org/archives/xml-dev/
List Guidelines: http://www.oasis-open.org/maillists/guidelines.php



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


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.