Project

Profile

Help

Revision e54a0d4a

Added by O'Neil Delpratt almost 3 years ago

Saxon/C update

View differences:

latest9.8/hec/samples/php/xqueryExamples.php
8 8
            
9 9
            /* simple example to show transforming to string */
10 10
            function exampleSimple1($proc, $xmlfile, $queryFile){
11
		echo '<b>exampleSimple1:</b><br/>';
11 12
                $proc->setContextItemFromFile($xmlfile);
13
echo '<b>exampleSimple cp1:</b><br/>';
12 14
                $proc->setQueryFile($queryFile);
15
echo '<b>exampleSimple cp2:</b><br/>';
13 16
  	        //$proc->setProperty('base', '/');      
14
                $result = $proc->runQueryToString();               
17
                $result = $proc->runQueryToString();  
18
echo '<b>exampleSimple cp3:</b><br/>';             
15 19
		if($result != null) {               
16
		echo '<b>exampleSimple1:</b><br/>';		
20
				
17 21
		echo 'Output:'.$result;
18 22
		} else {
19 23
			echo "Result is null";
......
27 31
		$sourceNode = $proc->parseXmlFromString("<foo xmlns='http://one.uri/'><bar><b>text node in example</b></bar></foo>");
28 32
		if($sourceNode !=null){
29 33
			/*echo "Name of Class " , get_class($sourceNode) , "\n"; 			
30
			$str = $xdmvalue->getStringValue();
34
			$str = $sourceNode->getStringValue();
31 35
			if($str!=null) {
32 36
				echo "XdmValue:".$str;
33 37
			} */

Also available in: Unified diff