You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by ro...@apache.org on 2012/09/29 22:26:50 UTC
svn commit: r1391867 - in /incubator/ooo/devtools/consultants: ./
consultants.xml consultants.xsd strings_en.xml strings_it.xml to-html.xsl
Author: robweir
Date: Sat Sep 29 20:26:50 2012
New Revision: 1391867
URL: http://svn.apache.org/viewvc?rev=1391867&view=rev
Log:
Initial XSLT script and data for consultants directory
Added:
incubator/ooo/devtools/consultants/
incubator/ooo/devtools/consultants/consultants.xml
incubator/ooo/devtools/consultants/consultants.xsd
incubator/ooo/devtools/consultants/strings_en.xml
incubator/ooo/devtools/consultants/strings_it.xml
incubator/ooo/devtools/consultants/to-html.xsl
Added: incubator/ooo/devtools/consultants/consultants.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/consultants/consultants.xml?rev=1391867&view=auto
==============================================================================
--- incubator/ooo/devtools/consultants/consultants.xml (added)
+++ incubator/ooo/devtools/consultants/consultants.xml Sat Sep 29 20:26:50 2012
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<consultants>
+ <consultant>
+ <name>John Doe</name>
+ <logo>jdoe.jpg</logo>
+ <country>ES</country>
+ <country>PT</country>
+ <practice>Extensions</practice>
+ <description>At John Doe we do application developement for OpenOffice. Give us your requirements and we'll give you a quote.
+ No job is too small.</description>
+ <website>http://www/jdoe.com/services.html</website>
+ <email>j@doe.com</email>
+ <phone>123-456-7890</phone>
+ </consultant>
+ <consultant>
+ <name>Joe Bloggs, LLC</name>
+ <logo>jbloggs.jpg</logo>
+ <country>DE</country>
+ <country>CH</country>
+ <country>AT</country>
+ <practice>Deployment</practice>
+ <practice>Migration</practice>
+ <description>Joe Bloggs, LLC provides custom deployment and migration servives for small and medium business moving to OpenOffice. We work with the client from initial
+ evaluation and piloting, through deployment and beyond. References and whitepaper are available on our website.</description>
+ <website>http://www/jbloggsllc.com/openoffice.html</website>
+ <email>joe@jbloggsllc.com</email>
+ <phone>123-456-7890</phone>
+ </consultant>
+
+
+</consultants>
\ No newline at end of file
Added: incubator/ooo/devtools/consultants/consultants.xsd
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/consultants/consultants.xsd?rev=1391867&view=auto
==============================================================================
--- incubator/ooo/devtools/consultants/consultants.xsd (added)
+++ incubator/ooo/devtools/consultants/consultants.xsd Sat Sep 29 20:26:50 2012
@@ -0,0 +1,58 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:element name="consultants">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="consultant"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="consultant">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="name"/>
+ <xs:element maxOccurs="unbounded" ref="country"/>
+ <xs:element maxOccurs="unbounded" ref="practice"/>
+ <xs:element ref="description"/>
+ <xs:element ref="website"/>
+ <xs:element minOccurs="0" ref="email"/>
+ <xs:element minOccurs="0" ref="phone"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+
+ <xs:element name="name" type="xs:string"/>
+ <xs:element name="country" type="xs:string"/>
+ <xs:element name="practice" type="practice"/>
+ <xs:element name="description" type="description"/>
+ <xs:element name="website" type="xs:anyURI"/>
+ <xs:element name="email" type="email-address"/>
+ <xs:element name="phone" type="xs:string"/>
+
+
+ <xs:simpleType name="email-address">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="[^@]+@[^\.]+\..+"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="description">
+ <xs:restriction base="xs:string">
+ <xs:minLength value="0"/>
+ <xs:maxLength value="300"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="practice">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="Deployment"/>
+ <xs:enumeration value="Migration"/>
+ <xs:enumeration value="Extensions"/>
+ <xs:enumeration value="Training"/>
+ <xs:enumeration value="Customization"/>
+ <xs:enumeration value="Other"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+</xs:schema>
Added: incubator/ooo/devtools/consultants/strings_en.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/consultants/strings_en.xml?rev=1391867&view=auto
==============================================================================
--- incubator/ooo/devtools/consultants/strings_en.xml (added)
+++ incubator/ooo/devtools/consultants/strings_en.xml Sat Sep 29 20:26:50 2012
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<strings>
+ <string id="page-title">Apache OpenOffice Consultants</string>
+
+ <string id="disclaimer-text">Although most individual users are able to install and use Apache OpenOffice without any help, or with the assistance of volunteers on our community support forum and mailing lists,
+ some users, especially corporate users, may have more complex requirements that require commercial services in order to optimize their deployments. The following
+ individuals and firms offer services that may be of interest. The information provided here was provided by the entities named, and is not verified or endorsed by
+ the Apache OpenOffice project. We offer this listing as a service to the ecosystem.</string>
+
+ <string id="submission-instructions">Consultants who wish to add their listing here should refer to these instructions: </string>
+
+ <string id="name-header">Name</string>
+ <string id="area-header">Area of Practice</string>
+ <string id="countries-header">Countries</string>
+ <string id="description-header">Description</string>
+ <string id="contact-header">Contact</string>
+
+</strings>
\ No newline at end of file
Added: incubator/ooo/devtools/consultants/strings_it.xml
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/consultants/strings_it.xml?rev=1391867&view=auto
==============================================================================
--- incubator/ooo/devtools/consultants/strings_it.xml (added)
+++ incubator/ooo/devtools/consultants/strings_it.xml Sat Sep 29 20:26:50 2012
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<strings>
+ <string id="page-title">Apache OpenOffice Consultants</string>
+
+ <string id="disclaimer-text">Although most individual users are able to install and use Apache OpenOffice without any help, or with the assistance of volunteers on our community support forum and mailing lists,
+ some users, especially corporate users, may have more complex requirements that require commercial services in order to optimize their deployments. The following
+ individuals and firms offer services that may be of interest. The information provided here was provided by the entities named, and is not verified or endorsed by
+ the Apache OpenOffice project. We offer this listing as a service to the ecosystem.</string>
+
+ <string id="submission-instructions">Consultants who wish to add their listing here should refer to these instructions: </string>
+
+ <string id="name-header">Name</string>
+ <string id="area-header">Area of Practice</string>
+ <string id="countries-header">Countries</string>
+ <string id="description-header">Description</string>
+ <string id="contact-header">Contact</string>
+
+</strings>
\ No newline at end of file
Added: incubator/ooo/devtools/consultants/to-html.xsl
URL: http://svn.apache.org/viewvc/incubator/ooo/devtools/consultants/to-html.xsl?rev=1391867&view=auto
==============================================================================
--- incubator/ooo/devtools/consultants/to-html.xsl (added)
+++ incubator/ooo/devtools/consultants/to-html.xsl Sat Sep 29 20:26:50 2012
@@ -0,0 +1,94 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+
+ <xsl:output method="html"/>
+
+ <!--
+
+ Load the UI strings from the locale-appropriate resource file. An input XSLT parameter called 'locale' should contain the locale.
+
+ The resource files should be named strings_<locale>.xml and be in the same directory as the XSLT script.
+
+ -->
+
+ <xsl:variable name="fileName" select="concat('strings_', $locale, '.xml')"/>
+ <xsl:variable name="localizedStrings" select="document($fileName)/*"/>
+
+ <xsl:variable name="disclaimer-text" select="$localizedStrings/string[@id='disclaimer-text']/text()"/>
+ <xsl:variable name="submission-instructions" select="$localizedStrings/string[@id='submission-instructions']/text()"/>
+ <xsl:variable name="page-title" select="$localizedStrings/string[@id='page-title']/text()"/>
+ <xsl:variable name="name-header" select="$localizedStrings/string[@id='name-header']/text()"/>
+ <xsl:variable name="area-header" select="$localizedStrings/string[@id='area-header']/text()"/>
+ <xsl:variable name="countries-header" select="$localizedStrings/string[@id='countries-header']/text()"/>
+ <xsl:variable name="description-header" select="$localizedStrings/string[@id='description-header']/text()"/>
+ <xsl:variable name="contact-header" select="$localizedStrings/string[@id='contact-header']/text()"/>
+
+
+<!-- Main template deals with the introductory text and the basic table declaration -->
+ <xsl:template match="/">
+ <html>
+ <head>
+ <title><xsl:value-of select="$page-title"/></title>
+ </head>
+ <body>
+
+ <h1><xsl:value-of select="$page-title"/></h1>
+
+ <p><xsl:value-of select="$disclaimer-text"/></p>
+
+ <p><xsl:value-of select="$submission-instructions"/><a href="consultant-submission.html">consultant-submission.html</a></p>
+
+ <br/>
+
+ <table border="1">
+ <tr>
+ <th><xsl:value-of select="$name-header"/></th>
+ <th><xsl:value-of select="$area-header"/></th>
+ <th><xsl:value-of select="$countries-header"/></th>
+ <th width="50%"><xsl:value-of select="$description-header"/></th>
+ <th><xsl:value-of select="$contact-header"/></th>
+ </tr>
+ <xsl:for-each select="consultants/consultant">
+ <xsl:sort select="name"/>
+ <xsl:apply-templates select="."/>
+ </xsl:for-each>
+ </table>
+ </body>
+ </html>
+ </xsl:template>
+
+
+ <!-- This template handles the per-consultant information, for each row of the table -->
+
+ <xsl:template match="consultant">
+ <tr>
+ <td>
+ <a rel="nofollow" href="{website}"><xsl:value-of select="name"/></a>
+ </td>
+ <td>
+ <xsl:for-each select="practice">
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:for-each>
+
+ </td>
+ <td>
+ <xsl:for-each select="country">
+ <xsl:value-of select="."/>
+ <br/>
+ </xsl:for-each>
+
+ </td>
+ <td>
+ <xsl:value-of select="description"/>
+ </td>
+ <td>
+ <xsl:value-of select="email"/>
+ <br/>
+ <xsl:value-of select="phone"/>
+ </td>
+ </tr>
+
+ </xsl:template>
+
+</xsl:stylesheet>