xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xmlbeans-...@xml.apache.org
Subject [jira] Updated: (XMLBEANS-42) Samples: Add MixedContent and SchemaEnum samples to sample set
Date Fri, 09 Jul 2004 19:21:12 GMT
The following issue has been updated:

    Updater: Steven Traut (mailto:straut@bea.com)
       Date: Fri, 9 Jul 2004 12:20 PM
    Comment:
SchemaEnum.zip containing SchemaEnum sample for review.
    Changes:
             Attachment changed to SchemaEnum.zip
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/XMLBEANS-42?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XMLBEANS-42

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XMLBEANS-42
    Summary: Samples: Add MixedContent and SchemaEnum samples to sample set
       Type: Task

     Status: Unassigned
   Priority: Minor

    Project: XMLBeans
   Versions:
             unspecified

   Assignee: 
   Reporter: Steven Traut

    Created: Fri, 9 Jul 2004 12:18 PM
    Updated: Fri, 9 Jul 2004 12:20 PM
Environment: Any.

Description:
I have two samples to submit for review: MixedContent and SchemaEnum. Descriptions from their
readmes are below. Seems to me that potential sample-related tasks are:

- Review the code. Is it useful? Does it do what it should? Are there any poor practices illustrated?

- If the code is acceptable...

- Find a CVS location for the ZIPs. I suggest xml-xmlbeans/samples/<feature_area>/<sample_name>.
So the SchemaEnum sample would have this structure in CVS:

xml-xmlbeans
    samples
        schema
            schemaenum
                SchemaEnum.zip
                <exploded files from zip>

- Explode the ZIPs and commit the ZIPs and their contents.

- Incorporate samples into the test process. Rather than "asserting" the main sample code,
I've included a separate test class in each ZIP that asserts for valid XML (the easiest thing
to get a boolean on). I'm hoping this leaves the sample code itself in a useful copy/paste
state while still supporting test integration. It's a very large-grained approach, and maybe
not useful. I'm a novice at the test thing. I'm open to suggestions.

- Create a "Samples" page on the web site and link to the ZIP files from it so they can be
downloaded.

-----

I tried to follow a few guidelines on package names. Let me know (or feel free to change)
if these won't work.

- Packages for main classes take the form: org.apache.xmlbeans.samples.schema.enumerations
and org.apache.xmlbeans.samples.cursor

- Schema namespace URIs (and therefore packages for generated types) take the form: <sample
package>.samplemainclassname.<names as needed to disambiguate schemas>

Each zip contains a readme.

-----

SchemaEnum
This sample illustrates how you can access XML values that are
defined in schema as enumerations. When a schema containing
enumerations is compiled, the generated Java types represent the
schema enumerations with Java enumerations. You can access these through their constants and
corresponding int values.

MixedContent
This sample illustrates how you can work with mixed content XML by combining strong types
generated from schema with an XmlCursor instance. The XmlCursor interface is provided with
XMLBeans for just this kind of use. With strong types you can only get or set the full value
of an element; by using a cursor you can "dive into" the contents of an element, manipulating
child elements that are embedded in the content and surrounded by other text.


---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message