S
Scott Sauyet
Hi folks, I'm new to this neighborhood. If my question should be posed
elsewhere, I would appreciate a pointer as to where. Thanks.
It took me a while to chase down what the Crimson parser was talking
about with this exception: "java.lang.IllegalStateException: can't
declare any more prefixes in this context", but I got it. It means
that it wants to see no attributes defined before the namespace
attribution declaration. For instance,
<myns:element name="xyz" xmlns:myns="this fails" ... >
<myns:element xmlns:myns="this works" name="xyz" ... >
A developer working for a client tells me that this restriction is
"straight out of the XML spec", but I can't find a reference anywhere.
I was wondering if I'm missing something, or if this is true. I
thought the namespace declaration was treated like any other attribute.
Any pointer to a reference confirming or refuting that point would be
appreciated.
Unfortunately, the Crimson version is embedded inside WebSphere and I
haven't found a way to isolate a simple test, but when I reorder my
attributes to put the namespace one first, it gets me past the sticking
point. However I run into it again with XML I don't directly control
(written by Apache Axis.) And that seems to have me up against a wall.
I'm imagine that if I learn more about WebSphere configuration, I can
change parsers or configure this one differently, but this is for an
application that is supposed to just drop into an Application/Web
server without need for configuration.
So I guess there are two questions. First, I would like to know if
this behavior is according to spec. Second, I wonder if anyone has run
into this and found a way to get past it.
Thanks for any insight you can offer,
-- Scott Sauyet
elsewhere, I would appreciate a pointer as to where. Thanks.
It took me a while to chase down what the Crimson parser was talking
about with this exception: "java.lang.IllegalStateException: can't
declare any more prefixes in this context", but I got it. It means
that it wants to see no attributes defined before the namespace
attribution declaration. For instance,
<myns:element name="xyz" xmlns:myns="this fails" ... >
<myns:element xmlns:myns="this works" name="xyz" ... >
A developer working for a client tells me that this restriction is
"straight out of the XML spec", but I can't find a reference anywhere.
I was wondering if I'm missing something, or if this is true. I
thought the namespace declaration was treated like any other attribute.
Any pointer to a reference confirming or refuting that point would be
appreciated.
Unfortunately, the Crimson version is embedded inside WebSphere and I
haven't found a way to isolate a simple test, but when I reorder my
attributes to put the namespace one first, it gets me past the sticking
point. However I run into it again with XML I don't directly control
(written by Apache Axis.) And that seems to have me up against a wall.
I'm imagine that if I learn more about WebSphere configuration, I can
change parsers or configure this one differently, but this is for an
application that is supposed to just drop into an Application/Web
server without need for configuration.
So I guess there are two questions. First, I would like to know if
this behavior is according to spec. Second, I wonder if anyone has run
into this and found a way to get past it.
Thanks for any insight you can offer,
-- Scott Sauyet