tied myself in prezel with validation name namespaces

View: New views
3 Messages — Rating Filter:   Alert me  

tied myself in prezel with validation name namespaces

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I'm writing a document with a document element like:

<foo xmlns="urn:my-namespace">

I do this by writing the start and then setting the default namespace.

Well, this causes validation to reject on the grounds that the element has the wrong namespace.

I can't find any way to get this right without assigning a prefix, which I don't really want.


Re: tied myself in prezel with validation name namespaces

by Cowtowncoder :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Thu, Sep 24, 2009 at 9:35 AM, Benson Margulies <bimargulies@...> wrote:
> I'm writing a document with a document element like:
>
> <foo xmlns="urn:my-namespace">
>
> I do this by writing the start and then setting the default namespace.

Which should be correct...

> Well, this causes validation to reject on the grounds that the element has
> the wrong namespace.
>
> I can't find any way to get this right without assigning a prefix, which I
> don't really want.

Just to clarify: your writeStartElement() does get correct namespace
URI, and null or empty String as prefix?
Is this in namespace-repairing mode or not? And validating against W3C
Schema? (not dtd, dtds still rely on prefixes, alas)
Do you have line number for exception where validation problem is reported?

-+ Tatu +-

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: tied myself in prezel with validation name namespaces

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I updated the old JIRA on this subject. I'll cook at test case and attach it.

On Thu, Sep 24, 2009 at 3:59 PM, Tatu Saloranta <tsaloranta@...> wrote:
On Thu, Sep 24, 2009 at 9:35 AM, Benson Margulies <bimargulies@...> wrote:
> I'm writing a document with a document element like:
>
> <foo xmlns="urn:my-namespace">
>
> I do this by writing the start and then setting the default namespace.

Which should be correct...

> Well, this causes validation to reject on the grounds that the element has
> the wrong namespace.
>
> I can't find any way to get this right without assigning a prefix, which I
> don't really want.

Just to clarify: your writeStartElement() does get correct namespace
URI, and null or empty String as prefix?
Is this in namespace-repairing mode or not? And validating against W3C
Schema? (not dtd, dtds still rely on prefixes, alas)
Do you have line number for exception where validation problem is reported?

-+ Tatu +-

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email