DataType question... Options
neehouse
Posted: Monday, February 26, 2007 11:27:26 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,076
Location: Charleston, West Virginia, United States
Is there a means in which I can create a datatype that stores the data into the database and content XML file in an XML format that is easily readable from XSLT?

I know it may not be best practice, but the idea is to allow me to have a datatype that stores structured data into the field in an easily usable manner.

thus I could reference the data as such:

Code:
<xsl:for-each select="data [@alias='xmldata']/entries/entry">
  <xsl:value-of select="./field1"/>: <xsl:value-of select="./field2"/>
</xsl:for-each>


This would open up a huge world of possibilities

The other means would be to have an XSLT helper function that would allow me to do the same thing.

Code:
<xsl:for-each select="umbraco.library:LoadXml(data [@alias='xmldata'])/entries/entry">
  <xsl:value-of select="./field1"/>: <xsl:value-of select="./field2"/>
</xsl:for-each>




Is there a better means of storing structured data in a single field?

Any thoughts would be appreciated.

• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
neehouse
Posted: Tuesday, February 27, 2007 10:03:30 PM

Rank: Umbracoholic

Joined: 7/20/2006
Posts: 1,076
Location: Charleston, West Virginia, United States
I think I found the solution that I am looking for... Kasper's blog saves the day (well, maybe)

• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.