You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by bu...@apache.org on 2004/12/06 16:33:26 UTC

DO NOT REPLY [Bug 32543] New: - remove lenya:dummy namespace workaround

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=32543>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=32543

           Summary: remove lenya:dummy namespace workaround
           Product: Lenya
           Version: unspecified
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Form Editor
        AssignedTo: michi@apache.org
        ReportedBy: gregor@apache.org
                CC: dev@lenya.apache.org


On 6.12.2004 10:06 Uhr, Michael Wechner wrote:

> Gregor J. Rothfuss wrote:
>
>> michi, do you recall if we still need
>>
>> <?xml version="1.0" encoding="UTF-8"?><html
xmlns:lenya="http://apache.org/cocoon/lenya/page-envelope/1.0"
xmlns:dcterms="http://purl.org/dc/terms/"
xmlns:unizh="http://unizh.ch/doctypes/elements/1.0"
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns="http://www.w3.org/1999/xhtml"
dc:dummy="FIXME:keepNamespace" dcterms:dummy="FIXME:keepNamespace"
lenya:dummy="FIXME:keepNamespace" unizh:columns="2">
>>
>> the dummy namespace declarations?
>
> yes, the "multiple" forms editor gets a problem otherwise (see FIXME)
>
> src/java/org/apache/lenya/cms/cocoon/acting/HTMLFormSaveAction.java
>
> because IIRC org.apache.xpath.compiler.XPathParser will have a problem.
>
> Some time ago I had an idea how to fix this, but didn't get around to try it out.


In libxml2 (the XML/XSLT/XPath library I use), the XPath engine is only aware of
prefix-to-namespaceURI mappings defined in the root node (or the context note,
for that matter). In JS it's basically the same, and it looks like in your
engine, also. According to the spec, this doesn't have to happen, but usually
engines do that for easier use.

Therefore, looks like you need your own PrefixResolver for making XPath
correctly work ( found this
http://www.stylusstudio.com/api/xalan-j_2_6_0/org/apache/xml/utils/PrefixResolver.htm
). We had to do this in BXE as well. And in PHP there's a method
$xpathquery->registerNamespace($prefix,$uri) for the same problem.

The same goes for default namespaces (another fixme in that file). There are no
default namespaces in XPath ;) You have to use some prefixes for them (and of
course register, resp. do an PrefixResolver)

HTH

chregu

>> iirc they are in there because one of the form editors would strip them out
otherwise.

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

---------------------------------------------------------------------
To unsubscribe, e-mail:              dev-unsubscribe@lenya.apache.org
For additional commands, e-mail:            dev-help@lenya.apache.org
Apache Lenya Project                          http://lenya.apache.org