|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Search Engine Optimization Forum SEO is much easier with help from peers and experts! The WebProWorld SEO forum is for the discussion and exploration of various search engine optimization topics. Any non (engine) specific SEO or SEM topics should go here. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
Below you find an example of how future markup and linking may be written:
1. links.xml Code:
<?xml version="1.0"?> <links xmlns:xlink="http://www.w3org/1999/xlink/namespace/"> <link xlink:type="extended" xlink:role="product-manufacturer"> <loc xlink:type="locator" xlink:href="products.xml#xpointer(id('23428'))" xlink:label="item"/> <loc xlink:type="locator" xlink:href="manufacturers.xml#xpointer(id(ABC))" xlink:label="madeby"/> <go xlink:type="arc" xlink:from="item" xlink:to="madeby"/> </link> <link xlink:type="extended" xlink:role="similar-products"> <loc xlink:type="locator" xlink:href="products.xml#xpointer(id('23428'))"/> <loc xlink:type="locator" xlink:href="products.xml#xpointer(id('75386'))"/> <loc xlink:type="locator" xlink:href="products.xml#xpointer(id('11111'))"/> </link> <link xlink:type="extended" xlink:role="similar-products"> <loc xlink:type="locator" xlink:href="products.xml#xpointer(id('99999'))"/> <loc xlink:type="locator" xlink:href="products.xml#xpointer(id('11111'))"/> </link> </links> Code:
<?xml version="1.0"?> <mcatalog> <manufacturer id='ABC'> <title>ABC</title> <description>ABC Ltd.</description> </manufacturer> <manufacturer id='XYZ'> <title>XYZ</title> <description>XYZ Ltd</description> </manufacturer> <manufacturer id='QRS'> <title>QRS</title> <description>QRS Ltd</description> </manufacturer> </mcatalog> Code:
<?xml version="1.0"?> <catalog> <product id='23428'> <title>ABC Microwave Oven - Model 34X</title> <description>Great oven!</description> </product> <product id='75386'> <title>XYZ Microwave Oven - Model TRL7</title> <description>Even a better model!</description> </product> <product id='11111'> <title>QRS Microwave Oven - Model SDF</title> <description>The ultimate in oven construction!</description> </product> <product id='99999'> <title>QRS convention Oven - Model LKJG</title> <description>You won't believe how good this oven is!</description> </product> </catalog> Code:
<?xml version="1.0"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3org/1999/XSL/Transform" xmlns:xlink="http://www.w3org/1999/xlink/namespace/"> <xsl:output method="html"/> <xsl:template match="product"> <xsl:variable name="prod-id" select="@id"/> <h1><xsl:value-of select="title"/></h1> <p>These files can not combined in modern browsers</p> <h3>Other similar products</h3> <!-- Select all similar products where - they are different from the current product - there is a link that - has the correct role (i.e., product similarity) - includes the similar product - includes the current product --> <xsl:for-each select="document('products.xml')/catalog/product"> <xsl:variable name="this-prod-id" select="@id"/> <xsl:if test="($this-prod-id != $prod-id) and document('links.xml')/links/link [@xlink:role='similar-products'] [loc/@xlink:href[substring(substring-after(string(), '#xpointer(id('), 2, 5)=$prod-id]] [loc/@xlink:href[substring(substring-after(string(), '#xpointer(id('), 2, 5)=$this-prod-id]]"> <xsl:value-of select="title"/><br/> </xsl:if> </xsl:for-each> <hr/> </xsl:template> </xsl:stylesheet> There may be errors in the code that I have had no time to locate. What are
__________________
Mini Network:: Financial information at your fingertips Learn object oriented programming where it started Last edited by kgun; 07-03-2008 at 03:13 PM. |
|
||||
|
Quote:
Quote:
Are you aware of this XML driven site: Read here sticky? Quote:
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Advanced SEO question - need help | back in 52' | Search Engine Optimization Forum | 19 | 08-31-2006 05:23 PM |
| Advanced Logo | WPW_Feedbot | Graphics & Design Discussion Forum | 0 | 03-17-2005 01:30 AM |
| Advanced Blending | WPW_Feedbot | Graphics & Design Discussion Forum | 0 | 12-28-2004 05:31 PM |
| Advanced Web Reporting | ppayne | Google Discussion Forum | 2 | 08-20-2004 11:34 AM |
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |