- 浏览: 82099 次
- 性别:
- 来自: 西安
文章分类
最新评论
XSL 语言入门4 -- xsl实际项目应用示例1
在项目中需要对通过后代代码生成的xml字符串数据做xsl样式转化,首先通过Altova XMLSpy工具进行xsl编辑:
首先给出xml数据文档CUSTOMER_Edit.xml:
<?xml version="1.0" encoding="GBK"?> <?xml-stylesheet type="text/xsl" href="CUSTOMER_Edit.xsl"?> <columns table="HSY_T_CUSTOMER" isWorkOrder="false" flowID="" flowName="" actionName="" title="大客户编辑" token="0428F398-9778-D1D7-2D05-968430963136"> <column seqId="000" feildName="CUSTOMER_ID" feildTitle="大用户ID" feildType="NUMBER" feildLen1="10" feildLen2="" feildNull="false" feildKey="true" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="right" rule="MaxValue" when="before"> </column> <column seqId="001" feildName="CUSTOMER_NAME" feildTitle="大用户名称" feildType="VARCHAR2" feildLen1="64" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="left" rule="" when=""> </column> <column seqId="005" feildName="START_DATE" feildTitle="创建时间" feildType="DATE" feildLen1="7" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="center" rule="" when=""> </column> <column seqId="006" feildName="STOP_DATE" feildTitle="停用时间" feildType="DATE" feildLen1="7" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="center" rule="" when=""> </column> <column seqId="002" feildName="X" feildTitle="X坐标" feildType="VARCHAR2" feildLen1="20" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="left" rule="" when=""> </column> <column seqId="003" feildName="Y" feildTitle="Y坐标" feildType="VARCHAR2" feildLen1="20" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="left" rule="" when=""> </column> <column seqId="007" feildName="USER_NAME" feildTitle="用户名" feildType="VARCHAR2" feildLen1="64" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="left" rule="UserName" when="before"> </column> <column seqId="008" feildName="USER_TITLE" feildTitle="用户标题" feildType="VARCHAR2" feildLen1="64" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="left" rule="UserTitle" when="before"> </column> <column seqId="009" feildName="DEPT_ID" feildTitle="部门编号" feildType="NUMBER" feildLen1="10" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="left" rule="" when=""> </column> <column seqId="010" feildName="DEPT_NAME" feildTitle="部门名称" feildType="VARCHAR2" feildLen1="64" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="true" readOnly="false" align="left" rule="" when=""> </column> <column seqId="004" feildName="DATA_GUID" feildTitle="DATA_GUID" feildType="VARCHAR2" feildLen1="38" feildLen2="" feildNull="true" feildKey="false" defaultValue="" feildDescribe="" feildProperty="" feildValue="" feildRight="" visible="false" readOnly="false" align="left" rule="Guid" when="before"> </column> </columns>
然后我们通过xsl文件CUSTOMER_Edit.xsl进行xml格式的转化(已经在CUSTOMER_Edit.xml中引入了xsl文档):
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fo="http://www.w3.org/1999/XSL/Format"> <xsl:template match="/"> <html> <head> <link rel="stylesheet" type="text/css" href="css/public.css"/> <script type="text/javascript" src="js/My97DatePicker/WdatePicker.js"/> <style type="text/css"> input{ width:100%; } </style> </head> <body> <!-- <div> <xsl:value-of select="columns/attribute::title"/> </div> --> <table style="width:800;" width="100%"> <!-- 隐藏行中包括table、isWorkOrder、flowID、flowName、actionName、token等信息 --> <tr id="hiddenTr" style="display:none;" width="100%"> <!-- display:none; --> <!-- 字段 table --> <td width="17%"> <xsl:attribute name="id">table</xsl:attribute> <xsl:attribute name="name">table</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="columns/attribute::table"/></xsl:attribute> <xsl:value-of select="columns/attribute::table"/> </td> <!-- 字段 isWorkOrder --> <td width="17%"> <xsl:attribute name="id">isWorkOrder</xsl:attribute> <xsl:attribute name="name">isWorkOrder</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="columns/attribute::isWorkOrder"/></xsl:attribute> <xsl:value-of select="columns/attribute::isWorkOrder"/> </td> <!-- 字段 flowID --> <td width="17%"> <xsl:attribute name="id">flowID</xsl:attribute> <xsl:attribute name="name">flowID</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="columns/attribute::flowID"/></xsl:attribute> <xsl:value-of select="columns/attribute::flowID"/> </td> <!-- 字段 flowName --> <td width="17%"> <xsl:attribute name="id">flowName</xsl:attribute> <xsl:attribute name="name">flowName</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="columns/attribute::flowName"/></xsl:attribute> <xsl:value-of select="columns/attribute::flowName"/> </td> <!-- 字段 actionName --> <td width="16%"> <xsl:attribute name="id">actionName</xsl:attribute> <xsl:attribute name="name">actionName</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="columns/attribute::actionName"/></xsl:attribute> <xsl:value-of select="columns/attribute::actionName"/> </td> <!-- 字段 token --> <td width="16%"> <xsl:attribute name="id">token</xsl:attribute> <xsl:attribute name="name">token</xsl:attribute> <xsl:attribute name="value"><xsl:value-of select="columns/attribute::token"/></xsl:attribute> <xsl:value-of select="columns/attribute::token"/> </td> </tr> <!-- 要在页面中显示的字段 --> <xsl:variable name="tdStyle"/> <!-- 定义变量tdStyle --> <tr> <xsl:for-each select="columns/column"> <!-- 字段 CUSTOMER_ID --> <xsl:if test="./@feildName='CUSTOMER_ID'"> <td width="18%"> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2" width="32%"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> <!-- 字段 CUSTOMER_NAME--> <xsl:if test="./@feildName='CUSTOMER_NAME'"> <td width="18%"> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2" width="32%"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> </xsl:for-each> </tr> <tr> <xsl:for-each select="columns/column"> <!-- 字段 START_DATE --> <xsl:if test="./@feildName='START_DATE'"> <td> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> <!-- 字段 STOP_DATE --> <xsl:if test="./@feildName='STOP_DATE'"> <td> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> </xsl:for-each> </tr> <tr> <xsl:for-each select="columns/column"> <!-- 字段 X --> <xsl:if test="./@feildName='X'"> <td> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> <!-- 字段 Y --> <xsl:if test="./@feildName='Y'"> <td> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> </xsl:for-each> </tr> <tr> <xsl:for-each select="columns/column"> <!-- 字段 USER_NAME --> <xsl:if test="./@feildName='USER_NAME'"> <td> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> <!-- 字段 USER_TITLE --> <xsl:if test="./@feildName='USER_TITLE'"> <td> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> </xsl:for-each> </tr> <tr> <xsl:for-each select="columns/column"> <!-- 字段 DEPT_ID --> <xsl:if test="./@feildName='DEPT_ID'"> <td> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> <!-- 字段 DEPT_NAME --> <xsl:if test="./@feildName='DEPT_NAME'"> <td> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> <xsl:if test="./@visible='false'"> <xsl:attribute name="style"> <xsl:text>display:none;</xsl:text> </xsl:attribute> </xsl:if> </td> <td colspan="2"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> </xsl:for-each> </tr> <!-- DATA_GUID --> <tr> <xsl:for-each select="columns/column"> <!-- 此列只有此一个字段,所以隐藏改行;若有>1个字段,则不需隐藏此行 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <!-- 字段 TITLE --> <xsl:if test="./@feildName='DATA_GUID'"> <td> <xsl:attribute name="align"><xsl:value-of select="./@align"/></xsl:attribute> <!-- 判断是否隐藏此列 --> <xsl:attribute name="style"> <xsl:if test="./@visible='false'">display:none;</xsl:if> </xsl:attribute> <xsl:value-of select="./@feildTitle"/> <xsl:if test="./@feildKey='true'"> <span style="color:#E58A22;font-weight:bold;font-size:15px;">(PK)</span> </xsl:if> </td> <td colspan="2"> <xsl:choose> <xsl:when test="./child::*"> <!-- select --> <xsl:if test="./feildDef/options/option"> <select> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <xsl:for-each select="./feildDef/options/option"> <option> <xsl:value-of select="./@value"/> </option> </xsl:for-each> </select> </xsl:if> </xsl:when> <xsl:otherwise> <!-- input --> <xsl:if test="./@feildLen1 < 100"> <input width="100%"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- type 属性 --> <xsl:attribute name="type">text</xsl:attribute> <!-- maxLength 属性 --> <xsl:attribute name="maxLength"><xsl:if test="./@feildLen2 = ''"><xsl:value-of select="./@feildLen1"/></xsl:if></xsl:attribute> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd HH:mm:ss'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:attribute name="onfocus">WdatePicker({dateFmt:'yyyy-MM-dd'})</xsl:attribute> <xsl:attribute name="class">Wdate</xsl:attribute> </xsl:if> <!-- style 属性 --> <xsl:attribute name="style"> <xsl:if test="./@when != ''">when:<xsl:value-of select="./@when"></xsl:value-of>;</xsl:if> <xsl:if test="./@rule != ''">rule:<xsl:value-of select="./@rule"></xsl:value-of>;</xsl:if> <xsl:if test="./@feildKey='true'">pk:true;</xsl:if> <xsl:if test="./@feildLen2 != ''"> length:<xsl:value-of select="./@feildLen1"/>-<xsl:value-of select="./@feildLen2"/>; </xsl:if> <!-- visible 属性 --> <xsl:if test="./@visible = 'false'"> <xsl:text>display:none;</xsl:text> </xsl:if> <!-- 是否是工单 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildRight = 'R'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:text>border-style:none;</xsl:text> </xsl:if> <xsl:if test="./@feildNull = 'false'"> <xsl:text>border-color:red;</xsl:text> </xsl:if> </xsl:if> <xsl:if test="./@feildType = 'NUMBER'"> <xsl:text>dataType:NUMBER;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'VARCHAR2' or ./@feildType != 'VARCHAR'"> <xsl:text>dataType:STRING;</xsl:text> </xsl:if> <!-- 时间下拉框样式 属性 --> <xsl:if test="./@feildType = 'TIMESTAMP'"> <xsl:text>dataType:TIMESTAMP;</xsl:text> </xsl:if> <xsl:if test="./@feildType = 'DATE'"> <xsl:text>dataType:DATE;</xsl:text> </xsl:if> </xsl:attribute> <!-- readonly 属性 --> <xsl:if test="../attribute::isWorkOrder = 'true'"> <xsl:if test="./@feildRight = ''"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <xsl:if test="../attribute::isWorkOrder = 'false'"> <xsl:if test="./@readOnly = 'true'"> <xsl:attribute name="readonly">true</xsl:attribute> </xsl:if> </xsl:if> <!-- value 属性 --> <xsl:attribute name="value"><xsl:value-of select="./@feildValue"/></xsl:attribute> </input> </xsl:if> <!-- textarea --> <xsl:if test="./@feildLen1 >= 100"> <textarea rows="3" cols="28"> <!-- id 属性 --> <xsl:attribute name="id"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- name 属性 --> <xsl:attribute name="name"><xsl:value-of select="./@feildName"/></xsl:attribute> <!-- text --> <xsl:value-of select="./@feildValue"/> </textarea> </xsl:if> </xsl:otherwise> </xsl:choose> </td> </xsl:if> </xsl:for-each> </tr> </table> </body> </html> </xsl:template> </xsl:stylesheet>
通过altova xmlspy进行网页预览,结果如下:
相关推荐
1. **Hello World 示例**:介绍一个简单的“Hello World”示例,帮助初学者快速入门。 2. **打印表单规范**:详细说明如何在XSL-FO中定义打印表单的结构和样式。 3. **样例2 fo.xsl 样式表**:提供了一个具体的样例...
### XSL 入门教程详解 #### 一、XML与XSL概述 随着互联网的快速发展,数据交换的需求日益增加,HTML作为一种标记语言逐渐暴露...通过这些基础知识的学习,您可以更深入地探索XML和XSL技术,并将其应用到实际项目中。
3,即入门级信息。 执照 根据 Apache 许可,版本 2.0(“许可”)获得许可; 除非遵守许可,否则您不得使用此文件。 您可以在以下网址获取许可证副本 兼容性 CDA XSL 已经过测试,可以与 Saxon-PE 和主要浏览器一起...
《XSLT从入门到精通》是一本深入探讨XSLT技术的专业书籍,它涵盖了XSLT的基础知识、进阶技巧以及实际应用案例。通过学习这本书的源代码,读者可以更好地理解和掌握XSLT在XML数据转换中的强大功能。XSLT是一种用于...
<?xml version="1.0" encoding="iso-8859-1"?> <greeting>Hello, world! ``` 这个XML文档包含了一个简单的问候语。接下来,我们将创建一个XSL文件来定义如何显示这个XML文档。 **2.3 XSLT文件示例** 创建一个名为...
作者Benoît Marchal通过丰富的示例来阐述XML的基础语法、高级特性以及实际应用场景,旨在帮助读者理解和掌握XML技术的核心要素。 #### 关键章节详解 **第1章:XML Galaxy(XML宇宙)** - **XML的历史与发展**:...
在“XSLT轻松入门第二章:XSLT的实例”中,你将看到实际的转换示例,这些例子将帮助你理解如何定义模板、应用模板以及如何处理XML文档的不同部分。这部分可能会包含如何创建简单的文本输出,如何转换元素和属性,...
本教程将帮助你深入理解XML转换,并通过PPT讲解和示例代码实践,让你从入门到精通。 首先,我们要理解XML的基本结构。XML文档由元素、属性、文本内容等组成。元素是XML的最基本构建块,用尖括号包围,如 `<element>...
在这个“xslt实例(实际例子)”的压缩包中,你将找到一系列用于学习和实践XSLT的实例,非常适合入门和中级学习者。 首先,让我们了解一下XSLT的基本概念: 1. **模板匹配**:XSLT的核心是模板匹配。通过定义模板,...
### XML实用大全(绝对经典) #### 一、XML概览 **XML**(eXtensible Markup Language)是一种标记语言,其设计目的是传输...通过以上内容,读者不仅可以了解XML的基础知识,还能深入了解XML的实际应用场景和技术细节。
4. **应用场景示例** - **动易系统**:体现XSLT的数据和表达式分离,以及客户端转换的优势。 学习XSLT对于处理XML数据和构建可复用的前端展示至关重要。虽然学习曲线可能较陡,但其强大的功能和灵活性使得投入时间...
XML(eXtensible Markup Language...通过学习“C-#XML入门经典随书源码”,你将能够深入理解XML在C#中的应用,并具备实际开发中处理XML数据的能力。源码部分通常包含示例程序,帮助读者更好地理解和实践这些理论知识。
XML,全称Extensible Markup Language,是一种用于存储和传输数据的标记语言,它的设计目标是传输数据,而非显示数据。XML的精华在于其灵活性和结构化特性,使得它成为跨平台、跨应用间交换和存储数据的理想选择。...
本书通过简洁明了的语言介绍了XML的基本概念及其在实际应用中的作用,适合初学者快速入门。 #### XML简介 - **定义**:XML是一种标记语言,用于结构化文档,以便于数据交换。 - **特点**: - **开放性**:XML是一...
《XML入门经典(第5版)》是一本深入浅出介绍XML基础和实践的书籍,源码部分通常包含了各种示例和练习,帮助读者更好地理解XML的语法和应用。 XML的核心概念包括: 1. **结构化数据**:XML通过标签定义数据的结构,...
在软件开发领域,掌握丰富的资源和技术文档对于提升个人技能、解决实际问题有着不可估量的作用。本文将详细介绍一系列对软件开发者非常有用的网站,涵盖各种语言和技术栈。 #### 1. GotAPI.com - **简介**:GotAPI....
QT35-C# XML入门经典源代码全集是一份针对初学者和开发者设计的资源,旨在帮助他们理解和掌握XML(可扩展标记语言)在C#编程环境中的应用。XML是一种广泛应用的数据交换和存储格式,因其结构化、自描述性而备受青睐...
这篇教程将带你入门这三种技术的基础概念和应用。 DOM是一种基于树形结构的XML或HTML文档表示法,它将整个文档加载到内存中,形成一个可操作的对象模型。通过DOM,你可以方便地查找、修改或添加文档中的任何元素。...
- **Nutch**: 开源网络爬虫项目,基于Apache Hadoop构建,能够抓取和索引大量网络数据,广泛应用于搜索引擎开发。 - **环境搭建**: - **配置中文API文档**: - 将中文API文档配置到Tomcat服务器上,并确保可以通过`...
这一章节通常会给出一个实际的 XML 示例文档,以帮助学习者更好地理解 XML 的结构和语法。 ### 第十二章至第十三章:格式化 XML 这两章主要介绍了如何使用不同的技术来格式化 XML 文档,包括: 1. **XSLT**:用于...