@@ -72,3 +72,41 @@ private predicate discardReferableLocatable(@locatable el) {
72
72
not drl .existsInOverlay ( )
73
73
)
74
74
}
75
+
76
+ overlay [ local]
77
+ private predicate baseConfigLocatable ( @configLocatable l ) { not isOverlay ( ) and exists ( l ) }
78
+
79
+ overlay [ local]
80
+ private predicate overlayHasConfigLocatables ( ) {
81
+ isOverlay ( ) and
82
+ exists ( @configLocatable el )
83
+ }
84
+
85
+ overlay [ discard_entity]
86
+ private predicate discardBaseConfigLocatable ( @configLocatable el ) {
87
+ // The properties extractor is currently not incremental, so if
88
+ // the overlay contains any config locatables, the overlay should
89
+ // contain a full extraction and all config locatables from base
90
+ // should be discarded.
91
+ baseConfigLocatable ( el ) and overlayHasConfigLocatables ( )
92
+ }
93
+
94
+ overlay [ local]
95
+ private predicate baseXmlLocatable ( @xmllocatable l ) {
96
+ not isOverlay ( ) and not files ( l , _) and not xmlNs ( l , _, _, _)
97
+ }
98
+
99
+ overlay [ local]
100
+ private predicate overlayHasXmlLocatable ( ) {
101
+ isOverlay ( ) and
102
+ exists ( @xmllocatable l | not files ( l , _) and not xmlNs ( l , _, _, _) )
103
+ }
104
+
105
+ overlay [ discard_entity]
106
+ private predicate discardBaseXmlLocatable ( @xmllocatable el ) {
107
+ // The XML extractor is currently not incremental, so if
108
+ // the overlay contains any XML locatables, the overlay should
109
+ // contain a full extraction and all XML locatables from base
110
+ // should be discarded.
111
+ baseXmlLocatable ( el ) and overlayHasXmlLocatable ( )
112
+ }
0 commit comments