LANSA エディターはペイロード・ラッパーの XSL スタイルシートを使って、フィールドやリスト TSML ノードを変換し、コンテンツを取得してデザインに追加します。 ペイロード・ラッパーの XSL スタイルシートは WebRoutine の (現在アクティブなTSP用の) TSP スタイル・シートをインポートします。この XSL の出力は、LANSA エディターがデザインに追加する必要のあるコンテンツです。(フィールドやリストのXSL インポート、lxml データ・ノード、XSL) ペイロード・ラッパーでは、XSL テンプレートが WebRoutineの TSP スタイル・シートで定義されると想定される場合があることに注意してください。 <?xml version="1.0" encoding="UTF-8"?> <!-- (c) 2002, 2013 LANSA --><!-- WAM Editor TSP Stylesheet Wrapper --><!-- $Workfile:: tsp_payload_wrapper.xsl $ --><!-- $Revision::3 $ --> <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xslt="http://www.lansa.com/2002/XSL/Transform-Alias" xmlns:lxml="http://www.lansa.com/2002/XML/Runtime-Data" xmlns:tsml="http://www.lansa.com/2002/XML/Generation-Metadata" xmlns:wd="http://www.lansa.com/2002/XSL/Weblet-Design" xmlns:lansa_design="http://www.lansa.com/2002/XML/Design" xmlns="http://www.w3.org/1999/xhtml" exclude-result-prefixes="tsml"> <xsl:import href="%tsp_webroutine%.xsl"/> <xsl:output method="xml" omit-xml-declaration="no" encoding="UTF-8" indent="yes"/> <xsl:namespace-alias stylesheet-prefix="xslt" result-prefix="xsl"/> <xsl:template match="tsml:data\[@full-document = 'false'\]"> <lansa_design:payload xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:lxml="http://www.lansa.com/2002/XML/Runtime-Data" xmlns:wd="http://www.lansa.com/2002/XSL/Weblet-Design" xmlns:lansa_design="http://www.lansa.com/2002/XML/Design" xmlns="http://www.w3.org/1999/xhtml"> <lansa_design:imports> <xsl:call-template name="weblet-imports"/> </lansa_design:imports> <xsl:apply-templates select="tsml:lxml-data"/> <lansa_design:content> <xsl:apply-templates select="*\[not(self::tsml:lxml-data)\]"/> </lansa_design:content> </lansa_design:payload> </xsl:template> <xsl:template match="tsml:lxml-data"> <lansa_design:lxml-data> <xsl:apply-imports /> </lansa_design:lxml-data> </xsl:template> <xsl:template match="tsml:fields"> <xsl:apply-templates select="tsml:field" /> </xsl:template> <xsl:template match="tsml:field"> <lansa_design:label> <xsl:if test="(tsml:mode != 'hidden') and (tsml:mode != 'private')"> <xsl:call-template name="field-caption"> <xsl:with-param name="field" select="."/> </xsl:call-template> </xsl:if> </lansa_design:label> <lansa_design:value> <xsl:if test="tsml:mode != 'private'"> <xsl:call-template name="field-value"> <xsl:with-param name="field" select="."/> </xsl:call-template> </xsl:if> </lansa_design:value> </xsl:template> <xsl:template match="tsml:lists\[not(@column-only)\]"> <lansa_design:reference> <xsl:apply-imports /> </lansa_design:reference> <lansa_design:implementation> <xsl:apply-templates select="tsml:list" mode="template_definition"/> </lansa_design:implementation> </xsl:template> <xsl:template match="tsml:lists\[@column-only\]"> <xsl:apply-templates select="tsml:list"/> </xsl:template> <xsl:template match="tsml:lists\[@column-only\]/tsml:list"> <lansa_design:value> <xsl:variable name="inline_list" select="(@inline = 'true') or ((@inline = 'default') and $g_inline_lists)"/> <xsl:apply-templates select="./tsml:list-entries/tsml:entry/tsml:column" mode="column_placement"> <xsl:with-param name="inline_list" select="$inline_list"/> </xsl:apply-templates> </lansa_design:value> </xsl:template></xsl:transform> |