]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/types/xml.jam
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / src / tools / types / xml.jam
1 #|
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)
10 |#
11
12 import scanner ;
13 import type ;
14
15 type XML : xml ;
16
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.
20 #
21 class xinclude-scanner : scanner
22 {
23 import scanner ;
24
25 rule __init__ ( includes * )
26 {
27 scanner.__init__ ;
28 self.includes = $(includes) ;
29 }
30
31 rule pattern ( )
32 {
33 return "xi:include[ ]*href=\"([^\"]*)\"" ;
34 }
35
36 rule process ( target : matches * : binding )
37 {
38 local target_path = [ NORMALIZE_PATH $(binding:D) ] ;
39
40 NOCARE $(matches) ;
41 INCLUDES $(target) : $(matches) ;
42 SEARCH on $(matches) = $(target_path) $(self.includes:G=) ;
43
44 scanner.propagate $(__name__) : $(matches) : $(target) ;
45 }
46 }
47
48 scanner.register xinclude-scanner : xsl:path ;
49 type.set-scanner XML : xinclude-scanner ;