Author: kn
Date: Tue Feb 5 16:21:11 2008
New Revision: 7294
Log:
- Added class stub for XSLT converter basics
- Restructured directory structure for converters
Added:
experimental/Document/src/converters/xslt/
experimental/Document/src/converters/xslt.php (with props)
experimental/Document/src/converters/xslt/ezp3_ezp4.php
- copied unchanged from r7270,
experimental/Document/src/converters/ezp3_ezp4.php
experimental/Document/src/converters/xslt/ezp3_ezp4.xsl
- copied unchanged from r7270,
experimental/Document/src/converters/ezp3_ezp4.xsl
experimental/Document/src/converters/xslt/xhtml_docbook.php
- copied unchanged from r7270,
experimental/Document/src/converters/xhtml_docbook.php
experimental/Document/src/converters/xslt/xhtml_docbook.xsl
- copied unchanged from r7270,
experimental/Document/src/converters/xhtml_docbook.xsl
Removed:
experimental/Document/src/converters/ezp3_ezp4.php
experimental/Document/src/converters/ezp3_ezp4.xsl
experimental/Document/src/converters/xhtml_docbook.php
experimental/Document/src/converters/xhtml_docbook.xsl
Modified:
experimental/Document/src/interfaces/converter.php
Added: experimental/Document/src/converters/xslt.php
==============================================================================
--- experimental/Document/src/converters/xslt.php (added)
+++ experimental/Document/src/converters/xslt.php [iso-8859-1] Tue Feb 5
16:21:11 2008
@@ -1,0 +1,55 @@
+<?php
+
+/**
+ * File containing the ezcDocumentXsltConverter class
+ *
+ * @package Document
+ * @version //autogen//
+ * @copyright Copyright (C) 2005-2008 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+
+/**
+ * Base class for conversions between XML documents using XSLT.
+ *
+ * @package Document
+ * @version //autogen//
+ * @copyright Copyright (C) 2005-2008 eZ systems as. All rights reserved.
+ * @license http://ez.no/licenses/new_bsd New BSD License
+ */
+abstract class ezcDocumentXsltConverter extends ezcDocumentConverter
+{
+ /**
+ * Construct converter
+ *
+ * Construct converter from XSLT file, which is used for the actual
+ * conversion.
+ *
+ * @param string $xslt
+ * @return void
+ */
+ public function __construct( $xslt )
+ {
+ if ( !file_exists( $xslt ) || !is_readable( $xslt ) )
+ {
+ throw new ezcBaseFileNotFoundException( $xslt );
+ }
+
+ $this->xslt = $xslt;
+ }
+
+ /**
+ * Convert documents between two formats
+ *
+ * Convert documents of the given type to the requested type.
+ *
+ * @param ezcDocumentXmlBase $doc
+ * @return ezcDocumentXmlBase
+ */
+ public function convert( ezcDocumentXmlBase $doc )
+ {
+ // @TODO: Implement
+ }
+}
+
+?>
Propchange: experimental/Document/src/converters/xslt.php
------------------------------------------------------------------------------
svn:eol-style = native
Modified: experimental/Document/src/interfaces/converter.php
==============================================================================
--- experimental/Document/src/interfaces/converter.php [iso-8859-1] (original)
+++ experimental/Document/src/interfaces/converter.php [iso-8859-1] Tue Feb 5
16:21:11 2008
@@ -17,7 +17,7 @@
* @copyright Copyright (C) 2005-2008 eZ systems as. All rights reserved.
* @license http://ez.no/licenses/new_bsd New BSD License
*/
-interface ezcDocumentConverter
+abstract class ezcDocumentConverter
{
/**
* Convert documents between two formats
--
svn-components mailing list
[email protected]
http://lists.ez.no/mailman/listinfo/svn-components