English | Français | Deutsch | Magyar | >> 中文 << | Polski adultinternetusers > Tutorials > XSLT Tutorial
>> 目录 << | 元素索引

简介

页 1 你可以用XSL自由地改变任何源文本。 stylesheet 还能 stylesheet 从同一个源文件生成不同的输出。
页 2 所有 XSL 样式表(stylesheet)必须以 xsl:stylesheet 元素开始。属性 version='1.0' 表示了 XSL(T) 规范的版本号。本例展示了一个最简单的样式表。由于它没有包含任何信息,所以按默认规则处理。
页 3 XSL处理器解析 Surf 源并且尝试找到匹配的模板规则。一旦找到,模板内定义的指令就会被执行。
页 4 有两种基本方法提取源元素中的内容。 stylesheet 使用 xsl:value-of 来获得,此时元素的内容不会再被进一步处理。 stylesheet 中的 xsl:apply-templates 指令却不同,解析器将按照模板的定义逐个继续处理。

模板

页 5 XSL处理器解析 Surf 源并且尝试找到匹配的模板规则。一旦找到,模板内定义的指令就会被执行。
页 6 位置路径(location paths)决定了对 Surf 文档的哪些部分应用哪些模板。位置路径的语法规则由 XPath 规范规定。在简单的情况下它看起来和文件系统的路径表示方法很类似。( stylesheet )
页 7 处理总是从匹配 "/" 的模板开始。这个符号匹配根节点(这个节点的唯一子元素就是文档元素(document element))。很多样式表并不显式地包含这个模板,这时将会应用隐含模板(它包含 作为唯一的指令)。这个指令意味着处理当前节点的所有子节点,包含文本节点在内。比较 stylesheetstylesheet 。当一个节点的模板存在,就不会调用默认处理过程 ( stylesheet )。如果想包括节点的子孙节点,必须显式地请求他们的模板( stylesheet )。
页 8 模板可以通过一组位置路径得到匹配,各个路径用 "|" 符号来分隔 ( stylesheet )。通配符 "*" 能与任意情况匹配。比较 stylesheetstylesheet
页 9 "//" 经常出现在路径的描述里。当它位于路径的开头时,表示选择文档中特定类型的节点的全体 ( stylesheet )。当它位于路径的中间时,表示选择前面部分的路径匹配后的所有节点 ( stylesheet )。
页 10 使用 mode 可以把一个元素处理多次,每一次处理得到不同的结果。With modes an element can be processed multiple times, each time producing a different result. 在 stylesheet 中,有一个 mode 是不存在的。
页 11 经常会有多个模板能匹配同一个 Surf 元素。因此必须能决定使用哪个模板。这个优先级的顺序可以通过 priority 属性来给出。如果没有给出这个属性,优先级将会根据某些规则算出。 stylesheetstylesheet 的模板优先级不同。 stylesheet 显示了没有指定优先级时的默认行为。模板 CCC 比模板 CCC/CCC 的优先级低,因为它不如后者精确。比较 stylesheetstylesheet 。模板 CCC 的优先级比 CCC/CCC 或者 AAA/CCC/CCC 都低,但是后两个的优先级却是相同的。这时 XSLT 处理器可能会发出出错信号,如果没有信号,处理器一定是使用了剩下的模板中最后一个在样式表中出现的模板。在 stylesheet 中,更不精确的 "*" 比 CCC 模板的优先级更低。算出来的优先级会在 -0.5 到 0.5 之间分布。XSLT 规范中对此有更详细的说明。

属性

页 12 访问属性的方法和访问元素的方法是一样的。注意属性名前面有个"@"符号
页 13 属性和元素的处理方法是一样的。
页 14 你也可以通过是否包含某些属性值来选择元素。 stylesheet 选择了,而 stylesheet 排除了那些包含特定属性的元素。

轴(Axes)

页 15 轴(Axes)在XSLT中扮演了重要的角色。欲知详情请看 XSLT 参考手册。比较: child(子) axis ( stylesheet ), descendant(后代) axis ( stylesheet ), parent(父) axis ( stylesheet ), ancestor(祖先) axis ( stylesheet ), following-sibling(后继兄弟) axis ( stylesheet ), preceding-sibling(前驱兄弟) axis ( stylesheet ), following(后继) axis ( stylesheet ), preceding(前驱) axis ( stylesheet ), attribute(属性) axis ( stylesheet ), namespace(命名空间) axis ( stylesheet ), self(本身) axis ( stylesheet ), descendant-or-self(后代或本身) axis ( stylesheet ), ancestor-or-self(祖先或本身) axis ( stylesheet ).
页 16 本例演示了各种轴(axes)的使用。
页 17 轴(Axis) child:: 可以省略,因为这是定位时的默认轴。轴 attribute:: 可以缩写为 @。 // 是轴 /descendant-or-self:: 的简写。. 等于 self:: 而.. 相当于 parent::。

重复和排序

页 18 xsl:for-each 指令包含了一个模板,这个模板将会逐个应用到通过 select 属性选中的节点上。
页 19 用 xsl:for-each ( stylesheetstylesheet ) 或者 xsl:apply-templates ( stylesheet ) 选出的节点可以被排序。次序决定于排序属性。 stylesheet 是升序,而 stylesheet 是降序排列。
页 20 stylesheet 按照字符排序,而 stylesheet 按照数值排序。注意这两者非常不同,在字符方式下10是小于2的。
页 21 stylesheet 按大写在前排序,而 stylesheet 做小写在前排序。

创建元素和属性

页 22 xsl:element 在处理的同时生成元素。 stylesheet 利用了这个特性,而 stylesheet 用另外一种劳神费力的方法达到同样的效果
页 23 xsl:attribute 在处理的同时生成元素。它在其包含的元素内创建属性。
页 24 copy 和 copy-of 结构是用来复制节点的。copy 元素只复制当前节点,不带子节点和属性。而 copy-of 却统统复制。
页 25 xsl:copy 元素可以带一个 use-attribute-sets 属性。这样就可以同时复制节点的属性集。 stylesheet 并不像想象的那样工作( 在 name 函数中使用了 use-attribute-sets)。这是因为属性中的表达式还没有被求值。

根据条件处理

页 26 xsl:if 指令让我们可以根据条件进行处理。 stylesheet 演示了一种典型的 xsl:for-each 用法,在条目间添加文字。通常你都不希望在最后一个元素的后面添加文字。 xsl-if 的用法在这里。( stylesheet )
页 27 元素 xsl:choose 用来在多种可能中进行选择。
页 28 如何找到以数字开头的文本。

数字生成和格式化

页 29 stylesheet 演示了 xsl:number 的默认行为。根据位置为各个章节编号。每一级的章节都有独立的序号。 stylesheet 把 level 属性设置为 multiple 得到了更自然的编号。
页 30 xsl:number 向输出中插入格式化后的数字。数字格式在格式化属性中指定。格式化属性以格式化标志符开头,后面有分隔字符。请看各个stylesheets来学习这些符号。
页 31 stylesheetstylesheet 是格式化多层次编号的例子

变量

页 32 stylesheetstylesheet 展示了不同的方法设置 xsl:variable。 stylesheetstylesheet 设置的是 xsl:param。
页 33 样式表( stylesheet )可以包含多个同名的变量。 stylesheet 展示了局部变量对同名全局变量的覆盖。 stylesheet 给出了一种错误的方法,局部变量被绑定到了 xsl:when 元素。因此其他模板只能看到全局变量的值。
页 34 模板的参数可以用 xsl:with-param 元素来传递。如果模板中 xsl:param 的名字和 xsl:with-param 相同,值将被传递。 stylesheet 是一个典型的例子。如果你想传递变量,必须用 xsl:param 元素来定义。 stylesheet 就是一个错误的例子。
页 35 可以用一个变量来表示结果树片断。对结果树片段的合法操作是节点集操作的子集。仅当一个操作也能运用于字符串操作时,它才能被用于结果树片段(对串操作的操作可能涉及先将串转化为数字或布尔量)。特别地,/, //, 和 [] 操作不能用于结果树片段。当对一个结果树片段进行合法的操作时,它的行为和对节点集的操作是完全一样的。请比较 stylesheetstylesheet
页 36 变量值的指定是有重要差别的。

数值计算

页 37 函数 number 将参数转化为数字。 stylesheet 展示了字符串的转换, stylesheet 转换布尔类型的值: true 和 false。
页 38 另外,减法和乘法运算的语法是相同的。Addition, subtraction and multiplication uses common syntax ( stylesheet )。 除法用得比较少,而斜杠 / 已经被占用,所以用关键字 div 来表示 ( stylesheet )。 整除用 mod 表示( stylesheet )。
页 39 函数 sum() 对所有选中的节点求和。 stylesheet 全部相加, stylesheet 只加奇数节点。
页 40 函数 ceilng(), floor() 和 round() 以三种不同的舍入方式将小数转换成整数。
页 41 函数 string() 将其输入参数转换为字符串。这个函数并不经常在样式表中直接使用,因为通常他会被默认调用。 stylesheet 演示了数字转化为字符串的例子。注意零除的结果。
页 42 测试,看元素的值是否是数字。

布尔函数

页 43 stylesheet 中,函数 boolean() 的参数是字符串。字符串的值为真的充分必要条件就是字符串的长度不为零。 stylesheet 把文字转换为数字再传给 boolean() 函数。 stylesheet 把 "0" 分别作为字符串和数字进行比较。 stylesheet 把节点集作为 boolean() 函数的参数。
页 44 如果传入参数为值假,函数 not 返回真,反之返回假。
页 45 当你需要再程序中做条件判断的时候,函数 true() 和 false() 就有用了。
页 46 函数 lang 根据节点的语言属性是否和参数字符串中指定的语言一致,或者是否属于指定语言的子语言而返回真或假。节点的语言属性来自节点的 Surf:lang 属性标签。如果该节点没有 Surf:lang 属性标签,这一属性继承自其最近的祖先节点的 Surf:lang 设置。如果所有的祖先节点都没有这个属性,lang 将返回假。如果存在这样的属性存在,lang 将把这个属性和参数进行忽略大小写的比较。相等就返回真,如果属性中包含 - 标志的后缀,忽略后缀后相等也返回真。

字符串函数

页 47 函数 string() 将其输入参数转换为字符串。这个函数并不经常在样式表中直接使用,因为通常他会被默认调用。 stylesheet 演示了数字转化为字符串的例子。注意零除的结果。
页 48 concat 函数返回参数的连接。
页 49 如果 starts-with 函数的第一个参数开头和第二个参数一致,函数返回真,否则返回假。如果函数 contains 的第一个参数字符串包含第二个参数的字符串,将返回真,否则返回假。
页 50 函数 substring-before 返回第一个参数串中子串的前驱串,substring-after 返回第一个参数串中子串的后继串。substring 返回第一个参数串中从第二个参数位置开始,长度为第三个参数的子串。如果没有第三个参数,将会返回从第二个参数开始,一直到字串结束的子串。字符串的计数是从1开始的( stylesheet )。 stylesheet 演示了一些参数越界或不完整的情形。
页 51 string-length 函数返回字串包含的字符数。normalize-space 函数返回一个这样的新串:将输入串的开头和结尾空格符全部去掉,然后把串内的连续空格符替换为单个空格,再返回。
页 52 translate 函数把第一个参数串中所有出现的第二个参数串中的字符替换为三个参数串中相应位置的字符。如果第二个参数串中有重复字符,替换以首次出现的位置对应到第三个串中的字符为准。如果第三个串的长度大于第二个串,多余的字符将被忽略。

节点集函数

页 53 position 函数返回上下文位置对应的数字,last 函数返回表达式求值时的上下文大小对应的数字。 stylesheet 演示了这些函数在不同上下文中的应用。 stylesheet 比较了排序和不排序的 xsl:for-each 元素。
页 54 count 函数返回作为参数的节点集所包含的节点数。
页 55 id 函数通过节点的唯一标志选择节点。 stylesheet 演示了一种简单的用法。请仔细研究 stylesheet 。标题元素的内容并未显示在方括号"[]"中。因为 DTD 中的属性id是定义为CDATA的,而不是ID。多个id也可以一起提供( stylesheet )。
页 56 使用函数 id 的一个例子。
页 57 函数 name, local-name 和 namespace-uri 可以用来获取元素和属性的名字以及命名空间 (namespaces)。

输出

页 58 xsl:output 元素使样式表的设计者可以指定结果树的输出方式。当一个 XSLT 处理器输出结果树时,它应该按照 xsl:output 元素的指定去做。但是,这并不是必需的。xsl:output 元素仅能作为顶级元素出现。 stylesheet 作为html输出, stylesheet 作为 Surf。 比较空标签是如何输出的。
页 59 不使用 Surf:output 元素指定时,默认的输出方式是 Surf ( stylesheet ), 但是如果 output 指定了值 html (区分大小写),那输出方法会用 html ( stylesheet ).
页 60 采用 html 作为输出方法时,根据 HTML 规范对空元素不输出结束标签,而且对程序脚本和样式表内的特殊字符不进行转义符替换(请看你浏览器中间最下面窗口的源代码)。比较 stylesheet 并参照 XSLT 规范。
页 61 encoding 属性指定了适用的编码方式。HTML 输出时应该在 HEAD 元素的开始标签后紧接着加上 META 元素,来指定字符的编码方式。 stylesheet 用 UTF-8 编码方式输出, stylesheet 使用 UTF-16, stylesheet 用 Cp1250。 在 stylesheet 中,请看你浏览器中间最下面窗口的源代码。xml 里面包含了指定字符集之外的字符,因此进行了转义符替换。
页 62 text 输出方式把结果数的所有文本节点的字符串值按照文档顺序输出,中间不做任何转义字符替换。请通过你的浏览器查看网页源代码来检查输出。

复制

页 63 copy 和 copy-of 结构是用来复制节点的。copy 元素只复制当前节点,不带子节点和属性。而 copy-of 却统统复制。
页 64 xsl:copy 元素可以带一个 use-attribute-sets 属性。这样就可以同时复制节点的属性集。 stylesheet 并不像想象的那样工作( 在 name 函数中使用了 use-attribute-sets)。这是因为属性中的表达式还没有被求值。

其他函数

页 65 current 函数返回一个节点集,集合的唯一成员就是当前节点。对于最外面的表达式(指一个不属于其它表达式的表达式),当前节点一定就是上下文节点。当然,在方括号内当前节点一般和上下文节点就不同了。
页 66 函数 generate-id 根据 Surf 规范产生一个标志(id)。 stylesheet 使用这个函数为源 Surf 的所有元素加上 id。

Stylesheet的合成

页 67 一个样式表 (stylesheet) 可以被导入 (xsl:import) 或者包含 (xsl:include) 其他的样式表。导入和包含的效果是一样的,除了导入的样式表中的定义和模板规则优先于被导入的样式表中的定义和模板规则。 stylesheetstylesheet 是导入和包含的两个例子。
页 68 stylesheet 导入 stylesheetstylesheet 导入 stylesheet
页 69 另外几个 xsl:include 和 xsl:import
页 70 被导入的样式表中定义的模板规则行为会因为冲突而发生变化,但是你可以用 xsl:apply-imports 元素来得到原来的信息。 stylesheet 导入 stylesheet 并且覆盖了原来的模板。 stylesheet 导入 stylesheet 并改变了模板。 xsl-apply-imports 只对 xsl:import 导入的模板才有效,对 xsl:include 包含的模板无能为力( stylesheet )。
页 71 导入产生的优先权比 优先级属性中的指定优先级更有权重。请看 stylesheet

Kevin Carr

Natural Skin Care European Soaps
Kevin Carr
Mayor Dave Shawver Stanton
Internetusers
This is the website that has all the latest for surf, skate and snow. You can also see it here:. You'll be glad you saw the surf apparel.

