Hi,
There is an XML which has the following nodes: ...<resource xml:lang="es"> ...<title xml:lang="es">...<description xml:lang="es"/> When i try to parse this file the following error arise: a XMLNamespaceException occurred (error 2710), Unmapped namespace prefix "xml" XMLNamespaceScope>>validatePrefix: Any idea is welcome ... How to define a prefix for "xml:" ? (mapPrefix:to:) but this should be automatic ? Regards, Bruno PS: original message: XMLDOMParser parseDocumentFrom: (FileStream fileNamed: 'myFile.xml'). |
That looks to be an "xml syntax error" and I am not enough of an XML export to know whether or not is an issue with the XML parser itself or the way that the xml parser is being used ...
I would check the tests to see if there is a similar pattern that is being tested and then look carefully at how the test us being set up ... Dale ----- Original Message ----- | From: "BrunoBB" <[hidden email]> | To: [hidden email] | Sent: Friday, November 22, 2013 11:19:48 AM | Subject: [Glass] XML Parser: XML prefix | | Hi, | | There is an XML which has the following nodes: | ...<resource xml:lang="es"> ...<title xml:lang="es">...<description | xml:lang="es"/> | | When i try to parse this file the following error arise: | | a XMLNamespaceException occurred (error 2710), Unmapped namespace | prefix | "xml" | XMLNamespaceScope>>validatePrefix: | | Any idea is welcome ... | | How to define a prefix for "xml:" ? (mapPrefix:to:) but this should | be | automatic ? | | Regards, | Bruno | | PS: original message: | XMLDOMParser parseDocumentFrom: (FileStream fileNamed: 'myFile.xml'). | | | | -- | View this message in context: | http://forum.world.st/XML-Parser-XML-prefix-tp4724394.html | Sent from the GLASS mailing list archive at Nabble.com. | _______________________________________________ | Glass mailing list | [hidden email] | http://lists.gemtalksystems.com/mailman/listinfo/glass | _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
In reply to this post by BrunoBB
On Fri, Nov 22, 2013 at 8:19 PM, BrunoBB <[hidden email]> wrote:
> Hi, > > There is an XML which has the following nodes: > ...<resource xml:lang="es"> ...<title xml:lang="es">...<description > xml:lang="es"/> > > When i try to parse this file the following error arise: > > a XMLNamespaceException occurred (error 2710), Unmapped namespace prefix > "xml" > XMLNamespaceScope>>validatePrefix: > > Any idea is welcome ... Parser bug xml:lang is allowed anywhere [1] [1] http://www.w3.org/TR/REC-xml/#sec-lang-tag Cheers Philippe _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Is this bug fixed on the Pharo side or does it only exist in the GemStone port? ... I seem to recall that there was a divergence in the XML Parser support ...
----- Original Message ----- | From: "Philippe Marschall" <[hidden email]> | To: "BrunoBB" <[hidden email]> | Cc: [hidden email] | Sent: Saturday, November 23, 2013 12:30:24 AM | Subject: Re: [Glass] XML Parser: XML prefix | | On Fri, Nov 22, 2013 at 8:19 PM, BrunoBB <[hidden email]> | wrote: | > Hi, | > | > There is an XML which has the following nodes: | > ...<resource xml:lang="es"> ...<title xml:lang="es">...<description | > xml:lang="es"/> | > | > When i try to parse this file the following error arise: | > | > a XMLNamespaceException occurred (error 2710), Unmapped namespace | > prefix | > "xml" | > XMLNamespaceScope>>validatePrefix: | > | > Any idea is welcome ... | | Parser bug xml:lang is allowed anywhere [1] | | [1] http://www.w3.org/TR/REC-xml/#sec-lang-tag | | Cheers | Philippe | _______________________________________________ | Glass mailing list | [hidden email] | http://lists.gemtalksystems.com/mailman/listinfo/glass | _______________________________________________ Glass mailing list [hidden email] http://lists.gemtalksystems.com/mailman/listinfo/glass |
Dale,
I think the bug is in the GemStone port. XMLDOMParser parse: '<resource xml:lang="es">test</resource>'. "evaluate in Pharo --> OK" XMLDOMParser parse: '<resource xml:lang="es">test</resource>'. "evaluate in GLASS --> error: Unmapped namespace prefix "xml" Regards, Bruno |
Free forum by Nabble | Edit this page |