<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>commons-dev@xml.apache.org Archives</title>
<link rel="self" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/?format=atom"/>
<link href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/"/>
<id>http://mail-archives.apache.org/mod_mbox/xml-commons-dev/</id>
<updated>2009-12-07T10:30:42Z</updated>
<entry>
<title>DO NOT REPLY [Bug 48194] Xml Catalog Resovler fails with included schemas</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200911.mbox/%3c20091120174829.66136234C052@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20091120174829-66136234C052@brutus-apache-org%3e</id>
<updated>2009-11-20T17:48:29Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=48194

Robert Streich &lt;robert.streich@objectfx.com&gt; changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |robert.streich@objectfx.com

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 48194] Xml Catalog Resovler fails with included schemas</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200911.mbox/%3c20091116181319.800CA234C052@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20091116181319-800CA234C052@brutus-apache-org%3e</id>
<updated>2009-11-16T18:13:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=48194

--- Comment #2 from Robert Streich &lt;robert.streich@objectfx.com&gt; 2009-11-16 10:13:18
UTC ---
Created an attachment (id=24543)
 --&gt; (https://issues.apache.org/bugzilla/attachment.cgi?id=24543)
Simple set up with included/imported schemas to illustrate bug.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 48194] Xml Catalog Resovler fails with included schemas</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200911.mbox/%3c20091113224753.044D7234C4D1@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20091113224753-044D7234C4D1@brutus-apache-org%3e</id>
<updated>2009-11-13T22:47:52Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=48194

--- Comment #1 from Robert Streich &lt;robert.streich@objectfx.com&gt; 2009-11-13 14:47:52
UTC ---
I don't know if this is viable, but this works:

        // The namespace is useful for resolving namespace aware
        // grammars such as XML schema. Let it take precedence over
        // the external identifier if one exists.
        String namespace = resourceIdentifier.getNamespace();
        if (namespace != null) {
           if (resourceIdentifier instanceof XSDDescription
                 &amp;&amp; XSDDescription.CONTEXT_INCLUDE == ((XSDDescription)
resourceIdentifier).getContextType()) {
              resolvedId =
resolveSystem(resourceIdentifier.getLiteralSystemId());
           } else {
            resolvedId = resolveURI(namespace);
           }
        }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 48194] New: Xml Catalog Resovler fails with included schemas</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200911.mbox/%3cbug-48194-4657@https.issues.apache.org/bugzilla/%3e"/>
<id>urn:uuid:%3cbug-48194-4657@https-issues-apache-org/bugzilla/%3e</id>
<updated>2009-11-13T20:43:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=48194

           Summary: Xml Catalog Resovler fails with included schemas
           Product: XmlCommons
           Version: 1.x
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Resolver
        AssignedTo: commons-dev@xml.apache.org
        ReportedBy: robert.streich@objectfx.com


If you attempt to include a schema into one that has a targetNamespace,
it fails to correctly resolve the included component. The problem is
with line ~420 of XMLCatalogResolver:

        // The namespace is useful for resolving namespace aware
        // grammars such as XML schema. Let it take precedence over
        // the external identifier if one exists.
        String namespace = resourceIdentifier.getNamespace();
        if (namespace != null) {
            resolvedId = resolveURI(namespace);
        }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>November Board Report</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200911.mbox/%3cOF4FF28D12.F7EEB552-ON85257669.00183A5C-85257669.0018BF1E@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOF4FF28D12-F7EEB552-ON85257669-00183A5C-85257669-0018BF1E@ca-ibm-com%3e</id>
<updated>2009-11-09T04:30:08Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: quoted-printable



Hi all,

The November board meeting is coming up on the 18th and we're due to
report. The Wiki page for the report is set up here:
http://wiki.apache.org/xerces/November2009. As usual I'll cover Xerces-=
J
and XML Commons. Could other committers please fill in the status for
Xerces-C and Xerces-P.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org=


</pre>
</div>
</content>
</entry>
<entry>
<title>assistance with Apache Forrest</title>
<author><name>David Crossley &lt;crossley@apache.org&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200911.mbox/%3c20091102035656.GO15843@igg.indexgeo.com.au%3e"/>
<id>urn:uuid:%3c20091102035656-GO15843@igg-indexgeo-com-au%3e</id>
<updated>2009-11-02T03:56:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I did some research to find the ASF projects that
manage their websites with Apache Forrest, and am
sending similar email to each project's dev mail list.
Already sent to general at xerces and general at xml,
but duplicates will not hurt.

The purposes of this email are to remind people
about some of the useful facilities of Forrest,
and also alert them to discussion about the status
and future directions of Forrest, and to appeal for
people to assist Forrest.

--- oOo ---

These are useful facilities to assist with developing
and managing a Forrest solution for your project's website.

"How to deploy documentation with the Forrestbot
svn workstage"
This explains how the Forrest project manages our
own documentation.
http://forrest.apache.org/howto-forrestbot-svn.html

"Generate an ASF mirrors page using interactive web form"
http://forrest.apache.org/docs/dev/howto/howto-asf-mirror.html

"ForrestBar - Firefox toolbar to ease navigation
and search of Forrest resources"
http://forrest.apache.org/tools/forrestbar.html

"How to do development with Apache Forrest"
http://forrest.apache.org/howto-dev.html

"Frequently Asked Questions"
http://forrest.apache.org/faq.html

"The Anakia output plugin"
This was developed to assist the old Incubator
website to stop using Forrest and export all content
to an Anakia "xdoc" format. From there it could used
by an Anakia-based build system, or be further transformed.
http://forrest.apache.org/pluginDocs/plugins_0_80/org.apache.forrest.plugin.output.Anakia/

As usual, if you need further assistance with anything
then please ask on the Forrest mail lists.

--- oOo ---

There is discussion currently underway on the Forrest
dev mail list about the current status and future
direction of Forrest.
http://thread.gmane.org/gmane.text.xml.forrest.devel/27325

If anyone can assist Forrest, in any capacity, then
please do.

-David


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: resolver should be able to parse catalog files without needing to resolve external entities?</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200910.mbox/%3cOFE4485EE3.3B9E314A-ON8525765E.0073DA57-8525765E.0074564B@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOFE4485EE3-3B9E314A-ON8525765E-0073DA57-8525765E-0074564B@ca-ibm-com%3e</id>
<updated>2009-10-29T21:10:39Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII

Jack,

Jack Bates &lt;ms419@freezone.co.uk&gt; wrote on 10/28/2009 07:48:23 PM:

&gt; On Sat, 2009-10-24 at 15:10 -0400, Michael Glavassevich wrote:
&gt; &gt; The OASIS catalog DTD is included in resolver.jar and there is a
&gt; &gt; BootstrapResolver [1] which gets installed on the parser that reads
&gt; &gt; the catalog which can return this DTD. I'm sure the reason that isn't
&gt; &gt; happening is that the public and system IDs differ from the ones that
&gt; &gt; the resolver knows about. You're supposed to extend BootstrapResolver
&gt; &gt; (in your own application) if you need support for more than the
&gt; &gt; well-known public IDs and URIs for the catalog DTDs / schemas and set
&gt; &gt; an instance of this extension on the CatalogManager [2].
&gt;
&gt; Thank you Michael! After some more digging, I think the reason that the
&gt; w3c-dtd-xhtml catalog.xml isn't using the well known catalog DTD public
&gt; ID and URI,
&gt;
&gt; &lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.0//EN"
&gt;   "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;
&gt;
&gt; is that it's trying to use a different DTD?
&gt;
&gt; &lt;!DOCTYPE catalog PUBLIC "-//GlobalTransCorp//DTD XML Catalogs V1.0-
&gt; Based Extension V1.0//EN"
&gt;     "http://globaltranscorp.org/oasis/catalog/xml/tr9401.dtd"&gt;
&gt;
&gt; The xml-core package distributes "tr9401.dtd", in addition to
&gt; "catalog.dtd" - here it is,
&gt; http://www.sfu.ca/~jdbates/tmp/debian/200910280/tr9401.dtd
&gt;
&gt; - and here are the differences between it, and the "catalog.dtd"
&gt; included in resolver.jar,
&gt; http://www.sfu.ca/~jdbates/tmp/debian/200910280/diff
&gt;
&gt; I dunno if the w3c-dtd-xhtml catalog.xml actually requires this
&gt; different DTD, but it sounds like if it does, and the system ID isn't
&gt; accessible, then it will only be parsable by tools which extend
&gt; BootstrapResolver to add support for this different DTD?

That's what I would do. I could imagine extending BootstrapResolver so that
it uses a secondary catalog resolver so that you just update a catalog file
instead of the code when you need a redirect for yet another catalog DTD.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: resolver should be able to parse catalog files without needing to resolve external entities?</title>
<author><name>Jack Bates &lt;ms419@freezone.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200910.mbox/%3c1256773703.3663.43.camel@tad%3e"/>
<id>urn:uuid:%3c1256773703-3663-43-camel@tad%3e</id>
<updated>2009-10-28T23:48:23Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On Sat, 2009-10-24 at 15:10 -0400, Michael Glavassevich wrote:
&gt; The OASIS catalog DTD is included in resolver.jar and there is a
&gt; BootstrapResolver [1] which gets installed on the parser that reads
&gt; the catalog which can return this DTD. I'm sure the reason that isn't
&gt; happening is that the public and system IDs differ from the ones that
&gt; the resolver knows about. You're supposed to extend BootstrapResolver
&gt; (in your own application) if you need support for more than the
&gt; well-known public IDs and URIs for the catalog DTDs / schemas and set
&gt; an instance of this extension on the CatalogManager [2].

Thank you Michael! After some more digging, I think the reason that the
w3c-dtd-xhtml catalog.xml isn't using the well known catalog DTD public
ID and URI,

&lt;!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.0//EN" 
  "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"&gt;

is that it's trying to use a different DTD?

&lt;!DOCTYPE catalog PUBLIC "-//GlobalTransCorp//DTD XML Catalogs V1.0-Based Extension V1.0//EN"
    "http://globaltranscorp.org/oasis/catalog/xml/tr9401.dtd"&gt;

The xml-core package distributes "tr9401.dtd", in addition to
"catalog.dtd" - here it is,
http://www.sfu.ca/~jdbates/tmp/debian/200910280/tr9401.dtd

- and here are the differences between it, and the "catalog.dtd"
included in resolver.jar,
http://www.sfu.ca/~jdbates/tmp/debian/200910280/diff

I dunno if the w3c-dtd-xhtml catalog.xml actually requires this
different DTD, but it sounds like if it does, and the system ID isn't
accessible, then it will only be parsable by tools which extend
BootstrapResolver to add support for this different DTD?


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: resolver should be able to parse catalog files without needing to resolve external entities?</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200910.mbox/%3cOF23010686.943396B4-ON85257659.0067623C-85257659.00696043@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOF23010686-943396B4-ON85257659-0067623C-85257659-00696043@ca-ibm-com%3e</id>
<updated>2009-10-24T19:10:58Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: quoted-printable


