[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    [jira] Updated: (XMLBEANS-42) Samples: Add MixedContent and SchemaEnum samples to sample set
From:       xmlbeans-dev () xml ! apache ! org
Date:       2004-08-11 17:58:23
Message-ID: 519706850.1092247103075.JavaMail.apache () nagoya
[Download RAW message or body]

The following issue has been updated:

    Updater: Jacob Danner (mailto:jacobd@bea.com)
       Date: Wed, 11 Aug 2004 10:57 AM
    Comment:
I've made some simple tests for these samples. The attached zip contains 2 files.
SamplesTest.java - should live at \
%XMLBEANS_HOME%\test\src\samples\checkin\SamplesTest.java testbuild.xml -should \
replace current (8-11-04) version of build file. Includes targets for building \
samples  Changes:
             Attachment changed to samples.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: Wed, 11 Aug 2004 10:57 AM
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/


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic