| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
package net.sf.saxon.trans; |
| 9 |
|
| 10 |
import net.sf.saxon.Configuration; |
| 11 |
import net.sf.saxon.Controller; |
| 12 |
import net.sf.saxon.expr.*; |
| 13 |
import net.sf.saxon.expr.parser.RetainedStaticContext; |
| 14 |
import net.sf.saxon.functions.IntegratedFunctionLibrary; |
| 15 |
import net.sf.saxon.functions.IsIdRef; |
| 16 |
import net.sf.saxon.functions.SystemFunction; |
| 17 |
import net.sf.saxon.lib.ConversionRules; |
| 18 |
import net.sf.saxon.om.*; |
| 19 |
import net.sf.saxon.pattern.BasePatternWithPredicate; |
| 20 |
import net.sf.saxon.pattern.MultipleNodeKindTest; |
| 21 |
import net.sf.saxon.pattern.NodeTestPattern; |
| 22 |
import net.sf.saxon.pattern.Pattern; |
| 23 |
import net.sf.saxon.sxpath.IndependentContext; |
| 24 |
import net.sf.saxon.trace.ExpressionPresenter; |
| 25 |
import net.sf.saxon.tree.iter.EmptyIterator; |
| 26 |
import net.sf.saxon.tree.iter.ListIterator; |
| 27 |
import net.sf.saxon.type.BuiltInAtomicType; |
| 28 |
import net.sf.saxon.type.Converter; |
| 29 |
import net.sf.saxon.type.UType; |
| 30 |
import net.sf.saxon.value.AtomicValue; |
| 31 |
import net.sf.saxon.value.DoubleValue; |
| 32 |
import net.sf.saxon.value.NumericValue; |
| 33 |
import net.sf.saxon.z.IntHashMap; |
| 34 |
|
| 35 |
import java.lang.ref.WeakReference; |
| 36 |
import java.util.*; |
| 37 |
|
| 38 |
import static net.sf.saxon.trans.KeyIndex.Status.*; |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
|
| 57 |
|
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
|
| 63 |
|
| 64 |
|
| 65 |
|
| 66 |
|
| 67 |
|
| 68 |
|
| 69 |
|
| 70 |
|
| 71 |
|
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
|
| 77 |
|
| 78 |
|
| 79 |
|
| 80 |
|
| 81 |
|
| 82 |
|
| 83 |
public class KeyManager { |
| 84 |
|
| 85 |
private PackageData packageData; |
| 86 |
|
| 87 |
private HashMap<StructuredQName, KeyDefinitionSet> keyDefinitions; |
| 88 |
|
| 89 |
|
| 90 |
private transient WeakHashMap<TreeInfo, WeakReference<IntHashMap<KeyIndex>>> docIndexes; |
| 91 |
|
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
|
| 96 |
|
| 97 |
|
| 98 |
|
| 99 |
|
| 100 |
|
| 101 |
|
| 102 |
public KeyManager(Configuration config, PackageData pack) { |
| 103 |
packageData = pack; |
| 104 |
keyDefinitions = new HashMap<>(10); |
| 105 |
docIndexes = new WeakHashMap<>(10); |
| 106 |
|
| 107 |
registerIdrefKey(config); |
| 108 |
} |
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
private synchronized void registerIdrefKey(Configuration config) { |
| 121 |
final StructuredQName qName = StandardNames.getStructuredQName(StandardNames.XS_IDREFS); |
| 122 |
SymbolicName symbolicName = new SymbolicName(StandardNames.XSL_KEY, qName); |
| 123 |
if (getKeyDefinitionSet(qName) == null) { |
| 124 |
BasePatternWithPredicate pp = new BasePatternWithPredicate( |
| 125 |
new NodeTestPattern(new MultipleNodeKindTest(UType.ELEMENT_OR_ATTRIBUTE)), |
| 126 |
IntegratedFunctionLibrary.makeFunctionCall(new IsIdRef(), new Expression[]{}) |
| 127 |
); |
| 128 |
try { |
| 129 |
IndependentContext sc = new IndependentContext(config); |
| 130 |
sc.setPackageData(packageData); |
| 131 |
sc.setXPathLanguageLevel(31); |
| 132 |
RetainedStaticContext rsc = new RetainedStaticContext(sc); |
| 133 |
Expression sf = SystemFunction.makeCall("string", rsc, new ContextItemExpression()); |
| 134 |
Expression use = SystemFunction.makeCall("tokenize", rsc, sf); |
| 135 |
KeyDefinition key = new KeyDefinition(symbolicName, pp, use, null, null); |
| 136 |
key.setPackageData(packageData); |
| 137 |
key.setIndexedItemType(BuiltInAtomicType.STRING); |
| 138 |
addKeyDefinition(qName, key, true, config); |
| 139 |
} catch (XPathException err) { |
| 140 |
throw new AssertionError(err); |
| 141 |
} |
| 142 |
} |
| 143 |
} |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
|
| 148 |
|
| 149 |
|
| 150 |
|
| 151 |
|
| 152 |
public synchronized void preRegisterKeyDefinition(StructuredQName keyName) { |
| 153 |
KeyDefinitionSet keySet = keyDefinitions.get(keyName); |
| 154 |
if (keySet == null) { |
| 155 |
keySet = new KeyDefinitionSet(keyName, keyDefinitions.size()); |
| 156 |
keyDefinitions.put(keyName, keySet); |
| 157 |
} |
| 158 |
} |
| 159 |
|
| 160 |
|
| 161 |
|
| 162 |
|
| 163 |
|
| 164 |
|
| 165 |
|
| 166 |
|
| 167 |
|
| 168 |
|
| 169 |
|
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
public synchronized void addKeyDefinition(StructuredQName keyName, KeyDefinition keydef, boolean reusable, Configuration config) throws XPathException { |
| 174 |
KeyDefinitionSet keySet = keyDefinitions.get(keyName); |
| 175 |
if (keySet == null) { |
| 176 |
keySet = new KeyDefinitionSet(keyName, keyDefinitions.size()); |
| 177 |
keyDefinitions.put(keyName, keySet); |
| 178 |
} |
| 179 |
keySet.addKeyDefinition(keydef); |
| 180 |
|
| 181 |
if (!reusable) { |
| 182 |
keySet.setReusable(false); |
| 183 |
} |
| 184 |
|
| 185 |
boolean backwardsCompatible = keySet.isBackwardsCompatible(); |
| 186 |
|
| 187 |
if (backwardsCompatible) { |
| 188 |
|
| 189 |
List<KeyDefinition> v = keySet.getKeyDefinitions(); |
| 190 |
for (KeyDefinition kd : v) { |
| 191 |
kd.setBackwardsCompatible(true); |
| 192 |
if (!kd.getBody().getItemType().equals(BuiltInAtomicType.STRING)) { |
| 193 |
Expression exp = new AtomicSequenceConverter(kd.getBody(), BuiltInAtomicType.STRING); |
| 194 |
((AtomicSequenceConverter) exp).allocateConverterStatically(config, false); |
| 195 |
kd.setBody(exp); |
| 196 |
} |
| 197 |
} |
| 198 |
} |
| 199 |
|
| 200 |
} |
| 201 |
|
| 202 |
|
| 203 |
|
| 204 |
|
| 205 |
|
| 206 |
|
| 207 |
|
| 208 |
|
| 209 |
public KeyDefinitionSet getKeyDefinitionSet(StructuredQName qName) { |
| 210 |
return keyDefinitions.get(qName); |
| 211 |
} |
| 212 |
|
| 213 |
|
| 214 |
|
| 215 |
|
| 216 |
|
| 217 |
|
| 218 |
|
| 219 |
|
| 220 |
|
| 221 |
|
| 222 |
|
| 223 |
public KeyDefinitionSet findKeyDefinition(Pattern finder, Expression use, String collationName) { |
| 224 |
for (KeyDefinitionSet keySet : keyDefinitions.values()) { |
| 225 |
if (keySet.getKeyDefinitions().size() == 1) { |
| 226 |
for (KeyDefinition keyDef : keySet.getKeyDefinitions()) { |
| 227 |
if (keyDef.getMatch().isEqual(finder) && |
| 228 |
keyDef.getUse().isEqual(use) && |
| 229 |
keyDef.getCollationName().equals(collationName)) { |
| 230 |
return keySet; |
| 231 |
} |
| 232 |
} |
| 233 |
} |
| 234 |
} |
| 235 |
return null; |
| 236 |
} |
| 237 |
|
| 238 |
|
| 239 |
|
| 240 |
|
| 241 |
|
| 242 |
|
| 243 |
|
| 244 |
|
| 245 |
|
| 246 |
|
| 247 |
|
| 248 |
private synchronized KeyIndex buildIndex(KeyDefinitionSet keySet, |
| 249 |
TreeInfo doc, |
| 250 |
XPathContext context) throws XPathException { |
| 251 |
|
| 252 |
KeyIndex index = new KeyIndex(keySet.isRangeKey()); |
| 253 |
index.buildIndex(keySet, doc, context); |
| 254 |
|
| 255 |
|
| 256 |
return index; |
| 257 |
} |
| 258 |
|
| 259 |
private void buildIndex(KeyIndex index, |
| 260 |
KeyDefinitionSet keySet, |
| 261 |
TreeInfo doc, |
| 262 |
XPathContext context) throws XPathException { |
| 263 |
index.buildIndex(keySet, doc, context); |
| 264 |
} |
| 265 |
|
| 266 |
private static int getContextDepth(XPathContext c) { |
| 267 |
int i = 0; |
| 268 |
while (c != null) { |
| 269 |
c = c.getCaller(); |
| 270 |
i++; |
| 271 |
} |
| 272 |
return i; |
| 273 |
} |
| 274 |
|
| 275 |
|
| 276 |
|
| 277 |
|
| 278 |
|
| 279 |
|
| 280 |
|
| 281 |
|
| 282 |
|
| 283 |
|
| 284 |
|
| 285 |
|
| 286 |
|
| 287 |
public SequenceIterator<NodeInfo> selectByKey( |
| 288 |
KeyDefinitionSet keySet, |
| 289 |
TreeInfo doc, |
| 290 |
AtomicValue soughtValue, |
| 291 |
XPathContext context) throws XPathException { |
| 292 |
if (soughtValue == null) { |
| 293 |
return EmptyIterator.OfNodes.THE_INSTANCE; |
| 294 |
} |
| 295 |
|
| 296 |
if (keySet.isBackwardsCompatible()) { |
| 297 |
|
| 298 |
final ConversionRules rules = context.getConfiguration().getConversionRules(); |
| 299 |
soughtValue = Converter.convert(soughtValue, BuiltInAtomicType.STRING, rules).asAtomic(); |
| 300 |
} else { |
| 301 |
|
| 302 |
|
| 303 |
|
| 304 |
BuiltInAtomicType itemType = soughtValue.getPrimitiveType(); |
| 305 |
if (itemType.equals(BuiltInAtomicType.INTEGER) || |
| 306 |
itemType.equals(BuiltInAtomicType.DECIMAL) || |
| 307 |
itemType.equals(BuiltInAtomicType.FLOAT)) { |
| 308 |
soughtValue = new DoubleValue(((NumericValue) soughtValue).getDoubleValue()); |
| 309 |
} |
| 310 |
} |
| 311 |
|
| 312 |
|
| 313 |
|
| 314 |
KeyIndex index = obtainIndex(keySet, doc, context); |
| 315 |
|
| 316 |
List<NodeInfo> nodes = index.get(soughtValue); |
| 317 |
if (nodes == null) { |
| 318 |
return EmptyIterator.OfNodes.THE_INSTANCE; |
| 319 |
} else { |
| 320 |
return new ListIterator<>(nodes); |
| 321 |
} |
| 322 |
|
| 323 |
} |
| 324 |
|
| 325 |
|
| 326 |
|
| 327 |
|
| 328 |
|
| 329 |
|
| 330 |
|
| 331 |
|
| 332 |
|
| 333 |
|
| 334 |
|
| 335 |
|
| 336 |
public SequenceIterator selectByCompositeKey( |
| 337 |
KeyDefinitionSet keySet, |
| 338 |
TreeInfo doc, |
| 339 |
SequenceIterator<?> soughtValue, |
| 340 |
XPathContext context) throws XPathException { |
| 341 |
|
| 342 |
|
| 343 |
KeyIndex index = obtainIndex(keySet, doc, context); |
| 344 |
|
| 345 |
List<NodeInfo> nodes = index.getComposite(soughtValue); |
| 346 |
if (nodes == null) { |
| 347 |
return EmptyIterator.emptyIterator(); |
| 348 |
} else { |
| 349 |
return new ListIterator<>(nodes); |
| 350 |
} |
| 351 |
|
| 352 |
} |
| 353 |
|
| 354 |
|
| 355 |
|
| 356 |
|
| 357 |
|
| 358 |
|
| 359 |
|
| 360 |
|
| 361 |
|
| 362 |
|
| 363 |
|
| 364 |
|
| 365 |
public KeyIndex obtainIndex(KeyDefinitionSet keySet, TreeInfo doc, XPathContext context) throws XPathException { |
| 366 |
if (keySet.isReusable()) { |
| 367 |
return obtainSharedIndex(keySet, doc, context); |
| 368 |
} else { |
| 369 |
return obtainLocalIndex(keySet, doc, context); |
| 370 |
} |
| 371 |
} |
| 372 |
|
| 373 |
private KeyIndex obtainSharedIndex(KeyDefinitionSet keySet, TreeInfo doc, XPathContext context) throws XPathException { |
| 374 |
KeyIndex index; |
| 375 |
int keySetNumber = keySet.getKeySetNumber(); |
| 376 |
|
| 377 |
index = getSharedIndex(doc, keySetNumber); |
| 378 |
if (index != null) { |
| 379 |
KeyIndex.Status status = index.getStatus(); |
| 380 |
if (status == UNDER_CONSTRUCTION) { |
| 381 |
if (index.isCreatedInThisThread()) { |
| 382 |
XPathException de = new XPathException( |
| 383 |
"Key definition " + keySet.getKeyName().getDisplayName() + " is circular"); |
| 384 |
de.setXPathContext(context); |
| 385 |
de.setErrorCode("XTDE0640"); |
| 386 |
throw de; |
| 387 |
} else { |
| 388 |
|
| 389 |
|
| 390 |
index = null; |
| 391 |
} |
| 392 |
} else if (status == FAILED) { |
| 393 |
throw new XPathException("Construction of index for key " + keySet.getKeyName().getDisplayName() + " was unsuccessful"); |
| 394 |
} |
| 395 |
} |
| 396 |
|
| 397 |
|
| 398 |
if (index == null) { |
| 399 |
|
| 400 |
index = new KeyIndex(keySet.isRangeKey()); |
| 401 |
synchronized(this) { |
| 402 |
index.setStatus(UNDER_CONSTRUCTION); |
| 403 |
KeyIndex index2 = putSharedIndex(doc, keySetNumber, index, context); |
| 404 |
if (index2.getStatus() == BUILT) { |
| 405 |
|
| 406 |
return index2; |
| 407 |
} else { |
| 408 |
index = index2; |
| 409 |
} |
| 410 |
} |
| 411 |
|
| 412 |
buildIndex(index, keySet, doc, context); |
| 413 |
|
| 414 |
|
| 415 |
synchronized(this) { |
| 416 |
index.setStatus(BUILT); |
| 417 |
index = putSharedIndex(doc, keySetNumber, index, context); |
| 418 |
} |
| 419 |
} |
| 420 |
return index; |
| 421 |
} |
| 422 |
|
| 423 |
private KeyIndex obtainLocalIndex(KeyDefinitionSet keySet, TreeInfo doc, XPathContext context) throws XPathException { |
| 424 |
KeyIndex index; |
| 425 |
int keySetNumber = keySet.getKeySetNumber(); |
| 426 |
|
| 427 |
|
| 428 |
|
| 429 |
|
| 430 |
|
| 431 |
|
| 432 |
|
| 433 |
|
| 434 |
|
| 435 |
index = getLocalIndex(doc, keySetNumber, context); |
| 436 |
if (index != null) { |
| 437 |
KeyIndex.Status status = index.getStatus(); |
| 438 |
if (status == UNDER_CONSTRUCTION) { |
| 439 |
if (index.isCreatedInThisThread()) { |
| 440 |
XPathException de = new XPathException( |
| 441 |
"Key definition " + keySet.getKeyName().getDisplayName() + " is circular"); |
| 442 |
de.setXPathContext(context); |
| 443 |
de.setErrorCode("XTDE0640"); |
| 444 |
throw de; |
| 445 |
} else { |
| 446 |
|
| 447 |
|
| 448 |
index = null; |
| 449 |
} |
| 450 |
} else if (status == FAILED) { |
| 451 |
throw new XPathException("Construction of index for key " + keySet.getKeyName().getDisplayName() + " was unsuccessful"); |
| 452 |
} |
| 453 |
} |
| 454 |
|
| 455 |
|
| 456 |
if (index == null) { |
| 457 |
|
| 458 |
|
| 459 |
index = new KeyIndex(keySet.isRangeKey()); |
| 460 |
synchronized(this) { |
| 461 |
index.setStatus(UNDER_CONSTRUCTION); |
| 462 |
KeyIndex index2 = putLocalIndex(doc, keySetNumber, index, context); |
| 463 |
if (index2.getStatus() == BUILT) { |
| 464 |
|
| 465 |
return index2; |
| 466 |
} else { |
| 467 |
index = index2; |
| 468 |
} |
| 469 |
} |
| 470 |
|
| 471 |
buildIndex(index, keySet, doc, context); |
| 472 |
|
| 473 |
|
| 474 |
synchronized(this) { |
| 475 |
index.setStatus(BUILT); |
| 476 |
index = putLocalIndex(doc, keySetNumber, index, context); |
| 477 |
} |
| 478 |
} |
| 479 |
return index; |
| 480 |
} |
| 481 |
|
| 482 |
|
| 483 |
|
| 484 |
|
| 485 |
|
| 486 |
|
| 487 |
|
| 488 |
|
| 489 |
|
| 490 |
|
| 491 |
|
| 492 |
|
| 493 |
|
| 494 |
|
| 495 |
|
| 496 |
|
| 497 |
|
| 498 |
|
| 499 |
private synchronized KeyIndex putSharedIndex(TreeInfo doc, int keyFingerprint, KeyIndex index, XPathContext context) { |
| 500 |
if (docIndexes == null) { |
| 501 |
|
| 502 |
docIndexes = new WeakHashMap<>(10); |
| 503 |
} |
| 504 |
WeakReference<IntHashMap<KeyIndex>> indexRef = docIndexes.get(doc); |
| 505 |
IntHashMap<KeyIndex> indexList; |
| 506 |
if (indexRef == null || indexRef.get() == null) { |
| 507 |
indexList = new IntHashMap<>(10); |
| 508 |
|
| 509 |
|
| 510 |
|
| 511 |
Controller controller = context.getController(); |
| 512 |
if (controller.getDocumentPool().contains(doc)) { |
| 513 |
context.getController().setUserData(doc, "saxon:key-index-list", indexList); |
| 514 |
} else { |
| 515 |
doc.setUserData("saxon:key-index-list", indexList); |
| 516 |
} |
| 517 |
docIndexes.put(doc, new WeakReference<>(indexList)); |
| 518 |
} else { |
| 519 |
indexList = indexRef.get(); |
| 520 |
} |
| 521 |
KeyIndex result = indexList.get(keyFingerprint); |
| 522 |
if (result == null || result.getStatus() != BUILT) { |
| 523 |
|
| 524 |
indexList.put(keyFingerprint, index); |
| 525 |
result = index; |
| 526 |
} |
| 527 |
return result; |
| 528 |
} |
| 529 |
|
| 530 |
|
| 531 |
|
| 532 |
|
| 533 |
|
| 534 |
|
| 535 |
|
| 536 |
|
| 537 |
|
| 538 |
|
| 539 |
|
| 540 |
|
| 541 |
|
| 542 |
|
| 543 |
|
| 544 |
|
| 545 |
private synchronized KeyIndex putLocalIndex(TreeInfo doc, int keyFingerprint, KeyIndex index, XPathContext context) { |
| 546 |
Controller controller = context.getController(); |
| 547 |
IntHashMap<Map<Long, KeyIndex>> masterIndex = controller.getLocalIndexes(); |
| 548 |
Map<Long, KeyIndex> docIndexes = masterIndex.get(keyFingerprint); |
| 549 |
if (docIndexes == null) { |
| 550 |
docIndexes = new HashMap<>(); |
| 551 |
masterIndex.put(keyFingerprint, docIndexes); |
| 552 |
} |
| 553 |
KeyIndex result = docIndexes.get(doc.getDocumentNumber()); |
| 554 |
if (result == null || result.getStatus() != BUILT) { |
| 555 |
|
| 556 |
docIndexes.put(doc.getDocumentNumber(), index); |
| 557 |
result = index; |
| 558 |
} |
| 559 |
return result; |
| 560 |
} |
| 561 |
|
| 562 |
|
| 563 |
|
| 564 |
|
| 565 |
|
| 566 |
|
| 567 |
|
| 568 |
|
| 569 |
|
| 570 |
|
| 571 |
|
| 572 |
private synchronized KeyIndex getSharedIndex(TreeInfo doc, int keyFingerprint) { |
| 573 |
if (docIndexes == null) { |
| 574 |
|
| 575 |
docIndexes = new WeakHashMap<>(10); |
| 576 |
} |
| 577 |
WeakReference<IntHashMap<KeyIndex>> ref = docIndexes.get(doc); |
| 578 |
if (ref == null) { |
| 579 |
return null; |
| 580 |
} |
| 581 |
IntHashMap<KeyIndex> indexList = ref.get(); |
| 582 |
if (indexList == null) { |
| 583 |
return null; |
| 584 |
} |
| 585 |
return indexList.get(keyFingerprint); |
| 586 |
} |
| 587 |
|
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
|
| 592 |
|
| 593 |
|
| 594 |
|
| 595 |
|
| 596 |
|
| 597 |
|
| 598 |
private synchronized KeyIndex getLocalIndex(TreeInfo doc, int keyFingerprint, XPathContext context) { |
| 599 |
Controller controller = context.getController(); |
| 600 |
IntHashMap<Map<Long, KeyIndex>> masterIndex = controller.getLocalIndexes(); |
| 601 |
Map<Long, KeyIndex> docIndexes = masterIndex.get(keyFingerprint); |
| 602 |
if (docIndexes == null) { |
| 603 |
return null; |
| 604 |
} else { |
| 605 |
return docIndexes.get(doc.getDocumentNumber()); |
| 606 |
} |
| 607 |
} |
| 608 |
|
| 609 |
|
| 610 |
|
| 611 |
|
| 612 |
|
| 613 |
|
| 614 |
|
| 615 |
|
| 616 |
|
| 617 |
public synchronized void clearDocumentIndexes(TreeInfo doc) { |
| 618 |
docIndexes.remove(doc); |
| 619 |
} |
| 620 |
|
| 621 |
|
| 622 |
|
| 623 |
|
| 624 |
|
| 625 |
|
| 626 |
|
| 627 |
public Collection<KeyDefinitionSet> getAllKeyDefinitionSets() { |
| 628 |
return keyDefinitions.values(); |
| 629 |
} |
| 630 |
|
| 631 |
|
| 632 |
|
| 633 |
|
| 634 |
|
| 635 |
|
| 636 |
|
| 637 |
public int getNumberOfKeyDefinitions() { |
| 638 |
return keyDefinitions.size(); |
| 639 |
} |
| 640 |
|
| 641 |
|
| 642 |
|
| 643 |
|
| 644 |
|
| 645 |
|
| 646 |
|
| 647 |
public void exportKeys(ExpressionPresenter out, Map<Component, Integer> componentIdMap) throws XPathException { |
| 648 |
for (Map.Entry<StructuredQName, KeyDefinitionSet> e : keyDefinitions.entrySet()) { |
| 649 |
boolean reusable = e.getValue().isReusable(); |
| 650 |
List<KeyDefinition> list = e.getValue().getKeyDefinitions(); |
| 651 |
for (KeyDefinition kd : list) { |
| 652 |
if (!kd.getObjectName().equals(StandardNames.getStructuredQName(StandardNames.XS_IDREFS))) { |
| 653 |
kd.export(out, reusable, componentIdMap); |
| 654 |
} |
| 655 |
} |
| 656 |
} |
| 657 |
} |
| 658 |
} |
| 659 |
|