The OASIS catalog DTD is included in resolver.jar and there is a
BootstrapResolver [1] which gets installed on the parser that reads the=

catalog which can return this DTD. I'm sure the reason that isn't happe=
ning
is that the public and system IDs differ from the ones that the resolve=
r
knows about. You're supposed to extend BootstrapResolver (in your own
application) if you need support for more than the well-known public ID=
s
and URIs for the catalog DTDs / schemas and set an instance of this
extension on the CatalogManager [2].

Thanks.

[1]
http://xml.apache.org/commons/components/apidocs/resolver/org/apache/xm=
l/resolver/helpers/BootstrapResolver.html
[2]
http://xml.apache.org/commons/components/apidocs/resolver/org/apache/xm=
l/resolver/CatalogManager.html#setBootstrapResolver
(org.apache.xml.resolver.helpers.BootstrapResolver)

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Earl Hood &lt;earl@earlhood.com&gt; wrote on 10/24/2009 01:22:50 PM:

&gt; On October 23, 2009 at 17:19, someone wrote:
&gt;
&gt; &gt; Here's an example of a catalog.xml file distributed in the Debian a=
nd
&gt; &gt; Ubuntu w3c-dtd-xhtml package,
&gt; &gt; http://www.sfu.ca/~jdbates/tmp/debian/200910230/catalog.xml
&gt; &gt;
&gt; &gt; It starts with,
&gt; &gt;
&gt; &gt; &lt;?xml version=3D'1.0'?&gt;
&gt; &gt; &lt;!DOCTYPE catalog PUBLIC "-//GlobalTransCorp//DTD XML Catalogs
V1.0-Based
&gt; &gt; &lt;Extension V1.0//EN"
&gt; &gt;     "http://globaltranscorp.org/oasis/catalog/xml/tr9401.dtd";&gt;
&gt; &gt; [...]
&gt;
&gt; I think they should fix it so the system identifier is set
&gt; to a pathname on the local file system.
&gt;
&gt; Also, the public identifier used is not the standard public
&gt; identifier, "-//OASIS//DTD XML Catalogs V1.1//EN".  So even
&gt; if the resolver provided intrinsic recognition of
&gt; the "-//OASIS//DTD XML Catalogs V1.1//EN" identifier, it
&gt; would still be of no use in this case.
&gt;
&gt; One can argue that the w3c-dtd-xhtml package has a bug in
&gt; their distribution since it provides no facility to resolve
&gt; the DTD to the local file system.  The system identifier
&gt; should be set to the pathname the catalog DTD is placed
&gt; by the w3c-dtd-xhtml installer.
&gt;
&gt; &gt; I understand comment #4,
&gt; &gt; https://bugs.launchpad.net/ubuntu/+source/w3c-dtd-
&gt; xhtml/+bug/400259/comments/4
&gt; &gt;
&gt; &gt; - to be suggesting that org.apache.xml.resolver is not following th=
e
&gt; &gt; encouragement of,
&gt; &gt; http://www.oasis-open.org/committees/download.php/14809/xml-
&gt; catalogs.html#s.bootstrap
&gt; &gt;
&gt; &gt; "Implementations are encouraged to provide some sort of bootstrappi=
ng
&gt; &gt; functionality to resolve external identifiers and URIs that the
&gt; &gt; implementation needs to load catalog entry files.
&gt;
&gt; It is not a requirement:
&gt;
&gt;   Conformant processors are not required to be able to perform
&gt;   resolution of those identifiers through the XML Catalog.
&gt;
&gt; The word "should" is used in other text instead of "must".  Also,
&gt; the following is stated:
&gt;
&gt;   Users can avoid any problems that might arise by limiting the
&gt;   external identifiers and URIs used to those that do not need
&gt;   resolution. Note that this only applies to external identifiers and=

&gt;   URIs that must be resolved in order to load the catalog entry file.=

&gt;
&gt; &gt; - and to be suggesting that not following this encouragement is a b=
ug
&gt; &gt;
&gt; &gt; Is maybe my understanding wrong - or either of these suggestions wr=
ong?
&gt;
&gt; The recommendations of the Oasis document are beneficial, but
&gt; they are only recommendations, not requirements.  So the "bug"
&gt; reports are really enhancement requests.
&gt;
&gt; IMO, the work-around for the problem is easy, and is directly
&gt; suggested by the Oasis document: Use system identifiers that
&gt; are resolvable without the need of a catalog.
&gt;
&gt; I think the underlying technical problem of why the resolver library
&gt; does not provide intrinsic resolution of the catalog DTD is that
&gt; the library does not know where the DTD may be installed for any
&gt; system that uses the resolver.  Since other software systems include
&gt; the resolver in their distribution, the DTD itself may not even
&gt; be available.
&gt;
&gt; A possible method of always knowing how to find the catalog DTD is
&gt; for the resolver to include the DTD in the resolver.jar file itself.
&gt; The resolver could register a custom (internal) resolver to the XML
&gt; parser when reading catalog files so any references to the DTD can
&gt; be resolved via a classpath resource lookup.  IMO, I'm not sure it
&gt; is worth the effort to do this when simple work-arounds exist for
&gt; the problem.
&gt;
&gt; I'm sure patches are welcome if anyone wants to implement this
&gt; functionality.
&gt;
&gt; --ewh=


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: resolver should be able to parse catalog files without needing to resolve external entities?</title>
<author><name>Earl Hood &lt;earl@earlhood.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200910.mbox/%3c200910241722.n9OHMo3Z007703@gator.earlhood.com%3e"/>
<id>urn:uuid:%3c200910241722-n9OHMo3Z007703@gator-earlhood-com%3e</id>
<updated>2009-10-24T17:22:50Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On October 23, 2009 at 17:19, someone wrote:

&gt; Here's an example of a catalog.xml file distributed in the Debian and
&gt; Ubuntu w3c-dtd-xhtml package,
&gt; http://www.sfu.ca/~jdbates/tmp/debian/200910230/catalog.xml
&gt; 
&gt; It starts with,
&gt; 
&gt; &lt;?xml version='1.0'?&gt;
&gt; &lt;!DOCTYPE catalog PUBLIC "-//GlobalTransCorp//DTD XML Catalogs V1.0-Based 
&gt; &lt;Extension V1.0//EN"
&gt;     "http://globaltranscorp.org/oasis/catalog/xml/tr9401.dtd";&gt;
&gt; [...]

I think they should fix it so the system identifier is set
to a pathname on the local file system.

Also, the public identifier used is not the standard public
identifier, "-//OASIS//DTD XML Catalogs V1.1//EN".  So even
if the resolver provided intrinsic recognition of
the "-//OASIS//DTD XML Catalogs V1.1//EN" identifier, it
would still be of no use in this case.

One can argue that the w3c-dtd-xhtml package has a bug in
their distribution since it provides no facility to resolve
the DTD to the local file system.  The system identifier
should be set to the pathname the catalog DTD is placed
by the w3c-dtd-xhtml installer.

&gt; I understand comment #4,
&gt; https://bugs.launchpad.net/ubuntu/+source/w3c-dtd-xhtml/+bug/400259/comments/4
&gt; 
&gt; - to be suggesting that org.apache.xml.resolver is not following the
&gt; encouragement of,
&gt; http://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.bootstrap
&gt; 
&gt; "Implementations are encouraged to provide some sort of bootstrapping
&gt; functionality to resolve external identifiers and URIs that the
&gt; implementation needs to load catalog entry files.

It is not a requirement:

  Conformant processors are not required to be able to perform
  resolution of those identifiers through the XML Catalog.

The word "should" is used in other text instead of "must".  Also,
the following is stated:

  Users can avoid any problems that might arise by limiting the
  external identifiers and URIs used to those that do not need
  resolution. Note that this only applies to external identifiers and
  URIs that must be resolved in order to load the catalog entry file.

&gt; - and to be suggesting that not following this encouragement is a bug
&gt; 
&gt; Is maybe my understanding wrong - or either of these suggestions wrong?

The recommendations of the Oasis document are beneficial, but
they are only recommendations, not requirements.  So the "bug"
reports are really enhancement requests.

IMO, the work-around for the problem is easy, and is directly
suggested by the Oasis document: Use system identifiers that
are resolvable without the need of a catalog.

I think the underlying technical problem of why the resolver library
does not provide intrinsic resolution of the catalog DTD is that
the library does not know where the DTD may be installed for any
system that uses the resolver.  Since other software systems include
the resolver in their distribution, the DTD itself may not even
be available.

A possible method of always knowing how to find the catalog DTD is
for the resolver to include the DTD in the resolver.jar file itself.
The resolver could register a custom (internal) resolver to the XML
parser when reading catalog files so any references to the DTD can
be resolved via a classpath resource lookup.  IMO, I'm not sure it
is worth the effort to do this when simple work-arounds exist for
the problem.

I'm sure patches are welcome if anyone wants to implement this
functionality.

--ewh


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: resolver should be able to parse catalog files without needing to resolve external entities?</title>
<author><name>Earl Hood &lt;earl@earlhood.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200910.mbox/%3c200910232147.n9NLl0oO006625@gator.earlhood.com%3e"/>
<id>urn:uuid:%3c200910232147-n9NLl0oO006625@gator-earlhood-com%3e</id>
<updated>2009-10-23T21:47:00Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
On October 23, 2009 at 09:52, Jack Bates wrote:

&gt; I'm getting the following exception using the XML catalog resolver with
&gt; FOP,

