PDA

View Full Version : noob needs help developing xml map/schema for gallery elements


oompa_l
07-06-2010, 08:34 PM
please bare with me, I m probably thinking about this all wrong. see my current xml map:

<Root>

<Prjct>
<Number></Number>
<Name></Name>
<Date></Date>
<Client></Client>
<Type></Type>
<Scope></Scope>
<Remarks></Remarks>
<Location>
<City></City>
<Province></Province>
<Country></Country>
</Location>
<Images>
<Thmb01></Thmb01>
<Img01></Img01>
<Ttl01></Ttl01>
<Cptn01></Cptn01>
</Images>
<Description></Description>

</Prjct>

How should I be contending with the issue of having multiple images per "project"? I know I can just duplicate the contents of "Images" tacking on sequential numbers but somehow this seems fairly inefficient and each project may have different numbers of images...is there a more appropriate way to be doing this?

Also, I guess I should say that my workflow - however "dumb" - is to map these xml elements onto my excel spreadsheet.

advice please? thanks!

byuhobbes85
07-06-2010, 10:32 PM
I would suggest an approach like this.


<Project>
<Number></Number>
<Name></Name>
<Date></Date>
<Client></Client>
<Type></Type>
<Scope></Scope>
<Remarks></Remarks>
<Location>
<City></City>
<Province></Province>
<Country></Country>
</Location>
<Images>
<Image>
<Thumbnail></Thumbnail>
<FullImage></FullImage>
<Title></Title>
<Caption></Caption>
</Image>
<Image>
<Thumbnail></Thumbnail>
<FullImage></FullImage>
<Title></Title>
<Caption></Caption>
</Image>
<Image>
<Thumbnail></Thumbnail>
<FullImage></FullImage>
<Title></Title>
<Caption></Caption>
</Image>
<!-- As many of these as you need -->
</Images>
<Description></Description>
</Project>


Definitely no need to number the images. As far as mapping onto a spreadsheet, I'm not sure how to help you there.

oompa_l
07-07-2010, 02:56 PM
yes, that looks cleaner. but how would you "find" the particular image you're looking for when developing an XSLT? Normally there is only one entry for each attribute for each root element...A project will only have one name, or type...so when you say something like <xsl:value-of select=" Root/Prjct/Description"/> there is only ever going to be one entry. What happens when there are multiple, as in the above scenario?