Class XsltTransformationVisitor

java.lang.Object
org.openrewrite.TreeVisitor<org.openrewrite.xml.tree.Xml,P>
org.openrewrite.xml.XmlVisitor<org.openrewrite.ExecutionContext>
org.openrewrite.xml.XsltTransformationVisitor

@Incubating(since="8.30.0") public class XsltTransformationVisitor extends org.openrewrite.xml.XmlVisitor<org.openrewrite.ExecutionContext>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.openrewrite.xml.tree.Xml.Tag
    transformTag(String xmlContent, String xslt)
    Transform XML content using XSLT transformation.
    org.openrewrite.xml.tree.Xml
    visitDocument(org.openrewrite.xml.tree.Xml.Document document, org.openrewrite.ExecutionContext executionContext)
     

    Methods inherited from class org.openrewrite.xml.XmlVisitor

    autoFormat, autoFormat, autoFormat, getLanguage, isAcceptable, maybeAutoFormat, maybeAutoFormat, maybeAutoFormat, visitAttribute, visitAttributeValue, visitCharData, visitComment, visitDocTypeDecl, visitDocTypeDeclExternalSubsets, visitElement, visitIdent, visitJspDirective, visitProcessingInstruction, visitProlog, visitTag, visitTagClosing, visitXmlDecl

    Methods inherited from class org.openrewrite.TreeVisitor

    adapt, collect, collect, defaultValue, doAfterVisit, getAfterVisit, getCursor, isAdaptableTo, noop, postVisit, preVisit, reduce, reduce, reduce, setCursor, stopAfterPreVisit, updateCursor, visit, visit, visit, visitAndCast, visitAndCast, visitMarker, visitMarkers, visitNonNull, visitNonNull, visitorTreeType

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • XsltTransformationVisitor

      public XsltTransformationVisitor()
  • Method Details

    • visitDocument

      public org.openrewrite.xml.tree.Xml visitDocument(org.openrewrite.xml.tree.Xml.Document document, org.openrewrite.ExecutionContext executionContext)
      Overrides:
      visitDocument in class org.openrewrite.xml.XmlVisitor<org.openrewrite.ExecutionContext>
    • transformTag

      public static org.openrewrite.xml.tree.Xml.Tag transformTag(@Language("xml") String xmlContent, @Language("xslt") String xslt)
      Transform XML content using XSLT transformation. There are no formatting guarantees with this transformation.
      Parameters:
      xmlContent - XML content to transform
      xslt - XSLT transformation
      Returns:
      Transformed XML content