[Phoenix] Implementing support for XML documents with unprefixed default namespaces

Andreas Wuest awuest at student.ethz.ch
Fri Sep 22 23:39:26 CEST 2006


Hi Thomas

On 22.9.2006 23:36 Uhr, Thomas Comiotto wrote:

> Hi Andi
> 
>>> I think there's one more thing to consider: the stylepatcher copies 
>>> nodeValue selectors that later make for location paths segments! This 
>>> means that location paths will contain prefixes as defined by the 
>>> stylesheet.
>>
>> Or rather no prefixes, in the case of default namespaces. Equally as 
>> bad though. :(
>>
> 
> Nope - no prefix means null namespace in case of node selctors in xslt's.

Yeah, you're right of course.

>> I am not sure what you mean by "prefix resolvers from the stylesheet". 
>> Are you referring to the namespace declaration attributes 
>> (xmlns:X="Y") in the <xsl:stylesheet> element here?
>>
>> And if so, is there no chance of intereference with prefixes declared 
>> in the documentDOM?
> 
> No chace of interference I think. The stylesheet must be compliant to 
> documentDOM and, if necessary, adds prefixes to default namespace(s).

Good news! :)

>>> You see, there's a hell lot to consider - maybe we just should 
>>> implement ns unaware mode first. This will cover 99.9% of all 
>>> documents while keeping the code simple and clean :)
>>
>> Yay, there seems to be no easy solution. What would we have to do in 
>> order to implement namespace-unawareness?
>>
> 
> 
> Implement an xpath xpression parser and replace all node selectors by 
> *[local-name()='nodename']

I am currently working on an XPath expression parser (basically because 
I wanted to try out my other recent proposal, which needs a parser as 
well, although slightly modified to match my custom syntax).

-- 
Kind regards,
Andi



More information about the Phoenix mailing list