In both cases, you can see how the results are appended to the existing contents of the targeted element each time the template is applied.
在这两个案例中,您可以了解到,在每次应用模板时结果是如何被附加到目标元素的现有内容的。
Automatically add behavior to each template element — that sounds like something a stylesheet could do!
自动将行为添加到每个模板元素—听上去象是样式表可以做的事!
Code a template to match the elements to output the element.
编写一个模板,匹配元素,将其输出到元素中。
By using a style sheet to define a template that matches an element with a particular archetype, you can further simplify the code.
通过使用样式表来定义一个与带特定原型的元素相匹配的模板,可以进一步简化代码。
The method discussed results in a transform that has a template for each element in the vocabulary and is really quite elaborate.
在以这种方法得到的转换中,对应词汇表中的每个元素都有一个模板,这的确很复杂。
However, you can see that if you add a new element that represents a balance, you'll need to change the template.
然而,可以看到,如果添加一个表示余额的新元素,那么就需要更改这个模板。
The XSLT template in Listing 16 displays the position of each element.
清单16 中的XSLT模板显示了每个元素的位置。
Of course, you can modify the example template to process the element however you want; you could make the font even bigger, change the color, and so on.
当然,您可以修改这个示例模板以按照您的方式处理元素;您甚至可以使字体更大,更改颜色,诸如此类。
This template first checks for the existence of any elements inside the element.
该模板首先检查元素中是否存在任何元素。
Listing 24 shows a template to process only the first element in the XML document.
清单24展示了只处理XML文档中第一个元素的模板。
The root element, CAM, defines the namespace used throughout the template itself as well as the level and version of CAM.
根元素CAM定义了整个模板本身使用的名称空间以及CAM的层次和版本。
For each HTML element, you'll find a brief description of the element, the corresponding formatting object, and an XSLT template for converting HTML into XSL-FO.
对于每个HTML元素,您将看到对该元素的简要描述、对应的格式化对象和将HTML转换成xsl - FO的XSLT模板。
The results list the position of the element within the context of the template.
结果列出了元素在模板上下文中的位置。
Notice that when the processor calls this template from the template for the element, it adds a space to the end of the value so there will always be at least one space.
当处理器从元素的模板调用该模板时,它将一个空格添加到值的末尾,因此始终至少有一个空格。
In the template for the element, the processor looks to see if the next element is also a element.
在元素的模板中,处理器检查下一个元素是否也是元素。
This is done by adding the type attribute to the body element in the template file.
通过向模板文件的body元素中添加type属性可以实现这一点。
This element is used in the Wiki area of the presentation template
演示模板的Wiki区域中使用了下面这个元素
Listing 3 shows how the template can place child element content from the chemistry namespace into the rendered SVG.
清单3展示了模板如何将子元素内容从chemistry名称空间放入呈现的SVG中。
This way, each occurrence of the "emps" element, will be subject to the rules of this template.
这样一来,每个出现的“emps”元素将要受该模板规则的约束。
However, you also want to include the name, symbol, atomic number, and atomic weight; you can select each of these by using an XBL: content element in the template.
不过,我们还希望填充一些元素名、元素符号、元素号和原子量,可以在模板中使用xbl:content元素来选择这些内容。
The template that matches the element is also defined in Frame.xsl.
在Frame . xsl中还定义了与元素匹配的模板。
Step 2-g creates a new page template as a Struts Tiles definition element with the Content Area's mapping data.
步骤2 -G创建一个新的页面模版,像StrutsTiles定义元素一样有ContentArea的映射数据。
The main template matches o: export, which is the first element generated by the pre-processor.
主模板和o:export匹配,这是预处理程序生成的第一个元素。
Fortunately, the content of the XSL: message element is really a full-blown XSLT template.
所幸的是,xsl:message元素的内容实际上是完整的XSLT模板。
Here's a simple XSLT template for transforming the element.
以下是转换元素的简单XSLT模板。
Here's the XSLT template that transforms the element.
以下是转换元素的XSLT模板。
Now that I've defined the graphics template, the element USES the XML Events' event attribute to define a handler for the SVGBindEnd event in ECMAScript.
现在已经定义了图形模板,元素通过XMLEvents的event属性在ECMAScript中定义了SVGBindEnd事件的处理程序。
The third element of the base class is used to choose which specific template specialization to use. The value for the third element is provided by
基类的第三个元素用于选择要使用哪种具体的模板特殊化。
To verify that the template is reached, place an XSL: message element at the top of the template to signal when the processor does indeed reach it.
为了检查是否执行了模板,可以在模板的开头加上xsl:message元素说明处理程序确实执行到了这里。
For that reason, the XSLT template for the element checks the previous element to see if it is a named anchor. Here are the templates for the and elements.
出于这个原因,元素的XSLT模板检查前一个元素,看它是否为命名锚点。
应用推荐