Exemple #1
0
  void nextSibling() {
    if (LOG.isLoggable(Level.FINER)) {
      LOG.finer("Next sibling");
    }

    nodePath.push(nodePath.pop() + 1);
  }
Exemple #2
0
  void start(XMLEntity entity) {
    if (LOG.isLoggable(Level.FINER)) {
      LOG.finer("Start of " + entity);
    }

    final boolean parentIncluded = (inclusionContext.isEmpty() ? true : inclusionContext.peek());
    inclusionContext.push(
        parentIncluded ? !configuration.excluded(entity) : configuration.included(entity));

    spacePreservationContext.push(
        spacePreservationContext.isEmpty() ? false : spacePreservationContext.peek());
    final Object xmlSpace = entity.getAttributes().get(TextConstants.XML_SPACE_ATTR_NAME);
    if (xmlSpace != null) {
      spacePreservationContext.pop();
      spacePreservationContext.push("preserve".equalsIgnoreCase(xmlSpace.toString()));
    }

    nodePath.set(entity.getAttributes());
    nodePath.push(0);

    elementContext.push(entity);

    for (XMLTransformerModule<T> m : modules) {
      m.start(this, entity);
    }
  }