vardja | 4 Dec 19:55 2010
Picon

RuntimeException problem in xerces.AbstractXMLParser impl


Hello forum,
I extend AbstractXMLParser and override startElement method , wher I throw
custom RuntimeException, and whant to handle it in other class ,but
AbstractXMLParser defines ErrorHandler and somehow deals or wraps Exception
objects thrown in method .I'm new to xerces and still can't figure out how
to deal with it.Pleas any suggestion is very helpful .
Thanks in advance.
--

-- 
View this message in context: http://old.nabble.com/RuntimeException-problem-in--xerces.AbstractXMLParser--impl-tp30366635p30366635.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.
Dave Brosius | 4 Dec 21:11 2010

Re: RuntimeException problem in xerces.AbstractXMLParser impl

On 12/04/2010 01:55 PM, vardja wrote:
> Hello forum,
> I extend AbstractXMLParser and override startElement method , wher I throw
> custom RuntimeException, and whant to handle it in other class ,but
> AbstractXMLParser defines ErrorHandler and somehow deals or wraps Exception
> objects thrown in method .I'm new to xerces and still can't figure out how
> to deal with it.Pleas any suggestion is very helpful .
> Thanks in advance.

Is there a need to extend AbstractXMLParser ?

Typically you don't need your own parser, you just provide the standard 
parser with your own implementation of ContentHandler with and implement 
that classes startElement.

There is a default implementation of ContentHandler called 
DefaultHandler that you can extend to make things easier.

http://www.ibm.com/developerworks/xml/library/x-tiphandl.html
Michael Glavassevich | 6 Dec 20:32 2010
Picon

XML Commons has migrated to JIRA

XML Commons' issue tracking has just been migrated from Bugzilla to JIRA. You should use the JIRA project [1] from now on for opening, updating, etc.. bug reports for XML Commons External (xml-apis.jar) and the XML Commons Resolver (resolver.jar).

Thanks.

[1] https://issues.apache.org/jira/browse/XMLCOMMONS

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

Andrew Welch | 15 Dec 16:54 2010
Picon

XSD 1.1 using xerces 2.11

Hi,

How do you get an XSD 1.1 SchemaFactory using Xerces 2.11 ?

This line:

SchemaFactory.newInstance("http://www.w3.org/XML/XMLSchema/v1.1");

fails with the message:

"No SchemaFactory that implements the language..... could be found"

Looking in the jar, the class XMLSchema11Factory is missing from
org.apache.xerces.jaxp.validation... is that right?

thanks
andrew

--

-- 
Andrew Welch
http://andrewjwelch.com
Michael Glavassevich | 15 Dec 17:29 2010
Picon

Re: XSD 1.1 using xerces 2.11

Hi Andrew,

Sanity check... Did you download [1] the stable version of Xerces-J 2.11.0 or the XML Schema 1.1 beta version of 2.11.0?

You need the XML Schema 1.1 beta binary package.

Thanks.

[1] http://xerces.apache.org/mirrors.cgi#binary

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

Andrew Welch <andrew.j.welch <at> gmail.com> wrote on 12/15/2010 10:54:14 AM:

> Hi,
>
> How do you get an XSD 1.1 SchemaFactory using Xerces 2.11 ?
>
> This line:
>
> SchemaFactory.newInstance("http://www.w3.org/XML/XMLSchema/v1.1");
>
> fails with the message:
>
> "No SchemaFactory that implements the language..... could be found"
>
> Looking in the jar, the class XMLSchema11Factory is missing from
> org.apache.xerces.jaxp.validation... is that right?
>
> thanks
> andrew
>
>
> --
> Andrew Welch
> http://andrewjwelch.com
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe <at> xerces.apache.org
> For additional commands, e-mail: j-users-help <at> xerces.apache.org

Andrew Welch | 15 Dec 17:51 2010
Picon

Re: XSD 1.1 using xerces 2.11

> Sanity check... Did you download [1] the stable version of Xerces-J 2.11.0
> or the XML Schema 1.1 beta version of 2.11.0?
>
> You need the XML Schema 1.1 beta binary package.
>
> Thanks.
>
> [1] http://xerces.apache.org/mirrors.cgi#binary

Ahh sorry, I didn't see the "(XML Schema 1.1)" link...  not sure how I
missed it as its directly beneath the link I clicked.  Wood for the
trees time.

Now sorted, thanks.

--

-- 
Andrew Welch
http://andrewjwelch.com
sri kumar | 24 Dec 07:59 2010
Picon

(unknown)

http://synadyti.110mb.com/resefaky.html
WorkWhe nYo u WantT o

joe j robles | 29 Dec 22:38 2010
Picon

check for element name starts with lower case


Hi all,

1) We have a bunch of xsds that need to be checked for few things.
I want to write a java program using xerces to programatically check that
the following conditions are satisified in the xsds. IN CASE, the conditions
are not satisfied, need to generate a report about the failures which should
include line numbers and element details:

1a) All element names must begin with lower case
1b) All the complex types use the <all> order indicator instead of
<sequence>

How to accomplish this using xerces? If not, which parser to use?

2) How generate xml document dynamically from a xsd?

Thanks in advance for your valuable input.

--

-- 
View this message in context: http://old.nabble.com/check-for-element-name-starts-with-lower-case-tp30554151p30554151.html
Sent from the Xerces - J - Users mailing list archive at Nabble.com.
Mukul Gandhi | 30 Dec 11:06 2010
Picon

Re: check for element name starts with lower case

On Thu, Dec 30, 2010 at 3:08 AM, joe j robles <joe.j.robles <at> gmail.com> wrote:
> 1a) All element names must begin with lower case
> 1b) All the complex types use the <all> order indicator instead of
> <sequence>
>
> How to accomplish this using xerces? If not, which parser to use?

You can try using SAX or/and DOM APIs to read the XML schema
documents, and do necessary checks on your schema documents.

> 2) How generate xml document dynamically from a xsd?

In general, it's not possible to produce all XML documents
(potentially these can be infinite in number) which can be validated
by a given schema document. But I've heard of tools (please try a web
search) which can generate a sample set of XML documents given a
schema as input.

--

-- 
Regards,
Mukul Gandhi

Gmane