code: protected final String computeOutputNodeName( Node selectedNode ) throws RepositoryException {
          String selectedNodeName = selectedNode.getName();
          if (selectedNodeName.equals(JcrConstants.JCR_CONTENT)) {
              try {
                  return selectedNode.getParent().getName();
              } catch (ItemNotFoundException e) {
                  // selected node must be the root node ?!?!
              }
          }
          return selectedNodeName;
      }
docs: Compute the name of the output node. If the selected node is named "jcr:content", this method assumes that the selected
  node is a child of an 'nt:file' node, and so it returns the name of that 'nt:file' node. Otherwise, this method returns the
  name of the selected node.
  
  @param selectedNode the node that was selected for sequencing; may not be null
  @return the name that should be used for the output node; never null
  @throws RepositoryException if there is a problem accessing the repository content