Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

This commit was manufactured by cvs2svn to create branch

'LotusXSL4C_1_0_0'.

git-svn-id: https://svn.apache.org/repos/asf/xalan/c/branches/LotusXSL4C_1_0_0@340174 13f79535-47bb-0310-9956-ffa450edef68
  • Loading branch information...
commit f6fc3b50d367a7e87cec72f48f5f4da5aa61b4ae 1 parent dddb94b
No Author authored
View
458 Projects/Win32/VC6/PlatformSupport/PlatformSupport.dsp
@@ -0,0 +1,458 @@
+# Microsoft Developer Studio Project File - Name="PlatformSupport" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
+
+CFG=PlatformSupport - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "PlatformSupport.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "PlatformSupport.mak" CFG="PlatformSupport - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "PlatformSupport - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "PlatformSupport - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE "PlatformSupport - Win32 Release with symbols" (based on "Win32 (x86) Dynamic-Link Library")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+MTL=midl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "PlatformSupport - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\Build\Win32\VC6\Release"
+# PROP Intermediate_Dir "..\..\..\..\Build\Win32\VC6\Release\PlatformSupport"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XALAN_PLATFORMSUPPORT_EXPORTS" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GR /GX /O2 /Ob2 /I "..\..\..\..\..\..\xml-xerces\c\src" /I "..\..\..\..\src\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XALAN_PLATFORMSUPPORT_BUILD_DLL" /FD /I /xml4c/include" /I /xml4c/include" " " " " " " /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /machine:I386
+# ADD LINK32 ..\..\..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release\xerces-c_1.lib /nologo /dll /pdb:none /machine:I386
+# SUBTRACT LINK32 /debug
+
+!ELSEIF "$(CFG)" == "PlatformSupport - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\..\..\Build\Win32\VC6\Debug"
+# PROP Intermediate_Dir "..\..\..\..\Build\Win32\VC6\Debug\PlatformSupport"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PlatformSupport_EXPORTS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W4 /Gm /GR /GX /Zi /Od /I "..\..\..\..\..\..\xml-xerces\c\src" /I "..\..\..\..\src\\" /D "_WINDOWS" /D "_USRDLL" /D "XALAN_PLATFORMSUPPORT_BUILD_DLL" /D "WIN32" /D "_DEBUG" /D "_MBCS" /YX /FD /I /xml4c/include" /I /lotusxsl4c/stl" /I /lotusxsl4c/src/include" /I /xml4c/include" /GZ " " " " " " /c
+# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ..\..\..\..\..\..\xml-xerces\c\Build\Win32\VC6\Debug\xerces-c_1D.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\..\Build\Win32\VC6\Debug/PlatformSupportD.dll" /pdbtype:sept
+
+!ELSEIF "$(CFG)" == "PlatformSupport - Win32 Release with symbols"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "PlatformSupport___Win32_Release_with_symbols"
+# PROP BASE Intermediate_Dir "PlatformSupport___Win32_Release_with_symbols"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\..\..\Build\Win32\VC6\Release.symbols"
+# PROP Intermediate_Dir "..\..\..\..\Build\Win32\VC6\Release.symbols\PlatformSupport"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W4 /GR /GX /O2 /Ob2 /I "..\..\..\..\..\..\xml-xerces\c\src" /I "..\..\..\..\src\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XALAN_PLATFORMSUPPORT_BUILD_DLL" /D "XALAN_XERCES" /FD /I /xml4c/include" /I /xml4c/include" " " " " " " /c
+# SUBTRACT BASE CPP /YX
+# ADD CPP /nologo /MD /W4 /GR /GX /Zi /O2 /Ob2 /I "..\..\..\..\..\..\xml-xerces\c\src" /I "..\..\..\..\src\\" /D "NDEBUG" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "XALAN_PLATFORMSUPPORT_BUILD_DLL" /D "XALAN_XERCES" /FD /I /xml4c/include" /I /xml4c/include" " " " " " " /c
+# SUBTRACT CPP /YX
+# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 ..\..\..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release\xerces-c_1.lib /nologo /dll /pdb:none /machine:I386
+# SUBTRACT BASE LINK32 /debug
+# ADD LINK32 ..\..\..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release\xerces-c_1.lib /nologo /dll /debug /machine:I386 /out:"..\..\..\..\Build\Win32\VC6\Release.symbols/PlatformSupportS.dll"
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "PlatformSupport - Win32 Release"
+# Name "PlatformSupport - Win32 Debug"
+# Name "PlatformSupport - Win32 Release with symbols"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\AttributeListImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\AttributesImpl.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\DOMStringHelper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\DOMStringPrintWriter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\DoubleSupport.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\ExecutionContext.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\FormatterListener.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\NamedNodeMapAttributeList.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\NullPrintWriter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\PlatformSupportInit.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\PrefixResolver.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\PrintWriter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\Resettable.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\StdBinInputStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\StringTokenizer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\URISupport.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\Writer.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanBitmap.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDecimalFormat.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDecimalFormatSymbols.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDOMStringCache.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDOMStringHashTable.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDOMStringPool.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanFileOutputStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanNullOutputStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanNumberFormat.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanOutputStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanOutputStreamPrintWriter.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanReferenceCountedObject.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanStdOutputStream.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanToXercesTranscoderWrapper.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanTranscodingServices.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanUTF16Transcoder.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanXMLChar.cpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XSLException.cpp
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\ArenaAllocator.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\ArenaBlock.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\AttributeListImpl.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\AttributesImpl.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\AttributeVectorEntry.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\AttributeVectorEntryExtended.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\DirectoryEnumerator.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\DOMStringHelper.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\DOMStringPrintWriter.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\DoubleSupport.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\ExecutionContext.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\FormatterListener.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\NamedNodeMapAttributeList.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\NullPrintWriter.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\PlatformSupportDefinitions.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\PlatformSupportInit.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\PrefixResolver.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\PrintWriter.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\Resettable.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\ReusableArenaAllocator.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\ReusableArenaBlock.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\StdBinInputStream.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\StringTokenizer.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\URISupport.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\Writer.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanAllocator.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanBitmap.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDecimalFormat.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDecimalFormatSymbols.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDOMStringCache.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDOMStringHashTable.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanDOMStringPool.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanFileOutputStream.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanNullOutputStream.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanNumberFormat.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanOutputStream.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanOutputStreamPrintWriter.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanReferenceCountedObject.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanStdOutputStream.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanToXercesTranscoderWrapper.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanTranscodingServices.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanUnicode.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanUTF16Transcoder.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XalanXMLChar.hpp
+# End Source File
+# Begin Source File
+
+SOURCE=..\..\..\..\src\PlatformSupport\XSLException.hpp
+# End Source File
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
View
149 Tests/Compare/compare.dsp
@@ -0,0 +1,149 @@
+# Microsoft Developer Studio Project File - Name="compare" - Package Owner=<4>
+# Microsoft Developer Studio Generated Build File, Format Version 6.00
+# ** DO NOT EDIT **
+
+# TARGTYPE "Win32 (x86) Console Application" 0x0103
+
+CFG=compare - Win32 Debug
+!MESSAGE This is not a valid makefile. To build this project using NMAKE,
+!MESSAGE use the Export Makefile command and run
+!MESSAGE
+!MESSAGE NMAKE /f "compare.mak".
+!MESSAGE
+!MESSAGE You can specify a configuration when running NMAKE
+!MESSAGE by defining the macro CFG on the command line. For example:
+!MESSAGE
+!MESSAGE NMAKE /f "compare.mak" CFG="compare - Win32 Debug"
+!MESSAGE
+!MESSAGE Possible choices for configuration are:
+!MESSAGE
+!MESSAGE "compare - Win32 Release" (based on "Win32 (x86) Console Application")
+!MESSAGE "compare - Win32 Debug" (based on "Win32 (x86) Console Application")
+!MESSAGE "compare - Win32 Release with symbols" (based on "Win32 (x86) Console Application")
+!MESSAGE
+
+# Begin Project
+# PROP AllowPerConfigDependencies 0
+# PROP Scc_ProjName ""
+# PROP Scc_LocalPath ""
+CPP=cl.exe
+RSC=rc.exe
+
+!IF "$(CFG)" == "compare - Win32 Release"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "Release"
+# PROP BASE Intermediate_Dir "Release"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\Build\Win32\VC6\Release"
+# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Release\compare"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GR /GX /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I "..\harness\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
+# ADD LINK32 ..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release\xerces-c_1.lib ..\..\Build\Win32\VC6\Release\*.lib /nologo /stack:0x1f4000 /subsystem:console /pdb:none /machine:I386
+
+!ELSEIF "$(CFG)" == "compare - Win32 Debug"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 1
+# PROP BASE Output_Dir "Debug"
+# PROP BASE Intermediate_Dir "Debug"
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 1
+# PROP Output_Dir "..\..\Build\Win32\VC6\Debug"
+# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Debug\compare"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
+# ADD CPP /nologo /MDd /W4 /GR /GX /Od /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I "..\harness\\" /D "_WINDOWS" /D "_CONSOLE" /D "WIN32" /D "_DEBUG" /D "_MBCS" /YX /FD /GZ /c
+# ADD BASE RSC /l 0x409 /d "_DEBUG"
+# ADD RSC /l 0x409 /d "_DEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
+# ADD LINK32 ..\..\..\..\xml-xerces\c\Build\Win32\VC6\Debug\xerces-c_1D.lib ..\..\Build\Win32\VC6\Debug\*.lib /nologo /stack:0x1f4000 /subsystem:console /debug /machine:I386 /pdbtype:sept
+
+!ELSEIF "$(CFG)" == "compare - Win32 Release with symbols"
+
+# PROP BASE Use_MFC 0
+# PROP BASE Use_Debug_Libraries 0
+# PROP BASE Output_Dir "compare___Win32_Release_with_symbols"
+# PROP BASE Intermediate_Dir "compare___Win32_Release_with_symbols"
+# PROP BASE Ignore_Export_Lib 0
+# PROP BASE Target_Dir ""
+# PROP Use_MFC 0
+# PROP Use_Debug_Libraries 0
+# PROP Output_Dir "..\..\Build\Win32\VC6\Release.symbols"
+# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Release.symbols\compare"
+# PROP Ignore_Export_Lib 0
+# PROP Target_Dir ""
+# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I "..\harness\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
+# ADD CPP /nologo /MD /W4 /GR /GX /Zi /O2 /Ob2 /I "..\..\..\..\xml-xerces\c\src" /I "..\..\src\\" /I "..\harness\\" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /FD /c
+# SUBTRACT CPP /YX
+# ADD BASE RSC /l 0x409 /d "NDEBUG"
+# ADD RSC /l 0x409 /d "NDEBUG"
+BSC32=bscmake.exe
+# ADD BASE BSC32 /nologo
+# ADD BSC32 /nologo
+LINK32=link.exe
+# ADD BASE LINK32 ..\..\Build\Win32\VC6\Release\Harness.lib ..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release\xerces-c_1.lib ..\..\Build\Win32\VC6\Release\*.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 /out:"..\..\Build\Win32\VC6\Release/perft.exe"
+# ADD LINK32 ..\..\..\..\xml-xerces\c\Build\Win32\VC6\Release\xerces-c_1.lib ..\..\Build\Win32\VC6\Release.symbols\*.lib /nologo /stack:0x1f4000 /subsystem:console /debug /machine:I386 /fixed:no
+# SUBTRACT LINK32 /pdb:none
+
+!ENDIF
+
+# Begin Target
+
+# Name "compare - Win32 Release"
+# Name "compare - Win32 Debug"
+# Name "compare - Win32 Release with symbols"
+# Begin Group "Source Files"
+
+# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
+# Begin Source File
+
+SOURCE=.\compare.cpp
+
+!IF "$(CFG)" == "compare - Win32 Release"
+
+# ADD CPP /MD /Zi
+
+!ELSEIF "$(CFG)" == "compare - Win32 Debug"
+
+# PROP Intermediate_Dir "..\..\Build\Win32\VC6\Debug\compare"
+# ADD CPP /MDd /Zi
+
+!ELSEIF "$(CFG)" == "compare - Win32 Release with symbols"
+
+# ADD BASE CPP /MD /Zi
+# ADD CPP /MD /Zi
+
+!ENDIF
+
+# End Source File
+# End Group
+# Begin Group "Header Files"
+
+# PROP Default_Filter "h;hpp;hxx;hm;inl"
+# End Group
+# Begin Group "Resource Files"
+
+# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
+# End Group
+# End Target
+# End Project
View
170 Tests/Tests.dsw
@@ -0,0 +1,170 @@
+Microsoft Developer Studio Workspace File, Format Version 6.00
+# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
+
+###############################################################################
+
+Project: "Harness"=".\Harness\Harness.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Memory"=".\Memory\Memory.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Harness
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "Params"=".\Params\Params.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Harness
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "PerfT"=".\PerfT\PerfT.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Harness
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "ThreadTest"=".\Threads\ThreadTest.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "Transformer"=".\Transformer\Transformer.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "compare"=".\Compare\compare.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Harness
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "dom2dom"=".\Dom2Dom\Dom2Dom.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "extensions"=".\Extensions\extensions.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Harness
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "inputsource"=".\InputSource\inputsource.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Harness
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Project: "perf"=".\Performance\perf.dsp" - Package Owner=<4>
+
+Package=<5>
+{{{
+}}}
+
+Package=<4>
+{{{
+ Begin Project Dependency
+ Project_Dep_Name Harness
+ End Project Dependency
+}}}
+
+###############################################################################
+
+Global:
+
+Package=<5>
+{{{
+}}}
+
+Package=<3>
+{{{
+}}}
+
+###############################################################################
+
View
402 Tests/Threads/ThreadTest.cpp
@@ -0,0 +1,402 @@
+// Base header file. Must be first.
+#include <Include/PlatformDefinitions.hpp>
+
+
+
+#include <cassert>
+#include <ctime>
+
+
+
+#if defined(XALAN_OLD_STREAM_HEADERS)
+#include <iostream.h>
+#else
+#include <iostream>
+#endif
+
+
+
+#include <util/PlatformUtils.hpp>
+#include <util/Mutexes.hpp>
+
+
+
+#include <Include/XalanAutoPtr.hpp>
+
+
+
+#include <XalanTransformer/XalanTransformer.hpp>
+
+
+
+#if defined(WIN32)
+//This is here for the threads.
+#include <process.h>
+
+#define WIN32_LEAN_AND_MEAN
+#include <windows.h>
+#elif defined(XALAN_POSIX2_AVAILABLE)
+#include <pthread.h>
+#include <unistd.h>
+#else
+#error Unsupported platform!
+#endif
+
+
+
+#if !defined(XALAN_NO_NAMESPACES)
+ using std::cerr;
+ using std::cout;
+ using std::endl;
+#endif
+
+
+
+// This is here for memory leak testing.
+#if defined(_DEBUG)
+#include <crtdbg.h>
+#endif
+
+
+
+class SynchronizedCounter
+{
+public:
+
+ SynchronizedCounter();
+
+ ~SynchronizedCounter();
+
+ void
+ increment();
+
+ void
+ decrement();
+
+ unsigned long
+ getCounter() const;
+
+private:
+
+ mutable XMLMutex m_mutex;
+
+ unsigned long m_counter;
+};
+
+
+
+SynchronizedCounter::SynchronizedCounter() :
+ m_mutex(),
+ m_counter(0)
+{
+}
+
+
+
+SynchronizedCounter::~SynchronizedCounter()
+{
+}
+
+
+
+void
+SynchronizedCounter::increment()
+{
+ XMLMutexLock theLock(&m_mutex);
+
+ if (m_counter < ULONG_MAX)
+ {
+ ++m_counter;
+ }
+}
+
+
+
+void
+SynchronizedCounter::decrement()
+{
+ XMLMutexLock theLock(&m_mutex);
+
+ if (m_counter > 0)
+ {
+ --m_counter;
+ }
+}
+
+
+
+unsigned long
+SynchronizedCounter::getCounter() const
+{
+ return m_counter;
+}
+
+
+
+struct
+ThreadInfo
+{
+ ThreadInfo(
+ unsigned int theThreadNumber = 0,
+ SynchronizedCounter* theCounter = 0) :
+ m_threadNumber(theThreadNumber),
+ m_counter(theCounter)
+ {
+ }
+
+ unsigned int m_threadNumber;
+
+ SynchronizedCounter* m_counter;
+};
+
+
+
+// Used to hold compiled stylesheet and pre-parsed source...
+const XalanCompiledStylesheet* glbCompiledStylesheet = 0;
+const XalanParsedSource* glbParsedSource = 0;
+
+
+
+#if defined(WIN32)
+
+extern "C" void theThreadRoutine(void* param);
+
+void
+#elif defined(XALAN_POSIX2_AVAILABLE)
+
+extern "C" void* theThreadRoutine(void* param);
+
+void*
+#else
+#error Unsupported platform!
+#endif
+theThreadRoutine(void* param)
+{
+// This routine uses compiled stylesheet (glbStylesheetRoot), which is set using the
+// theProcessor.setStylesheetRoot method. The transform is done using the theProcessor's
+// process() method.
+
+#if defined(XALAN_OLD_STYLE_CASTS)
+ const ThreadInfo* const theInfo = (const ThreadInfo*)param;
+#else
+ const ThreadInfo* const theInfo = reinterpret_cast<const ThreadInfo*>(param);
+#endif
+
+ assert(theInfo != 0);
+
+ theInfo->m_counter->increment();
+
+ try
+ {
+ // Our input file. The assumption is that the executable will be run
+ // from same directory as the input files.
+
+ // Generate the output file name.
+ const XalanDOMString theOutputFile(
+ XalanDOMString("birds") +
+ UnsignedLongToDOMString(theInfo->m_threadNumber) +
+ XalanDOMString(".out"));
+
+ // Create a transformer...
+ XalanTransformer theTransformer;
+
+ // Do the transform...
+ theTransformer.transform(*glbParsedSource, glbCompiledStylesheet, XSLTResultTarget(theOutputFile));
+ }
+ catch(...)
+ {
+ cerr << "Exception caught in thread " << theInfo->m_threadNumber;
+ }
+
+ // Decrement the counter because we're done...
+ theInfo->m_counter->decrement();
+
+#if defined(XALAN_POSIX2_AVAILABLE)
+ return 0;
+#endif
+}
+
+
+
+inline void
+doSleep(unsigned int theMilliseconds)
+{
+#if defined(WIN32)
+ Sleep(theMilliseconds);
+#elif defined(XALAN_POSIX2_AVAILABLE)
+ usleep(theMilliseconds * 10);
+#else
+#error Unsupported platform!
+#endif
+}
+
+
+
+void
+doThreads(long theThreadCount)
+{
+ cout << endl << "Starting " << theThreadCount << " threads." << endl;
+
+ XalanArrayAutoPtr<ThreadInfo> theThreadInfo(new ThreadInfo[theThreadCount]);
+
+ try
+ {
+ cout << endl << "Clock before starting threads: " << clock() << endl;
+
+ SynchronizedCounter theCounter;
+
+ long i = 0;
+
+ while (i < theThreadCount)
+ {
+ theThreadInfo[i].m_threadNumber = i;
+ theThreadInfo[i].m_counter = &theCounter;
+
+#if defined(WIN32)
+
+ const unsigned long theThreadID =
+ _beginthread(theThreadRoutine, 4096, reinterpret_cast<LPVOID>(&theThreadInfo[i]));
+
+ if (theThreadID == unsigned(-1))
+ {
+ cerr << endl << "Unable to create thread number " << i + 1 << "." << endl;
+ }
+
+#elif defined(XALAN_POSIX2_AVAILABLE)
+
+ pthread_t theThread;
+
+ const int theResult = pthread_create(&theThread, 0, theThreadRoutine, (void*)&theThreadInfo[i]);
+
+ if (theResult != 0)
+ {
+ cerr << endl << "Unable to create thread number " << i + 1 << "." << endl;
+ }
+ else
+ {
+#if defined(OS390)
+ pthread_detach(&theThread);
+#else
+ pthread_detach(theThread);
+#endif
+ }
+#else
+#error Unsupported platform!
+#endif
+
+ ++i;
+ }
+
+ clock_t theClock = 0;
+
+ if (i == 0)
+ {
+ cerr << endl << "No threads were created!" << endl;
+ }
+ else
+ {
+ unsigned int theCheckCount = 0;
+
+ do
+ {
+ doSleep(2000);
+
+ // Check a couple of times, just in case, since
+ // getCounter() is not synchronized...
+ if (theCounter.getCounter() == 0)
+ {
+ if (theCheckCount == 0)
+ {
+ theClock = clock();
+ }
+
+ ++theCheckCount;
+ }
+ }
+ while(theCheckCount < 2);
+ }
+
+ cout << endl << "Clock after threads: " << theClock << endl;
+ }
+ catch(...)
+ {
+ cerr << "Exception caught!!!"
+ << endl
+ << endl;
+ }
+}
+
+
+int
+main(
+ int argc,
+ const char* argv[])
+{
+#if !defined(NDEBUG) && defined(_MSC_VER)
+ _CrtSetDbgFlag(_CrtSetDbgFlag(_CRTDBG_REPORT_FLAG) | _CRTDBG_LEAK_CHECK_DF);
+
+ _CrtSetReportMode(_CRT_WARN, _CRTDBG_MODE_FILE);
+ _CrtSetReportFile(_CRT_WARN, _CRTDBG_FILE_STDERR);
+#endif
+
+ if (argc > 2)
+ {
+ cerr << "Usage: ThreadTest"
+ << endl
+ << endl;
+ }
+ else
+ {
+ int threadCount = 60;
+
+ if (argc == 2)
+ {
+ threadCount = atoi(argv[1]);
+ }
+
+ try
+ {
+ // Initialize Xerces...
+ XMLPlatformUtils::Initialize();
+
+ // Initialize Xalan...
+ XalanTransformer::initialize();
+
+ {
+ // Create a XalanTransformer. We won't actually use this to transform --
+ // it's just acting likely a factory for the compiled stylesheet and
+ // pre-parsed source.
+ XalanTransformer theXalanTransformer;
+
+ const char* const theXSLFileName = "birds.xsl";
+
+ theXalanTransformer.compileStylesheet(theXSLFileName, glbCompiledStylesheet);
+ assert(glbCompiledStylesheet != 0);
+
+ // Compile the XML source document as well. All threads will use
+ // this binary representation of the source tree.
+ const char* const theXMLFileName = "birds.xml";
+
+ theXalanTransformer.parseSource(theXMLFileName, glbParsedSource);
+ assert(glbParsedSource != 0);
+
+ doThreads(threadCount);
+ }
+
+ // Terminate Xalan...
+ XalanTransformer::terminate();
+
+ // Terminate Xerces...
+ XMLPlatformUtils::Terminate();
+ }
+ catch(...)
+ {
+ cerr << "Exception caught!!!"
+ << endl
+ << endl;
+ }
+
+ }
+
+ return 0;
+}
View
664 src/Makefile.in
@@ -0,0 +1,664 @@
+#
+# The Apache Software License, Version 1.1
+#
+# Copyright (c) 1999 The Apache Software Foundation. All rights
+# reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+#
+# 2. Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+#
+# 3. The end-user documentation included with the redistribution,
+# if any, must include the following acknowledgment:
+# "This product includes software developed by the
+# Apache Software Foundation (http://www.apache.org/)."
+# Alternately, this acknowledgment may appear in the software itself,
+# if and wherever such third-party acknowledgments normally appear.
+#
+# 4. The names "Xalan", "Xerces" and "Apache Software Foundation" must
+# not be used to endorse or promote products derived from this
+# software without prior written permission. For written
+# permission, please contact apache\@apache.org.
+#
+# 5. Products derived from this software may not be called "Apache",
+# nor may "Apache" appear in their name, without prior written
+# permission of the Apache Software Foundation.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+# ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+# USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+# OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+# SUCH DAMAGE.
+# ====================================================================
+#
+# This software consists of voluntary contributions made by many
+# individuals on behalf of the Apache Software Foundation, and was
+# originally based on software copyright (c) 1999, International
+# Business Machines, Inc., http://www.ibm.com . For more information
+# on the Apache Software Foundation, please see
+# <http://www.apache.org/>.
+#
+###################################################################
+# IMPORTANT NOTE #
+###################################################################
+# Before you try to run the Makefile, make sure you have two #
+# environment variables set. #
+# #
+# export XALANCROOT=<the directory where you installed XALAN-C> #
+# export XERCESCROOT=<the directory where you installed XERCES-C> #
+# #
+###################################################################
+
+DEPFILE=depends
+
+#MACROS defining commands
+MKDIR=mkdir
+
+ifndef XALANCROOT
+noxalanroot:
+ @echo XALANCROOT must be defined
+endif
+
+ifndef XERCESCROOT
+noxercesroot:
+ @echo XERCESCROOT must be defined
+endif
+
+ifdef XALAN_USE_ICU
+ifndef ICUROOT
+ICUROOT=/usr/local
+endif
+ifndef ICUI18NROOT
+ICUI18NROOT=${ICUROOT}
+endif
+endif
+
+XALANDOM_DIR = XalanDOM
+DOMSUPPORT_DIR = DOMSupport
+INCLUDE_DIR = Include
+ICUBRIDGE_DIR = ICUBridge
+PLATFORMSUPPORT_DIR = PlatformSupport
+XALANSOURCETREE_DIR = XalanSourceTree
+TESTXPATH_DIR = TestXPath
+TESTXSLT_DIR = TestXSLT
+XMLSUPPORT_DIR = XMLSupport
+XPATH_DIR = XPath
+XSLT_DIR = XSLT
+XALANEXTENSIONS_DIR = XalanExtensions
+XERCESPARSERLIAISON_DIR = XercesParserLiaison
+XALANTRANSFORMER_DIR = XalanTransformer
+ALL_OBJECTS_DIR = ${XALANCROOT}/obj
+LIB_DIR = ${XALANCROOT}/lib
+SAMPLES_DIR = ${XALANCROOT}/samples
+TESTS_DIR = ${XALANCROOT}/Tests
+
+PROJECT_NAME = xalan-c
+LIBNAME = lib${PROJECT_NAME}
+THISLIB = ${LIB_DIR}/${LIBNAME}
+VER = 1_2
+
+PRODUCTNAME=xalan
+PRODUCTVERSION=${VER}
+BINTARGETDIR=${XALANCROOT}/bin
+
+ALL_VPATH_CPP = \
+$(XALANDOM_DIR):$(DOMSUPPORT_DIR):$(PLATFORMSUPPORT_DIR):$(XALANSOURCETREE_DIR):$(TESTXPATH_DIR):$(TESTXSLT_DIR):\
+$(XMLSUPPORT_DIR):$(XPATH_DIR):$(XSLT_DIR):$(XALANEXTENSIONS_DIR):$(XALANTRANSFORMER_DIR):$(XERCESPARSERLIAISON_DIR)
+
+# Using ICUBridge
+ifdef XALAN_USE_ICU
+ALL_VPATH_CPP+=:$(ICUBRIDGE_DIR)
+endif
+
+#all these setting come from the arguments passed in to runConfigure.
+PLATFORM =@platform@
+CC = @cc@
+CXX = @cxx@
+CXXFLAGS = @cxxflags@
+PREFIX = @prefix@
+
+#=============== LINUX SPECIFIC OPTIONS =========================
+
+ifeq ($(PLATFORM), LINUX)
+
+ SUPPORTED = TRUE
+ PLATFORM_COMPILE_OPTIONS = -fpic -Wall -instances=static -D${PLATFORM} -D_REENTRANT
+ ALLLIBS = ${LIBS} -L/usr/lib
+ SHLIBSUFFIX=.so
+
+ # We need the ICU library if we are using the ICUBridge
+ ifdef XALAN_USE_ICU
+ LD_RPATH_PRE= -Wl,-rpath,
+ PLATFORM_LIB_LINK_OPTIONS=$(LD_RPATH_PRE)${ICUROOT}/lib
+ endif
+
+ EXTRA_LINK_OPTIONS=-lc
+ CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+ MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fpic
+ LINK = g++ -D${PLATFORM} -fpic
+
+endif
+
+#=============== HPUX SPECIFIC OPTIONS =========================
+
+ifeq ($(PLATFORM), HPUX)
+
+ SUPPORTED = TRUE
+ PLATFORM_COMPILE_OPTIONS = +Z -D${PLATFORM} -D_THREAD_SAFE
+ ALLLIBS = ${LIBS}
+ SHLIBSUFFIX=.sl
+ CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+ CC2 = $(CXX) $(PLATFORM_COMPILE_OPTIONS)
+ MAKE_SHARED = $(CXX) -b +Z
+ LINK = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS) -Wl,+s
+
+endif
+
+#=============== SOLARIS SPECIFIC OPTIONS =========================
+
+ifeq ($(PLATFORM), SOLARIS)
+
+ SUPPORTED = TRUE
+
+ ifeq (${CXX}, g++)
+
+ PLATFORM_COMPILE_OPTIONS = -fPIC -instances=static -D${PLATFORM} -D_REENTRANT
+ ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
+
+ ifdef XALAN_USE_ICU
+ LD_RPATH_PRE= -Wl,-rpath,
+ endif
+
+ EXTRA_LINK_OPTIONS=-lc
+ CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+ MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fPIC
+ LINK = g++ -D${PLATFORM} -fPIC
+
+ ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
+
+ PLATFORM_LIB_LINK_OPTIONS=$(LD_RPATH_PRE)${ICUROOT}/lib $(LD_RPATH_PRE)${ICUI18NROOT}/lib
+
+ else
+
+ PLATFORM_COMPILE_OPTIONS = -KPIC -mt -xs -ptr$(ALL_OBJECTS_DIR) -features=rtti -D${PLATFORM} -D_REENTRANT
+
+ CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS) -I${STLPORTROOT}/stlport
+ MAKE_SHARED = ${CXX} -D${PLATFORM} -G -ptr$(ALL_OBJECTS_DIR) ${LDFLAGS}
+ MAKE_SHARED_C = ${CC} -D${PLATFORM} -G ${LDFLAGS}
+ LINK = ${CXX} -D${PLATFORM} -ptr$(ALL_OBJECTS_DIR) ${LDFLAGS}
+
+ ALLLIBS = -mt ${LIBS} -L/usr/local/SUNWspro/lib -L/usr/ccs/lib \
+ -lc -lgen
+ endif
+
+ SHLIBSUFFIX=.so
+
+endif
+
+#=============== AIX SPECIFIC OPTIONS =========================
+ifeq ($(PLATFORM), AIX)
+
+ SUPPORTED = TRUE
+
+ ifeq (${CXX}, g++)
+
+ PLATFORM_COMPILE_OPTIONS = -fPIC -instances=static -D${PLATFORM} -D_REENTRANT
+ ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
+
+ ifdef XALAN_USE_ICU
+ LD_RPATH_PRE= -Wl,-rpath,
+ PLATFORM_LIB_LINK_OPTIONS=$(LD_RPATH_PRE)${ICUROOT}/lib $(LD_RPATH_PRE)${ICUI18NROOT}/lib
+ endif
+
+ EXTRA_LINK_OPTIONS=-lc
+ CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+ MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -shared -fPIC
+ LINK = g++ -D${PLATFORM} -fPIC
+
+ ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib -lc
+
+ else
+
+ ifndef STLPORTROOT
+ nostlportroot:
+ @echo STLPORTROOT must be defined
+ endif
+
+ PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -D_THREAD_SAFE -I${STLPORTROOT}/stlport
+ ALLLIBS = ${LIBS} -L/usr/lib
+ CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+ CC2 = $(CXX) $(PLATFORM_COMPILE_OPTIONS)
+ MAKE_SHARED = makeC++SharedLib_r -p 5000
+ LINK = $(CXX) -qnotempinc $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+
+ endif
+
+ SHLIBSUFFIX=.a
+
+endif
+
+#=============== OS390 SPECIFIC OPTIONS =========================
+
+ifeq ($(PLATFORM), OS390)
+
+ ifndef STLPORTROOT
+ nostlportroot:
+ @echo STLPORTROOT must be defined
+ endif
+
+ SUPPORTED = TRUE
+ PLATFORM_COMPILE_OPTIONS =-Wc,dll -W0,"langlvl(extended),float(ieee)" -D${PLATFORM} -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -I ${STLPORTROOT}/stlport
+ PLATFORM_COMPILE_OPTIONS2 =-Wc,dll -W0,"langlvl(extended),notempinc,float(ieee)" -D${PLATFORM} -D_OPEN_THREADS -D_XOPEN_SOURCE_EXTENDED -I ${STLPORTROOT}/stlport
+ ALLLIBS =
+ SHLIBSUFFIX=.dll
+ OS390SIDEDECK=.x
+
+ CC1 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+ CC2 = $(CXX) $(PLATFORM_COMPILE_OPTIONS2)
+ CC3 = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS2)
+ MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -Wl,dll
+ LINK = $(CXX) $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+
+endif
+
+#============ TRU64 SPECIFIC OPTIONS ============================
+
+ifeq ($(PLATFORM), TRU64)
+
+ SUPPORTED = TRUE
+ PLATFORM_COMPILE_OPTIONS = -D${PLATFORM} -ptr ${ALL_OBJECTS_DIR}/.cxx_repository -ieee -pthread
+ ALLLIBS = ${LIBS} -L/usr/lib -lc -lrt -lm
+ SHLIBSUFFIX = .so
+ CC1 = ${CXX} ${CXXFLAGS} $(PLATFORM_COMPILE_OPTIONS)
+ MAKE_SHARED = ${CXX} ${CXXFLAGS} -shared -D${PLATFORM} -ptr ${ALL_OBJECTS_DIR}/.cxx_repository -nocxxstd
+ LINK = ${CXX} $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+
+endif
+
+#============ MacOSX SPECIFIC OPTIONS ============================
+
+ifeq ($(PLATFORM), MACOSX)
+
+ SUPPORTED = TRUE
+ PLATFORM_COMPILE_OPTIONS = -Wall -D${PLATFORM} -D_REENTRANT -DXALAN_USE_XERCES_LOCAL_CODEPAGE_TRANSCODERS
+ ALLLIBS = ${LIBS} -L/usr/lib -L/usr/local/lib
+ SHLIBSUFFIX=.dylib
+ CC1 = ${CXX} $(CXXFLAGS) $(PLATFORM_COMPILE_OPTIONS)
+ MAKE_SHARED = ${CXX} $(CXXFLAGS) -D${PLATFORM} -dynamiclib
+ LINK = ${CXX} $(CXXFLAGS) ${PLATFORM_COMPILE_OPTIONS}
+
+endif
+
+ifndef SUPPORTED
+ nogood:
+ @echo Linux, Solaris, AIX, Compaq Tru64, OS/390, MacOSX, and HP-UX are the only platforms supported.
+endif
+
+# We need the Xerces library
+ifeq ($(PLATFORM), OS390)
+ ALLLIBS += $(XERCESCROOT)/lib/libxerces-c1_5_1.x
+else
+ ALLLIBS += -L$(XERCESCROOT)/lib -lxerces-c1_5
+endif
+
+# We need the ICU library if we are using the ICUBridge
+ifdef XALAN_USE_ICU
+ ifeq ($(PLATFORM), OS390)
+ ALLLIBS += ${ICUROOT}/lib/libicuuc.x ${ICUROOT}/lib/libicui18n.x
+ else
+ ALLLIBS += -L${ICUROOT}/lib -licuuc
+ ALLLIBS += -L${ICUI18NROOT}/lib -licui18n
+ endif
+endif
+
+
+# We have to use the includes from the source distribution, since we use
+# headers that others normally wouldn't
+ifdef XALAN_USE_ICU
+# We need the ICU library if we are using the ICUBridge
+ XSL_INCL = -I${ICUROOT}/include/ -I. -I$(XERCESCROOT)/src/ -I$(XERCESCROOT)/include/
+ XSL_BUILD_OPTIONS += -DXALAN_USE_ICU
+else
+ XSL_INCL = -I. -I$(XERCESCROOT)/src/ -I$(XERCESCROOT)/include/
+endif
+
+
+vpath %.cpp \
+$(ALL_VPATH_CPP)
+${ALL_OBJECTS_DIR}/%.o:%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+
+${ALL_OBJECTS_DIR}/%.o:%.hpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $(patsubst .hpp,.cpp,$<)
+
+
+ALLSOURCE = \
+ $(wildcard $(XALANDOM_DIR)/*.cpp) \
+ $(wildcard $(DOMSUPPORT_DIR)/*.cpp) \
+ $(wildcard $(PLATFORMSUPPORT_DIR)/*.cpp) \
+ $(wildcard $(XALANSOURCETREE_DIR)/*.cpp) \
+ $(wildcard $(XMLSUPPORT_DIR)/*.cpp) \
+ $(wildcard $(XPATH_DIR)/*.cpp) \
+ $(wildcard $(XSLT_DIR)/*.cpp) \
+ $(wildcard $(XALANEXTENSIONS_DIR)/*.cpp) \
+ $(wildcard $(XERCESINIT_DIR)/*.cpp) \
+ $(wildcard $(XERCESPARSERLIAISON_DIR)/*.cpp) \
+ $(wildcard $(XALANTRANSFORMER_DIR)/*.cpp) \
+
+
+# Using ICUBridge
+ifdef XALAN_USE_ICU
+ALLSOURCE += \
+ $(wildcard $(ICUBRIDGE_DIR)/*.cpp)
+endif
+
+ALL_OBJECTS = $(addprefix $(ALL_OBJECTS_DIR)/,$(addsuffix .o,$(basename $(notdir $(ALLSOURCE)))))
+
+all: lib testXSLT testXPath
+
+prepare:
+ @echo Preparing the directory structure for a build ...
+ -${MKDIR} -p ${ALL_OBJECTS_DIR}
+ -${MKDIR} -p ${LIB_DIR}
+ -${MKDIR} -p $(BINTARGETDIR)
+
+# Create header dependencies file -- this must be run before any objects are
+# built
+depend:
+ $(MAKE) -f makedepends DEPFILE=$(DEPFILE)
+
+-include $(DEPFILE)
+
+compile: $(ALL_OBJECTS)
+
+ifeq ($(PLATFORM), AIX)
+templates: ${ALL_OBJECTS_DIR}/XalanTemplate.o
+
+${ALL_OBJECTS_DIR}/XalanTemplate.o:$(XSLT_DIR)/XalanTemplate.cpp
+ $(CC2) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -o $@ $<
+else
+ifeq ($(PLATFORM), OS390)
+templates: ${ALL_OBJECTS_DIR}/XalanTemplate.o
+${ALL_OBJECTS_DIR}/XalanTemplate.o:$(XSLT_DIR)/XalanTemplate.cpp
+ $(CC2) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -o $@ $<
+endif
+endif
+
+testXSLT: lib $(BINTARGETDIR)/testXSLT
+
+ifeq ($(PLATFORM), OS390)
+$(BINTARGETDIR)/testXSLT: ${ALL_OBJECTS_DIR}/process.o
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $^ -o $@
+${ALL_OBJECTS_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+$(BINTARGETDIR)/testXSLT: ${ALL_OBJECTS_DIR}/process.o
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $^ -o $@
+${ALL_OBJECTS_DIR}/process.o: $(TESTXSLT_DIR)/process.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+testXPath: lib $(BINTARGETDIR)/testXPath
+
+ifeq ($(PLATFORM), OS390)
+$(BINTARGETDIR)/testXPath: ${ALL_OBJECTS_DIR}/TestXPath.o ${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/TestXPath.o: $(TESTXPATH_DIR)/TestXPath.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o: $(TESTXPATH_DIR)/NodeNameTreeWalker.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+$(BINTARGETDIR)/testXPath: ${ALL_OBJECTS_DIR}/TestXPath.o ${ALL_OBJECTS_DIR}/NodeNameTreeWalker.o
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(TESTXPATH_DIR)/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+samples : Samples
+
+tests : ThreadTest
+
+Samples: lib CompileStylesheet DocumentBuilder ExternalFunction SimpleTransform SimpleXPathAPI StreamTransform TraceListen UseStylesheetParam XalanTransform XalanTransformerCallback XPathWrapper
+
+ApacheModuleXSLT: lib ${LIB_DIR}/mod_xslt$(SHLIBSUFFIX)
+
+${LIB_DIR}/mod_xslt$(SHLIBSUFFIX) : ${ALL_OBJECTS_DIR}/mod_xslt.o
+ifeq ($(PLATFORM), OS390)
+ $(MAKE_SHARED) $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ApacheModuleXSLT/%.c
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I/usr/include/apache/ $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ $(MAKE_SHARED) $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ApacheModuleXSLT/%.c
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) -I/usr/include/apache/ $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+CompileStylesheet: lib $(BINTARGETDIR)/CompileStylesheet
+
+$(BINTARGETDIR)/CompileStylesheet: ${ALL_OBJECTS_DIR}/CompileStylesheet.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/CompileStylesheet/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/CompileStylesheet/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+DocumentBuilder: lib $(BINTARGETDIR)/DocumentBuilder
+
+$(BINTARGETDIR)/DocumentBuilder: ${ALL_OBJECTS_DIR}/DocumentBuilder.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/DocumentBuilder/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/DocumentBuilder/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+ExternalFunction: lib $(BINTARGETDIR)/ExternalFunction
+
+$(BINTARGETDIR)/ExternalFunction: ${ALL_OBJECTS_DIR}/ExternalFunction.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ExternalFunction/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/ExternalFunction/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+SimpleTransform: lib $(BINTARGETDIR)/SimpleTransform
+
+$(BINTARGETDIR)/SimpleTransform: ${ALL_OBJECTS_DIR}/SimpleTransform.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleTransform/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleTransform/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+SimpleXPathAPI: lib $(BINTARGETDIR)/SimpleXPathAPI
+
+$(BINTARGETDIR)/SimpleXPathAPI: ${ALL_OBJECTS_DIR}/SimpleXPathAPI.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleXPathAPI/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/SimpleXPathAPI/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+StreamTransform: lib $(BINTARGETDIR)/StreamTransform
+
+$(BINTARGETDIR)/StreamTransform: ${ALL_OBJECTS_DIR}/StreamTransform.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/StreamTransform/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/StreamTransform/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+TraceListen: lib $(BINTARGETDIR)/TraceListen
+
+$(BINTARGETDIR)/TraceListen: ${ALL_OBJECTS_DIR}/TraceListen.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/TraceListen/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/TraceListen/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+UseStylesheetParam: lib $(BINTARGETDIR)/UseStylesheetParam
+
+$(BINTARGETDIR)/UseStylesheetParam: ${ALL_OBJECTS_DIR}/UseStylesheetParam.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/UseStylesheetParam/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/UseStylesheetParam/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+XalanTransform: lib $(BINTARGETDIR)/XalanTransform
+
+$(BINTARGETDIR)/XalanTransform: ${ALL_OBJECTS_DIR}/XalanTransform.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransform/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransform/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+XalanTransformerCallback: lib $(BINTARGETDIR)/XalanTransformerCallback
+
+$(BINTARGETDIR)/XalanTransformerCallback: ${ALL_OBJECTS_DIR}/XalanTransformerCallback.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransformerCallback/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XalanTransformerCallback/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+XPathWrapper: lib $(BINTARGETDIR)/XPathWrapper
+
+$(BINTARGETDIR)/XPathWrapper: ${ALL_OBJECTS_DIR}/XPathWrapper.o ${ALL_OBJECTS_DIR}/TestDriver.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XPathWrapper/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(SAMPLES_DIR)/XPathWrapper/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+Tests: lib ThreadTest
+
+ThreadTest: lib $(BINTARGETDIR)/ThreadTest
+
+$(BINTARGETDIR)/ThreadTest: ${ALL_OBJECTS_DIR}/ThreadTest.o
+ifeq ($(PLATFORM), OS390)
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} $(LIB_DIR)/lib$(PROJECT_NAME)$(VER).x $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(TESTS_DIR)/Threads/%.cpp
+ $(CC3) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+else
+ ${LINK} $(XSL_BUILD_OPTIONS) ${PLATFORM_LIB_LINK_OPTIONS} ${LIBRARY_SEARCH_PATHS} \
+ ${EXTRA_LINK_OPTIONS} -L$(LIB_DIR) -l$(PROJECT_NAME)$(VER) $(ALLLIBS) $(CXXFLAGS) $^ -o $@
+${ALL_OBJECTS_DIR}/%.o:$(TESTS_DIR)/Threads/%.cpp
+ $(CC1) $(XSL_BUILD_OPTIONS) -c $(XSL_INCL) $(EXTRA_COMPILE_OPTIONS) -o $@ $<
+endif
+
+lib: prepare compile $(THISLIB)$(VER)$(SHLIBSUFFIX)
+
+$(THISLIB)$(VER)$(SHLIBSUFFIX): $(ALL_OBJECTS)
+ $(MAKE_SHARED) $(PLATFORM_LIBRARIES) $(EXTRA_LINK_OPTIONS) $(ALLLIBS) $^ -o $@
+ifeq ($(PLATFORM), OS390)
+ cp -p *.x ${LIB_DIR}
+endif
+
+clean:
+ rm -rf $(ALL_OBJECTS_DIR)/*
+ifeq ($(PLATFORM), TRU64)
+ rm -rf $(ALL_OBJECTS_DIR)/.cxx_repository
+endif
+ rm -f $(THISLIB)$(VER)$(SHLIBSUFFIX)
+ rm -f $(BINTARGETDIR)/testXSLT
+ rm -f $(BINTARGETDIR)/testXPath
+ rm -f ${LIB_DIR}/mod_xslt$(SHLIBSUFFIX)
+ rm -f $(BINTARGETDIR)/CompileStylesheet
+ rm -f $(BINTARGETDIR)/ExternalFunction
+ rm -f $(BINTARGETDIR)/SimpleTransform
+ rm -f $(BINTARGETDIR)/StreamTransform
+ rm -f $(BINTARGETDIR)/TraceListen
+ rm -f $(BINTARGETDIR)/UseStylesheetParam
+ rm -f $(BINTARGETDIR)/XalanTransform
+ rm -f $(BINTARGETDIR)/XPathWrapper
+
View
1,370 src/TestXSLT/process.cpp
@@ -0,0 +1,1370 @@
+/*
+ * The Apache Software License, Version 1.1
+ *
+ *
+ * Copyright (c) 1999-2000 The Apache Software Foundation. All rights
+ * reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ *
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in
+ * the documentation and/or other materials provided with the
+ * distribution.
+ *
+ * 3. The end-user documentation included with the redistribution,
+ * if any, must include the following acknowledgment:
+ * "This product includes software developed by the
+ * Apache Software Foundation (http://www.apache.org/)."
+ * Alternately, this acknowledgment may appear in the software itself,
+ * if and wherever such third-party acknowledgments normally appear.
+ *
+ * 4. The names "Xalan" and "Apache Software Foundation" must
+ * not be used to endorse or promote products derived from this
+ * software without prior written permission. For written
+ * permission, please contact apache@apache.org.
+ *
+ * 5. Products derived from this software may not be called "Apache",
+ * nor may "Apache" appear in their name, without prior written
+ * permission of the Apache Software Foundation.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
+ * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+ * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
+ * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ * ====================================================================
+ *
+ * This software consists of voluntary contributions made by many
+ * individuals on behalf of the Apache Software Foundation and was
+ * originally based on software copyright (c) 1999, International
+ * Business Machines, Inc., http://www.ibm.com. For more
+ * information on the Apache Software Foundation, please see
+ * <http://www.apache.org/>.
+ */
+
+#include <Include/PlatformDefinitions.hpp>
+
+
+
+#include <cstdio>
+#include <cstring>
+
+
+
+#if defined(XALAN_OLD_STREAM_HEADERS)
+#include <iostream.h>
+#else
+#include <iostream>
+#endif
+
+
+
+#if !defined(NDEBUG) && defined(_MSC_VER)
+#include <crtdbg.h>
+#endif
+
+
+
+#include <util/PlatformUtils.hpp>
+#include <sax/SAXException.hpp>
+
+
+
+#include <XalanDOM/XalanDOMException.hpp>
+
+
+
+#include <PlatformSupport/DOMStringHelper.hpp>
+#include <PlatformSupport/DOMStringPrintWriter.hpp>
+#include <PlatformSupport/XalanOutputStreamPrintWriter.hpp>
+#include <PlatformSupport/XalanFileOutputStream.hpp>
+#include <PlatformSupport/XalanStdOutputStream.hpp>
+
+
+
+#include <Include/XalanAutoPtr.hpp>
+
+
+
+#include <DOMSupport/DOMSupportDefault.hpp>
+
+
+
+#include <XPath/XObjectFactoryDefault.hpp>
+#include <XPath/XPathEnvSupportDefault.hpp>
+#include <XPath/XPath.hpp>
+#include <XPath/XPathExecutionContextDefault.hpp>
+#include <XPath/XPathFactoryBlock.hpp>
+#include <XPath/XPathFactoryDefault.hpp>
+#include <XPath/XPathProcessorImpl.hpp>
+
+
+
+#include <XalanExtensions/XalanExtensions.hpp>
+
+
+
+#include <XercesParserLiaison/XercesParserLiaison.hpp>
+#include <XercesParserLiaison/XercesDOMSupport.hpp>
+
+
+
+#include <XMLSupport/FormatterToDOM.hpp>
+#include <XMLSupport/FormatterToHTML.hpp>
+#include <XMLSupport/FormatterToNull.hpp>
+#include <XMLSupport/FormatterToText.hpp>
+#include <XMLSupport/FormatterToXML.hpp>
+#include <XMLSupport/FormatterTreeWalker.hpp>
+
+
+
+#include <XalanSourceTree/FormatterToSourceTree.hpp>
+#include <XalanSourceTree/XalanSourceTreeDOMSupport.hpp>
+#include <XalanSourceTree/XalanSourceTreeDocument.hpp>
+#include <XalanSourceTree/XalanSourceTreeInit.hpp>
+#include <XalanSourceTree/XalanSourceTreeParserLiaison.hpp>
+
+
+
+#include <XSLT/XSLTEngineImpl.hpp>
+#include <XSLT/XSLTInit.hpp>
+#include <XSLT/XSLTInputSource.hpp>
+#include <XSLT/XSLTResultTarget.hpp>
+#include <XSLT/StylesheetRoot.hpp>
+#include <XSLT/StylesheetConstructionContextDefault.hpp>
+#include <XSLT/StylesheetExecutionContextDefault.hpp>
+#include <XSLT/TraceListenerDefault.hpp>
+#include <XSLT/XSLTProcessorEnvSupportDefault.hpp>
+
+
+
+//#define XALAN_USE_ICU
+#if defined(XALAN_USE_ICU)
+#include <ICUBridge/ICUBridge.hpp>
+#include <ICUBridge/FunctionICUFormatNumber.hpp>
+#include <ICUBridge/ICUBridgeCollationCompareFunctor.hpp>
+#endif
+
+
+
+//#define XALAN_VQ_SPECIAL_TRACE
+#if defined(XALAN_VQ_SPECIAL_TRACE)
+#include "C:/Program Files/Rational/Quantify/pure.h"
+#endif
+
+
+
+#if !defined (XALAN_NO_NAMESPACES)
+using std::cerr;
+using std::cin;
+using std::cout;
+using std::endl;
+using std::hex;
+using std::pair;
+using std::vector;
+#endif
+
+
+
+/**
+ * Print argument options.
+ */
+void
+printArgOptions()
+{
+ cerr << endl
+ << "TestXSLT options: "
+ << endl
+ << endl
+ << "Options are not case-sensitive."
+ << endl
+ << endl
+ << " [-? Shows this message.]"
+ << endl
+ << endl
+ << " [-h Shows this message.]"
+ << endl
+ << endl
+ << " [-IN inputXMLURL (If not specified, stdin is used.)]"
+ << endl
+ << endl
+ << " [-XSL XSLTransformationURL]"
+ << endl
+ << " [-OUT outputFileName]"
+ << endl
+ << " [-V (Show version information only.)]"
+ << endl
+ << " [-QC (Quiet pattern conflicts warnings.)]"
+ << endl
+ << " [-Q (Use quiet mode.)]"
+ << endl
+ << " [-INDENT n (Controls how many spaces to indent. {default is 0})]"
+ << endl
+ << " [-VALIDATE (Controls whether validation occurs. Validation is off by default.)]"
+ << endl
+ << endl
+ << " [-TT (Trace the templates as they are being called.)]"
+ << endl
+ << " [-TG (Trace each generation event.)]"
+ << endl
+ << " [-TS (Trace each selection event.)]"
+ << endl
+ << " [-TTC (Trace the template children as they are being processed.)]"
+ << endl
+ << endl
+ << " [-XML (Use XML formatter and add XML header.)]"
+ << endl
+ << " [-TEXT (Use Text formatter.)]"
+ << endl
+ << " [-HTML (Use HTML formatter.)]"
+ << endl
+ << " [-DOM (Use DOM formatter. Formats to DOM, then formats XML for output.)]"
+ << endl
+ << " [-XST (Use source tree formatter. Formats to Xalan source tree, then formats XML for output.)]"
+ << endl
+ << endl
+ << " [-PARAM name expression (Sets a stylesheet parameter.)]"
+ << endl
+ << endl
+ << " [-XD (Use Xerces DOM instead of Xalan source tree.)]"
+ << endl
+ << endl
+ << " [-DE (Disable built-in extension functions.)]"
+ << endl
+ << " [-EN (Specify the namespace URI for Xalan extension functions. The default is 'http://xml.apache.org/xalan')]"
+ << endl
+ << endl
+ << "The following options are valid only with -HTML or -XML."
+ << endl
+ << endl
+ << " [-STRIPCDATA (Strip CDATA sections of their brackets, but don't escape.)"
+ << endl
+ << " [-ESCAPECDATA (Strip CDATA sections of their brackets, but escape.)"
+ << endl
+ << endl
+ << "The following option is valid only with -HTML."
+ << endl
+ << endl
+ << " [-NOINDENT (Turns off HTML indenting..]"
+ << endl
+ << endl
+ << "The following option is valid only with -XML."
+ << endl
+ << endl
+ << " [-NH (Don't write XML header.)]"
+ << endl;
+}
+
+
+
+typedef vector<pair<const char*, const char*> > StringPairVectorType;
+
+
+
+struct CmdLineParams
+{
+ StringPairVectorType params;
+
+ bool escapeCData;
+ bool setQuietConflictWarnings;
+ bool setQuietMode;
+ bool stripCData;
+ bool versionOnly;
+ bool traceTemplates;
+ bool traceGenerationEvent;
+ bool traceSelectionEvent;
+ bool traceTemplateChildren;
+ bool shouldWriteXMLHeader;
+ bool doValidation;
+ bool noIndent;
+ bool formatToNull;
+ bool formatToSourceTree;
+ bool useDOM;
+ bool disableExtensions;
+
+ int indentAmount;
+ int outputType;
+
+ const char* outFileName;
+ const char* xslFileName;
+ const char* inFileName;
+ const char* extentionsNamespace;
+
+ CmdLineParams() :
+ params(),
+ escapeCData(false),
+ setQuietConflictWarnings(false),
+ setQuietMode(false),
+ stripCData(false),
+ versionOnly(false),
+ traceTemplates(false),
+ traceGenerationEvent(false),
+ traceSelectionEvent(false),
+ traceTemplateChildren(false),
+ shouldWriteXMLHeader(true),
+ doValidation(false),
+ noIndent(false),
+ formatToNull(false),
+ formatToSourceTree(false),
+ useDOM(false),
+ disableExtensions(false),
+ indentAmount(-1),
+ outputType(-1),
+ outFileName(0),
+ xslFileName(0),
+ inFileName(0),
+ extentionsNamespace(0)
+ {
+ }
+};
+
+
+
+void
+warnPreviousOutputMethod(int outputMethod)
+{
+ cerr << endl << "Warning: Ignoring previous output method switch ";
+
+ switch(outputMethod)
+ {
+ case FormatterListener::OUTPUT_METHOD_XML:
+ cerr << "-XML.";
+ break;
+
+ case FormatterListener::OUTPUT_METHOD_TEXT:
+ cerr << "-TEXT.";
+ break;
+
+ case FormatterListener::OUTPUT_METHOD_HTML:
+ cerr << "-HTML.";
+ break;
+
+ case FormatterListener::OUTPUT_METHOD_DOM:
+ cerr << "-DOM.";
+ break;
+ }
+
+ cerr << endl << endl;
+}
+
+
+
+#if defined(OS390)
+#include <strings.h>
+
+int
+compareNoCase(
+ const char* str1,
+ const char* str2)
+{
+ return strcasecmp(str1, str2);
+}
+
+#else
+
+int
+compareNoCase(
+ const char* str1,
+ const char* str2)
+{
+ return stricmp(str1, str2);
+}
+
+#endif
+
+
+
+bool
+getArgs(
+ int argc,
+ const char* argv[],
+ CmdLineParams& p)
+{
+ bool fSuccess = true;
+
+ for (int i = 1; i < argc && fSuccess == true; ++i)
+ {
+ if (!compareNoCase("-h", argv[i]) || !compareNoCase("-?", argv[i]))
+ {
+ fSuccess = false;
+ }
+ else if (!compareNoCase("-IN", argv[i]))
+ {
+ ++i;
+
+ if(i < argc && argv[i][0] != '-')
+ {
+ p.inFileName = argv[i];
+ }
+ else
+ {
+ fSuccess = false;
+ }
+ }
+ else if (!compareNoCase("-XSL", argv[i]))
+ {
+ ++i;
+
+ if(i < argc && argv[i][0] != '-')
+ {
+ p.xslFileName = argv[i];
+ }
+ else
+ {
+ fSuccess = false;
+ }
+ }
+ else if (!compareNoCase("-OUT", argv[i]))
+ {
+ ++i;
+
+ if(i < argc && argv[i][0] != '-')
+ {
+ p.outFileName = argv[i];
+ }
+ else
+ {
+ fSuccess = false;
+ }
+ }
+ else if (!compareNoCase("-NOINDENT", argv[i]))
+ {
+ p.noIndent = true;
+ }
+ else if (!compareNoCase("-INDENT", argv[i]))
+ {
+ ++i;
+
+ if(i < argc && argv[i][0] != '-')
+ {
+ p.indentAmount = atoi(argv[i]);
+ }
+ else
+ {
+ fSuccess = false;
+ }
+ }
+ else if(!compareNoCase("-VALIDATE", argv[i]))
+ {
+ p.doValidation = true;
+ }
+ else if (!compareNoCase("-PARAM", argv[i]))
+ {
+ ++i;
+
+ if(i < argc && argv[i][0] != '-')
+ {
+ const char* const name = argv[i];
+
+ ++i;
+
+ // Don't check for '-' here, since that might
+ // be a valid character in a parameter value.
+ if(i < argc)
+ {
+ typedef StringPairVectorType::value_type value_type;
+
+ p.params.push_back(value_type(name, argv[i]));
+ }
+ else
+ {
+ fSuccess = false;
+ }
+ }
+ else
+ {
+ fSuccess = false;
+ }
+ }
+ else if(!compareNoCase("-V", argv[i]))
+ {
+ p.versionOnly = true;
+ }
+ else if(!compareNoCase("-QC", argv[i]))
+ {
+ p.setQuietConflictWarnings = true;
+ }
+ else if(!compareNoCase("-Q", argv[i]))
+ {
+ p.setQuietMode = true;
+ }
+ else if(!compareNoCase("-XML", argv[i]))
+ {
+ if (p.outputType != -1)
+ {
+ warnPreviousOutputMethod(p.outputType);
+ }
+
+ p.outputType = FormatterListener::OUTPUT_METHOD_XML;
+ }
+ else if(!compareNoCase("-TEXT", argv[i]))
+ {
+ if (p.outputType != -1)
+ {
+ warnPreviousOutputMethod(p.outputType);
+ }
+
+ p.outputType = FormatterListener::OUTPUT_METHOD_TEXT;
+ }
+ else if(!compareNoCase("-HTML", argv[i]))
+ {
+ if (p.outputType != -1)
+ {
+ warnPreviousOutputMethod(p.outputType);
+ }
+
+ p.outputType = FormatterListener::OUTPUT_METHOD_HTML;
+ }
+ else if(!compareNoCase("-DOM", argv[i]))
+ {
+ if (p.outputType != -1)
+ {
+ warnPreviousOutputMethod(p.outputType);
+ }
+
+ p.outputType = FormatterListener::OUTPUT_METHOD_DOM;
+ }
+ else if(!compareNoCase("-XST", argv[i]))
+ {
+ if (p.outputType != -1)
+ {
+ warnPreviousOutputMethod(p.outputType);
+ }
+
+ p.outputType = FormatterListener::OUTPUT_METHOD_DOM;
+
+ p.formatToSourceTree = true;
+ }
+ else if(!compareNoCase("-NULL", argv[i]))
+ {
+ p.formatToNull = true;
+ }
+ else if(!compareNoCase("-STRIPCDATA", argv[i]))
+ {
+ p.stripCData = true;
+ }
+ else if(!compareNoCase("-ESCAPECDATA", argv[i]))
+ {
+ p.escapeCData = true;
+ }
+ else if (!compareNoCase("-NH", argv[i]))
+ {
+ p.shouldWriteXMLHeader = false;
+ }
+ else if(!compareNoCase("-TT", argv[i]))
+ {
+ p.traceTemplates = true;
+ }
+ else if(!compareNoCase("-TG", argv[i]))
+ {
+ p.traceGenerationEvent = true;
+ }
+ else if(!compareNoCase("-TS", argv[i]))
+ {
+ p.traceSelectionEvent = true;
+ }
+ else if(!compareNoCase("-TTC", argv[i]))
+ {
+ p.traceTemplateChildren = true;
+ }
+ else if (!compareNoCase("-XD", argv[i]))
+ {
+ p.useDOM = true;
+ }
+ else if (!compareNoCase("-DE", argv[i]))
+ {
+ p.disableExtensions = true;
+ }
+ else if (!compareNoCase("-EN", argv[i]))
+ {
+ ++i;
+
+ if(i < argc)
+ {
+ p.extentionsNamespace = argv[i];
+
+ if (strlen(p.extentionsNamespace) == 0)
+ {
+ fSuccess = false;
+ }
+ }
+ else
+ {
+ fSuccess = false;
+ }
+ }
+ else
+ {
+ cerr << endl << "Warning: Ignoring unknown option \"" << argv[i] << "\"." << endl << endl;
+ }
+ }
+
+ return fSuccess;
+}
+
+
+
+FormatterListener*
+createFormatter(
+ int outputType,
+ bool shouldWriteXMLHeader,
+ bool stripCData,
+ bool escapeCData,
+ bool noIndent,
+ bool formatToNull,
+ bool formatToSourceTree,
+ PrintWriter& resultWriter,
+ int indentAmount,
+ const XalanDOMString& mimeEncoding,
+ const StylesheetRoot* stylesheet,
+ XMLParserLiaison& parserLiaison,
+ XalanSourceTreeParserLiaison& sourceTreeParserLiaison,
+ const PrefixResolver& prefixResolver,
+ const XalanDocument*& theResultDocument)
+{
+ FormatterListener* formatter = 0;
+
+ if (formatToNull == true)
+ {
+ formatter = new FormatterToNull;
+ }
+ else if(FormatterListener::OUTPUT_METHOD_XML == outputType)
+ {
+ XalanDOMString version;
+ bool outputIndent = false;
+ XalanDOMString mediatype;
+ XalanDOMString doctypeSystem;
+ XalanDOMString doctypePublic;
+ XalanDOMString standalone;
+
+ if (stylesheet != 0)
+ {
+ version = stylesheet->m_version;
+
+ mediatype = stylesheet->m_mediatype;
+ doctypeSystem = stylesheet->getOutputDoctypeSystem();
+ doctypePublic = stylesheet->getOutputDoctypePublic();
+ standalone = stylesheet->m_standalone;
+ }
+
+ FormatterToXML* const fToXML =
+ new FormatterToXML(
+ resultWriter,
+ version,
+ outputIndent,
+ indentAmount,
+ mimeEncoding,
+ mediatype,
+ doctypeSystem,
+ doctypePublic,
+ true, // xmlDecl
+ standalone);
+
+ fToXML->setShouldWriteXMLHeader(shouldWriteXMLHeader);
+ fToXML->setStripCData(stripCData);
+ fToXML->setEscapeCData(escapeCData);
+
+ formatter = fToXML;
+ }
+ else if(FormatterListener::OUTPUT_METHOD_TEXT == outputType)
+ {
+ formatter = new FormatterToText(resultWriter, mimeEncoding);
+ }
+ else if(FormatterListener::OUTPUT_METHOD_HTML == outputType)
+ {
+ XalanDOMString version;
+ bool outputIndent = !noIndent;
+ XalanDOMString mediatype;
+ XalanDOMString doctypeSystem;
+ XalanDOMString doctypePublic;
+ XalanDOMString standalone;
+
+ if (stylesheet != 0)
+ {
+ version = stylesheet->m_version;
+
+ if (noIndent == false)
+ {
+ outputIndent = stylesheet->getOutputIndent();
+ }
+
+ mediatype = stylesheet->m_mediatype;
+ doctypeSystem = stylesheet->getOutputDoctypeSystem();
+ doctypePublic = stylesheet->getOutputDoctypePublic();
+ standalone = stylesheet->m_standalone;
+ }
+
+ FormatterToHTML* const fToHTML =
+ new FormatterToHTML(
+ resultWriter,
+ mimeEncoding,
+ mediatype,
+ doctypeSystem,
+ doctypePublic,
+ outputIndent,
+ indentAmount,
+ version,
+ standalone,
+ false); // xmlDecl
+
+ fToHTML->setStripCData(stripCData);
+ fToHTML->setPrefixResolver(&prefixResolver);
+
+ formatter = fToHTML;
+ }
+ else if(FormatterListener::OUTPUT_METHOD_DOM == outputType)
+ {
+ if (formatToSourceTree == true)
+ {
+ XalanSourceTreeDocument* theDocument =
+ sourceTreeParserLiaison.createXalanSourceTreeDocument();
+ assert(theDocument != 0);
+
+ theResultDocument = theDocument;
+
+ FormatterToSourceTree* const fToSourceTree =
+ new FormatterToSourceTree(theDocument);
+
+ fToSourceTree->setPrefixResolver(&prefixResolver);
+
+ formatter = fToSourceTree;
+ }
+ else
+ {
+ XalanDocument* const theDocument =
+ parserLiaison.createDOMFactory();
+ assert(theDocument != 0);
+
+ theResultDocument = theDocument;
+
+ FormatterToDOM* const fToDOM =
+ new FormatterToDOM(theDocument, 0);
+
+ fToDOM->setPrefixResolver(&prefixResolver);
+
+ formatter = fToDOM;
+ }
+ }
+
+ return formatter;
+}
+
+
+
+XalanOutputStream*
+createOutputStream(const CmdLineParams& params)
+{
+ if (params.outFileName == 0)
+ {
+ return new XalanStdOutputStream(cout);
+ }
+ else
+ {
+ return new XalanFileOutputStream(TranscodeFromLocalCodePage(params.outFileName));
+ }
+}
+
+
+
+TraceListener*
+createTraceListener(
+ const CmdLineParams& params,
+ PrintWriter& diagnosticsWriter)
+{
+ if (params.traceTemplates == true ||
+ params.traceTemplateChildren == true ||
+ params.traceGenerationEvent == true ||
+ params.traceSelectionEvent == true)
+ {
+ return new TraceListenerDefault(
+ diagnosticsWriter,
+ params.traceTemplates,
+ params.traceTemplateChildren,
+ params.traceGenerationEvent,
+ params.traceSelectionEvent);
+ }
+ else
+ {
+ return 0;
+ }
+
+}
+
+
+
+DOMSupport&
+getDOMSupport(
+ XalanSourceTreeDOMSupport& theXalanSourceTreeDOMSupport,
+ XercesDOMSupport& theXercesDOMSupport,
+ const CmdLineParams& params)
+{
+ if (params.useDOM == false)
+ {
+ return theXalanSourceTreeDOMSupport;
+ }
+ else
+ {
+ return theXercesDOMSupport;
+ }
+}
+
+
+
+XMLParserLiaison&
+getParserLiaison(
+ XalanSourceTreeParserLiaison& theXalanSourceTreeParserLiaison,
+ XercesParserLiaison& theXercesParserLiaison,
+ const CmdLineParams& params)
+{
+ if (params.useDOM == false)
+ {
+ return theXalanSourceTreeParserLiaison;
+ }
+ else
+ {
+ return theXercesParserLiaison;
+ }
+}
+
+
+
+void
+installExtensions(
+ const CmdLineParams& params,
+ XSLTProcessorEnvSupportDefault& theXSLProcessorSupport)
+{
+ XalanDOMString theXalanNamespace;
+
+ if (params.extentionsNamespace != 0)
+ {