Welcome to WebmasterWorld Guest from 54.144.243.34

Forum Moderators: httpwebwitch

Description Variations using xml/xslt?

xml, xslt, repurpose text

   
11:49 pm on Sep 10, 2009 (gmt 0)

5+ Year Member



Hello,
Complete NooB to xml xslt, primarily php/mysql hack.

I'm doing descriptions of garments and have to write a title, full description, meta title and overview.

Each of these are minor variations of a general description.
Would I be able to use xml/xslt to repurpose this general description 'on the fly'? Is there an editor that is best at this sort of 're-writing'? Will it mess with SEO?

here is an example:
title
Womens shirred V-neck with 3/4 sleeves & eclectic jewels

description
This Stylish Top Has a shirred V-neck with 3/4 sleeves & eclectic jewel embelishments <BR>Made of 100% Cotton 2x1 Baby Rib

overview
Shirred V-neck with 3/4 sleeves & eclectic jewel embelishments

meta title
Ladies shirred V-neck with 3/4 sleeves & eclectic jewel embelishments. 100% Cotton 2x1 Baby Rib

The overview might be used on the thumbnail page, the rest on the product page.

-------
Thanks so much!

4:13 pm on Sep 11, 2009 (gmt 0)

WebmasterWorld Administrator httpwebwitch is a WebmasterWorld Top Contributor of All Time 10+ Year Member



It's rare that you can cut-and-paste the English language and still have grammatically normal-sounding descriptions like you have above. Possessives and pluralizations will mess things up.

But if your phrases are constructed generically enough, you can use XML and XSLT to "fill in the blanks" in large documents.

you can put your phrase fragments into an XML file, then you can use XSLT like so:

<xsl:foreach select='//nodename'>
<xsl:text>This thing is </xsl:text><xsl:value-of select="nodename" /><xsl:text> and isn't it good.</xsl:text>
</xsl:foreach>

5:33 am on Oct 17, 2009 (gmt 0)

5+ Year Member



sorry for returning to this so late, I'm with a different company but still doing basically the same thing.
is there a resource that can elaborate on your example?

I was thinking that with some carefull planning, I could work this out. But, I was thinking I would use something like:
<garment>
<color>
<feature>
<descriptive 1>
<descriptive 2>
etc.

for example I have:
Black Shelby Cobra Collage T-Shirt
T-Shirt featuring Shelby Cobra Collage, in Black
Shelby Cobra Black T-Shirt
tshirt-with-shelby-cobra

as various entries that go into the page header, title, <h1> and URL.

An alternative would be to make a script to poke these in to the database fields, I could go back and dial them in as necessary.

 

Featured Threads

My Threads

Hot Threads This Week

Hot Threads This Month