Вопрос

I was wondering what the "|" in the apply template mean in XSLT.

<input type="{@Type}" id="{@Id}" name="{$calculatedName}" class="input-small" >
 <xsl:apply-templates select="DisplayOption1 | DisplayOptions2"/>
</input>

I am thinking that it pick one or the other but it does not. It actually applied both. So if the "|" does not represent an OR (bitwise) here what does it mean? The small snippet of the XML

<DataField Type="DropDown" Id="65" Name="PropertyStatus">
      <DisplayOptions1 Column="1" />
      <DisplayOptions2 DisplayName="Status:" LookupType="PropertyStatus"   
        ReadOnly="FALSE" Required="true" Visibilty="TRUE" />
</DataField>
Это было полезно?

Решение

The pipe is used to combine the two expressions into one, essentially a union of the two.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top