John & Sean,
Thanks for the view points. I was afraid that would be the case and it appeared that way as well when I looked over the brief tutorial. It's a shame my suspicions had to be confirmed.
While I don't doubt the XLST approach can offer considerable flexibility I see it as case of over-engineering a simple problem. Kinda like requiring a degree in astrophysics just to operate a lathe. Something simple is all that's needed. I think letting us provide our own XHTML based templates with a series of tags to tell LR where to fill data would be the ideal solution. Like this:
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head profile="http://gmpg.org/xfn/11">
<title>LR Gallery</title>
</head>
<body>
<div id="galleryContainer">
$gallery$
</div>
</body>
</html>
Better yet, let us provide a template that LR will use to generate the content (like above) but keep it separate from what's used in the preview. This way server-side scripting can be included in the output. A separate and static template page could then be used for the preview.
Heck, they could still keep XLST as an option for advanced users too.
Whatever path they choose, hopefully Adobe will implement a simpler solution soon. In the mean time, I'll just have to bust out my text editor and wade through it...
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head profile="http://gmpg.org/xfn/11">
<title>LR Gallery</title>
</head>
<body>
<div id="galleryContainer">
$gallery$
</div>
</body>
</html>
[a href=\"index.php?act=findpost&pid=101411\"][{POST_SNAPBACK}][/a]
Except you miss a very vital point: there are 2 page types to most galleries, the index page(s) and the media pages. Even iView has two page types to hack. I've not done any iView scripting though.
I have a modification of the simple one Andy shows with an image scroller and a menubar. Basically it's a single page gallery that has a center section with the images available to scroll through.
2 things I'll work on when I have time: Adding the ID plate and making a way to set your own menubar names and links. I have a rough idea on the second, but never tried and as for the first, I just can't find exactly the right combination of the Model/VBox/Bindings to make the ID plate work. If you want to look at it I'll post it in my Blog. Let me know.
My code example is just to get the point across and not to be thorough.
I'd love to check out what you got when you have time to post it. I'll be getting LR Monday and I have some time (and the need) to dedicate to this.
[a href=\"index.php?act=findpost&pid=101539\"][{POST_SNAPBACK}][/a]
Using Andy Rahn's simple code you can extrapolate a page to look like a web page easily.:
This is the transformer.xslt file
<?xml version="1.0"?>
<xsl:stylesheet
version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:output method="xml" indent="yes"/>
<xsl:param name="siteTitle" select="/photoCollection/display/metadata/siteInfo/@title" />
<xsl:template match="photoCollection">
<files>
<!-- copy source xml to a file for ease of development -->
<file name="source.xml">
<xsl:copy-of select="/" />
</file>
<!-- A ultra simple index page -->
<xsl:call-template name="index.html" />
</files>
</xsl:template>
<!-- Generate an index page -->
<xsl:template name="index.html" >
<file name="index.html">
<html>
<head>
<title><xsl:value-of select="$siteTitle" /></title>
</head>
<body>
<ol>
<xsl:for-each select="samples/img">
<xsl:call-template name="indexImage" />
</xsl:for-each>
</ol>
</body>
</html>
</file>
</xsl:template>
<!-- Add one image to the list -->
<xsl:template name="indexImage">
<xsl:param name="path" select="rendition[@size='thumb']/@path" />
<li><img src="{$path}" /></li>
</xsl:template>
</xsl:stylesheet>
In the head you can call a CSS file that you link to in a file called gallery.xml
<gallery>
<amgVersion>0.5</amgVersion>
<filePath>mycss.css</filePath>
</gallery>
The filepath will link to this. Include any images etc, using the filepath tag.
To put the images in line remove the li and ol tags in the above.
You can build your own web template around this to start.
I'll upload my scroll template when I get home.