kwq5421
asked on
what meaning of the "<xsl:value-of select="../product[index() $gt$ context()!index()][0]"/>"
<xsl:for-each select="products/product">
<TABLE BORDER="1">
<xsl:for-each select="products/product">
<xsl:if expr="(childNumber(this) % 3) == 1">
<TR>
<TD><xsl:value-of /></TD>
<TD><xsl:value-of select="../product[index() $gt$ context()!index()][0]"/></ TD>
<TD><xsl:value-of select="../product[index() $gt$ context()!index()][1]"/></ TD>
</TR>
</xsl:if>
</xsl:for-each>
</TABLE>
</xsl:for-each>
and how to use the attribute to do table like about , and please give the example.
<!--<?xml version="1.0"?>-->
<?xml:stylesheet type="text/xsl" href="auction.asp" ?>
<xml xmlns:s="uuid:BDC6E3F0-6DA 3-11d1-A2A 3-00AA00C1 4882" xmlns:dt="uuid:C2F41010-65 B3-11d1-A2 9F-00AA00C 14882" xmlns:rs="urn:schemas-micr osoft-com: rowset" xmlns:z="#RowsetSchema">
<s:Schema id="RowsetSchema">
<s:ElementType name="categories" content="eltOnly">
<s:attribute type='typename'/>
<s:attribute type='numbers'/>
<s:extends type="rs:rowbase" />
</s:ElementType>
<s:AttributeType name='typename' rs:number='1' rs:nullable='true' rs:write='true'>
<s:datatype dt:type='string' dt:maxLength='50'/>
</s:AttributeType>
<s:AttributeType name='numbers' rs:number='2' rs:nullable='true' rs:write='true'>
<s:datatype dt:type='string' dt:maxLength='50'/>
</s:AttributeType>
</s:Schema>
<rs:data>
<z:categories typename='Textiles and Apparel' numbers='117' />
<z:categories typename='Other' numbers='119' />
<z:categories typename='Chemicals' numbers='101' />
<z:categories typename='Computer' numbers='102' />
<z:categories typename='Construction' numbers='103' />
<z:categories typename='Consumer Goods' numbers='104' />
<z:categories typename='Electronics' numbers='105' />
<z:categories typename='Energy, Mining and Minerals' numbers='106' />
<z:categories typename='Entertainment and Media Production' numbers='107' />
<z:categories typename='Environment' numbers='108' />
<z:categories typename='Food and Beverage' numbers='109' />
<z:categories typename='Forestry and Agriculture' numbers='110' />
<z:categories typename='Manufacturing and Processing' numbers='112' />
<z:categories typename='Packaging' numbers='113' />
<z:categories typename='Printing and Publishing' numbers='114' />
<z:categories typename='Science and Medicine' numbers='115' />
<z:categories typename='Industrial Supplies' numbers='111' />
<z:categories typename='Business and Office' numbers='100' />
<z:categories typename='Transportation' numbers='118' />
<z:categories typename='Telecommunicatio n' numbers='116' />
</rs:data>
</xml>
this id my xml file , and i would like to draw the table with 4 column to put the attribute "typename" so how to solve this problem ????
<TABLE BORDER="1">
<xsl:for-each select="products/product">
<xsl:if expr="(childNumber(this) % 3) == 1">
<TR>
<TD><xsl:value-of /></TD>
<TD><xsl:value-of select="../product[index()
<TD><xsl:value-of select="../product[index()
</TR>
</xsl:if>
</xsl:for-each>
</TABLE>
</xsl:for-each>
and how to use the attribute to do table like about , and please give the example.
<!--<?xml version="1.0"?>-->
<?xml:stylesheet type="text/xsl" href="auction.asp" ?>
<xml xmlns:s="uuid:BDC6E3F0-6DA
<s:Schema id="RowsetSchema">
<s:ElementType name="categories" content="eltOnly">
<s:attribute type='typename'/>
<s:attribute type='numbers'/>
<s:extends type="rs:rowbase" />
</s:ElementType>
<s:AttributeType name='typename' rs:number='1' rs:nullable='true' rs:write='true'>
<s:datatype dt:type='string' dt:maxLength='50'/>
</s:AttributeType>
<s:AttributeType name='numbers' rs:number='2' rs:nullable='true' rs:write='true'>
<s:datatype dt:type='string' dt:maxLength='50'/>
</s:AttributeType>
</s:Schema>
<rs:data>
<z:categories typename='Textiles and Apparel' numbers='117' />
<z:categories typename='Other' numbers='119' />
<z:categories typename='Chemicals' numbers='101' />
<z:categories typename='Computer' numbers='102' />
<z:categories typename='Construction' numbers='103' />
<z:categories typename='Consumer Goods' numbers='104' />
<z:categories typename='Electronics' numbers='105' />
<z:categories typename='Energy, Mining and Minerals' numbers='106' />
<z:categories typename='Entertainment and Media Production' numbers='107' />
<z:categories typename='Environment' numbers='108' />
<z:categories typename='Food and Beverage' numbers='109' />
<z:categories typename='Forestry and Agriculture' numbers='110' />
<z:categories typename='Manufacturing and Processing' numbers='112' />
<z:categories typename='Packaging' numbers='113' />
<z:categories typename='Printing and Publishing' numbers='114' />
<z:categories typename='Science and Medicine' numbers='115' />
<z:categories typename='Industrial Supplies' numbers='111' />
<z:categories typename='Business and Office' numbers='100' />
<z:categories typename='Transportation' numbers='118' />
<z:categories typename='Telecommunicatio
</rs:data>
</xml>
this id my xml file , and i would like to draw the table with 4 column to put the attribute "typename" so how to solve this problem ????
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Prasad.