You are here:   Software > XsltDb > XSLideShow > XSLideShow XML format
Register   |  Login

XSLideShow XML Albums

XSLideShow has its own XML format for albums, to be used to build galleries from XML files or dynamic services.

A sample album is defined like:
<?xml version="1.0" encoding="utf-8"?>
<album albumname="Img/XSLideshow">
<media filename="Galleria Classic.png" extension="png"
 href="/Portals/0/XSLideShowThumbnails/767_Galleria Classic_150x100r.png" 
height="100" width="150" title="Galleria Classic" description="Galleria Classic" medium="image" size="" timestamp="">
    <thumbnails>
      <thumbnail href="/Portals/0/XSLideShowThumbnails/767_Galleria Classic_75x75c.png" width="75" height="75" />
    </thumbnails>
  </media>
  <media filename="Image resizing.png" extension="png" 
href="/Portals/0/XSLideShowThumbnails/767_Image resizing_150x100r.png"
 height="100" width="150" title="Image resizing" description="Image resizing" medium="image" size="" timestamp="">
    <thumbnails>
      <thumbnail href="/Portals/0/XSLideShowThumbnails/767_Image resizing_75x75c.png" width="75" height="75" />
    </thumbnails>
  </media>
</album>



The format is very simple: there's a root element (album) containing a list of images (media), where each media is defined by these attributes:
  • extension: e.g. jpg or png, file extension
  • href: URL to the media (image)
  • width and heigth: dimensions of image
  • title, description: descriptive data for image
  • medium: for now only "image"
  • size, timestamp: optional metadata, currently not used
  • link (new in 01.00.08), allows to specify an URL to link on image click.

Static and Dynamic XML Media Sources

This XML format can be used to define custom media sources, for example to include in a gallery images from different (local or remote) sources. And it can be used as a static definition, saving an XML file to be loaded at runtime, or dynamically.
That is you could dynamically generate the XML, loading it from an URL (using XML File from URL as media source).
How? With XsltDb!
Just publish a new XsltDb module on your site, and there handle the dynamic generation of the XML within an mdo:service section.
For example:

<mdo:service name="ProductsImages" type="text/xml">
            <xsl:variable name="sql">
                exec ProductsImages 20
            </xsl:variable>
            <xsl:variable name="rs" select="mdo:sql($sql,'p')/root/p"></xsl:variable>
            <album>
            <xsl:for-each select="$rs">
                <media>
                    <xsl:attribute name="title">{{productName}}</xsl:attribute>
                    <xsl:attribute name="extension">png</xsl:attribute>
                    <xsl:attribute name="link">/Catalogo/id_prod/{{id_prod}}</xsl:attribute>
                    <xsl:attribute name="href">/getproductimage.aspx?id={{id_prod}}</xsl:attribute>
                    <thumbnails>
                        <thumbnail href="/getproductimage.aspx?id={id_prod}&w=75"></thumbnail>
                    </thumbnails>
                </media>
            </xsl:for-each>
            </album>
        </mdo:service>

In you XSLideShow gallery, you would specify this mdo:service url (mdo:service-url) as the url for your "XML file from URL" media source, for example:

http://www.mysite.com/DesktopModules/XsltDb/ws.aspx?service=ProductsImages&mod=621


Dynamic Media Source parameters

XSLideShow can also pass parameters to the XML Media Source services.
As for version 01.00.08, the following parameters are supported:
  • thumbsize: passes the configured thumbnails size to the remote service, so that it would dynamically build its XML album generating thumbnails of the correct size
  • height and width: passes the configured image size to the remote service, so that it can resize images as expected.

Dynamic XML sample: most sold products at www.albaris.it

Rating And Comments

Total votes: 0
Average: -

Current page rating and comments:


Rate this page:


Post a comment:

Name:
E-Mail:
Web Site:
   
 
 
 
 
   

Screenshots

Galleria Classic
Galleria Classic
Image resizing
Image resizing
Media Source Configuration
Media Source Configuration
Media Sources
Media Sources
picasa_album
picasa_album
ShineTime plugin
ShineTime plugin
SlidesJS
SlidesJS
Visualization Plugin Configuration
Visualization Plugin Configuration
Visualization Plugins
Visualization Plugins
XSLideshow with Galleria plugin
XSLideshow with Galleria plugin
XSLideshow with JBGallery plugin
XSLideshow with JBGallery plugin

Download XSLideShow

File Kb
Info XSLideShow 01.00.11 2808 K