&gt; DELEGATE_PUBLIC: -//W3C//DTD XHTML//EN
&gt;         file:/usr/share/xml/xhtml/schema/dtd/catalog.xml
&gt; resolvePublic(-//W3C//DTD XHTML 1.0 Transitional//EN,null)
&gt; Switching to delegated catalog(s):
&gt;         file:/usr/share/xml/xhtml/schema/dtd/1.0/catalog.xml
&gt; Parse catalog: file:/usr/share/xml/xhtml/schema/dtd/1.0/catalog.xml
&gt; Loading catalog: file:/usr/share/xml/xhtml/schema/dtd/1.0/catalog.xml
&gt; Default BASE: file:/usr/share/xml/xhtml/schema/dtd/1.0/catalog.xml
&gt; 22-Oct-2009 5:04:13 PM org.apache.fop.cli.Main startFOP
&gt; SEVERE: Exception
&gt; javax.xml.transform.TransformerException: java.net.UnknownHostException: 
&gt; globaltranscorp.org

Is globaltranscorp.org resolvable on the system you are running FOP?
Apparently the underlying network library of the JVM cannot resolve
the hostname.

As for the "resolve external entities" problem, it appears to
be a chicken-n-egg problem.  The resolver depends on the underlying
XML parser to parse the XML catalog file, but at that time,
the base entity resolution of the XML parser is being used since
the resolver is still bootstrapping itself.

If your catalog file contains a DOCTYPE declaration with a public and
system identifier, then the XML parser will try to resolve it, and if
the system identifier listed is not accessible, you will get an error.

All of this is a function of the XML parser itself and NOT the
resolver library.

In practice, I normally do not specify a doctype declaration for
catalog files to avoid the unnecessary overhead of parsing a DTD.

If you absolutely need to have DTD validation of your catalog files,
make sure the system identifier is resolvable, and preferably to a
location on the local file system for better performance and to avoid
dependency on a remote system.

--ewh


</pre>
</div>
</content>
</entry>
<entry>
<title>resolver should be able to parse catalog files without needing to resolve external entities?</title>
<author><name>Jack Bates &lt;ms419@freezone.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200910.mbox/%3c1256316742.1735.17.camel@tad%3e"/>
<id>urn:uuid:%3c1256316742-1735-17-camel@tad%3e</id>
<updated>2009-10-23T16:52:22Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
I'm getting the following exception using the XML catalog resolver with
FOP,

[...]
DELEGATE_PUBLIC: -//W3C//DTD XHTML//EN
        file:/usr/share/xml/xhtml/schema/dtd/catalog.xml
resolvePublic(-//W3C//DTD XHTML 1.0 Transitional//EN,null)
Switching to delegated catalog(s):
        file:/usr/share/xml/xhtml/schema/dtd/1.0/catalog.xml
Parse catalog: file:/usr/share/xml/xhtml/schema/dtd/1.0/catalog.xml
Loading catalog: file:/usr/share/xml/xhtml/schema/dtd/1.0/catalog.xml
Default BASE: file:/usr/share/xml/xhtml/schema/dtd/1.0/catalog.xml
22-Oct-2009 5:04:13 PM org.apache.fop.cli.Main startFOP
SEVERE: Exception
javax.xml.transform.TransformerException: java.net.UnknownHostException: globaltranscorp.org
        at org.apache.fop.cli.InputHandler.transformTo(InputHandler.java:314)
        at org.apache.fop.cli.InputHandler.renderTo(InputHandler.java:146)
        at org.apache.fop.cli.Main.startFOP(Main.java:174)
        at org.apache.fop.cli.Main.main(Main.java:205)
[...]

I think it's the same issue reported here,
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=491091

- and here,
https://bugs.launchpad.net/ubuntu/+source/w3c-dtd-xhtml/+bug/400259

Is comment #4 correct?

"Arguably this is a bug in org.apache.xml.resolver, cf.
http://www.oasis-open.org/committees/download.php/14809/xml-catalogs.html#s.bootstrap - the
resolver should be able to parse catalog files without needing to resolve external entities"

https://bugs.launchpad.net/ubuntu/+source/w3c-dtd-xhtml/+bug/400259/comments/4


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Proposal - A Very Simple API for Reading Simple XML Data</title>
<author><name>Gary Rowe &lt;g.rowe@froot.co.uk&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200909.mbox/%3c25344422.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c25344422-post@talk-nabble-com%3e</id>
<updated>2009-09-08T11:35:49Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

After stumbling upon this answer I thought I'd do the conversion and compare
the two approaches. 

I happened to have used the original posters method but didn't like it
because it seemed to move the persistence meta-data out of the model and
into an external adapter. Some people may like that, but I prefer to have
the persistence meta-data in the form of annotations right next to the model
(or DTO if you prefer). 

So I made the conversion and using XStream I was able to remove vast tracts
of marshalling code and condense it into a a single 3 line templated method
in a base class. All the mapping information is now held in simple to
understand annotations, and specialised date handling is managed through an
XStream converter. 

Now for the all important performance figures. In my particular
configuration that requires a *lot* of XML parsing and mucking about with
various InputStreams, XStream came out on top - which is a relief given the
benefits that it brings. The times to completion were: 

Traditional XML through DocumentFactory and Node analysis=32s
XStream=26s

Not a vast difference (~20%) but enough to justify XStream as the better way
to go.

Hope this helps someone.

Gary  


Bruno Borges wrote:
&gt; 
&gt; Try XStream. :-)
&gt; 
&gt; Cheers,
&gt; Bruno
&gt; 

-- 
View this message in context: http://www.nabble.com/Proposal---A-Very-Simple-API-for-Reading-Simple-XML-Data-tp23804602p25344422.html
Sent from the Apache XML - Commons - Dev mailing list archive at Nabble.com.



</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 47720] New: Find Catalogs using Service Provider Interface</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200908.mbox/%3cbug-47720-4657@https.issues.apache.org/bugzilla/%3e"/>
<id>urn:uuid:%3cbug-47720-4657@https-issues-apache-org/bugzilla/%3e</id>
<updated>2009-08-21T10:00:14Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=47720

           Summary: Find Catalogs using Service Provider Interface
           Product: XmlCommons
           Version: 1.x
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Resolver
        AssignedTo: commons-dev@xml.apache.org
        ReportedBy: Martin.vGagern@gmx.net


--- Comment #0 from Martin von Gagern &lt;Martin.vGagern@gmx.net&gt; 2009-08-21 03:00:04 PDT
---
Developing apps would be greatly simplified if you could simply add some JAR to
the classpath, and a Catalog as generated by the default CatalogManager would
find the catalog within that JAR as well as the documents it references.

To achieve this, I believe a slightly modified version of the Service Provider
Interface would be most suitable.
http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#Service%20Provider
describes that a file under META-INF/services/package.interface.Name should
list qualified names of classes providing said interface.

To work with XML catalogs, you would specify a class name, but instead the name
of a resource. So I think that you should have a file called
"META-INF/services/org.apache.xml.resolver.catalog" which would contain lines
like "my/company/catalog.xml". That catalog could then be located as a
resource, auto-appended to the list of catalogs and parsed along with the
system catalogs.

One could consider placing the catalog itself in the META-INF directory. That,
however, would probably prevent it from being uniquely identified by its name
alone, which might be useful if you want to deal with the catalog yourself,
without using the full CatalogManager framework.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>August Board Report</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200908.mbox/%3cOF5D6E30A3.FC2CD110-ON85257614.00570512-85257614.00576387@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOF5D6E30A3-FC2CD110-ON85257614-00570512-85257614-00576387@ca-ibm-com%3e</id>
<updated>2009-08-16T15:54:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: quoted-printable



Hey all,

According to the calendar the August board meeting is happening this
Wednesday and we're due to report again.  The page for the report is se=
tup
on the Wiki here: http://wiki.apache.org/xerces/August2009.  As usual I=
'll
cover Xerces-J and XML Commons.  Could other committers please fill in =
the
status for Xerces-C and Xerces-P.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org=


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 47671] unable to resolve a relative path</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200908.mbox/%3c20090811150006.E6625234C046@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20090811150006-E6625234C046@brutus-apache-org%3e</id>
<updated>2009-08-11T15:00:06Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=47671



--- Comment #3 from Earl Hood &lt;earl@earlhood.com&gt; 2009-08-11 08:00:03 PDT ---
(In reply to comment #2)
&gt; resolveSystem(file:/files/erlang/module.xsl)
&gt; resolveSystem(file:/files/erlang/erlang.xml)
&gt; resolveSystem(file:/files/erlang/erlref.dtd)

The above verbosity implies (to me) that the parser is passing
the wrong system ID to the resolver.

I.e. Instead of the XML parser passing just "erlref.dtd" to
the resolver, the parser is first fully qualifying the system ID
(probably based upon the current working directory)
before it passes the system ID to the resolver.  Since the
catalog has no entry for "file:/files/erlang/erlref.dtd", the
resolver will find no matching entries.

The parser then attempts to load the file directory, which of
course fails since the file does not exist with given path.

At this time, this appears to be an XML parser problem.
The parser should only be passing "erlref.dtd" to the
resolver.

BTW, did you trim some of the diagnostic output?  It seems
the XML parser is calling Catalog directly versus the
CatalogResolver class that implements the SAX EntityResolver
and JAXP URIResolver interfances.  I see no debugging messages
from the CatalogResolver class.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 47671] unable to resolve a relative path</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200908.mbox/%3c20090811045337.AB74F234C044@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20090811045337-AB74F234C044@brutus-apache-org%3e</id>
<updated>2009-08-11T04:53:37Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=47671



--- Comment #2 from Dave Pawson &lt;dave.pawson@gmail.com&gt; 2009-08-10 21:53:34 PDT ---
What is the full catalog?
Does the path "/files/erlang/dtds/erlref.dtd" exist on
the filesystem?  Or have you set xml:base?

Have you tried setting the verbosity with the
xml.catalog.verbosity property. Set to 5 or larger to get maximum
verbosity.  This will determine if your catalog is actually getting
read and what the resolver does when resolving a uri.

What is the exact error message(s) you get?

If you can provide a reproducable test case, it will make
finding a solution faster.

1. full catalog

&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"
     &gt;
 &lt;system
      systemId="erlref.dtd"
      uri="/files/erlang/dtds/erlref.dtd"            /&gt;
 &lt;systemSuffix
      systemIdSuffix="xhtml-lat1.ent"
      uri="/files/erlang/dtds/xhtml-lat1.ent"     /&gt;
&lt;/catalog&gt;

2. The dtd and entity file are in ./dtds /files/erlang/dtds
3. I had tried xml:base, but now removed.

Instance has 
&lt;?xml version="1.0" encoding="latin1" ?&gt;
&lt;!DOCTYPE erlref SYSTEM "erlref.dtd"&gt;
a file of 
&lt;erlref&gt;&amp;nbsp&lt;/erlref&gt;

would test it.

I have CatalogManger.properties with verbosity set high.

Error reported is:

Parse catalog: erlang.catalog.xml                            
Loading catalog: erlang.catalog.xml
Default BASE: file:////files/erlang/erlang.catalog.xml
system: erlref.dtd
        /files/erlang/dtds/erlref.dtd
SYSTEM: erlref.dtd
        file:/files/erlang/dtds/erlref.dtd
systemSuffix: xhtml-lat1.ent
        /files/erlang/dtds/xhtml-lat1.ent
SYSTEM_SUFFIX: xhtml-lat1.ent
        file:/files/erlang/dtds/xhtml-lat1.ent
resolveSystem(file:/files/erlang/module.xsl)
resolveSystem(file:/files/erlang/erlang.xml)
resolveSystem(file:/files/erlang/erlref.dtd)
Error on line 2 column 37 of file:/files/erlang/erlang.xml:
  Error reported by XML parser: Cannot read from file:/files/erlang/erlref.dtd
(/files/erlang/erlref.dtd (No such file or directory))
Transformation failed: Run-time errors were reported

HTH

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 47671] unable to resolve a relative path</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200908.mbox/%3c20090810232733.94BCC234C052@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20090810232733-94BCC234C052@brutus-apache-org%3e</id>
<updated>2009-08-10T23:27:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=47671


Earl Hood &lt;earl@earlhood.com&gt; changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |earl@earlhood.com


--- Comment #1 from Earl Hood &lt;earl@earlhood.com&gt; 2009-08-10 16:27:31 PDT ---
What is the full catalog?
Does the path "/files/erlang/dtds/erlref.dtd" exist on
the filesystem?  Or have you set xml:base?

