Deleted:
/framework/trunk/piwi/resources/xslt/DocbookToPiwiTransformation.xsl
/framework/trunk/piwi/resources/xslt/FODTToPiwiTransformation.xsl
/framework/trunk/piwi/resources/xslt/RstToPiwiTransformation.xsl
Modified:
/framework/trunk/piwi/lib/piwi/inputprovider/docbook/DocbookPage.class.php
/framework/trunk/piwi/lib/piwi/inputprovider/odt/FODTPage.class.php
/framework/trunk/piwi/lib/piwi/inputprovider/rst/RSTPage.class.php
/framework/trunk/piwi/lib/piwi/inputprovider/wiki/CreoleWikiPage.class.php
/framework/trunk/piwi/lib/piwi/inputprovider/wiki/DokuWikiPage.class.php
/framework/trunk/piwi/resources/xslt/GeneratorTransformation.xsl
/framework/trunk/piwi/resources/xslt/HTMLTransformation-v1.0.xsl
/framework/trunk/piwi/resources/xslt/OfficeTransformation-v1.0.xsl
/framework/trunk/piwi/resources/xslt/WikiToPiwiTransformation.xsl
=======================================
--- /framework/trunk/piwi/resources/xslt/DocbookToPiwiTransformation.xsl
Fri Oct 15 01:22:50 2010
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" encoding="UTF-8" indent="no"
omit-xml-declaration="yes" />
-
- <!-- Copy everything that is not a generator or a form -->
- <xsl:template match="body">
- <content position="main">
- <xsl:copy-of select="node()"></xsl:copy-of>
- </content>
- </xsl:template>
-
- <xsl:template match="head">
- </xsl:template>
-</xsl:stylesheet>
=======================================
--- /framework/trunk/piwi/resources/xslt/FODTToPiwiTransformation.xsl Fri
Oct 15 01:23:08 2010
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" encoding="UTF-8" indent="no"
omit-xml-declaration="yes" />
-
- <!-- Copy everything that is not a generator or a form -->
- <xsl:template match="body">
- <content position="main">
- <xsl:copy-of select="node()"></xsl:copy-of>
- </content>
- </xsl:template>
-
- <xsl:template match="head">
- </xsl:template>
-</xsl:stylesheet>
=======================================
--- /framework/trunk/piwi/resources/xslt/RstToPiwiTransformation.xsl Fri
Oct 15 01:24:02 2010
+++ /dev/null
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:output method="xml" encoding="UTF-8" indent="no"
omit-xml-declaration="yes" />
-
- <!-- Copy everything that is not a generator or a form -->
- <xsl:template match="*">
- <content position="main">
- <xsl:copy-of select="node()"></xsl:copy-of>
- </content>
- </xsl:template>
-
- <xsl:template match="head">
- </xsl:template>
-</xsl:stylesheet>
=======================================
---
/framework/trunk/piwi/lib/piwi/inputprovider/docbook/DocbookPage.class.php
Fri Oct 15 01:22:50 2010
+++
/framework/trunk/piwi/lib/piwi/inputprovider/docbook/DocbookPage.class.php
Sun Nov 21 07:57:07 2010
@@ -45,10 +45,10 @@
$this->content = $html->getDomDocument();
// Configure the transformer
- $processor = new XSLTProcessor;
+ $processor = new XSLTProcessor();
$processor->registerPHPFunctions();
$processor->importStyleSheet(DOMDocument :: load($GLOBALS['PIWI_ROOT'] .
- "resources/xslt/DocbookToPiwiTransformation.xsl"));
+ "resources/xslt/WikiToPiwiTransformation.xsl"));
// Transform the Generators
$this->content = $processor->transformToDoc($this->content);
@@ -56,8 +56,7 @@
// Save page in cache
if ($cache != null) {
$cache->cachePage($this->content);
- }
-
+ }
}
return $this->content;
=======================================
--- /framework/trunk/piwi/lib/piwi/inputprovider/odt/FODTPage.class.php Fri
Oct 15 01:23:08 2010
+++ /framework/trunk/piwi/lib/piwi/inputprovider/odt/FODTPage.class.php Sun
Nov 21 07:57:07 2010
@@ -45,10 +45,10 @@
$this->content = $html->getDomDocument();
// Configure the transformer
- $processor = new XSLTProcessor;
+ $processor = new XSLTProcessor();
$processor->registerPHPFunctions();
$processor->importStyleSheet(DOMDocument :: load($GLOBALS['PIWI_ROOT'] .
- "resources/xslt/FODTToPiwiTransformation.xsl"));
+ "resources/xslt/WikiToPiwiTransformation.xsl"));
// Transform the Generators
$this->content = $processor->transformToDoc($this->content);
@@ -56,8 +56,7 @@
// Save page in cache
if ($cache != null) {
$cache->cachePage($this->content);
- }
-
+ }
}
return $this->content;
=======================================
--- /framework/trunk/piwi/lib/piwi/inputprovider/rst/RSTPage.class.php Fri
Oct 15 01:24:02 2010
+++ /framework/trunk/piwi/lib/piwi/inputprovider/rst/RSTPage.class.php Sun
Nov 21 07:57:07 2010
@@ -44,7 +44,7 @@
$this->content = $document->getAsXhtml()->getDomDocument();
// Configure the transformer
- $processor = new XSLTProcessor;
+ $processor = new XSLTProcessor();
$processor->registerPHPFunctions();
$processor->importStyleSheet(DOMDocument :: load($GLOBALS['PIWI_ROOT'] .
"resources/xslt/RstToPiwiTransformation.xsl"));
=======================================
---
/framework/trunk/piwi/lib/piwi/inputprovider/wiki/CreoleWikiPage.class.php
Fri Oct 15 01:24:34 2010
+++
/framework/trunk/piwi/lib/piwi/inputprovider/wiki/CreoleWikiPage.class.php
Sun Nov 21 07:57:07 2010
@@ -29,8 +29,7 @@
// Page has been found in cache
$this->content = $content;
} else {
- // Page has not been found in cache, so load it and save it in the cache
-
+ // Page has not been found in cache, so load it and save it in the cache
$filePath = $this->contentPath . '/' . $this->site->getFilePath();
if (!file_exists($filePath)) {
@@ -38,18 +37,17 @@
PiwiException :: ERR_404);
}
- $document = new ezcDocumentWiki();
-
+ $document = new ezcDocumentWiki();
$document->loadFile($filePath);
$docbook = $document->getAsDocbook();
$html = new ezcDocumentXhtml();
- $html->createFromDocbook( $docbook );
+ $html->createFromDocbook($docbook);
$this->content = $html->getDomDocument();
// Configure the transformer
- $processor = new XSLTProcessor;
+ $processor = new XSLTProcessor();
$processor->registerPHPFunctions();
$processor->importStyleSheet(DOMDocument :: load($GLOBALS['PIWI_ROOT'] .
"resources/xslt/WikiToPiwiTransformation.xsl"));
=======================================
---
/framework/trunk/piwi/lib/piwi/inputprovider/wiki/DokuWikiPage.class.php
Fri Oct 15 01:24:34 2010
+++
/framework/trunk/piwi/lib/piwi/inputprovider/wiki/DokuWikiPage.class.php
Sun Nov 21 07:57:07 2010
@@ -29,8 +29,7 @@
// Page has been found in cache
$this->content = $content;
} else {
- // Page has not been found in cache, so load it and save it in the cache
-
+ // Page has not been found in cache, so load it and save it in the cache
$filePath = $this->contentPath . '/' . $this->site->getFilePath();
if (!file_exists($filePath)) {
@@ -44,12 +43,12 @@
$docbook = $document->getAsDocbook();
$html = new ezcDocumentXhtml();
- $html->createFromDocbook( $docbook );
+ $html->createFromDocbook($docbook);
$this->content = $html->getDomDocument();
// Configure the transformer
- $processor = new XSLTProcessor;
+ $processor = new XSLTProcessor();
$processor->registerPHPFunctions();
$processor->importStyleSheet(DOMDocument :: load($GLOBALS['PIWI_ROOT'] .
"resources/xslt/WikiToPiwiTransformation.xsl"));
@@ -60,8 +59,7 @@
// Save page in cache
if ($cache != null) {
$cache->cachePage($this->content);
- }
-
+ }
}
return $this->content;
=======================================
--- /framework/trunk/piwi/resources/xslt/GeneratorTransformation.xsl Sat
Aug 14 07:38:50 2010
+++ /framework/trunk/piwi/resources/xslt/GeneratorTransformation.xsl Sun
Nov 21 07:57:07 2010
@@ -2,7 +2,9 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:php="http://php.net/xsl"
xmlns:piwixml="http://piwi.googlecode.com/xsd/piwixml"
exclude-result-prefixes="php">
- <xsl:output method="xml" encoding="UTF-8" indent="no"
omit-xml-declaration="yes" />
+
+ <!-- Output configuration -->
+ <xsl:output method="xml" encoding="UTF-8" indent="no"
omit-xml-declaration="yes" />
<!-- Copy everything that is not a generator or a form -->
<xsl:template match="*">
=======================================
--- /framework/trunk/piwi/resources/xslt/HTMLTransformation-v1.0.xsl Thu
Nov 20 03:43:59 2008
+++ /framework/trunk/piwi/resources/xslt/HTMLTransformation-v1.0.xsl Sun
Nov 21 07:57:07 2010
@@ -2,13 +2,13 @@
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <!-- Piwi Elements -->
- <xsl:include href="PiwiXML-v1.0.xsl"/>
-
- <!-- Custom transformation -->
- <xsl:include href="xsltsss://customStyleSheet"/>
-
- <!-- Output configuration -->
+ <!-- Piwi Elements -->
+ <xsl:include href="PiwiXML-v1.0.xsl"/>
+
+ <!-- Custom transformation -->
+ <xsl:include href="xsltsss://customStyleSheet"/>
+
+ <!-- Output configuration -->
<xsl:output method="xml" encoding="UTF-8" indent="no"
omit-xml-declaration="yes" />
<!-- Only evaluate elements under '/content' (ignore the root) -->
=======================================
--- /framework/trunk/piwi/resources/xslt/OfficeTransformation-v1.0.xsl Thu
Nov 20 03:43:59 2008
+++ /framework/trunk/piwi/resources/xslt/OfficeTransformation-v1.0.xsl Sun
Nov 21 07:57:07 2010
@@ -3,7 +3,7 @@
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- Piwi Elements -->
- <xsl:include href="PiwiXML-v1.0.xsl"/>
+ <xsl:include href="PiwiXML-v1.0.xsl"/>
<!-- Custom transformation -->
<xsl:include href="xsltsss://customStyleSheet"/>
=======================================
--- /framework/trunk/piwi/resources/xslt/WikiToPiwiTransformation.xsl Fri
Oct 15 01:24:34 2010
+++ /framework/trunk/piwi/resources/xslt/WikiToPiwiTransformation.xsl Sun
Nov 21 07:57:07 2010
@@ -1,15 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
- xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xhtml="http://www.w3.org/1999/xhtml">
+
+ <!-- Output configuration -->
<xsl:output method="xml" encoding="UTF-8" indent="no"
omit-xml-declaration="yes" />
-
- <!-- Copy everything that is not a generator or a form -->
+
+ <!-- Only evaluate elements under '/body' (ignore the root) -->
<xsl:template match="body">
<content position="main">
- <xsl:copy-of select="node()"></xsl:copy-of>
+ <xsl:apply-templates/>
</content>
</xsl:template>
-
- <xsl:template match="head">
+
+ <!-- Copy everything but remove the namespace -->
+ <xsl:template match="*">
+ <xsl:element name="{local-name()}">
+ <xsl:apply-templates select="@*|node()"/>
+ </xsl:element>
</xsl:template>
+
+ <xsl:template match="@*">
+ <xsl:attribute name="{local-name()}">
+ <xsl:value-of select="."/>
+ </xsl:attribute>
+ </xsl:template>
+
</xsl:stylesheet>