On Oct 30, 2006, at 17:53, [EMAIL PROTECTED] wrote:
On 30 Oct 2006 at 16:42, Also Sprach Robin Berjon:
It may be a long shot but you should try dumping namespaceURI,
localName and tagName for body and the divs that match. A number of
implementations are a bit fuzzy on what they match on for non-
namespaced methods. The NS variant may work better, and failing that
you can match on //*:body.

It is a long shot in so far as I have no idea how to do that!
The getelementsbytagname does work on the dom I create, it
doesn't seem to work on the dom that is returned after it has gone
through the stylesheet transforms (3 of them).

Is there any chance that in the DOM you create you use createElement ('div') to create elements but that in the XSLT there is a namespace declaration binding http://www.w3.org/1999/xhtml to the default namespace?

If that's the case you should create elements with createElementNS ('http://www.w3.org/1999/xhtml', 'div').

Also, try

  $doc->getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'body');

which'll get body elements in the right namespace. Or if you're confident enough, match in any namespace with either

  $doc->getElementsByTagNameNS('http://www.w3.org/1999/xhtml', 'body');

or

  $doc->findnodes('//*:body');


--
Robin Berjon - http://berjon.com/
-----------------------------------------------------------------------
"Politics is the entertainment arm of Industry."
                        -- Zappa



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to