Boardshorts are designed to be quick-drying, and are generally made from smooth polyester or nylon material. They are durable and hold up to wear from contact with a surfboard, yet are comfortable and light-weight. They are well-adapted to their use in various active watersports. These are the best board shorts around: Volcom Board Shorts
Hurley Board Shorts
Quiksilver Board Shorts
Roxy Board Shorts
Billabong Board Shorts
Adidas Board Shorts
Emerica Board Shorts
Element Board Shorts
Analog Board Shorts
Alpinestars Board Shorts
Quiksilver Board Shorts
C1rca Board Shorts
DC Board Shorts
Dakine Board Shorts
Etnies Board Shorts
Independent Board Shorts
Jet Pilot Board Shorts
Kr3w Board Shorts
RVCA Board Shorts
LRG Board Shorts
Matix Board Shorts
Lost Board Shorts
Metal Mulisha Board Shorts
O'Neill Board Shorts
Boardshorts do not have an elastic waist like many swim shorts do; instead they have a more rigid waistband which opens at the front, often with a velcro fly. The waistband is also held together at the front with a lace-up tie. This double fail-safe system is in order to ensure that the shorts cannot be pulled off the body by the force of the wave when a surfer is tumbled under water during a wipeout. Another common feature of authentic surfing boardshort design is a very small pocket sealed with velcro and vented with a grommet. This is designed to be a secure place to carry a car key or house key while in the water: Volcom Boardshorts
Hurley Boardshorts
Quiksilver Boardshorts
Roxy Boardshorts
Billabong Boardshorts
Adidas Boardshorts
Emerica Boardshorts
Element Boardshorts
Analog Boardshorts
Alpinestars Boardshorts
Quiksilver Boardshorts
C1rca Boardshorts
DC Boardshorts
Dakine Boardshorts
Etnies Boardshorts
Independent Boardshorts
Jet Pilot Boardshorts
Kr3w Boardshorts
RVCA Boardshorts
LRG Boardshorts
Matix Boardshorts
Lost Boardshorts
Metal Mulisha Boardshorts
O'Neill Boardshorts
Boardshorts are normally longer than some shorts or form-fitting speedo styles of swimwear and sometimes they have a baggy appearance. Boardshorts are longer than normal shorts for one major reason: surfboards are covered with a layer of sticky wax, which allows the surfer to stand on the board without slipping off. However, this wax can rip leg hair off the surfer when he is sitting on the board waiting for waves. Long boardshorts cover the back of the leg when sitting on the board, preventing the wax from ripping at the leg hair. The length of boardshorts is also affected according to fashion trends; ranging from mid-thigh (old school) to below the knee, covering the entire knee. They often sit low in the back, exposing the top of the buttocks. Many designs use vibrant color, Hawaiian floral images and highlighted stitching; however not all boardshorts have these features: Volcom Boardshort
Hurley Boardshort
Quiksilver Boardshort
Roxy Boardshort
Billabong Boardshort
Adidas Boardshort
Emerica Boardshort
Element Boardshort
Analog Boardshort
Alpinestars Boardshort
Quiksilver Boardshort
C1rca Boardshort
DC Boardshort
Dakine Boardshort
Etnies Boardshort
Independent Boardshort
Jet Pilot Boardshort
Kr3w Boardshort
RVCA Boardshort
LRG Boardshort
Matix Boardshort
Lost Boardshort
Metal Mulisha Boardshort
O'Neill Boardshort
Although the basic design for boardshorts remains largely the same, some manufacturers have taken advantage of new technology. Because surfers and other water-sports enthusiasts commonly wear boardshorts without underwear, one of the major complaints has been about the use of velcro for the fly closure which tends to entangle pubic hair. A solution that some manufactures have come up with is to use a neoprene fly, which does not allow the fly to completely open, but provides enough stretch so that the shorts can be easily pulled on and off. Pubic hair does not get caught on the neoprene fly. To remedy another common complaint, about boardshorts stitching in the inseam area which would rub directly against the wearer's skin, many manufacturers switched to a seamless design, or use welding or glue, rather than stitches. Although it is very common for boardshorts to be worn as is, some male wearers prefer to wear boxers, a jockstrap or briefs under them. Some female wearers wear a swimsuit or bikini bottom under them. Volcom Board Short
Hurley Board Short
Quiksilver Board Short
Roxy Board Short
Billabong Board Short
Adidas Board Short
Emerica Board Short
Element Board Short
Analog Board Short
Alpinestars Board Short
Quiksilver Board Short
C1rca Board Short
DC Board Short
Dakine Board Short
Etnies Board Short
Independent Board Short
Jet Pilot Board Short
Kr3w Board Short
RVCA Board Short
LRG Board Short
Matix Board Short
Lost Board Short
Metal Mulisha Board Short
O'Neill Board Short
Here are few links to some of the more popular Volcom surf clothing products:

Volcom Shirts
Volcom Tees
Volcom Shorts
Volcom Hats
Volcom Shoes
Volcom Boardshorts
Volcom Jackets

Here are few links to some of the more popular Element apparel and clothing products:

Element Shirts
Element Tees
Element Shorts
Element Hats
Element Shoes
Element Boardshorts
Element Jackets

Here are few links to some of the more popular Ezekiel apparel and clothing products:

Ezekiel Shirts
Ezekiel Tees
Ezekiel Shorts
Ezekiel Hats
Ezekiel Shoes
Ezekiel Boardshorts
Ezekiel Jackets

Here are few links to some of the more popular RVCA apparel and clothing products:

RVCA Shirts
RVCA Tees
RVCA Shorts
RVCA Hats
RVCA Shoes
RVCA Boardshorts
RVCA Jackets

HB Surf Shop
HB Sport Apparel
OC Sport Shop
OC Sport Apparel
All Sport Apparel
All Surf clothing

 

Master Plumber Orange County, Stanton, CA

Take a moment to visit 1cecilia448 or see them on twitter at 1cecilia448 or view them on facebook at 1cecilia448.

You can also get Organic Skin Care products from Bliss Bath Body and you must check out their Natural Body Lotions and bath soaps

Now if you are looking for the best deals on surf clothing from Quiksilver and Roxy then you have to check these amazing deals here:

Hey, check out this Organic Skin Care European Soaps along with Natural Lavender Body Lotion and shea butter

and we can get surf t shirts surfing shirt and And you must check out this website swim suit swimming suit and swim trunks