homepage Welcome to WebmasterWorld Guest from 54.163.70.249
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / XML Development
Forum Library, Charter, Moderators: httpwebwitch

XML Development Forum

    
Description Variations using xml/xslt?
xml, xslt, repurpose text
sasori




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

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!

 

httpwebwitch




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

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>

sasori




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

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / XML Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved