You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by Aaron Mulder <am...@alumni.princeton.edu> on 2003/10/08 20:01:49 UTC
RE: XMLBeans Speed (plus a "Should not be called" error)
On Wed, 8 Oct 2003, Eric Vasilik wrote:
> What, exactly, is taking 2 seconds? Is it:
>
> XmlObject.Factory.parse( ... ) ??? (Or similar parse on a generated
> Factory?)
>
> The schema associated with an instance should not affect the initial
> load time for that document.
>
> Are you timing the first load, or are you warming up the VM before
> performing the timing?
I was timing the first load. I just tried again where I loaded once
before timing and then timed the second load, and it was plenty fast. So
I guess you're right that it's the "warm-up" that causes the delay.
Since my first question was so easy, here's another. I am trying to run
the SchemaCompiler on the schema located at:
http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd
The schema compiler gives me this:
"web-jsptaglibrary_2_0.xsd:7: error: Should not be called
Any thoughts on what that means? If I take out line 6, it works.
Line 6 is the "xmlns:xml" line in the snippet below:
<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema
targetNamespace="http://java.sun.com/xml/ns/j2ee"
xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
elementFormDefault="qualified"
attributeFormDefault="unqualified"
version="2.0">
I guess I just don't understand why that line is in error.
Thanks,
Aaron
P.S. If you get past the line 7 error, you'll also need the schema
http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd
- ---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
Re: [xmlbeans-dev] RE: XMLBeans Speed (plus a "Should not be called" error)
Posted by David Bau <da...@bea.com>.
The XML namespaces spec basically says you can't have user-defined namespace
prefixes that start with the letters "xml". And the exact prefix xml: is
built-in so you shouldn't need to redefine it.
http://www.w3.org/TR/REC-xml-names/
Namespace Constraint: Leading "XML"
Prefixes beginning with the three-letter sequence x, m, l, in any case
combination, are reserved for use by XML and XML-related specifications.
We're catching an error from the underlying XML parser but not passing on a
very good error message. If you get a chance can you open a bugzilla bug
about the message?
David
----- Original Message -----
From: "Aaron Mulder" <am...@alumni.princeton.edu>
To: <xm...@xml.apache.org>
Sent: Wednesday, October 08, 2003 2:01 PM
Subject: [xmlbeans-dev] RE: XMLBeans Speed (plus a "Should not be called"
error)
> On Wed, 8 Oct 2003, Eric Vasilik wrote:
> > What, exactly, is taking 2 seconds? Is it:
> >
> > XmlObject.Factory.parse( ... ) ??? (Or similar parse on a generated
> > Factory?)
> >
> > The schema associated with an instance should not affect the initial
> > load time for that document.
> >
> > Are you timing the first load, or are you warming up the VM before
> > performing the timing?
>
> I was timing the first load. I just tried again where I loaded once
> before timing and then timed the second load, and it was plenty fast. So
> I guess you're right that it's the "warm-up" that causes the delay.
>
> Since my first question was so easy, here's another. I am trying to run
> the SchemaCompiler on the schema located at:
>
> http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd
>
> The schema compiler gives me this:
>
> "web-jsptaglibrary_2_0.xsd:7: error: Should not be called
>
> Any thoughts on what that means? If I take out line 6, it works.
> Line 6 is the "xmlns:xml" line in the snippet below:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema
> targetNamespace="http://java.sun.com/xml/ns/j2ee"
> xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xml="http://www.w3.org/XML/1998/namespace"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified"
> version="2.0">
>
>
> I guess I just don't understand why that line is in error.
>
> Thanks,
> Aaron
>
> P.S. If you get past the line 7 error, you'll also need the schema
> http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: xmlbeans-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>
>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
Re: [xmlbeans-dev] RE: XMLBeans Speed (plus a "Should not be called" error)
Posted by David Bau <da...@bea.com>.
The XML namespaces spec basically says you can't have user-defined namespace
prefixes that start with the letters "xml". And the exact prefix xml: is
built-in so you shouldn't need to redefine it.
http://www.w3.org/TR/REC-xml-names/
Namespace Constraint: Leading "XML"
Prefixes beginning with the three-letter sequence x, m, l, in any case
combination, are reserved for use by XML and XML-related specifications.
We're catching an error from the underlying XML parser but not passing on a
very good error message. If you get a chance can you open a bugzilla bug
about the message?
David
----- Original Message -----
From: "Aaron Mulder" <am...@alumni.princeton.edu>
To: <xm...@xml.apache.org>
Sent: Wednesday, October 08, 2003 2:01 PM
Subject: [xmlbeans-dev] RE: XMLBeans Speed (plus a "Should not be called"
error)
> On Wed, 8 Oct 2003, Eric Vasilik wrote:
> > What, exactly, is taking 2 seconds? Is it:
> >
> > XmlObject.Factory.parse( ... ) ??? (Or similar parse on a generated
> > Factory?)
> >
> > The schema associated with an instance should not affect the initial
> > load time for that document.
> >
> > Are you timing the first load, or are you warming up the VM before
> > performing the timing?
>
> I was timing the first load. I just tried again where I loaded once
> before timing and then timed the second load, and it was plenty fast. So
> I guess you're right that it's the "warm-up" that causes the delay.
>
> Since my first question was so easy, here's another. I am trying to run
> the SchemaCompiler on the schema located at:
>
> http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd
>
> The schema compiler gives me this:
>
> "web-jsptaglibrary_2_0.xsd:7: error: Should not be called
>
> Any thoughts on what that means? If I take out line 6, it works.
> Line 6 is the "xmlns:xml" line in the snippet below:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsd:schema
> targetNamespace="http://java.sun.com/xml/ns/j2ee"
> xmlns:j2ee="http://java.sun.com/xml/ns/j2ee"
> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> xmlns:xml="http://www.w3.org/XML/1998/namespace"
> elementFormDefault="qualified"
> attributeFormDefault="unqualified"
> version="2.0">
>
>
> I guess I just don't understand why that line is in error.
>
> Thanks,
> Aaron
>
> P.S. If you get past the line 7 error, you'll also need the schema
> http://java.sun.com/xml/ns/j2ee/j2ee_1_4.xsd
>
>
> - ---------------------------------------------------------------------
> To unsubscribe, e-mail: xmlbeans-user-unsubscribe@xml.apache.org
> For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
> Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/
>
>
- ---------------------------------------------------------------------
To unsubscribe, e-mail: xmlbeans-user-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-user-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/