Quantcast
Channel: Jim's PeopleSoft Journal
Viewing all articles
Browse latest Browse all 201

Pagelet Wizard Custom Tags

$
0
0

Pagelet Wizard custom transformations can use special tags documented here to insert images, message catalog entries, or to format numbers and dates. This is great when trying to format currencies or ensure multilingual compliance. The problem with "Post-Transformation Processing," as it is called in PeopleBooks, is that it requires the transformation results to be valid XML. Question: How do you get Pagelet Wizard to generate valid XML when the Xalan processor used by PeopleTools sees HTML tags and automatically generates HTML? Answer: use the <xsl:output> XSL tag. Here is a sample template that produces valid XML:

<?xmlversion="1.0"encoding="UTF-8"?>
<xsl:stylesheetversion="2.0"xmlns:xhtml="http://www.w3.org/1999/xhtml"
xmlns="http://www.w3.org/1999/xhtml"xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="xhtmlxsl">

<xsl:outputmethod="xml"version="1.0"encoding="UTF-8"
doctype-public="-//W3C//DTDXHTML1.1//EN"doctype-system="http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"
indent="yes"/>

<xsl:templatematch="/">
<!--yourXSLgoeshere-->
</xsl:template>

<!--identitytransformtemplates-->
<xsl:templatematch="*">
<xsl:apply-templates/>
</xsl:template>

<!--deleteunmatchedtext-->
<xsl:templatematch="@*|text()|comment()|processing-instruction()">
</xsl:template>

</xsl:stylesheet>

Viewing all articles
Browse latest Browse all 201

Trending Articles