2 Copyright 2017 Rene Rivera
3 Copyright 2003, 2004, 2005 Dave Abrahams
4 Copyright 2003, 2004, 2005 Douglas Gregor
5 Copyright 2005, 2006, 2007 Rene Rivera
6 Copyright 2003, 2004, 2005 Vladimir Prus
7 Distributed under the Boost Software License, Version 1.0. (See
8 accompanying file LICENSE_1_0.txt or copy at
9 http://www.boost.org/LICENSE_1_0.txt)
17 # XInclude scanner. Mostly stolen from c-scanner. :)
18 # Note that this assumes an "xi" prefix for XIncludes. This is not always the
19 # case for XML documents, but we assume it is true for anything we encounter.
21 class xinclude-scanner : scanner
25 rule __init__ ( includes * )
28 self.includes = $(includes) ;
33 return "xi:include[ ]*href=\"([^\"]*)\"" ;
36 rule process ( target : matches * : binding )
38 local target_path = [ NORMALIZE_PATH $(binding:D) ] ;
41 INCLUDES $(target) : $(matches) ;
42 SEARCH on $(matches) = $(target_path) $(self.includes:G=) ;
44 scanner.propagate $(__name__) : $(matches) : $(target) ;
48 scanner.register xinclude-scanner : xsl:path ;
49 type.set-scanner XML : xinclude-scanner ;