Automatically add behavior to each template element — that sounds like something a stylesheet could do!
自动将行为添加到每个模板元素—听上去象是样式表可以做的事!
If you want to modify Listing 2 to adapt to your site layout, you can edit the contents of the XSL: template element.
如果您希望修改清单2以便适应您的站点布局,可以编辑xsl:template元素的内容。
Delete the call-template element from the code to remove the Properties section from the layout, as Listing 7 shows.
从代码中删去call - template元素,以去掉布局中的properties段落,如列表7所示。
To remove Included Patterns from the description, delete the following call-template element from the code in Listing 11.
为了从描述中移除包含的Patterns,从列表11中的代码中,删除以下的call - template元素。
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.
在这两个案例中,您可以了解到,在每次应用模板时结果是如何被附加到目标元素的现有内容的。
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的层次和版本。
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.
在元素的模板中,处理器检查下一个元素是否也是元素。
Since all the logic is now in the text_line PostScript function, the line template itself is trivial-each element translates directly into a call to the text_line PostScript function.
由于所有的逻辑现在都在text_linePostScript函数中,因此line模板本身变得微不足道—每个元素都直接转换为对text_line PostScript函数的调用。
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中还定义了与元素匹配的模板。
Then the template displays the text of the element using the PostScript show command; a string of PostScript text is contained in parentheses.
然后模板将使用PostScriptshow命令显示元素的文本;PostScript文本字符串包含在圆括号中。
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模板。
应用推荐