Have you tried setting the verbosity with the
xml.catalog.verbosity property. Set to 5 or larger to get maximum
verbosity.  This will determine if your catalog is actually getting
read and what the resolver does when resolving a uri.

What is the exact error message(s) you get?

If you can provide a reproducable test case, it will make
finding a solution faster.

BTW, I'm not an official maintainer of the resolver code,
but I had to dive into it over a year ago to fix bugs.
I believe some of my patches have been accepted, but
I do not think a new release of the resolver has been
done in quite some time.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 47671] New: unable to resolve a relative path</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200908.mbox/%3cbug-47671-4657@https.issues.apache.org/bugzilla/%3e"/>
<id>urn:uuid:%3cbug-47671-4657@https-issues-apache-org/bugzilla/%3e</id>
<updated>2009-08-10T18:32:01Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=47671

           Summary: unable to resolve a relative path
           Product: XmlCommons
           Version: 1.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Resolver
        AssignedTo: commons-dev@xml.apache.org
        ReportedBy: dave.pawson@gmail.com


--- Comment #0 from Dave Pawson &lt;dave.pawson@gmail.com&gt; 2009-08-10 11:32:00 PDT ---
catalog entry of

 &lt;system
      systemId="erlref.dtd"
      uri="/files/erlang/dtds/erlref.dtd"

     /&gt;

Is never seen by the resolver. See
http://www.sagehill.net/docbookxsl/WriteCatalog.html#ResolveDtdLoc


Yet http://xmlsoft.org/XSLT/xsltproc.html  catalog resolves this?

I.e. I think it should resolve appropriately

Marked as XSLTBug, since transform cannot take place
without DTD resolution


regards DaveP

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>Fw: Sign up for ApacheCon US by 14 August and save up to $500!</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200908.mbox/%3cOF1E3BE33D.FD83376F-ON8525760E.000DB596-8525760E.000E0A5C@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOF1E3BE33D-FD83376F-ON8525760E-000DB596-8525760E-000E0A5C@ca-ibm-com%3e</id>
<updated>2009-08-10T02:33:16Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII


Forwarding on behalf of the ApacheCon US 2009 Team.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Sally Khudairi &lt;sk@apache.org&gt; wrote on 08/07/2009 09:55:10 PM:

&gt; Sign up for ApacheCon US by 14 August and save up to $500!
&gt;
&gt; This year's ApacheCon US promises to deliver our most extensive
&gt; program to date, and largest anticipated gathering of the global
&gt; Apache community to celebrate the ASF's milestone 10th Anniversary.
&gt; The San Francisco Bay Area is where the very first ASF official user
&gt; conference was held, and we hope that you will join us in
&gt; celebrating the ASF's success!
&gt;
&gt; Apache members, code contributors, users, developers, system
&gt; administrators, business managers, service providers, and vendors
&gt; will convene 2-6 November in Oakland, California, for a week of
&gt; training, presentations, sharing and hacking. ApacheCon US 2009
&gt; features new content tracks, MeetUps, and GetTogethers, as well as a
&gt; number of events open to the public free of charge, such as the
&gt; Hackathon and 2-day BarCampApache, in appreciation of their support
&gt; over the past decade.
&gt;
&gt; Be sure to register by 14 August to save up to $500! To sign up, visit
&gt; http://www.us.apachecon.com/
&gt;
&gt; Those wishing to attend ApacheCon, but may be unable to do so due to
&gt; financial reasons are encouraged to apply for Travel Assistance by
&gt; completing the form at http://www.apache.org/travel/ Financial
&gt; support for flights, accommodation, subsistence, and conference fees
&gt; are availablAnyone involved in Open Source is welcome to apply for
&gt; financial support for flights, accommodation, subsistence and
&gt; Conference fees. Hurry, applications close on 17 August.
&gt;
&gt; Conference sponsor, exhibitor, and community partnerships are also
&gt; available: please contact Delia Frees at delia@apachecon.com for details.
&gt;
&gt; # # #

</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 45207] Windows pathnames with drive letters not handled correctly</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200907.mbox/%3c20090729114944.5791C234C046@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20090729114944-5791C234C046@brutus-apache-org%3e</id>
<updated>2009-07-29T11:49:44Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=45207


Florent Georges &lt;fgeorges@gmail.com&gt; changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fgeorges@gmail.com




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>Fw: Application Period for Travel Assistance to ApacheCon US 2009 Opens Soon</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200907.mbox/%3cOF580CDDBD.96BBB800-ON85257600.0057875C-85257600.0057D7CA@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOF580CDDBD-96BBB800-ON85257600-0057875C-85257600-0057D7CA@ca-ibm-com%3e</id>
<updated>2009-07-27T15:59:28Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII


(Apologies if you're receiving this a 2nd time. It seems most of the lists
didn't get the first note.)

Forwarding on behalf of the ASF's Travel Assistance Committee.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

"Gav..." &lt;gmcdonald@apache.org&gt; wrote on 07/22/2009 05:46:15 AM:

&gt; The Travel Assistance Committee is taking in applications for those
wanting
&gt; to attend ApacheCon US 2009 (Oakland) which takes place between the 2nd
and
&gt; 6th November 2009.
&gt;
&gt; The Travel Assistance Committee is looking for people who would like to
be
&gt; able to attend ApacheCon US 2009 who may need some financial support in
&gt; order to get there. There are limited places available, and all
applications
&gt; will be scored on their individual merit. Applications are open to all
open
&gt; source developers who feel that their attendance would benefit
themselves,
&gt; their project(s), the ASF and open source in general.
&gt;
&gt; Financial assistance is available for flights, accommodation, subsistence
&gt; and Conference fees either in full or in part, depending on
circumstances.
&gt; It is intended that all our ApacheCon events are covered, so it may be
&gt; prudent for those in Europe and/or Asia to wait until an event closer to
&gt; them comes up - you are all welcome to apply for ApacheCon US of course,
but
&gt; there should be compelling reasons for you to attend an event further
away
&gt; that your home location for your application to be considered above those
&gt; closer to the event location.
&gt;
&gt; More information can be found on the main Apache website at
&gt; http://www.apache.org/travel/index.html - where you will also find a link
to
&gt; the online application and details for submitting.
&gt;
&gt; Applications for applying for travel assistance will open on 27th July
2009
&gt; and close of the 17th August 2009.
&gt;
&gt; Good luck to all those that will apply.
&gt;
&gt; Regards,
&gt;
&gt; The Travel Assistance Committee
&gt; --------------------

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Proposal - A Very Simple API for Reading Simple XML Data</title>
<author><name>Bruno Borges &lt;bruno.borges@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200907.mbox/%3c24606592.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c24606592-post@talk-nabble-com%3e</id>
<updated>2009-07-22T13:31:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Try XStream. :-)

Cheers,
Bruno


Hi Jake,

Thanks for pointing that out - I didn't know about that.

First impressions are that yes it's [very] flexible, my only criticisms
being that it doesn't use generics, and that it's a pretty big API, whereas
the single-class solution is nice and light weight and probably caters for
the majority of use cases.

Anyway, whether that warrants another interface is questionable... probably
not.

Cheers,
Chris.


Jacob Kjome wrote:
&gt; 
&gt; Have you considered commons-configuration [1]?Â  It seems to me it does
&gt; what 
&gt; you want, while being very flexible and robust.
&gt; 
&gt; 
&gt; [1] http://commons.apache.org/configuration/
&gt; 
&gt; Jake
&gt; 
&gt; 
&gt; 


-----
Bruno Borges
blog.brunoborges.com.br
+55 21 76727099

"The glory of great men should always be
measured by the means they have used to
acquire it."
- Francois de La Rochefoucauld
-- 
View this message in context: http://www.nabble.com/Proposal---A-Very-Simple-API-for-Reading-Simple-XML-Data-tp23804602p24606592.html
Sent from the Apache XML - Commons - Dev mailing list archive at Nabble.com.



</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 15647] [PATCH] bad imports</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200906.mbox/%3c20090610202647.ED134234C051@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20090610202647-ED134234C051@brutus-apache-org%3e</id>
<updated>2009-06-10T20:26:47Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=15647


Mark Thomas &lt;markt@apache.org&gt; changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
         AssignedTo|curcuru@apache.org          |commons-dev@xml.apache.org




--- Comment #2 from Mark Thomas &lt;markt@apache.org&gt;  2009-06-10 13:26:47 PST ---
Reset assignee so mails go to list.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 4989] NPE in TransformerFactory.newInstance() when jaxp.properties is present.</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200906.mbox/%3c20090610202624.5A2C1234C052@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20090610202624-5A2C1234C052@brutus-apache-org%3e</id>
<updated>2009-06-10T20:26:24Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=4989


Mark Thomas &lt;markt@apache.org&gt; changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |NEW
         AssignedTo|edwingo@apache.org          |commons-dev@xml.apache.org




--- Comment #2 from Mark Thomas &lt;markt@apache.org&gt;  2009-06-10 13:26:23 PST ---
Reset assignee so mails go to list.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 47334] New: Behaviour for null/default namespace unspecified; NPE's for null publicId.</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200906.mbox/%3cbug-47334-4657@https.issues.apache.org/bugzilla/%3e"/>
<id>urn:uuid:%3cbug-47334-4657@https-issues-apache-org/bugzilla/%3e</id>
<updated>2009-06-09T10:44:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=47334

           Summary: Behaviour for null/default namespace unspecified;
                    NPE's for null publicId.
           Product: XmlCommons
           Version: 1.x
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Resolver
        AssignedTo: commons-dev@xml.apache.org
        ReportedBy: cps@decisionsoft.com


