XSLT StyleSheet XML

File: Data.xml


  
  
  
  

File: Transform.xml

  xmlns:graph="http://wrox.com/569090/graph"
  xmlns:xs="http://www.w3.org/2001/XMLSchema" version="2.0">
  
    
    
    
    
      
        
      
    
          select="if (exists($direct intersect $B)) then true()
                         else if (some $C in $direct 
                                  satisfies graph:refers($links, $C, $B)) then true()
                         else false()" />