Package com.ptc.windchill.esi.lite.util
Class XSLTransformer
java.lang.Object
com.ptc.windchill.esi.lite.util.XSLTransformer
Utility class has methods for transforming XML using XSL.
Supported API: true
Supported API: true
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic URLaddUserInfoToURL(URL url, String userName, String password) Adds the user information to URL.static StringApplies the XSL to XML contents considering parameters provided for method.static StringApplies the XSL to XML contents considering parameters provided for method.static StringapplyXSL(String inputXMLStr, File xslFile, String xslParams, String nameValseperator, String paramSeperator) Applies the XSL to XML contents considering parameters provided for method.static StringApplies the XSL to XML contents considering parameters provided for method.static StringApplies the XSL to XML contents considering parameters provided for method.static StringApplies the XSL to XML contents considering parameters provided for method.static StringapplyXSL(String inputXMLStr, String xslFileURL, String xslUsername, String xslPasswd, String xslParams) Applies the XSL to XML contents considering parameters provided for method.static StringapplyXSL(String inputXMLStr, String xslFileURL, String xslUsername, String xslPasswd, String xslParams, String nameValseperator, String paramSeperator) Applies the XSL to XML contents considering parameters provided for method.static StringapplyXSL(String inputXMLStr, StreamSource xslFileSource, String xslParams, String nameValseperator, String paramSeperator) Applies the XSL to XML contents considering parameters provided for method.
-
Field Details
-
XSL_PARAM_NAME_VALUE_SEPERATOR
Separator for the name and value pair. Default value is "="
Supported API: true -
XSL_PARAM_SEPERATOR
Separator for parameters which are provided as name1=value1^name2=value2
Supported API: true
-
-
Method Details
-
applyXSL
public static String applyXSL(String inputXMLStr, StreamSource xslFileSource, String xslParams, String nameValseperator, String paramSeperator) Applies the XSL to XML contents considering parameters provided for method.
Supported API: true- Parameters:
inputXMLStr- the XML string to which XSL style sheet need to be applied.xslFileSource- the xsl style sheet source file.xslParams- xsl parameters to be used while applying style sheet.nameValseperator- name value separatorparamSeperator- parameter separator- Returns:
- the transformed output.
-
applyXSL
public static String applyXSL(String inputXMLStr, File xslFile, String xslParams, String nameValseperator, String paramSeperator) Applies the XSL to XML contents considering parameters provided for method.
Supported API: true- Parameters:
inputXMLStr- the XML string to which XSL style sheet need to be applied.xslFile- the xsl style sheet source file.xslParams- xsl parameters to be used while applying style sheet.nameValseperator- name value separatorparamSeperator- parameter separator- Returns:
- the transformed output.
-
applyXSL
public static String applyXSL(String inputXMLStr, String xslFileURL, String xslUsername, String xslPasswd, String xslParams, String nameValseperator, String paramSeperator) Applies the XSL to XML contents considering parameters provided for method.
Supported API: true- Parameters:
inputXMLStr- the XML string to which XSL style sheet need to be applied.xslFileURL- the URL of xsl style sheet source file.xslUsername- the user name to access XSL URL.xslPasswd- the password to access XSL URL.xslParams- xsl parameters to be used while applying style sheet.nameValseperator- name value separatorparamSeperator- parameter separator- Returns:
- the transformed output.
-
applyXSL
Applies the XSL to XML contents considering parameters provided for method.
Supported API: true- Parameters:
inputXMLStr- the XML string to which XSL style sheet need to be applied.xslFileURL- the URL of xsl style sheet source file.- Returns:
- the transformed output.
-
applyXSL
Applies the XSL to XML contents considering parameters provided for method.
Supported API: true- Parameters:
inputXMLStr- the XML string to which XSL style sheet need to be applied.xslFileURL- the URL of xsl style sheet source file.xslParams- xsl parameters to be used while applying style sheet.- Returns:
- the transformed output.
-
applyXSL
public static String applyXSL(String inputXMLStr, String xslFileURL, String xslUsername, String xslPasswd, String xslParams) Applies the XSL to XML contents considering parameters provided for method.
Supported API: true- Parameters:
inputXMLStr- the XML string to which XSL style sheet need to be applied.xslFileURL- the URL of xsl style sheet source file.xslUsername- the user name to access XSL URL.xslPasswd- the password to access XSL URL.xslParams- xsl parameters to be used while applying style sheet.- Returns:
- the transformed output.
-
applyXSL
public static String applyXSL(String inputXMLStr, String xslFileURL, String xslUsername, String xslPasswd) Applies the XSL to XML contents considering parameters provided for method.
Supported API: true- Parameters:
inputXMLStr- the XML string to which XSL style sheet need to be applied.xslFileURL- the URL of xsl style sheet source file.xslUsername- the user name to access XSL URL.xslPasswd- the password to access XSL URL.- Returns:
- the transformed output.
-
addUserInfoToURL
public static URL addUserInfoToURL(URL url, String userName, String password) throws MalformedURLException, URISyntaxException Adds the user information to URL.
Supported API: true- Parameters:
url- the url to which user information needs to be addeduserName- the user name to be used to add user information to urlpassword- the password to be used to add user information to url- Returns:
- URL having user information
- Throws:
MalformedURLExceptionURISyntaxException
-
applyXSL
Applies the XSL to XML contents considering parameters provided for method.
Supported API: true- Parameters:
inputXMLStr- the XML string to which XSL style sheet need to be applied.xslFile- the xsl style sheet source file.xslParams- xsl parameters to be used while applying style sheet.- Returns:
- the transformed output.
-
applyXSL
Applies the XSL to XML contents considering parameters provided for method.
Supported API: true- Parameters:
inputXMLStr- the XML string to which XSL style sheet need to be applied.xslFile- the xsl style sheet source file.- Returns:
- the transformed output.
-