Class CmsXsltContext


  • public class CmsXsltContext
    extends java.lang.Object
    Provides extension functions for use in XSLT version transformation files.

    An instance of this class is meant to be used for only a single content conversion.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.w3c.dom.NodeList convertType​(org.w3c.dom.NodeList value, java.lang.String sourceTypeName, java.lang.String targetTypeName, java.lang.String elementName)
      XSLT extension function that converts the XML for a value between two different OpenCms content value types.
      • Methods inherited from class java.lang.Object

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

      • CmsXsltContext

        public CmsXsltContext​(CmsObject cms)
        Creates a new instance.
        Parameters:
        cms - the CMS context
    • Method Detail

      • convertType

        public org.w3c.dom.NodeList convertType​(org.w3c.dom.NodeList value,
                                                java.lang.String sourceTypeName,
                                                java.lang.String targetTypeName,
                                                java.lang.String elementName)
        XSLT extension function that converts the XML for a value between two different OpenCms content value types.
        Parameters:
        value - a node list that is expected to contain exactly one element, which should represent an XML content value
        sourceTypeName - the original type of the value
        targetTypeName - the type which the value should be converted to
        elementName - the name that should be used
        Returns:
        a node list containing the converted XML value