#!/bin/sh
#
#    Copyright (C) 2006 W3C (R) (MIT ERCIM Keio), All Rights Reserved.
#    W3C liability, trademark and document use rules apply.
#
#    http://www.w3.org/Consortium/Legal/ipr-notice
#    http://www.w3.org/Consortium/Legal/copyright-documents
#
#    $Header: /w3ccvs/WWW/2002/ws/databinding/edcopy/patterns/listexamples,v 1.3 2006/11/10 18:50:42 pdowney Exp $
#

[ -f "examples.xml" ] && examples="examples.xml"
[ ! -f "$examples" ] && [ -f "$EXAMPLES_DIR/examples.xml" ] && examples="$EXAMPLES_DIR/examples.xml"

exec xsltproc - $examples <<!
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:p="http://www.w3.org/2002/ws/databinding/patterns/6/09/"
    xmlns:e="http://www.w3.org/2002/ws/databinding/examples/6/09/"
    xmlns:ex="http://www.w3.org/2002/ws/databinding/examples/6/09/">

  <xsl:output method="text" encoding="UTF-8" />

    <xsl:template match="/">
	<xsl:for-each select="//e:example">
	    <xsl:value-of select="./@xml:id"/> 
	    <xsl:text>&#xa;</xsl:text>
	</xsl:for-each>
    </xsl:template>

</xsl:stylesheet>
!
