diff options
author | Adrian Kummerländer | 2014-05-01 16:22:41 +0200 |
---|---|---|
committer | Adrian Kummerländer | 2014-05-01 16:22:41 +0200 |
commit | 29a6c1ab8b82491bcd54ad027e45644fde09ef59 (patch) | |
tree | f6a4361ba2477f58107cfa95aa384cb1669469ab | |
parent | 42a0b31ebc10bea7e205e04c12b590afbcc27b3d (diff) | |
download | InputXSLT-29a6c1ab8b82491bcd54ad027e45644fde09ef59.tar InputXSLT-29a6c1ab8b82491bcd54ad027e45644fde09ef59.tar.gz InputXSLT-29a6c1ab8b82491bcd54ad027e45644fde09ef59.tar.bz2 InputXSLT-29a6c1ab8b82491bcd54ad027e45644fde09ef59.tar.lz InputXSLT-29a6c1ab8b82491bcd54ad027e45644fde09ef59.tar.xz InputXSLT-29a6c1ab8b82491bcd54ad027e45644fde09ef59.tar.zst InputXSLT-29a6c1ab8b82491bcd54ad027e45644fde09ef59.zip |
Changed namespace for external functions to InputXSLT
* "InputXSLT" is defined as "function.inputxslt.application"
* functions can now be accessed like "InputXSLT:read-file('../')"
* updated test transformation accordingly
* the XML standard does not require namespaces to be real, valid HTTP-URIs but treats them as plain strings
-rw-r--r-- | dummy/transform.xsl | 15 | ||||
-rw-r--r-- | src/transformation_facade.cc | 2 |
2 files changed, 10 insertions, 7 deletions
diff --git a/dummy/transform.xsl b/dummy/transform.xsl index eab7a81..c955a85 100644 --- a/dummy/transform.xsl +++ b/dummy/transform.xsl @@ -2,15 +2,18 @@ <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:external="http://ExternalFunction.xalan-c++.xml.apache.org" + xmlns:InputXSLT="function.inputxslt.application" + exclude-result-prefixes="InputXSLT" > -<xsl:output method="xml" +<xsl:output + method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" omit-xml-declaration="yes" encoding="UTF-8" - indent="yes" /> + indent="yes" +/> <xsl:template match="/"> <html> @@ -18,7 +21,7 @@ </head> <body> <div id="raw"> - <xsl:variable name="testFile" select="external:read-file('test.txt')"/> + <xsl:variable name="testFile" select="InputXSLT:read-file('test.txt')"/> <xsl:choose> <xsl:when test="$testFile/self::error"> Could not read text file. @@ -30,7 +33,7 @@ </div> <div id="xml"> - <xsl:variable name="testXml" select="external:read-xml-file('test.txt')"/> + <xsl:variable name="testXml" select="InputXSLT:read-xml-file('test.txt')"/> <xsl:choose> <xsl:when test="$testXml/self::error"> Could not read XML file. @@ -46,7 +49,7 @@ </div> <div id="filelists"> - <xsl:variable name="fileList" select="external:read-directory('../')"/> + <xsl:variable name="fileList" select="InputXSLT:read-directory('../')"/> <xsl:choose> <xsl:when test="$fileList/self::error"> Could not read directory. diff --git a/src/transformation_facade.cc b/src/transformation_facade.cc index 38dfe93..846c586 100644 --- a/src/transformation_facade.cc +++ b/src/transformation_facade.cc @@ -17,7 +17,7 @@ TransformationFacade::TransformationFacade(const std::string& transformation): transformation_{}, transformer_() { const xalan::XalanDOMString customNamespace( - "http://ExternalFunction.xalan-c++.xml.apache.org" + "function.inputxslt.application" ); this->transformer_.installExternalFunction( |