Nimekuwa kufanya kidogo ya mambo XSL hivi karibuni na mawazo ningependa kuweka pamoja sampuli kwa ajili ya kumbukumbu yangu ya baadaye na kwamba inaweza kuwa na thamani ya sisi wote XSLT-ER kufanya hai katika internets.
Fikiria XML zifuatazo:
<FdcSearchTabsCollection Count="2">
<SearchTab Label="Industry" SortOrder=”00” Label=”Industries” SearchConstraints="contenttype:Viwanda" TabID="831b2a74-98c4-4453-8061-86e2fdb22c63"/>
<SearchTab Label="Practices" SortOrder=”01” Label=”Practices” SearchConstraints="contenttype:PracticeGroups" TabID="678e206b-6996-421f-9765-b0558fe1a9c0"/>
</FdcSearchTabsCollection>
zifuatazo XSL snippet kuzalisha orodha Iliyopangwa ya tabo hrefs:
<xsl:template match="FdcSearchTabsCollection" xml:space="preserve">
<!– The "all" tab –>
<a href="javascript:ViewTab(‘All’)">View all</a>
<!– Kila mtu binafsi tab –>
<!– Iterate kupitia Tabo zote na kuonyesha sahihi viungo. –>
<xsl:for-each select="SearchTab">
<xsl:sort select="@SortOrder"/>…
<a href="javascript:ViewTab('{@TabID}')"><xsl:value-of select="@Label"/></a>
</xsl:kwa-kila><br />
</xsl:template>
Hapa ni nini inaonekana kama katika SharePoint:
</mwisho>
Kufuata yangu juu ya Twitter kwa http://www.twitter.com/pagalvin
Hey, Paulo. Interesting that the XML isn’t valid, as each SearchTab element has two Label attributes. Please tell me that SharePoint doesn’t generate that!
M.