protected function checkContext(DOMNode $node)
	{
		// Test whether we know in what context this node is used. An <xsl:for-each/> ancestor would // change this node's context
		$xpath     = new DOMXPath($node->ownerDocument);
		$ancestors = $xpath->query('ancestor::xsl:for-each', $node);

		if ($ancestors->length)
		{
			throw new UnsafeTemplateException("Cannot assess context due to '" . $ancestors->item(0)->nodeName . "'", $node);
		}
	}
protected function checkContext(DOMNode $node)
	{
		// Test whether we know in what context this node is used. An <xsl:for-each/> ancestor would // change this node's context
		$xpath     = new DOMXPath($node->ownerDocument);
		$ancestors = $xpath->query('ancestor::xsl:for-each', $node);

		if ($ancestors->length)
		{
			throw new UnsafeTemplateException("Cannot assess context due to '" . $ancestors->item(0)->nodeName . "'", $node);
		}
	}
protected function checkContext ( DOMNode $ node ) { // Test whether we know in what context this node is used. An <xsl:for-each/> ancestor would // change this node's context $ xpath = new DOMXPath ( $ node -> ownerDocument ) ; $ ancestors = $ xpath -> query ( 'ancestor::xsl:for-each' , $ node ) ; if ( $ ancestors -> length ) { throw new UnsafeTemplateException ( "Cannot assess context due to '" . $ ancestors -> item ( 0 ) -> nodeName . "'" , $ node ) ; } }
Test whether a node's context can be safely assessed

@param  DOMNode $node Source node
@return void
Test whether a node s context can be safely assessed