--- a/FOPRunXSLTExt/examples/example1_dotnet_ahf61.bat Tue Feb 25 11:30:26 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-cd "%~d0%~p0..\bin"
-"%~d0%~p0..\bin\pi.ep.ppl.xslt.ext.ahf.dotnet.transformer.exe" "%~d0%~p0example1.xml" "%~d0%~p0example1.xsl" "%~d0%~p0out\example1_dotnet_ahf.at" ppl-formatter=ahf
-pause
\ No newline at end of file
--- a/FOPRunXSLTExt/examples/ppl-extensions.xsl Tue Feb 25 11:30:26 2014 +0100
+++ b/FOPRunXSLTExt/examples/ppl-extensions.xsl Fri Feb 28 15:13:46 2014 +0100
@@ -21,9 +21,10 @@
xmlns:runfop="runfop"
xmlns:runahf="runahf"
xmlns:runahfdotnet="pi.ep.ppl.xslt.ext.ahf.dotnet"
+ xmlns:runfopdotnet="pi.ep.ppl.xslt.ext.fop.dotnet"
xmlns:ahf="http://www.antennahouse.com/names/XSL/AreaTree"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
- exclude-result-prefixes="ppl se ahf xalan runahf runfop runahfdotnet xs">
+ exclude-result-prefixes="ppl se ahf xalan runahf runfop runahfdotnet runfopdotnet xs">
<!-- ============================================================= -->
<!-- KEYS -->
@@ -98,7 +99,7 @@
<xsl:copy-of select="runahfdotnet:areaTree($fo-tree)" use-when="function-available('runahfdotnet:areatree')"/>
</xsl:when>
<xsl:otherwise>
- <xsl:message>Formatter <xsl:value-of select="$ppl-formatter"/> not yet supported</xsl:message>
+ <xsl:copy-of select="runfopdotnet:areaTree($fo-tree)" use-when="function-available('runfopdotnet:areatree')"/>
</xsl:otherwise>
</xsl:choose>
</xsl:when>
--- a/FOPRunXSLTExt/examples/rundotnet_ahf61.bat Tue Feb 25 11:30:26 2014 +0100
+++ b/FOPRunXSLTExt/examples/rundotnet_ahf61.bat Fri Feb 28 15:13:46 2014 +0100
@@ -1,5 +1,5 @@
-cd "%~d0%~p0..\bin"
+cd "%~d0%~p0"
echo xmlinfile %1
echo xslt stylesheet: %2
echo outfile %3
-"%~d0%~p0..\bin\pi.ep.ppl.xslt.ext.ahf.dotnet.transformer.exe" %1 %2 %3 ppl-formatter=ahf
+pi.ep.xslt.transformer.app.exe %1 %2 %3 ppl-formatter=ahf
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/examples/rundotnet_fop11.bat Fri Feb 28 15:13:46 2014 +0100
@@ -0,0 +1,5 @@
+cd "%~d0%~p0"
+echo xmlinfile %1
+echo xslt stylesheet: %2
+echo outfile %3
+pi.ep.xslt.transformer.app.exe %1 %2 %3 ppl-formatter=fop
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/ahf/dotnet/pi.ep.ppl.xslt.ext.ahf.dotnet/Import/README Fri Feb 28 15:13:46 2014 +0100
@@ -0,0 +1,14 @@
+BUILD pi.ep.ppl.xslt.ext.ahf.donet
+
+Antenna House Formatter
+----------------------------
+1. Get Antenna House Formatter from http://www.antennahouse.com
+2. Install Antenna House Formatter on your system
+3. Copy XfoDotNet40Ctl61.dll form AHF-Installation, to project's import directory
+
+BUILD
+----------------------------
+1. Create a Solution Project in Visual Studio 2010
+2. Add pi.ep.ppl.xslt.ext.ahf.dotnet.csproj to your solution
+3. Build your solution
+ binaries are created in bin/debug or bin/release directory depending on your configuration
Binary file FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/ahf/dotnet/pi.ep.ppl.xslt.ext.ahf.dotnet/Import/pi.ep.xslt.ext.interfaces.dll has changed
--- a/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/ahf/dotnet/pi.ep.ppl.xslt.ext.ahf.dotnet/pi.ep.ppl.xslt.ext.ahf.dotnet.csproj Tue Feb 25 11:30:26 2014 +0100
+++ b/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/ahf/dotnet/pi.ep.ppl.xslt.ext.ahf.dotnet/pi.ep.ppl.xslt.ext.ahf.dotnet.csproj Fri Feb 28 15:13:46 2014 +0100
@@ -31,27 +31,25 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="pi.ep.xslt.ext.interfaces, Version=0.1.5172.20049, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\pi.ep.xslt.ext.interfaces.dll</HintPath>
+ </Reference>
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
<Reference Include="XfoDotNet40Ctl61">
- <HintPath>C:\Program Files\Antenna House\AHFormatterV61\XfoDotNet40Ctl61.dll</HintPath>
+ <HintPath>import\XfoDotNet40Ctl61.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="RunAHF.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
- <ItemGroup>
- <ProjectReference Include="..\pi.ep.xslt.ext.interfaces\pi.ep.xslt.ext.interfaces.csproj">
- <Project>{7F7A7292-874A-46D2-8866-788976F0A4B6}</Project>
- <Name>pi.ep.xslt.ext.interfaces</Name>
- </ProjectReference>
- </ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
--- a/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/ahf/dotnet/pi.ep.ppl.xslt.sln Tue Feb 25 11:30:26 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,26 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 11.00
-# Visual Studio 2010
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "pi.ep.ppl.xslt.ext.ahf.dotnet", "pi.ep.ppl.xslt.ext.ahf.dotnet\pi.ep.ppl.xslt.ext.ahf.dotnet.csproj", "{6B6F793A-05D4-4167-B6ED-AAF5D59E22FD}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "pi.ep.xslt.ext.interfaces", "pi.ep.xslt.ext.interfaces\pi.ep.xslt.ext.interfaces.csproj", "{7F7A7292-874A-46D2-8866-788976F0A4B6}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Release|Any CPU = Release|Any CPU
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {6B6F793A-05D4-4167-B6ED-AAF5D59E22FD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {6B6F793A-05D4-4167-B6ED-AAF5D59E22FD}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {6B6F793A-05D4-4167-B6ED-AAF5D59E22FD}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {6B6F793A-05D4-4167-B6ED-AAF5D59E22FD}.Release|Any CPU.Build.0 = Release|Any CPU
- {7F7A7292-874A-46D2-8866-788976F0A4B6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {7F7A7292-874A-46D2-8866-788976F0A4B6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {7F7A7292-874A-46D2-8866-788976F0A4B6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {7F7A7292-874A-46D2-8866-788976F0A4B6}.Release|Any CPU.Build.0 = Release|Any CPU
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
--- a/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/ahf/dotnet/pi.ep.xslt.ext.interfaces/IXsltExtensionObject.cs Tue Feb 25 11:30:26 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,12 +0,0 @@
-using System;
-using System.Collections.Generic;
-using System.Linq;
-using System.Text;
-
-namespace pi.ep.xslt.ext.interfaces
-{
- public interface IXsltExtensionObject
- {
- string NamespaceURI { get; }
- }
-}
--- a/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/ahf/dotnet/pi.ep.xslt.ext.interfaces/Properties/AssemblyInfo.cs Tue Feb 25 11:30:26 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,56 +0,0 @@
-/*
-Program Name:
- pi.ep.xslt.ext.interfaces
-
-Requires:
- DotNet 4.0
-General Description:
- DotNet XSLT-Processor Extension Interfaces
-License:
- W3C license
-Author:
- Markus Wiedenmaier
- practice innovatio
- Zum Kiesgrüble 20
- DE-78259 Mühlhausen-Ehingen
- mailto:info@practice-innovation.de
- http://www.practice-innovation.de
-Versions:
- 0.1 2014-02-14 Markus Wiedenmaier
-*/
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// Allgemeine Informationen über eine Assembly werden über die folgenden
-// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
-// die mit einer Assembly verknüpft sind.
-[assembly: AssemblyTitle("pi.ep.xslt.ext.interfaces")]
-[assembly: AssemblyDescription("Interfaces for XSLT extension objects (IXsltExtensionObject)")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("practice innovation, DE-78259 Mühlhausen-Ehingen")]
-[assembly: AssemblyProduct("pi.ep.xslt.ext.interfaces")]
-[assembly: AssemblyCopyright("Copyright © 2014 practice innovation, DE-78259 Mühlhausen-Ehingen")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
-// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
-// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
-[assembly: ComVisible(false)]
-
-// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
-[assembly: Guid("d0c98feb-3e29-44c0-8f57-c7536ad51eb8")]
-
-// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
-//
-// Hauptversion
-// Nebenversion
-// Buildnummer
-// Revision
-//
-// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
-// übernehmen, indem Sie "*" eingeben:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("0.1.*")]
-//[assembly: AssemblyFileVersion("1.0.0.0")]
--- a/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/ahf/dotnet/pi.ep.xslt.ext.interfaces/pi.ep.xslt.ext.interfaces.csproj Tue Feb 25 11:30:26 2014 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,54 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
- <PropertyGroup>
- <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
- <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
- <ProductVersion>8.0.30703</ProductVersion>
- <SchemaVersion>2.0</SchemaVersion>
- <ProjectGuid>{7F7A7292-874A-46D2-8866-788976F0A4B6}</ProjectGuid>
- <OutputType>Library</OutputType>
- <AppDesignerFolder>Properties</AppDesignerFolder>
- <RootNamespace>pi.ep.xslt.ext.interfaces</RootNamespace>
- <AssemblyName>pi.ep.xslt.ext.interfaces</AssemblyName>
- <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
- <FileAlignment>512</FileAlignment>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
- <DebugSymbols>true</DebugSymbols>
- <DebugType>full</DebugType>
- <Optimize>false</Optimize>
- <OutputPath>bin\Debug\</OutputPath>
- <DefineConstants>DEBUG;TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
- <DebugType>pdbonly</DebugType>
- <Optimize>true</Optimize>
- <OutputPath>bin\Release\</OutputPath>
- <DefineConstants>TRACE</DefineConstants>
- <ErrorReport>prompt</ErrorReport>
- <WarningLevel>4</WarningLevel>
- </PropertyGroup>
- <ItemGroup>
- <Reference Include="System" />
- <Reference Include="System.Core" />
- <Reference Include="System.Xml.Linq" />
- <Reference Include="System.Data.DataSetExtensions" />
- <Reference Include="Microsoft.CSharp" />
- <Reference Include="System.Data" />
- <Reference Include="System.Xml" />
- </ItemGroup>
- <ItemGroup>
- <Compile Include="IXsltExtensionObject.cs" />
- <Compile Include="Properties\AssemblyInfo.cs" />
- </ItemGroup>
- <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
- <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
- Other similar extension points exist, see Microsoft.Common.targets.
- <Target Name="BeforeBuild">
- </Target>
- <Target Name="AfterBuild">
- </Target>
- -->
-</Project>
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/fop/dotnet/pi.ep.ppl.xslt.ext.fop.dotnet/Extensions/ByteArrayOutputStreamExtensions.cs Fri Feb 28 15:13:46 2014 +0100
@@ -0,0 +1,61 @@
+/*
+Program Name:
+ pi.ep.ppl.xslt.ext.fop.dotnet.transformer
+
+Requires:
+ DotNet 4.0
+ IKVM - http://www.ikvm.net/
+ Apache FOP - http://xmlgraphics.apache.org/fop/
+ FOP 1.1 must be compiled with IKVM (see Import/README
+
+General Description:
+ DotNet XSLT-Processor Extension for FOP areaTree function support
+ based on the Java implementation of Print and Page Layout Community Group @ W3C
+ See http://www.w3.org/community/ppl/wiki/FOPRunXSLTExt
+License:
+ W3C license
+Author:
+ Markus Wiedenmaier
+ practice innovatio
+ Zum Kiesgrüble 20
+ DE-78259 Mühlhausen-Ehingen
+ mailto:info@practice-innovation.de
+ http://www.practice-innovation.de
+Versions:
+ 0.1 2014-02-28 Markus Wiedenmaier
+*/
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.IO;
+using java.io;
+using System.Xml.XPath;
+using System.Xml;
+
+namespace pi.ep.ppl.xslt.ext.fop.dotnet.Extensions
+{
+ /// <summary>
+ /// Extension methods to enhance java.io.ByteArryOutputStream for conversion to DotNet data types
+ /// </summary>
+ public static class ByteArrayOutputStreamExtensions
+ {
+ /// <summary>
+ /// Convert ByteArrayOutputStream to System.Xml.XPath.XPathDocument
+ /// </summary>
+ /// <param name="self">ByteArrayOutputStream object</param>
+ /// <returns>XPathDocument converted from ByteArrayOutputStream</returns>
+ public static XPathDocument ToXPathDocument(this ByteArrayOutputStream self)
+ {
+ XPathDocument doc = null;
+ using (MemoryStream resultStream = new MemoryStream(self.toByteArray()))
+ {
+ using (XmlReader reader = XmlReader.Create(resultStream))
+ {
+ doc = new XPathDocument(reader);
+ }
+ }
+ return doc;
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/fop/dotnet/pi.ep.ppl.xslt.ext.fop.dotnet/Extensions/XPathNavigatorExtensions.cs Fri Feb 28 15:13:46 2014 +0100
@@ -0,0 +1,57 @@
+/*
+Program Name:
+ pi.ep.ppl.xslt.ext.fop.dotnet.transformer
+
+Requires:
+ DotNet 4.0
+ IKVM - http://www.ikvm.net/
+ Apache FOP - http://xmlgraphics.apache.org/fop/
+ FOP 1.1 must be compiled with IKVM (see Import/README
+
+General Description:
+ DotNet XSLT-Processor Extension for FOP areaTree function support
+ based on the Java implementation of Print and Page Layout Community Group @ W3C
+ See http://www.w3.org/community/ppl/wiki/FOPRunXSLTExt
+License:
+ W3C license
+Author:
+ Markus Wiedenmaier
+ practice innovatio
+ Zum Kiesgrüble 20
+ DE-78259 Mühlhausen-Ehingen
+ mailto:info@practice-innovation.de
+ http://www.practice-innovation.de
+Versions:
+ 0.1 2014-02-28 Markus Wiedenmaier
+*/
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using System.Xml.XPath;
+using System.IO;
+using System.Xml;
+
+namespace pi.ep.ppl.xslt.ext.fop.dotnet.Extensions
+{
+ /// <summary>
+ /// Extension methods to enhance System.Xml.XPath.XPathNavigator for conversion to Java Data Types
+ /// </summary>
+ public static class XPathNavigatorExtensions
+ {
+ /// <summary>
+ /// Converts System.Xml.XPath.XPathNavigator to java.io.ByteArrayInputStream
+ /// </summary>
+ /// <param name="self">XPathNavigator object</param>
+ /// <returns>java.io.ByteArrayInputStream converted from XPathNavigator</returns>
+ public static java.io.ByteArrayInputStream ToJavaInputStream(this XPathNavigator self)
+ {
+ using (MemoryStream inStream = new MemoryStream())
+ {
+ using (XmlWriter writer = XmlWriter.Create(inStream))
+ self.WriteSubtree(writer);
+ return new java.io.ByteArrayInputStream(inStream.GetBuffer());
+ }
+ }
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/fop/dotnet/pi.ep.ppl.xslt.ext.fop.dotnet/Import/README Fri Feb 28 15:13:46 2014 +0100
@@ -0,0 +1,31 @@
+BUILD pi.ep.ppl.xslt.ext.fop.donet
+
+IKVM - http://www.ikvm.net/
+---------------------------
+1. Get IKVM from http://sourceforge.net/projects/ikvm/files/ (current build with version 7.2.4630.5)
+2. Install IKVM to your system (i.e. C:\Program Files (x86)\IVKM)
+3. Copy all IKVM.OpenJDK.*.dll s to this import directory
+4. Copy IKVM.Runtime.dll to project's import directory
+5. Copy IKVM.Runtime.JNI.dll to project's import directory
+
+Apache FOP
+---------------------------
+1. Get Apache Fop from http://xmlgraphics.apache.org/fop/ (current build with version 1.1)
+2. Install FOP to your system
+3. Create a build-directory on your system (i.e. c:\temp\fopbuild)
+4. Copy fop.jar to this directory
+5. Copy all jar files in fop/lib to this directory
+6. Run buildDotNetDLLs.bat
+ Param 1: IKVM installation directory
+ Param 2: FOP jar directory (created in Step 3)
+ Param 3: Name of output file (i.e. c:\temp\fopbuild\fop11.dll)
+ Sample buildDotNetDLLs.bat "C:\Program Files (x86)\IVKM\" "c:\temp\fopbuild" "c:\temp\fopbuild\fop11.dll)
+ Note: There are a lot of warnings in this process. AFAIK these warnings can be ignored
+7. Copy dll to project's import directory
+
+BUILD
+----------------------------
+1. Create a Solution Project in Visual Studio 2010
+2. Add pi.ep.ppl.xslt.ext.ahf.dotnet.csproj to your solution
+3. Build your solution
+ binaries are created in bin/debug or bin/release directory depending on your configuration
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/fop/dotnet/pi.ep.ppl.xslt.ext.fop.dotnet/Import/buildDotNetDLLs.bat Fri Feb 28 15:13:46 2014 +0100
@@ -0,0 +1,4 @@
+echo IKVM dir: %1
+echo JAR dir : %2
+echo outfile : %3
+%~p1%~n1\ikvmc.exe -target:library -reference:IKVM.OpenJDK.Core.dll -recurse:%~p2%~n2\*.jar -version:1.1 -out:%3
\ No newline at end of file
Binary file FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/fop/dotnet/pi.ep.ppl.xslt.ext.fop.dotnet/Import/pi.ep.xslt.ext.interfaces.dll has changed
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/fop/dotnet/pi.ep.ppl.xslt.ext.fop.dotnet/Properties/AssemblyInfo.cs Fri Feb 28 15:13:46 2014 +0100
@@ -0,0 +1,62 @@
+/*
+Program Name:
+ pi.ep.ppl.xslt.ext.fop.dotnet.transformer
+
+Requires:
+ DotNet 4.0
+ IKVM - http://www.ikvm.net/
+ Apache FOP - http://xmlgraphics.apache.org/fop/
+ FOP 1.1 must be compiled with IKVM (see Import/README
+
+General Description:
+ DotNet XSLT-Processor Extension for FOP areaTree function support
+ based on the Java implementation of Print and Page Layout Community Group @ W3C
+ See http://www.w3.org/community/ppl/wiki/FOPRunXSLTExt
+License:
+ W3C license
+Author:
+ Markus Wiedenmaier
+ practice innovatio
+ Zum Kiesgrüble 20
+ DE-78259 Mühlhausen-Ehingen
+ mailto:info@practice-innovation.de
+ http://www.practice-innovation.de
+Versions:
+ 0.1 2014-02-28 Markus Wiedenmaier
+*/
+using System.Reflection;
+using System.Runtime.CompilerServices;
+using System.Runtime.InteropServices;
+
+// Allgemeine Informationen über eine Assembly werden über die folgenden
+// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern,
+// die mit einer Assembly verknüpft sind.
+[assembly: AssemblyTitle("pi.ep.ppl.xslt.ext.fop.dotnet")]
+[assembly: AssemblyDescription("")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("pi.ep.ppl.xslt.ext.fop.dotnet")]
+[assembly: AssemblyCopyright("Copyright © 2014")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+// Durch Festlegen von ComVisible auf "false" werden die Typen in dieser Assembly unsichtbar
+// für COM-Komponenten. Wenn Sie auf einen Typ in dieser Assembly von
+// COM zugreifen müssen, legen Sie das ComVisible-Attribut für diesen Typ auf "true" fest.
+[assembly: ComVisible(false)]
+
+// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird
+[assembly: Guid("1090c78a-8949-4d12-ab9f-3f3a867e0882")]
+
+// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten:
+//
+// Hauptversion
+// Nebenversion
+// Buildnummer
+// Revision
+//
+// Sie können alle Werte angeben oder die standardmäßigen Build- und Revisionsnummern
+// übernehmen, indem Sie "*" eingeben:
+// [assembly: AssemblyVersion("1.0.*")]
+[assembly: AssemblyVersion("1.0.0.0")]
+[assembly: AssemblyFileVersion("1.0.0.0")]
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/fop/dotnet/pi.ep.ppl.xslt.ext.fop.dotnet/RunFOP.cs Fri Feb 28 15:13:46 2014 +0100
@@ -0,0 +1,117 @@
+/*
+Program Name:
+ pi.ep.ppl.xslt.ext.fop.dotnet.transformer
+
+Requires:
+ DotNet 4.0
+ IKVM - http://www.ikvm.net/
+ Apache FOP - http://xmlgraphics.apache.org/fop/
+ FOP 1.1 must be compiled with IKVM (see Import/README
+
+General Description:
+ DotNet XSLT-Processor Extension for FOP areaTree function support
+ based on the Java implementation of Print and Page Layout Community Group @ W3C
+ See http://www.w3.org/community/ppl/wiki/FOPRunXSLTExt
+License:
+ W3C license
+Author:
+ Markus Wiedenmaier
+ practice innovatio
+ Zum Kiesgrüble 20
+ DE-78259 Mühlhausen-Ehingen
+ mailto:info@practice-innovation.de
+ http://www.practice-innovation.de
+Versions:
+ 0.1 2014-02-28 Markus Wiedenmaier
+*/
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using pi.ep.xslt.ext.interfaces;
+using System.Xml.XPath;
+using org.apache.fop.apps;
+
+using javax.xml.transform;
+using org.apache.xalan.processor;
+using javax.xml.transform.sax;
+using javax.xml.transform.dom;
+using org.xml.sax;
+using java.io;
+using System.IO;
+using System.Xml;
+using javax.xml.transform.stream;
+using pi.ep.ppl.xslt.ext.fop.dotnet.Extensions;
+
+namespace pi.ep.ppl.xslt.ext.fop.dotnet
+{
+ public class RunFOP : IXsltExtensionObject
+ {
+ /// <summary>
+ /// Get the Area Tree from Antenna House Formatter
+ /// </summary>
+ /// <param name="nav">XSL:FO tree</param>
+ /// <returns></returns>
+ public XPathNavigator areaTree(XPathNavigator nav)
+ {
+ XPathDocument doc = GetAreaTrea(nav, string.Empty);
+ return doc.CreateNavigator();
+ }
+ /// <summary>
+ /// Get the Area Tree from Antenna House Formatter
+ /// </summary>
+ /// <param name="nav">XSL:FO tree</param>
+ /// <param name="optionFileName">Option file name: Setting file for Antenna House Formatter rendering</param>
+ /// <returns></returns>
+ public XPathNavigator areaTree(XPathNavigator nav, string optionFileName)
+ {
+ XPathDocument doc = GetAreaTrea(nav, optionFileName);
+ return doc.CreateNavigator();
+ }
+ /// <summary>
+ /// Get the Area Tree from Antenna House Formatter
+ /// </summary>
+ /// <param name="nav">XSL:FO tree</param>
+ /// <param name="configFileName">FOP configuration file name: Setting file for Antenna House Formatter rendering</param>
+ /// <returns></returns>
+ protected XPathDocument GetAreaTrea(XPathNavigator nav, string configFileName)
+ {
+ return GetAreaTrea(nav.ToJavaInputStream(), configFileName);
+ }
+ /// <summary>
+ /// Get the Area Tree from Antenna House Formatter
+ /// </summary>
+ /// <param name="inputStream">XSL:FO tree as ByteArryInputStream</param>
+ /// <param name="configFileName">FOP configuration file name: Setting file for Antenna House Formatter rendering</param>
+ /// <returns></returns>
+ protected XPathDocument GetAreaTrea(ByteArrayInputStream inputStream, string configFileName)
+ {
+ ByteArrayOutputStream outStream = new ByteArrayOutputStream();
+
+ FOUserAgent userAgent = new FOUserAgent(FopFactory.newInstance());
+ FopFactoryConfigurator configurator = new FopFactoryConfigurator(userAgent.getFactory());
+ if (string.IsNullOrEmpty(configFileName)==false)
+ userAgent.getFactory().setUserConfig(configFileName);
+ Fop fop = userAgent.getFactory().newFop(MimeConstants.__Fields.MIME_FOP_AREA_TREE, userAgent, outStream);
+ TransformerFactory tf = new TransformerFactoryImpl();
+ Transformer transformer = tf.newTransformer();
+ Source src = new StreamSource(inputStream);
+ Result res = new SAXResult(fop.getDefaultHandler());
+ transformer.transform(src, res);
+
+ return outStream.ToXPathDocument();
+ }
+ #region IXsltExtensionObject implementation
+ /// <summary>
+ /// returns namespace used for running this extension object
+ /// </summary>
+ public string NamespaceURI
+ {
+ get
+ {
+ return "pi.ep.ppl.xslt.ext.fop.dotnet";
+ }
+ }
+ #endregion
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/FOPRunXSLTExt/src/org/w3c/ppl/xslt/ext/fop/dotnet/pi.ep.ppl.xslt.ext.fop.dotnet/pi.ep.ppl.xslt.ext.fop.dotnet.csproj Fri Feb 28 15:13:46 2014 +0100
@@ -0,0 +1,163 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+ <PropertyGroup>
+ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+ <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+ <ProductVersion>8.0.30703</ProductVersion>
+ <SchemaVersion>2.0</SchemaVersion>
+ <ProjectGuid>{1A0EFD22-46C8-4F44-B004-77661C5234BC}</ProjectGuid>
+ <OutputType>Library</OutputType>
+ <AppDesignerFolder>Properties</AppDesignerFolder>
+ <RootNamespace>pi.ep.ppl.xslt.ext.fop.dotnet</RootNamespace>
+ <AssemblyName>pi.ep.ppl.xslt.ext.fop.dotnet</AssemblyName>
+ <TargetFrameworkVersion>v4.0</TargetFrameworkVersion>
+ <FileAlignment>512</FileAlignment>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+ <DebugSymbols>true</DebugSymbols>
+ <DebugType>full</DebugType>
+ <Optimize>false</Optimize>
+ <OutputPath>bin\Debug\</OutputPath>
+ <DefineConstants>DEBUG;TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+ <DebugType>pdbonly</DebugType>
+ <Optimize>true</Optimize>
+ <OutputPath>bin\Release\</OutputPath>
+ <DefineConstants>TRACE</DefineConstants>
+ <ErrorReport>prompt</ErrorReport>
+ <WarningLevel>4</WarningLevel>
+ </PropertyGroup>
+ <ItemGroup>
+ <Reference Include="fop11, Version=1.1.0.0, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\fop11.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.AWT.WinForms, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.AWT.WinForms.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Beans, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Beans.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Charsets, Version=0.46.0.2, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Charsets.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Corba, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Corba.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Core, Version=0.46.0.2, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Core.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Jdbc, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Jdbc.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Management, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Management.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Media, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Media.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Misc, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Misc.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Naming, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Naming.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Remoting, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Remoting.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Security, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Security.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.SwingAWT, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.SwingAWT.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Text, Version=0.46.0.2, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Text.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Tools, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Tools.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.Util, Version=0.46.0.2, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.Util.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.XML.API, Version=0.46.0.2, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.XML.API.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.XML.Bind, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.XML.Bind.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.XML.Crypto, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.XML.Crypto.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.XML.Parse, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.XML.Parse.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.XML.Transform, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.XML.Transform.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.XML.WebServices, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.XML.WebServices.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.OpenJDK.XML.XPath, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.OpenJDK.XML.XPath.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.Runtime, Version=0.46.0.2, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.Runtime.dll</HintPath>
+ </Reference>
+ <Reference Include="IKVM.Runtime.JNI, Version=7.2.4630.5, Culture=neutral, PublicKeyToken=13235d27fcbfff58, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\IKVM.Runtime.JNI.dll</HintPath>
+ </Reference>
+ <Reference Include="pi.ep.xslt.ext.interfaces, Version=0.1.5172.20049, Culture=neutral, processorArchitecture=MSIL">
+ <SpecificVersion>False</SpecificVersion>
+ <HintPath>import\pi.ep.xslt.ext.interfaces.dll</HintPath>
+ </Reference>
+ <Reference Include="System" />
+ <Reference Include="System.Core" />
+ <Reference Include="System.Data.DataSetExtensions" />
+ <Reference Include="Microsoft.CSharp" />
+ <Reference Include="System.Data" />
+ <Reference Include="System.Xml" />
+ </ItemGroup>
+ <ItemGroup>
+ <Compile Include="Extensions\ByteArrayOutputStreamExtensions.cs" />
+ <Compile Include="Extensions\XPathNavigatorExtensions.cs" />
+ <Compile Include="RunFOP.cs" />
+ <Compile Include="Properties\AssemblyInfo.cs" />
+ </ItemGroup>
+ <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
+ <!-- To modify your build process, add your task inside one of the targets below and uncomment it.
+ Other similar extension points exist, see Microsoft.Common.targets.
+ <Target Name="BeforeBuild">
+ </Target>
+ <Target Name="AfterBuild">
+ </Target>
+ -->
+</Project>
\ No newline at end of file