Revision: 2257
Author: olavmrk
Date: Wed Apr 21 05:55:32 2010
Log: SAML2_Utils: Allow DOMDocument as parameter for xpQuery().
http://code.google.com/p/simplesamlphp/source/detail?r=2257
Modified:
/trunk/lib/SAML2/Utils.php
=======================================
--- /trunk/lib/SAML2/Utils.php Wed Apr 21 05:55:24 2010
+++ /trunk/lib/SAML2/Utils.php Wed Apr 21 05:55:32 2010
@@ -117,8 +117,14 @@
assert('is_string($query)');
static $xpCache = NULL;
- if ($xpCache === NULL |
| !$xpCache->document->isSameNode($node->ownerDocument)) {
- $xpCache = new DOMXPath($node->ownerDocument);
+ if ($node instanceof DOMDocument) {
+ $doc = $node;
+ } else {
+ $doc = $node->ownerDocument;
+ }
+
+ if ($xpCache === NULL || !$xpCache->document->isSameNode($doc))
{
+ $xpCache = new DOMXPath($doc);
$xpCache->registerNamespace('soap-env',
SAML2_Const::NS_SOAP);
$xpCache->registerNamespace('saml_protocol',
SAML2_Const::NS_SAMLP);
$xpCache->registerNamespace('saml_assertion',
SAML2_Const::NS_SAML);
--
You received this message because you are subscribed to the Google Groups
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/simplesamlphp-commits?hl=en.