The prefix "xmlns" cannot be bound to any namespace explicitly

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

The prefix "xmlns" cannot be bound to any namespace explicitly

Jean-Baptiste Quenot-2
Hello,

With this tiny little XQuery, eXist 20050805 complains:

------------------------------------------------------------------------
xquery version "1.0";

<doc xmlns="doc"/>
------------------------------------------------------------------------

The error message is:

------------------------------------------------------------------------
org.xml.sax.SAXParseException: The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly.
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.exist.xmldb.RemoteXMLResource.getContentAsSAX(RemoteXMLResource.java:224)
        at org.exist.cocoon.XQueryGenerator.generate(XQueryGenerator.java:307)
------------------------------------------------------------------------

What's wrong?  This type of XQuery with default namespace was
working seamlessly with 20050620.

Thanks in advance,
--
Jean-Baptiste Quenot
Systèmes d'Information
ANYWARE TECHNOLOGIES
Tel : +33 (0)5 61 00 52 90
Fax : +33 (0)5 61 00 51 46
http://www.anyware-tech.com/


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: The prefix "xmlns" cannot be bound to any namespace explicitly

Jean-Marc Vanel-3
Jean-Baptiste Quenot wrote:

>Hello,
>
>With this tiny little XQuery, eXist 20050805 complains:
>
>------------------------------------------------------------------------
>xquery version "1.0";
>
><doc xmlns="doc"/>
>------------------------------------------------------------------------
>
>The error message is:
>
>------------------------------------------------------------------------
>org.xml.sax.SAXParseException: The prefix "xmlns" cannot be bound to any namespace explicitly; neither can the namespace for "xmlns" be bound to any prefix explicitly.
>        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
>        at org.exist.xmldb.RemoteXMLResource.getContentAsSAX(RemoteXMLResource.java:224)
>        at org.exist.cocoon.XQueryGenerator.generate(XQueryGenerator.java:307)
>------------------------------------------------------------------------
>
>What's wrong?  This type of XQuery with default namespace was
>working seamlessly with 20050620.
>
>Thanks in advance,
>  
>
Bonsoir Jean-Baptiste

Happily with the latest CVS it works fine .

--
Jean-Marc Vanel
Conseil et Services / développement & intégration logiciels
Logiciel libre, Web, Java, XML ...
A la pointe de la technique, au service des projets
http://jmvanel.free.fr/ ===) CV, software resources

Mes journaux:
- sujets généraux en Français: http://jmvanel.free.fr/Block-note.html
- sujets informatiques en Français: http://jmvanel.free.fr/notes-informatiques.html
- computer science diary : http://jmvanel.free.fr/computer-notes.html

Worldwide Botanical Knowledge Base
http://wwbota.free.fr/ 
test XML query engine: http://jmvanel.free.fr/protea.html




-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: The prefix "xmlns" cannot be bound to any namespace explicitly

Chris Tomlinson-2
Hi,

In a Java built-in function module (eXist snapshot 20050805) I have a function defined with the following parameters for its signature:

new SequenceType[] {
                    new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE),
                    new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE) },
                   
I intended to permit calls to the function without a second argument; however, I get:

wrong number of parameters in call to function ewts:getStyles. Defined function signatures:
ewts:getStyles($a as xs:string, $b as xs:string?) xs:string
[at line 41, column 2]

The error message seems to me to correctly note that the second argument is optional so I'm not understanding why I'm getting an error.

The call looks like:

ewts:getStyles('24')

Thanks,
Chris


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: The prefix "xmlns" cannot be bound to any namespace explicitly

Pierrick Brihaye
Hi,

Chris Tomlinson wrote:

> new SequenceType[] {
>                     new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE),
>                     new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE) },
>                    
> I intended to permit calls to the function without a second argument; however, I get:
>
> wrong number of parameters in call to function ewts:getStyles. Defined function signatures:
> ewts:getStyles($a as xs:string, $b as xs:string?) xs:string
> [at line 41, column 2]
>
> The error message seems to me to correctly note that the second argument is optional so I'm not understanding why I'm getting an error.

Nope.

You *must* have a second argument. However, this argument *may* be an
empty sequence.

See the code of a function such as fn:adjust-date-to-timezone to define
a function with*multiple* signatures.

Cheers,

p.b.


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open
Reply | Threaded
Open this post in threaded view
|

Re: parameters specs for built-in function modules

Chris Tomlinson-2
Hi Pierrick,

Thanks for the information. I'd looked at fn:contains() but didn't think to use multiple signatures. I'll try that now.

ciao,
Chris

>Hi,
>
>Chris Tomlinson wrote:
>
>> new SequenceType[] {
>>                     new SequenceType(Type.STRING, Cardinality.EXACTLY_ONE),
>>                     new SequenceType(Type.STRING, Cardinality.ZERO_OR_ONE) },
>>                    
>> I intended to permit calls to the function without a second argument; however, I get:
>>
>> wrong number of parameters in call to function ewts:getStyles. Defined function signatures:
>> ewts:getStyles($a as xs:string, $b as xs:string?) xs:string
>> [at line 41, column 2]
>>
>> The error message seems to me to correctly note that the second argument is optional so I'm not
>understanding why I'm getting an error.
>
>Nope.
>
>You *must* have a second argument. However, this argument *may* be an
>empty sequence.
>
>See the code of a function such as fn:adjust-date-to-timezone to define
>a function with*multiple* signatures.
>
>Cheers,
>
>p.b.
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by:
>Power Architecture Resource Center: Free content, downloads, discussions,
>and more. http://solutions.newsforge.com/ibmarch.tmpl
>_______________________________________________
>Exist-open mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/exist-open


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Exist-open mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/exist-open