Created an attachment (id=23777)
 --&gt; (https://issues.apache.org/bugzilla/attachment.cgi?id=23777)
Test case showing the NPE.

When using the resolvePublic method for a schema with the null namespace, or an
attribute in the default namespace, this method is likely to be called.

DOM uses 'null' for this namespace whereas JAXP tends to use the empty string
(see javax.xml.XMLConstants.NULL_NS_URI) so the javadoc should specify which is
used in the resolver internals.

The code has lots of null checks in this method which makes me think you expect
null to be passed in and yet this null pointers as seen in the attached test
case.


I can't vouch for whether or not the resolver behaves sensibly when the
publicId is empty string.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Proposal - A Very Simple API for Reading Simple XML Data</title>
<author><name>chris0 &lt;technical0@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200906.mbox/%3c23823138.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c23823138-post@talk-nabble-com%3e</id>
<updated>2009-06-01T21:59:19Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hi Jake,

Thanks for pointing that out - I didn't know about that.

First impressions are that yes it's [very] flexible, my only criticisms
being that it doesn't use generics, and that it's a pretty big API, whereas
the single-class solution is nice and light weight and probably caters for
the majority of use cases.

Anyway, whether that warrants another interface is questionable... probably
not.

Cheers,
Chris.


Have you considered commons-configuration [1]?Â  It seems to me it does what 
you want, while being very flexible and robust.


[1] http://commons.apache.org/configuration/

Jake


-- 
View this message in context: http://www.nabble.com/Proposal---A-Very-Simple-API-for-Reading-Simple-XML-Data-tp23804602p23823138.html
Sent from the Apache XML - Commons - Dev mailing list archive at Nabble.com.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Proposal - A Very Simple API for Reading Simple XML Data</title>
<author><name>&quot;Jacob Kjome&quot; &lt;hoju@visi.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200906.mbox/%3cweb-14788676@mailback2.g2host.com%3e"/>
<id>urn:uuid:%3cweb-14788676@mailback2-g2host-com%3e</id>
<updated>2009-06-01T15:43:27Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Have you considered commons-configuration [1]?  It seems to me it does what 
you want, while being very flexible and robust.


[1] http://commons.apache.org/configuration/

Jake

On Sun, 31 May 2009 09:24:48 -0700 (PDT)
  chris0 &lt;technical0@gmail.com&gt; wrote:
&gt; 
&gt; Hello,
&gt; 
&gt; I'm making this proposal because I couldn't find a good solution to a
&gt; problem that I recently had.
&gt; 
&gt; What I wanted to do was to configure an application with a simple XML file,
&gt; something along the lines of:
&gt; 
&gt; &lt;config&gt;
&gt; 	&lt;title&gt;test&lt;/title&gt;
&gt; 	&lt;version
&gt; 		major="1"
&gt; 		minor="2"/&gt;
&gt; 	&lt;roles&gt;
&gt; 		&lt;role name="admin"/&gt;
&gt; 		&lt;role name="user"/&gt;
&gt; 	&lt;/roles&gt;
&gt; 	&lt;users&gt;
&gt; 		&lt;user name="joe" password="pass" role="admin"/&gt;
&gt; 		&lt;user name="harry" password="secret" role="user"/&gt;
&gt; 	&lt;/users&gt;
&gt; &lt;/config&gt;
&gt; 
&gt; So the point is that it's really a very simple bit of XML data and what I
&gt; wanted was a nice easy way to read it in. The current options seem to be
&gt; SAX, DOM or JAXB.
&gt; 
&gt; To use JAXB I need an XSD which is just complicating things too much for a
&gt; simple config file. SAX is a bit low-level and complicated too. The best
&gt; option is probably DOM, but even DOM is quite verbose. Infact DOM is verbose
&gt; enough that it made me think for a while if I could just use some other
&gt; mechanism such as a properties file so that I didn't have to bother with
&gt; DOM.
&gt; 
&gt;For the purpose of this proposal I've written what I think is pretty much
&gt; the most concise way to parse this data with DOM. Also note that I want to
&gt; provide some basic error reporting if the XML data is not in the expected
&gt; format. The code follows below:
&gt; 
&gt; 	FileInputStream fileInputStream = null;
&gt; 	try
&gt; 	{
&gt; 		String rootName = "config";
&gt; 		fileInputStream = new FileInputStream("config.xml");		
&gt; 		DocumentBuilderFactory builderFactory =
&gt; DocumentBuilderFactory.newInstance();
&gt; 		DocumentBuilder builder = builderFactory.newDocumentBuilder();
&gt; 		Document document = builder.parse(fileInputStream);
&gt; 		Element rootElement = document.getDocumentElement();
&gt; 		if(!rootElement.getNodeName().equals(rootName)) 
&gt; 			throw new Exception("Could not find root node: "+rootName);
&gt; 
&gt; 		NodeList titles = rootElement.getElementsByTagName("title");
&gt; 		if(titles.getLength()!=1) throw new Exception("Could not find individual
&gt; node: title");
&gt; 		Node title = titles.item(0);
&gt; 		out.println("title: "+title.getTextContent());
&gt; 		
&gt; 		NodeList versions = rootElement.getElementsByTagName("version");
&gt; 		if(versions.getLength()!=1) throw new Exception("Could not find individual
&gt; node: version");
&gt; 		Node version = versions.item(0);
&gt; 		NamedNodeMap versionAttributes = version.getAttributes();
&gt; 		Node major = versionAttributes.getNamedItem("major");
&gt; 		if(major==null) throw new Exception("Could not find attribute: major");
&gt; 		Node minor = versionAttributes.getNamedItem("minor");
&gt; 		if(minor==null) throw new Exception("Could not find attribute: minor");
&gt; 		out.println(
&gt; 			"version:
&gt; "+Integer.parseInt(major.getNodeValue())+"."+Integer.parseInt(minor.getNodeValue()));
&gt; 		
&gt; 		NodeList roles = rootElement.getElementsByTagName("roles");
&gt; 		if(roles.getLength()!=1) throw new Exception("Could not find individual
&gt; node: roles");
&gt; 		
&gt; 		NodeList roleList = ((Element)roles.item(0)).getElementsByTagName("role");
&gt; 		int n = roleList.getLength();
&gt; 		for(int i=0;i&lt;n;i++)
&gt; 		{
&gt; 			Node role = roleList.item(i);
&gt; 			Node roleName = role.getAttributes().getNamedItem("name");
&gt; 			if(roleName==null) throw new Exception("Could not find attribute: name");
&gt; 			out.println("role: name: "+roleName.getNodeValue());
&gt; 		}
&gt; 		
&gt; 		NodeList users = rootElement.getElementsByTagName("users");
&gt; 		if(users.getLength()!=1) throw new Exception("Could not find individual
&gt; node: users");
&gt; 		
&gt; 		NodeList userList = ((Element)users.item(0)).getElementsByTagName("user");
&gt; 		n = userList.getLength();
&gt; 		for(int i=0;i&lt;n;i++)
&gt; 		{
&gt; 			Node user = userList.item(i);
&gt; 			NamedNodeMap userAttributes = user.getAttributes();
&gt; 			Node userName = userAttributes.getNamedItem("name");
&gt; 			if(userName==null) throw new Exception("Could not find attribute: name");
&gt; 			Node userPassword = userAttributes.getNamedItem("password");
&gt; 			if(userPassword==null) throw new Exception("Could not find attribute:
&gt; password");
&gt; 			Node userRole = userAttributes.getNamedItem("role");
&gt; 			if(userPassword==null) throw new Exception("Could not find attribute:
&gt; role");
&gt; 			out.println(
&gt; 				"user: name: "+userName.getNodeValue()+
&gt; 				", password: "+userPassword.getNodeValue()+
&gt; 				", role: "+userRole.getNodeValue());
&gt; 		}
&gt; 	}
&gt; 	finally
&gt; 	{
&gt; 		if(fileInputStream!=null) fileInputStream.close();
&gt; 	}
&gt; 	
&gt; Output:
&gt; 
&gt; 	title: test
&gt; 	version: 1.2
&gt; 	role: name: admin
&gt; 	role: name: user
&gt; 	user: name: joe, password: pass, role: admin
&gt; 	user: name: harry, password: secret, role: user
&gt; 
&gt; And it's pretty verbose, 65 lines in all.
&gt; 
&gt; What I then decided to do was to write a very simple utility class called
&gt; XmlData that could be used to get this information as easily as possible,
&gt; and that would have basic built-in error reporting. When using the XmlData
&gt; class it is possible to write equivalent code to the above in a fraction of
&gt; the number of lines:
&gt; 
&gt; 	XmlData config = new XmlData("config.xml","config");
&gt; 
&gt; 	out.println("title: "+config.child("title").content());
&gt; 	
&gt; 	XmlData version = config.child("version");
&gt; 	out.println("version:
&gt; "+version.integer("major")+"."+version.integer("minor"));
&gt; 	
&gt; 	for(XmlData role:config.child("roles").children("role")) out.println("role:
&gt; name: "+role.string("name"));
&gt; 	
&gt; 	for(XmlData user:config.child("users").children("user"))
&gt; 	{
&gt; 		out.println(
&gt; 			"user: name: "+user.string("name")+
&gt; 			", password: "+user.string("password")+
&gt; 			", role: "+user.string("role"));
&gt; 	}
&gt; 
&gt; Output:
&gt; 
&gt; 	title: test
&gt; 	version: 1.2
&gt; 	role: name: admin
&gt; 	role: name: user
&gt; 	user: name: joe, password: pass, role: admin
&gt; 	user: name: harry, password: secret, role: user
&gt; 
&gt; As you can see, this is a really simple way to read basic XML files. All
&gt; nodes, attributes and content can very easily be accessed, and only one
&gt; class is required.
&gt; 
&gt; The XmlData class uses DOM to read an XML file then builds its own
&gt; representation of the tree in a very simple form, with only the basic data
&gt; present and all data exposed using standard Collections classes where
&gt; appropriate. The XmlData class source is included at the end of this post.
&gt; 
&gt; So in summary, the main point of this single utility class, XmlData, is to
&gt; provide a very simple and user-friendly way of reading simple XML files that
&gt; may contain simple data such as startup configurations. This class is not
&gt; supposed to be a substitute for DOM and is not intended for high-performance
&gt; scenarios, rather to make XML as easily accessible as possible.
&gt; 
&gt; [One improvement to this may be to base XmlData on SAX rather than DOM in
&gt; order to increase performance]
&gt; 
&gt; My proposal is perhaps to see something like XmlData as a Commons utility
&gt; class.
&gt; 
&gt; All comments very welcome.
&gt; 
&gt; Thanks,
&gt; 
&gt; Chris.
&gt; 
&gt; --
&gt; 
&gt; package main;
&gt; 
&gt; import java.io.FileInputStream;
&gt; import java.util.ArrayList;
&gt; import java.util.Collections;
&gt; import java.util.HashMap;
&gt; import java.util.List;
&gt; import java.util.Map;
&gt; 
&gt; import javax.xml.parsers.DocumentBuilder;
&gt; import javax.xml.parsers.DocumentBuilderFactory;
&gt; 
&gt; import org.w3c.dom.Document;
&gt; import org.w3c.dom.Element;
&gt; import org.w3c.dom.NamedNodeMap;
&gt; import org.w3c.dom.Node;
&gt; import org.w3c.dom.NodeList;
&gt; 
&gt; public class XmlData
&gt; {
&gt; 	private static Element rootElement(String filename, String rootName) throws
&gt; Exception
&gt; 	{
&gt; 		FileInputStream fileInputStream = null;
&gt; 		try
&gt; 		{
&gt; 			fileInputStream = new FileInputStream(filename);		
&gt; 			DocumentBuilderFactory builderFactory =
&gt; DocumentBuilderFactory.newInstance();
&gt; 			DocumentBuilder builder = builderFactory.newDocumentBuilder();
&gt; 		    Document document = builder.parse(fileInputStream);
&gt; 		    Element rootElement = document.getDocumentElement();
&gt; 		    if(!rootElement.getNodeName().equals(rootName)) 
&gt; 		    	throw new RuntimeException("Could not find root node: "+rootName);
&gt; 		    return rootElement;
&gt; 		}
&gt; 		finally
&gt; 		{
&gt; 			if(fileInputStream!=null) fileInputStream.close();
&gt; 		}
&gt; 	}
&gt; 	
&gt; 	public XmlData(String filename, String rootName) throws Exception
&gt; 	{
&gt; 		this(rootElement(filename,rootName));
&gt; 	}
&gt; 	
&gt; 	private XmlData(Element element)
&gt; 	{
&gt; 		this.name = element.getNodeName();
&gt; 		this.content = element.getTextContent();
&gt; 		NamedNodeMap namedNodeMap = element.getAttributes();
&gt; 		int n = namedNodeMap.getLength();
&gt; 		for(int i=0;i&lt;n;i++)
&gt; 		{
&gt; 			Node node = namedNodeMap.item(i);
&gt; 			String name = node.getNodeName();
&gt;    		addAttribute(name,node.getNodeValue());
&gt; 		}		
&gt; 		NodeList nodes = element.getChildNodes();
&gt; 		n = nodes.getLength();
&gt; 	    for(int i=0;i&lt;n;i++)
&gt; 	    {
&gt; 	    	Node node = nodes.item(i);
&gt; 	    	int type = node.getNodeType();
&gt; 	    	if(type==Node.ELEMENT_NODE) addChild(node.getNodeName(),new
&gt; XmlData((Element)node));
&gt; 	    }
&gt; 	}
&gt; 	
&gt; 	private void addAttribute(String name, String value)
&gt; 	{
&gt; 		nameAttributes.put(name,value);
&gt; 	}
&gt; 	
&gt; 	private void addChild(String name, XmlData child)
&gt; 	{
&gt; 		List&lt;XmlData&gt; children = nameChildren.get(name);
&gt; 		if(children==null)
&gt; 		{
&gt; 			children = new ArrayList&lt;XmlData&gt;();
&gt; 			nameChildren.put(name,children);
&gt; 		}
&gt; 		children.add(child);
&gt; 	}
&gt; 	
&gt; 	public String name()
&gt; 	{
&gt; 		return name;
&gt; 	}
&gt; 	
&gt; 	public String content()
&gt; 	{
&gt; 		return content;
&gt; 	}
&gt; 	
&gt; 	public XmlData child(String name) throws Exception
&gt; 	{
&gt; 		List&lt;XmlData&gt; children = children(name);
&gt; 		if(children.size()!=1) throw new Exception("Could not find individual
&gt; child node: "+name);
&gt; 		return children.get(0);
&gt; 	}
&gt; 	
&gt; 	public List&lt;XmlData&gt; children(String name)
&gt; 	{
&gt; 		List&lt;XmlData&gt; children = nameChildren.get(name);
&gt; 		return children==null ? Collections.EMPTY_LIST : children;			
&gt; 	}
&gt; 	
&gt; 	public String string(String name) throws Exception
&gt; 	{
&gt; 		String value = nameAttributes.get(name);
&gt; 		if(value==null) throw new Exception("Could not find attribute: "+name+",
&gt; in node: "+this.name);
&gt; 		return value;
&gt; 	}
&gt; 	
&gt; 	public int integer(String name) throws Exception
&gt; 	{
&gt; 		return Integer.parseInt(string(name)); 
&gt; 	}
&gt; 	
&gt; 	private String name;
&gt; 	private String content;
&gt; 	private Map&lt;String,String&gt; nameAttributes = new HashMap&lt;String,String&gt;();
&gt; 	private Map&lt;String,List&lt;XmlData&gt;&gt; nameChildren = new
&gt; HashMap&lt;String,List&lt;XmlData&gt;&gt;();
&gt; }
&gt; -- 
&gt; View this message in context: 
&gt;http://www.nabble.com/Proposal---A-Very-Simple-API-for-Reading-Simple-XML-Data-tp23804602p23804602.html
&gt; Sent from the Apache XML - Commons - Dev mailing list archive at Nabble.com.
&gt; 
&gt; 



</pre>
</div>
</content>
</entry>
<entry>
<title>Proposal - A Very Simple API for Reading Simple XML Data</title>
<author><name>chris0 &lt;technical0@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200905.mbox/%3c23804602.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c23804602-post@talk-nabble-com%3e</id>
<updated>2009-05-31T16:24:48Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hello,

I'm making this proposal because I couldn't find a good solution to a
problem that I recently had.

What I wanted to do was to configure an application with a simple XML file,
something along the lines of:

&lt;config&gt;
	&lt;title&gt;test&lt;/title&gt;
	&lt;version
		major="1"
		minor="2"/&gt;
	&lt;roles&gt;
		&lt;role name="admin"/&gt;
		&lt;role name="user"/&gt;
	&lt;/roles&gt;
	&lt;users&gt;
		&lt;user name="joe" password="pass" role="admin"/&gt;
		&lt;user name="harry" password="secret" role="user"/&gt;
	&lt;/users&gt;
&lt;/config&gt;

So the point is that it's really a very simple bit of XML data and what I
wanted was a nice easy way to read it in. The current options seem to be
SAX, DOM or JAXB.

To use JAXB I need an XSD which is just complicating things too much for a
simple config file. SAX is a bit low-level and complicated too. The best
option is probably DOM, but even DOM is quite verbose. Infact DOM is verbose
enough that it made me think for a while if I could just use some other
mechanism such as a properties file so that I didn't have to bother with
DOM.

For the purpose of this proposal I've written what I think is pretty much
the most concise way to parse this data with DOM. Also note that I want to
provide some basic error reporting if the XML data is not in the expected
format. The code follows below:

	FileInputStream fileInputStream = null;
	try
	{
		String rootName = "config";
		fileInputStream = new FileInputStream("config.xml");		
		DocumentBuilderFactory builderFactory =
DocumentBuilderFactory.newInstance();
		DocumentBuilder builder = builderFactory.newDocumentBuilder();
		Document document = builder.parse(fileInputStream);
		Element rootElement = document.getDocumentElement();
		if(!rootElement.getNodeName().equals(rootName)) 
			throw new Exception("Could not find root node: "+rootName);

		NodeList titles = rootElement.getElementsByTagName("title");
		if(titles.getLength()!=1) throw new Exception("Could not find individual
node: title");
		Node title = titles.item(0);
		out.println("title: "+title.getTextContent());
		
		NodeList versions = rootElement.getElementsByTagName("version");
		if(versions.getLength()!=1) throw new Exception("Could not find individual
node: version");
		Node version = versions.item(0);
		NamedNodeMap versionAttributes = version.getAttributes();
		Node major = versionAttributes.getNamedItem("major");
		if(major==null) throw new Exception("Could not find attribute: major");
		Node minor = versionAttributes.getNamedItem("minor");
		if(minor==null) throw new Exception("Could not find attribute: minor");
		out.println(
			"version:
"+Integer.parseInt(major.getNodeValue())+"."+Integer.parseInt(minor.getNodeValue()));
		
		NodeList roles = rootElement.getElementsByTagName("roles");
		if(roles.getLength()!=1) throw new Exception("Could not find individual
node: roles");
		
		NodeList roleList = ((Element)roles.item(0)).getElementsByTagName("role");
		int n = roleList.getLength();
		for(int i=0;i&lt;n;i++)
		{
			Node role = roleList.item(i);
			Node roleName = role.getAttributes().getNamedItem("name");
			if(roleName==null) throw new Exception("Could not find attribute: name");
			out.println("role: name: "+roleName.getNodeValue());
		}
		
		NodeList users = rootElement.getElementsByTagName("users");
		if(users.getLength()!=1) throw new Exception("Could not find individual
node: users");
		
		NodeList userList = ((Element)users.item(0)).getElementsByTagName("user");
		n = userList.getLength();
		for(int i=0;i&lt;n;i++)
		{
			Node user = userList.item(i);
			NamedNodeMap userAttributes = user.getAttributes();
			Node userName = userAttributes.getNamedItem("name");
			if(userName==null) throw new Exception("Could not find attribute: name");
			Node userPassword = userAttributes.getNamedItem("password");
			if(userPassword==null) throw new Exception("Could not find attribute:
password");
			Node userRole = userAttributes.getNamedItem("role");
			if(userPassword==null) throw new Exception("Could not find attribute:
role");
			out.println(
				"user: name: "+userName.getNodeValue()+
				", password: "+userPassword.getNodeValue()+
				", role: "+userRole.getNodeValue());
		}
	}
	finally
	{
		if(fileInputStream!=null) fileInputStream.close();
	}
	
Output:

	title: test
	version: 1.2
	role: name: admin
	role: name: user
	user: name: joe, password: pass, role: admin
	user: name: harry, password: secret, role: user

And it's pretty verbose, 65 lines in all.

What I then decided to do was to write a very simple utility class called
XmlData that could be used to get this information as easily as possible,
and that would have basic built-in error reporting. When using the XmlData
class it is possible to write equivalent code to the above in a fraction of
the number of lines:

	XmlData config = new XmlData("config.xml","config");

	out.println("title: "+config.child("title").content());
	
	XmlData version = config.child("version");
	out.println("version:
"+version.integer("major")+"."+version.integer("minor"));
	
	for(XmlData role:config.child("roles").children("role")) out.println("role:
name: "+role.string("name"));
	
	for(XmlData user:config.child("users").children("user"))
	{
		out.println(
			"user: name: "+user.string("name")+
			", password: "+user.string("password")+
			", role: "+user.string("role"));
	}

Output:

	title: test
	version: 1.2
	role: name: admin
	role: name: user
	user: name: joe, password: pass, role: admin
	user: name: harry, password: secret, role: user

As you can see, this is a really simple way to read basic XML files. All
nodes, attributes and content can very easily be accessed, and only one
class is required.

The XmlData class uses DOM to read an XML file then builds its own
representation of the tree in a very simple form, with only the basic data
present and all data exposed using standard Collections classes where
appropriate. The XmlData class source is included at the end of this post.

So in summary, the main point of this single utility class, XmlData, is to
provide a very simple and user-friendly way of reading simple XML files that
may contain simple data such as startup configurations. This class is not
supposed to be a substitute for DOM and is not intended for high-performance
scenarios, rather to make XML as easily accessible as possible.

[One improvement to this may be to base XmlData on SAX rather than DOM in
order to increase performance]

My proposal is perhaps to see something like XmlData as a Commons utility
class.

All comments very welcome.

Thanks,

Chris.

--

package main;

import java.io.FileInputStream;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;

import org.w3c.dom.Document;
import org.w3c.dom.Element;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.w3c.dom.NodeList;

public class XmlData
{
	private static Element rootElement(String filename, String rootName) throws
Exception
	{
		FileInputStream fileInputStream = null;
		try
		{
			fileInputStream = new FileInputStream(filename);		
			DocumentBuilderFactory builderFactory =
DocumentBuilderFactory.newInstance();
			DocumentBuilder builder = builderFactory.newDocumentBuilder();
		    Document document = builder.parse(fileInputStream);
		    Element rootElement = document.getDocumentElement();
		    if(!rootElement.getNodeName().equals(rootName)) 
		    	throw new RuntimeException("Could not find root node: "+rootName);
		    return rootElement;
		}
		finally
		{
			if(fileInputStream!=null) fileInputStream.close();
		}
	}
	
	public XmlData(String filename, String rootName) throws Exception
	{
		this(rootElement(filename,rootName));
	}
	
	private XmlData(Element element)
	{
		this.name = element.getNodeName();
		this.content = element.getTextContent();
		NamedNodeMap namedNodeMap = element.getAttributes();
		int n = namedNodeMap.getLength();
		for(int i=0;i&lt;n;i++)
		{
			Node node = namedNodeMap.item(i);
			String name = node.getNodeName();
    		addAttribute(name,node.getNodeValue());
		}		
		NodeList nodes = element.getChildNodes();
		n = nodes.getLength();
	    for(int i=0;i&lt;n;i++)
	    {
	    	Node node = nodes.item(i);
	    	int type = node.getNodeType();
	    	if(type==Node.ELEMENT_NODE) addChild(node.getNodeName(),new
XmlData((Element)node));
	    }
	}
	
	private void addAttribute(String name, String value)
	{
		nameAttributes.put(name,value);
	}
	
	private void addChild(String name, XmlData child)
	{
		List&lt;XmlData&gt; children = nameChildren.get(name);
		if(children==null)
		{
			children = new ArrayList&lt;XmlData&gt;();
			nameChildren.put(name,children);
		}
		children.add(child);
	}
	
	public String name()
	{
		return name;
	}
	
	public String content()
	{
		return content;
	}
	
	public XmlData child(String name) throws Exception
	{
		List&lt;XmlData&gt; children = children(name);
		if(children.size()!=1) throw new Exception("Could not find individual
child node: "+name);
		return children.get(0);
	}
	
	public List&lt;XmlData&gt; children(String name)
	{
		List&lt;XmlData&gt; children = nameChildren.get(name);
		return children==null ? Collections.EMPTY_LIST : children;			
	}
	
	public String string(String name) throws Exception
	{
		String value = nameAttributes.get(name);
		if(value==null) throw new Exception("Could not find attribute: "+name+",
in node: "+this.name);
		return value;
	}
	
	public int integer(String name) throws Exception
	{
		return Integer.parseInt(string(name)); 
	}
	
	private String name;
	private String content;
	private Map&lt;String,String&gt; nameAttributes = new HashMap&lt;String,String&gt;();
	private Map&lt;String,List&lt;XmlData&gt;&gt; nameChildren = new
HashMap&lt;String,List&lt;XmlData&gt;&gt;();
}
-- 
View this message in context: http://www.nabble.com/Proposal---A-Very-Simple-API-for-Reading-Simple-XML-Data-tp23804602p23804602.html
Sent from the Apache XML - Commons - Dev mailing list archive at Nabble.com.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to make a proposal</title>
<author><name>chris0 &lt;technical0@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200905.mbox/%3c23804070.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c23804070-post@talk-nabble-com%3e</id>
<updated>2009-05-31T15:21:09Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Thanks Michael, post to follow...


Michael Glavassevich-3 wrote:
&gt; 
&gt; Hello Chris,
&gt; 
&gt; If you have ideas for a new XML Commons component feel free to share them
&gt; with the list.
&gt; 
&gt; Thanks.
&gt; 
&gt; Michael Glavassevich
&gt; XML Parser Development
&gt; IBM Toronto Lab
&gt; E-mail: mrglavas@ca.ibm.com.
&gt; E-mail: mrglavas@apache.org
&gt; 
&gt; chris0 &lt;technical0@gmail.com&gt; wrote on 05/31/2009 06:18:15 AM:
&gt; 
&gt;&gt; Hello,
&gt;&gt;
&gt;&gt; Suppose I wanted to make a proposal for something to be included in
&gt; Commons,
&gt;&gt; is there any particular way I should go about it, or should I just post
&gt; it
&gt;&gt; in this forum?
&gt;&gt;
&gt;&gt; Thanks,
&gt;&gt;
&gt;&gt; Chris
&gt;&gt; --
&gt;&gt; View this message in context: http://www.nabble.com/How-to-make-a-
&gt;&gt; proposal-tp23801735p23801735.html
&gt;&gt; Sent from the Apache XML - Commons - Dev mailing list archive at
&gt; Nabble.com.
&gt; 

-- 
View this message in context: http://www.nabble.com/Re%3A-How-to-make-a-proposal-tp23802770p23804070.html
Sent from the Apache XML - Commons - Dev mailing list archive at Nabble.com.



</pre>
</div>
</content>
</entry>
<entry>
<title>Re: How to make a proposal</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200905.mbox/%3cOF695587CC.3210E9AD-ON852575C7.00464FEA-852575C7.004675A1@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOF695587CC-3210E9AD-ON852575C7-00464FEA-852575C7-004675A1@ca-ibm-com%3e</id>
<updated>2009-05-31T12:49:33Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII

Hello Chris,

If you have ideas for a new XML Commons component feel free to share them
with the list.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com.
E-mail: mrglavas@apache.org

chris0 &lt;technical0@gmail.com&gt; wrote on 05/31/2009 06:18:15 AM:

&gt; Hello,
&gt;
&gt; Suppose I wanted to make a proposal for something to be included in
Commons,
&gt; is there any particular way I should go about it, or should I just post
it
&gt; in this forum?
&gt;
&gt; Thanks,
&gt;
&gt; Chris
&gt; --
&gt; View this message in context: http://www.nabble.com/How-to-make-a-
&gt; proposal-tp23801735p23801735.html
&gt; Sent from the Apache XML - Commons - Dev mailing list archive at
Nabble.com.

</pre>
</div>
</content>
</entry>
<entry>
<title>How to make a proposal</title>
<author><name>chris0 &lt;technical0@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200905.mbox/%3c23801735.post@talk.nabble.com%3e"/>
<id>urn:uuid:%3c23801735-post@talk-nabble-com%3e</id>
<updated>2009-05-31T10:18:15Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>

Hello,

Suppose I wanted to make a proposal for something to be included in Commons,
is there any particular way I should go about it, or should I just post it
in this forum?

Thanks,

Chris
-- 
View this message in context: http://www.nabble.com/How-to-make-a-proposal-tp23801735p23801735.html
Sent from the Apache XML - Commons - Dev mailing list archive at Nabble.com.



</pre>
</div>
</content>
</entry>
<entry>
<title>May Board Report</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200905.mbox/%3cOFE0AA3461.D1C7D829-ON852575B5.000B165B-852575B5.000B824B@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOFE0AA3461-D1C7D829-ON852575B5-000B165B-852575B5-000B824B@ca-ibm-com%3e</id>
<updated>2009-05-13T02:05:35Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: quoted-printable



Hey all,

The May board meeting is coming up (next week I believe) and we're due =
to
report. The page for the report is setup on the Wiki here:
http://wiki.apache.org/xerces/May2009. As usual I'll cover Xerces-J and=
 XML
Commons. Could other committers please fill in the status for Xerces-C =
and
Xerces-P.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org=


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 45207] Windows pathnames with drive letters not handled correctly</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200905.mbox/%3c20090507015157.017A329A0011@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20090507015157-017A329A0011@brutus-apache-org%3e</id>
<updated>2009-05-07T01:51:56Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=45207


Kevan Simpson &lt;kevan.simpson@gmail.com&gt; changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |kevan.simpson@gmail.com




-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 45207] Windows pathnames with drive letters not handled correctly</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200905.mbox/%3c20090507014941.2248029A0011@brutus.apache.org%3e"/>
<id>urn:uuid:%3c20090507014941-2248029A0011@brutus-apache-org%3e</id>
<updated>2009-05-07T01:49:41Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=45207





--- Comment #1 from Kevan Simpson &lt;kevan.simpson@gmail.com&gt;  2009-05-06 18:49:39 PST
---
Encountered same issue, applied patch in local environment and it worked.

When can/will this patch be applied in a release?

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


</pre>
</div>
</content>
</entry>
<entry>
<title>DO NOT REPLY [Bug 47112] New: thread lock of XMLEntityScanner' load method</title>
<author><name>bugzilla@apache.org</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200904.mbox/%3cbug-47112-4657@https.issues.apache.org/bugzilla/%3e"/>
<id>urn:uuid:%3cbug-47112-4657@https-issues-apache-org/bugzilla/%3e</id>
<updated>2009-04-28T19:19:18Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
https://issues.apache.org/bugzilla/show_bug.cgi?id=47112

           Summary: thread lock of XMLEntityScanner' load method
           Product: XmlCommons
           Version: 1.x
          Platform: HP
        OS/Version: Linux
            Status: NEW
          Severity: critical
          Priority: P2
         Component: SAX
        AssignedTo: commons-dev@xml.apache.org
        ReportedBy: xmlman@nhncorp.com


Hi, 

Iâ€™m using xercesImpl-2.8.1.jar in tomcat 5.5.20.
This xerces caused tomcat hang a few days ago.

The thread locks happened after XMLEntityScanner' load method was excuted.
I know there is no the load method of XMLEntityScanner class in version 2.9.
I want to know thre load method of XMLEntityScanner class is bug.
Many java.io.Exception situations after XMLEntityScanner' load call were
searched in Google.

Please help. 

Thanks.

Sample thread of java thread dump follow:

"TP-Processor325" daemon prio=1 tid=0x69eaed00 nid=0xcf0 runnable
[0x68705000..0x687061b0]
         at java.net.SocketInputStream.socketRead0(Native Method)
         at java.net.SocketInputStream.read(SocketInputStream.java:129)
         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
         at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
         at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
         - locked &lt;0x8eece9e0&gt; (a java.io.BufferedInputStream)
         at
sun.net.www.http.ChunkedInputStream.fastRead(ChunkedInputStream.java:221)
         at
sun.net.www.http.ChunkedInputStream.read(ChunkedInputStream.java:662)
         - locked &lt;0x8eecea00&gt; (a sun.net.www.http.ChunkedInputStream)
         at java.io.FilterInputStream.read(FilterInputStream.java:111)
         at
sun.net.www.protocol.http.HttpURLConnection$HttpInputStream.read(HttpURLConnection.java:2172)
         at
org.apache.xerces.impl.XMLEntityManager$RewindableInputStream.read(Unknown
Source)
         at
sun.nio.cs.StreamDecoder$CharsetSD.readBytes(StreamDecoder.java:411)
         at sun.nio.cs.StreamDecoder$CharsetSD.implRead(StreamDecoder.java:453)
         at sun.nio.cs.StreamDecoder.read(StreamDecoder.java:183)
         - locked &lt;0x8eeceab0&gt; (a java.io.InputStreamReader)
         at java.io.InputStreamReader.read(InputStreamReader.java:167)
         at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
         at org.apache.xerces.impl.XMLEntityScanner.peekChar(Unknown Source)
         at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanCDATASection(Unknown
Source)
         at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
         at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown
Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown
Source)
         at org.apache.commons.digester.Digester.parse(Digester.java:1704)
         at com.naver.local.weather.common.DigesterParser.parse(Unknown Source)
         at
com.naver.local.weather.common.bo.WeatherBaseBOImpl.getWeeklyWeatherBeginToday(Unknown
Source)
         at
com.naver.local.weather.common.bo.WeatherBaseBOImpl.getCityWeather(Unknown
Source)
         at
com.naver.local.weather.common.interceptor.LocalInjectInterceptor.setLeftFrameData(Unknown
Source)
         at
com.naver.local.weather.common.interceptor.LocalInjectInterceptor.intercept(Unknown
Source)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.nhncorp.lucy.web.interceptor.PermissionInterceptor.intercept(PermissionInterceptor.java:71)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.nhncorp.lucy.web.interceptor.UserInterceptor.intercept(UserInterceptor.java:88)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.nhncorp.lucy.web.interceptor.MDCLoggingInterceptor.intercept(MDCLoggingInterceptor.java:36)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.nhncorp.lucy.web.interceptor.PagerInfoInterceptor.intercept(PagerInfoInterceptor.java:67)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.nhncorp.lucy.web.interceptor.MetaCharsetInterceptor.intercept(MetaCharsetInterceptor.java:50)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.naver.local.weather.common.interceptor.ContentFilterInterceptor.intercept(Unknown
Source)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.nhncorp.lucy.web.interceptor.RequestParamsInterceptor.intercept(RequestParamsInterceptor.java:44)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.opensymphony.xwork.interceptor.AroundInterceptor.intercept(AroundInterceptor.java:31)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.opensymphony.xwork.interceptor.ExceptionMappingInterceptor.intercept(ExceptionMappingInterceptor.java:186)
         at
com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:190)
         at
com.opensymphony.xwork.DefaultActionProxy.execute(DefaultActionProxy.java:116)
         at
com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:225)
         at
com.opensymphony.webwork.dispatcher.FilterDispatcher.doFilter(FilterDispatcher.java:202)
         at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at
com.opensymphony.webwork.dispatcher.ActionContextCleanUp.doFilter(ActionContextCleanUp.java:88)
         at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at
com.nhncorp.lucy.web.filter.WebworkActionCheckFilter.doFilter(WebworkActionCheckFilter.java:75)
         at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at
com.nhncorp.lucy.web.filter.ServiceFilter.doFilter(ServiceFilter.java:85)
         at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
         at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
         at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
         at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
         at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
         at
org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
         at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:595)

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

</pre>
</div>
</content>
</entry>
<entry>
<title>Re: Buildbot at Apache, and a new builds mailing list.</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200904.mbox/%3cOFB947A04E.C8AC182D-ON85257595.007D518B-85257596.001EF16C@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOFB947A04E-C8AC182D-ON85257595-007D518B-85257596-001EF16C@ca-ibm-com%3e</id>
<updated>2009-04-12T05:38:36Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII

FYI.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

"Gavin" &lt;gavin@16degrees.com.au&gt; wrote on 04/11/2009 05:15:02 AM:

&gt; Hi All,
&gt;
&gt; This is a heads-up that Buildbot CI server is now available for projects
&gt; use.
&gt;
&gt; Some projects that have been used for testing Buildbot here at the ASF
can
&gt; be seen at http://ci.apache.org.
&gt;     I have a development installation at
&gt; http://build01.16degrees.com.au:8020/waterfall where I have been testing
&gt; many more projects (about 20 including the Buildbot project itself).
&gt;
&gt; Any new or existing project that wants to add Buildbot to their arsenal
of
&gt; tools to help them build,test,snapshot,deploy,etc can create an issue on
the
&gt; Infrastructure Issue Tracker :
&gt;
&gt; https://issues.apache.org/jira/browse/INFRA/component/12312782
&gt;
&gt; There has been a new mailing list created specifically for all our CI
&gt; servers (Buildbot, Hudson, Continuum) - builds@apache.org - sign up at
&gt; builds-subscribe@apache.org .
&gt;
&gt; I made use of our infra blog and posted a short note about it at
&gt;
&gt; https://blogs.apache.org/infra/entry/new_mailing_list_for_ci
&gt;
&gt; So, any requests to make use of any of the build servers are made to the
&gt; appropriate Jira component on the Infra Issue Tracker. All discussions
&gt; regarding them should be directed to the builds@apache.org list from now
on.
&gt;
&gt; Thanks, and see you there!
&gt;
&gt; Gav...

</pre>
</div>
</content>
</entry>
<entry>
<title>Fw: [GSoC 2009] Apache is officially participating in Google Summer of 	Code 2009</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200903.mbox/%3cOF0575608E.606FFDA3-ON8525757F.00146D0C-8525757F.00157260@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOF0575608E-606FFDA3-ON8525757F-00146D0C-8525757F-00157260@ca-ibm-com%3e</id>
<updated>2009-03-20T03:55:01Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: quoted-printable



Hi all,

Applications for this summer's GSoC will be starting on Monday. As many=
 of
you know Xerces has participated the last three years. Looking forward =
to
the opportunity again.

I'm planning on posting a couple project ideas or so for Xerces-J. If
you're also interested in being a mentor feel free to add your own idea=
s to
the Wiki, and if you're a student interested in participating we'd like=
 to
hear from you with your ideas.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

Luciano Resende &lt;lresende@apache.org&gt; wrote on 03/19/2009 05:52:29 PM:

&gt; Dear PMC,
&gt;
&gt; It's now official, Google has announced that The Apache Software
&gt; Foundation was selected as one of the participating organization in
&gt; the GSoC 2009 program. This is an excellent opportunity for Apache, a=
s
&gt; it allows projects to build/increase its community, it also help
&gt; students to learn about open source, about Apache Software Foundation=

&gt; and how to do things the "Apache Way".
&gt;
&gt; Please start advertising the program and discussing project ideas wit=
h
&gt; your project community. Then add your project ideas to the ASF GSoC
&gt; 2009 Official Project Ideas page [1], as this is going to be the most=

&gt; visible place for students. Per GSoC 2009 timeline, Students should
&gt; officially start applying for these ideas on March 23.
&gt;
&gt; ASF Members and committers can volunteer to be mentors in the GSoC
&gt; 2009 program (see [2] for more details about being a mentor). We
&gt; invite all mentors and GSoC interested parties to subscribe to the
&gt; code-awards@a.o mailing list [3] to coordinate work between mentors,
&gt; ask questions and get updates related to GSoC 2009 program.
&gt;
&gt; Please, feel free to forward this announce to any appropriate dev@ or=

&gt; users@ lists so your larger community can hear about the GSoC 2009
&gt; program.
&gt;
&gt; [1] http://wiki.apache.org/general/SummerOfCode2009
&gt; [2] http://wiki.apache.org/general/SummerOfCodeMentor
&gt; [3] mailto:code-awards-subscribe@apache.org
&gt;
&gt; --
&gt; Luciano Resende
&gt; http://people.apache.org/~lresende
&gt; http://lresende.blogspot.com/=


</pre>
</div>
</content>
</entry>
<entry>
<title>Re: importNode missing namespace</title>
<author><name>Michael Glavassevich &lt;mrglavas@ca.ibm.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200903.mbox/%3cOF4D4D8250.E7CC039F-ON85257578.00184597-85257578.0018E8D5@ca.ibm.com%3e"/>
<id>urn:uuid:%3cOF4D4D8250-E7CC039F-ON85257578-00184597-85257578-0018E8D5@ca-ibm-com%3e</id>
<updated>2009-03-13T04:33:44Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Content-type: text/plain; charset=US-ASCII

Richard &lt;wrongch@gmail.com&gt; wrote on 03/13/2009 12:20:42 AM:

&gt; Hi, I got such problem with importNode, when try to import a Node
&gt; from one Document into another.
&gt;
&gt; DocumentA
&gt; &lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;m:root xmlns:m='TEST'&gt;&lt;m:
&gt; s&gt;TEST&lt;/m:s&gt;&lt;/m:root&gt;
&gt; DocumentB:
&gt; &lt;?xml version='1.0' encoding='utf-8' ?&gt;&lt;n:root xmlns:n='TEST'&gt;&lt;n:
&gt; t&gt;TEST&lt;/n:t&gt;&lt;/n:root&gt;
&gt;
&gt; I try to import m:s in DocumentA into DocumentB, and replace n:t Node
&gt;
&gt; expected:
&gt; &lt;?xml version='1.0' encoding='utf-8' ?&gt;&lt;n:root xmlns:n='TEST'&gt;&lt;n:
&gt; s&gt;TEST&lt;/n:s&gt;&lt;/n:root&gt;
&gt;
&gt; but the result was:
&gt; &lt;?xml version='1.0' encoding='utf-8' ?&gt;&lt;n:root xmlns:n='TEST'&gt;&lt;m:
&gt; s&gt;TEST&lt;/m:s&gt;&lt;/n:root&gt;
&gt;
&gt; Can somebody tell me why?

You've left out all sorts of details, but you're probably not using a
namespace-aware or namespace fixing serializer when you serialize the
document. DOM Level 3's LSSerializer would write [1] this out correctly.

Thanks.

[1]
http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms.html#normalizeDocumentAlgo

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

</pre>
</div>
</content>
</entry>
<entry>
<title>importNode missing namespace</title>
<author><name>Richard &lt;wrongch@gmail.com&gt;</name></author>
<link rel="alternate" href="http://mail-archives.apache.org/mod_mbox/xml-commons-dev/200903.mbox/%3c1be492430903122120o1211ba19icc6ef565709cd279@mail.gmail.com%3e"/>
<id>urn:uuid:%3c1be492430903122120o1211ba19icc6ef565709cd279@mail-gmail-com%3e</id>
<updated>2009-03-13T04:20:42Z</updated>
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<pre>
Hi, I got such problem with importNode, when try to import a Node from one
Document into another.


DocumentA
&lt;?xml version='1.0' encoding='utf-8'?&gt;&lt;m:root
xmlns:m='TEST'&gt;&lt;m:s&gt;TEST&lt;/m:s&gt;&lt;/m:root&gt;
DocumentB:
&lt;?xml version='1.0' encoding='utf-8' ?&gt;&lt;n:root
xmlns:n='TEST'&gt;&lt;n:t&gt;TEST&lt;/n:t&gt;&lt;/n:root&gt;

I try to import m:s in DocumentA into DocumentB, and replace n:t Node

expected:
&lt;?xml version='1.0' encoding='utf-8' ?&gt;&lt;n:root
xmlns:n='TEST'&gt;&lt;n:s&gt;TEST&lt;/n:s&gt;&lt;/n:root&gt;

but the result was:
&lt;?xml version='1.0' encoding='utf-8' ?&gt;&lt;n:root
xmlns:n='TEST'&gt;&lt;m:s&gt;TEST&lt;/m:s&gt;&lt;/n:root&gt;


Can somebody tell me why?


</pre>
</div>
</content>
</entry>
</feed>
