use of com.helger.schematron.pure.model.PSActive in project ph-schematron by phax.
the class PSPreprocessor method _getPreprocessedPhase.
@Nonnull
private static PSPhase _getPreprocessedPhase(@Nonnull final PSPhase aPhase, @Nonnull final PreprocessorIDPool aIDPool) throws SchematronPreprocessException {
final PSPhase ret = new PSPhase();
ret.setID(aIDPool.getUniqueID(aPhase.getID()));
ret.setRich(aPhase.getRichClone());
if (aPhase.hasAnyInclude())
throw new SchematronPreprocessException("Cannot preprocess <phase> with an <include>");
for (final IPSElement aElement : aPhase.getAllContentElements()) {
if (aElement instanceof PSActive)
ret.addActive(((PSActive) aElement).getClone());
else if (aElement instanceof PSLet)
ret.addLet(((PSLet) aElement).getClone());
// ps are ignored
}
ret.addForeignElements(aPhase.getAllForeignElements());
ret.addForeignAttributes(aPhase.getAllForeignAttributes());
return ret;
}
Aggregations