Browse files

This commit was manufactured by cvs2svn to create tag

'Root_MAINT_0_3_8'.
  • Loading branch information...
1 parent bd075d2 commit 420f783e538b0e0ef888aeaedfac9af4cbfcf799 (no author) committed Nov 20, 2006
Showing with 0 additions and 2,275 deletions.
  1. +0 −13 CVSROOT/checkoutlist
  2. +0 −15 CVSROOT/commitinfo
  3. +0 −21 CVSROOT/config
  4. +0 −75 CVSROOT/cvswrappers
  5. +0 −21 CVSROOT/editinfo
  6. +0 −27 CVSROOT/loginfo
  7. +0 −26 CVSROOT/modules
  8. +0 −12 CVSROOT/notify
  9. +0 −1 CVSROOT/passwd
  10. +0 −13 CVSROOT/rcsinfo
  11. +0 −2 CVSROOT/readers
  12. +0 −20 CVSROOT/taginfo
  13. +0 −21 CVSROOT/verifymsg
  14. +0 −8 libxslt/.cvsignore
  15. +0 −14 libxslt/CHANGELOG
  16. +0 −21 libxslt/LICENSE
  17. +0 −49 libxslt/README
  18. +0 −245 libxslt/Rakefile
  19. +0 −32 libxslt/TODO
  20. +0 −6 libxslt/ext/xml/.cvsignore
  21. +0 −97 libxslt/ext/xml/extconf.rb
  22. +0 −247 libxslt/ext/xml/libxslt.c
  23. +0 −52 libxslt/ext/xml/libxslt.h
  24. +0 −298 libxslt/ext/xml/ruby_xslt_stylesheet.c
  25. +0 −21 libxslt/ext/xml/ruby_xslt_stylesheet.h
  26. +0 −63 libxslt/ext/xml/ruby_xslt_transform_context.c
  27. +0 −22 libxslt/ext/xml/ruby_xslt_transform_context.h
  28. +0 −1 libxslt/tests/.cvsignore
  29. +0 −34 libxslt/tests/commentary.dtd
  30. +0 −15 libxslt/tests/fuzface.rb
  31. +0 −154 libxslt/tests/fuzface.xml
  32. +0 −4 libxslt/tests/fuzface.xsl
  33. +0 −46 libxslt/tests/ramblings.xsl
  34. +0 −65 libxslt/tests/tc_libxslt.rb
  35. +0 −41 libxslt/tests/tc_xslt_stylesheet.rb
  36. +0 −41 libxslt/tests/tc_xslt_stylesheet2.rb
  37. +0 −2 www/.cvsignore
  38. +0 −85 www/Rakefile
  39. +0 −33 www/doc/layouts/normal.html
  40. +0 −11 www/doc/pages/COMMON.rb
  41. +0 −33 www/doc/pages/index.thtml
  42. +0 −59 www/doc/pages/install.thtml
  43. +0 −20 www/doc/pages/license.html
  44. BIN www/doc/res/images/rote-tiny.png
  45. +0 −189 www/doc/res/stylesheets/normal.css
View
13 CVSROOT/checkoutlist
@@ -1,13 +0,0 @@
-# The "checkoutlist" file is used to support additional version controlled
-# administrative files in $CVSROOT/CVSROOT, such as template files.
-#
-# The first entry on a line is a filename which will be checked out from
-# the corresponding RCS file in the $CVSROOT/CVSROOT directory.
-# The remainder of the line is an error message to use if the file cannot
-# be checked out.
-#
-# File format:
-#
-# [<whitespace>]<filename>[<whitespace><error message>]<end-of-line>
-#
-# comment lines begin with '#'
View
15 CVSROOT/commitinfo
@@ -1,15 +0,0 @@
-# The "commitinfo" file is used to control pre-commit checks.
-# The filter on the right is invoked with the repository and a list
-# of files to check. A non-zero exit of the filter program will
-# cause the commit to be aborted.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being committed to, relative
-# to the $CVSROOT. For the first match that is found, then the remainder
-# of the line is the name of the filter to run.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
View
21 CVSROOT/config
@@ -1,21 +0,0 @@
-# Set this to "no" if pserver shouldn't check system users/passwords
-#SystemAuth=no
-
-# Put CVS lock files in this directory rather than directly in the repository.
-LockDir=/var/cvslocks/
-
-# Set `TopLevelAdmin' to `yes' to create a CVS directory at the top
-# level of the new working directory when using the `cvs checkout'
-# command.
-#TopLevelAdmin=no
-
-# Set `LogHistory' to `all' or `TOFEWGCMAR' to log all transactions to the
-# history file, or a subset as needed (ie `TMAR' logs all write operations)
-#LogHistory=TOFEWGCMAR
-
-# Set `RereadLogAfterVerify' to `always' (the default) to allow the verifymsg
-# script to change the log message. Set it to `stat' to force CVS to verify# that the file has changed before reading it (this can take up to an extra
-# second per directory being committed, so it is not recommended for large
-# repositories. Set it to `never' (the previous CVS behavior) to prevent
-# verifymsg scripts from changing the log message.
-#RereadLogAfterVerify=always
View
75 CVSROOT/cvswrappers
@@ -1,75 +0,0 @@
-# This file affects handling of files based on their names.
-#
-# The -m option specifies whether CVS attempts to merge files.
-#
-# The -k option specifies keyword expansion (e.g. -kb for binary).
-#
-# Format of wrapper file ($CVSROOT/CVSROOT/cvswrappers or .cvswrappers)
-#
-# wildcard [option value][option value]...
-#
-# where option is one of
-# -f from cvs filter value: path to filter
-# -t to cvs filter value: path to filter
-# -m update methodology value: MERGE or COPY
-# -k expansion mode value: b, o, kkv, &c
-#
-# and value is a single-quote delimited value.
-# For example:
-#*.gif -k 'b'
-*.JPG -k 'b' -m 'COPY'
-*.avi -k 'b' -m 'COPY'
-*.bin -k 'b' -m 'COPY'
-*.bz -k 'b' -m 'COPY'
-*.bz2 -k 'b' -m 'COPY'
-*.doc -k 'b' -m 'COPY'
-*.exe -k 'b' -m 'COPY'
-*.gif -k 'b' -m 'COPY'
-*.gz -k 'b' -m 'COPY'
-*.hqx -k 'b' -m 'COPY'
-*.jar -k 'b' -m 'COPY'
-*.jpeg -k 'b' -m 'COPY'
-*.jpg -k 'b' -m 'COPY'
-*.mov -k 'b' -m 'COPY'
-*.mp3 -k 'b' -m 'COPY'
-*.mpg -k 'b' -m 'COPY'
-*.pdf -k 'b' -m 'COPY'
-*.png -k 'b' -m 'COPY'
-*.ppt -k 'b' -m 'COPY'
-*.rpm -k 'b' -m 'COPY'
-*.sit -k 'b' -m 'COPY'
-*.srpm -k 'b' -m 'COPY'
-*.swf -k 'b' -m 'COPY'
-*.tar -k 'b' -m 'COPY'
-*.tbz -k 'b' -m 'COPY'
-*.tgz -k 'b' -m 'COPY'
-*.tif -k 'b' -m 'COPY'
-*.tiff -k 'b' -m 'COPY'
-*.xbm -k 'b' -m 'COPY'
-*.xls -k 'b' -m 'COPY'
-*.zip -k 'b' -m 'COPY'
-*.keystore -k 'b' -m 'COPY'
-# File types added by Borland JBuilder
-*.aiff -k 'b'
-*.midi -k 'b'
-*.jds -k 'b'
-*.asx -k 'b'
-*.wav -k 'b'
-*.war -k 'b'
-*.ear -k 'b'
-*.obj -k 'b'
-*.dcu -k 'b'
-*.class -k 'b'
-*.au -k 'b'
-*.eargrp -k 'b'
-*.jpe -k 'b'
-*.o -k 'b'
-*.asf -k 'b'
-*.rar -k 'b'
-*.library -k 'b'
-*.ejbgrp -k 'b'
-*.ram -k 'b'
-*.ejbgrpx -k 'b'
-*.mid -k 'b'
-*.rmf -k 'b'
-
View
21 CVSROOT/editinfo
@@ -1,21 +0,0 @@
-# The "editinfo" file is used to allow verification of logging
-# information. It works best when a template (as specified in the
-# rcsinfo file) is provided for the logging procedure. Given a
-# template with locations for, a bug-id number, a list of people who
-# reviewed the code before it can be checked in, and an external
-# process to catalog the differences that were code reviewed, the
-# following test can be applied to the code:
-#
-# Making sure that the entered bug-id number is correct.
-# Validating that the code that was reviewed is indeed the code being
-# checked in (using the bug-id number or a seperate review
-# number to identify this particular code set.).
-#
-# If any of the above test failed, then the commit would be aborted.
-#
-# Actions such as mailing a copy of the report to each reviewer are
-# better handled by an entry in the loginfo file.
-#
-# One thing that should be noted is the the ALL keyword is not
-# supported. There can be only one entry that matches a given
-# repository.
View
27 CVSROOT/loginfo
@@ -1,27 +0,0 @@
-# The "loginfo" file controls where "cvs commit" log information
-# is sent. The first entry on a line is a regular expression which must match
-# the directory that the change is being made to, relative to the
-# $CVSROOT. If a match is found, then the remainder of the line is a filter
-# program that should expect log information on its standard input.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name ALL appears as a regular expression it is always used
-# in addition to the first matching regex or DEFAULT.
-#
-# You may specify a format string as part of the
-# filter. The string is composed of a `%' followed
-# by a single format character, or followed by a set of format
-# characters surrounded by `{' and `}' as separators. The format
-# characters are:
-#
-# s = file name
-# V = old version number (pre-checkin)
-# v = new version number (post-checkin)
-#
-# For example:
-#DEFAULT (echo ""; id; echo %s; date; cat) >> $CVSROOT/CVSROOT/commitlog
-# or
-#DEFAULT (echo ""; id; echo %{sVv}; date; cat) >> $CVSROOT/CVSROOT/commitlog
-DEFAULT /var/cvs/commitmailer.sh %s tom@infoether.com
View
26 CVSROOT/modules
@@ -1,26 +0,0 @@
-# Three different line formats are valid:
-# key -a aliases...
-# key [options] directory
-# key [options] directory files...
-#
-# Where "options" are composed of:
-# -i prog Run "prog" on "cvs commit" from top-level of module.
-# -o prog Run "prog" on "cvs checkout" of module.
-# -e prog Run "prog" on "cvs export" of module.
-# -t prog Run "prog" on "cvs rtag" of module.
-# -u prog Run "prog" on "cvs update" of module.
-# -d dir Place module in directory "dir" instead of module name.
-# -l Top-level directory only -- do not recurse.
-#
-# NOTE: If you change any of the "Run" options above, you'll have to
-# release and re-checkout any working directories of these modules.
-#
-# And "directory" is a path to a directory relative to $CVSROOT.
-#
-# The "-a" option specifies an alias. An alias is interpreted as if
-# everything on the right of the "-a" had been typed on the command line.
-#
-# You can encode a module within a module by using the special '&'
-# character to interpose another module into the current module. This
-# can be useful for creating a module that consists of many directories
-# spread out over the entire source repository.
View
12 CVSROOT/notify
@@ -1,12 +0,0 @@
-# The "notify" file controls where notifications from watches set by
-# "cvs watch add" or "cvs edit" are sent. The first entry on a line is
-# a regular expression which is tested against the directory that the
-# change is being made to, relative to the $CVSROOT. If it matches,
-# then the remainder of the line is a filter program that should contain
-# one occurrence of %s for the user to notify, and information on its
-# standard input.
-#
-# "ALL" or "DEFAULT" can be used in place of the regular expression.
-#
-# For example:
-#ALL mail -s "CVS notification" %s
View
1 CVSROOT/passwd
@@ -1 +0,0 @@
-anonymous:$1$0H$2/LSjjwDfsSA0gaDYY5Df/:tutorials
View
13 CVSROOT/rcsinfo
@@ -1,13 +0,0 @@
-# The "rcsinfo" file is used to control templates with which the editor
-# is invoked on commit and import.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being made to, relative to the
-# $CVSROOT. For the first match that is found, then the remainder of the
-# line is the name of the file that contains the template.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
View
2 CVSROOT/readers
@@ -1,2 +0,0 @@
-anonymous::anonymous
-
View
20 CVSROOT/taginfo
@@ -1,20 +0,0 @@
-# The "taginfo" file is used to control pre-tag checks.
-# The filter on the right is invoked with the following arguments:
-#
-# $1 -- tagname
-# $2 -- operation "add" for tag, "mov" for tag -F, and "del" for tag -d
-# $3 -- repository
-# $4-> file revision [file revision ...]
-#
-# A non-zero exit of the filter program will cause the tag to be aborted.
-#
-# The first entry on a line is a regular expression which is tested
-# against the directory that the change is being committed to, relative
-# to the $CVSROOT. For the first match that is found, then the remainder
-# of the line is the name of the filter to run.
-#
-# If the repository name does not match any of the regular expressions in this
-# file, the "DEFAULT" line is used, if it is specified.
-#
-# If the name "ALL" appears as a regular expression it is always used
-# in addition to the first matching regex or "DEFAULT".
View
21 CVSROOT/verifymsg
@@ -1,21 +0,0 @@
-# The "verifymsg" file is used to allow verification of logging
-# information. It works best when a template (as specified in the
-# rcsinfo file) is provided for the logging procedure. Given a
-# template with locations for, a bug-id number, a list of people who
-# reviewed the code before it can be checked in, and an external
-# process to catalog the differences that were code reviewed, the
-# following test can be applied to the code:
-#
-# Making sure that the entered bug-id number is correct.
-# Validating that the code that was reviewed is indeed the code being
-# checked in (using the bug-id number or a seperate review
-# number to identify this particular code set.).
-#
-# If any of the above test failed, then the commit would be aborted.
-#
-# Actions such as mailing a copy of the report to each reviewer are
-# better handled by an entry in the loginfo file.
-#
-# One thing that should be noted is the the ALL keyword is not
-# supported. There can be only one entry that matches a given
-# repository.
View
8 libxslt/.cvsignore
@@ -1,8 +0,0 @@
-.project
-.cdtproject
-Makefile
-extconf.h
-mkmf.log
-html
-pkg
-
View
14 libxslt/CHANGELOG
@@ -1,14 +0,0 @@
-27.02.2006 Ross Bamford <rosco at roscopeco.co.uk>
- * Source layout for Rubygem release
- * Fixed unit tests (set_up to setup, directory handling)
- * Updated extconf to remove shell-script dependency
- * Fixed multiple symbol declarations for -fno-common
-
-15.12.2003 Martin Povolny <martin@solnet.cz>
- * libxslt.c: added call to exsltRegisterAll to enable exslt extensions
- * extconf.rb: added -lexslt
-
-2.1.2004 Martin Povolny <martin@solnet.cz>
- * libxslt.c: added call to ruby_init_xslt_transform_context() to make it
- work on ruby1.8
-
View
21 libxslt/LICENSE
@@ -1,21 +0,0 @@
-# $Id$
-
-Copyright (c) 2002-2006 Sean Chittenden <sean@chittenden.org> and contributors
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.
View
49 libxslt/README
@@ -1,49 +0,0 @@
-== INSTALLATION
-
-Installation is simple. Follow the following steps:
-
-=== Rubygems
-
- gem install libxslt-ruby
-
-=== Tarball/zip
-
- $ rake test
- $ rake install
-
-If extconf yacks up an error, follow the instructions it provides.
-You will need to chdir to ext/xml and run 'ruby extconf.rb' to provide
-options, after which you can either use Rake for everything or
-do with make (make && make install).
-
-Once installed, look at the test scripts (tests/*.rb), and run
-'rake doc' to generate API documentation.
-
-== DOCUMENTATION
-
-RDoc comments are included - run 'rake doc' to generate documentation.
-You can find the latest documentation at:
-
-* http://libxml.rubyforge.org/doc/xslt
-
-== USAGE EXAMPLE
-
-*Note*: To use libxslt, you have to require both 'xml/libxml' and 'xml/libxslt'.
-
- $ cd tests
- $ ruby fuzface.rb
-
-== If you checked out from CVS
-
-If you checked out the source from CVS, you must install a copy of
-the current (or matching) libxml-ruby headers in:
-
- ext/xml/libxml-ruby
-
-prior to running the above. This can be done via rake, and will
-happen automatically if ../libxml/ext/xml is found, or the
-LIBXMLH=/path/to/headers commandline option is supplied.
-
-# $Id$
-
-# See the LICENSE file for copyright and distribution information
View
245 libxslt/Rakefile
@@ -1,245 +0,0 @@
-require 'net/ftp'
-require 'rake/clean'
-require 'rake/testtask'
-require 'rake/rdoctask'
-require 'rake/gempackagetask'
-
-CLEAN.include '**/*.o'
-CLEAN.include '**/*.so'
-CLEAN.include 'html'
-CLEAN.include 'tests/fuzface.html'
-CLOBBER.include '**/*.log'
-CLOBBER.include '**/Makefile'
-CLOBBER.include '**/extconf.h'
-
-desc "Default Task (Build release)"
-task :default => :test
-
-# Determine the current version of the software
-if File.read('ext/xml/libxslt.h') =~ /\s*RUBY_LIBXSLT_VERSION\s*['"](\d.+)['"]/
- CURRENT_VERSION = $1
-else
- CURRENT_VERSION = "0.0.0"
-end
-
-PKG_VERSION = ENV['REL'] || CURRENT_VERSION
-LIBXMLH = ENV['LIBXMLH'] || '../libxml/ext/xml'
-
-task :test_ver do
- puts PKG_VERSION
-end
-
-# Make tasks -----------------------------------------------------
-MAKECMD = ENV['MAKE_CMD'] || 'make'
-MAKEOPTS = ENV['MAKE_OPTS'] || ''
-
-# Copy libxml headers in if needed or official release
-task :copy_libxml_headers do
- rm_rf 'ext/xml/libxml-ruby' if ENV['REL'] || ENV['ALLCLEAN']
-
- unless File.exist?('ext/xml/libxml-ruby')
- unless File.exist?(LIBXMLH)
- fail <<-EOM
-
- LibXML-Ruby headers are required to build a release.
-
- Install libxml-ruby source at ../libxml, or supply
- LIBXMLH option to rake (e.g. LIBXMLH=../myinc/path)
-
- EOM
- end
-
- mkdir 'ext/xml/libxml-ruby'
-
- Dir[File.join(LIBXMLH, '*.h')].each do |fn|
- unless fn =~ /extconf.h$/
- File.open(File.join('ext/xml/libxml-ruby', File.basename(fn)), 'w+') do |f|
- f << "/* DO NOT EDIT THIS FILE - UPDATE FROM LIBXML-RUBY ONLY */\n"
- f << "/* Generated: #{Time.now} */\n"
- f << "/* Release : #{CURRENT_VERSION} */\n\n\n\n\n\n\n\n"
- f << File.read(fn)
- end
- end
- end
- end
-end
-
-file 'ext/xml/extconf.rb' => :copy_libxml_headers
-
-file 'ext/xml/Makefile' => 'ext/xml/extconf.rb' do
- Dir.chdir('ext/xml') do
- ruby 'extconf.rb'
- end
-end
-
-def make(target = '')
- Dir.chdir('ext/xml') do
- pid = fork { exec "#{MAKECMD} #{MAKEOPTS} #{target}" }
- Process.waitpid pid
- end
- $?.exitstatus
-end
-
-# Let make handle dependencies between c/o/so - we'll just run it.
-file 'ext/xml/libxslt.so' => 'ext/xml/Makefile' do
- m = make
- fail "Make failed (status #{m})" unless m == 0
-end
-
-desc "Compile the shared object"
-task :compile => 'ext/xml/libxslt.so'
-
-desc "Install to your site_ruby directory"
-task :install => :compile do
- m = make 'install'
- fail "Make install failed (status #{m})" unless m == 0
-end
-
-# Test Tasks ---------------------------------------------------------
-task :ta => :alltests
-task :tu => :unittests
-task :test => :unittests
-
-Rake::TestTask.new(:alltests) do |t|
- t.test_files = FileList[
- 'tests/tc_*.rb',
- 'tests/contrib/*.rb',
- ]
- t.verbose = true
-end
-
-Rake::TestTask.new(:unittests) do |t|
- t.test_files = FileList['tests/tc_*.rb']
- t.verbose = false
-end
-
-#Rake::TestTask.new(:funtests) do |t|
- # t.test_files = FileList['test/fun*.rb']
- #t.warning = true
- #t.warning = true
-#end
-
-task :unittests => :compile
-task :alltests => :compile
-
-# RDoc Tasks ---------------------------------------------------------
-desc "Create the RDOC documentation tree"
-rd = Rake::RDocTask.new(:doc) do |rdoc|
- rdoc.rdoc_dir = 'html'
- rdoc.title = "Libxslt-Ruby API"
- rdoc.options << '--main' << 'README'
- rdoc.rdoc_files.include('README', 'LICENSE', 'TODO')
- rdoc.rdoc_files.include('ext/xml/ruby_xslt*.c', 'ext/xml/libxslt.c', '*.rdoc')
-end
-
-desc "Publish the RDoc documentation to project web site"
-task :pubdoc => [ :doc ] do
- unless ENV['RUBYFORGE_ACCT']
- raise "Need to set RUBYFORGE_ACCT to your rubyforge.org user name (e.g. 'fred')"
- end
- require 'rake/contrib/sshpublisher'
- Rake::SshDirPublisher.new(
- "#{ENV['RUBYFORGE_ACCT']}@rubyforge.org",
- "/var/www/gforge-projects/libxml/doc/xslt",
- "html"
- ).upload
-end
-
-# Packaging / Version number tasks -----------------------------------
-#
-# You can create a Rubygem with 'rake package'
-#
-# You can build a release package set with 'rake release'
-#
-# The project can build official release packages with
-# 'rake release REL=x.y.z' in a working copy (with correct
-# libxml-ruby headers in ../libxml/ext/xml or alternative dir
-# specified with LIBXMLH=/path/to/headers/ )
-
-# Used during release packaging if a REL is supplied
-task :update_version do
- unless PKG_VERSION == CURRENT_VERSION
- maj, min, mic = /(\d+)\.(\d+)(?:\.(\d+))?/.match(PKG_VERSION).captures
- File.open('ext/xml/libxslt.h.new','w+') do |f|
- f << File.read('ext/xml/libxslt.h').
- gsub(/RUBY_LIBXSLT_VERSION\s+"(\d.+)"/) { "RUBY_LIBXSLT_VERSION \"#{PKG_VERSION}\"" }.
- gsub(/RUBY_LIBXSLT_VERNUM\s+\d+/) { "RUBY_LIBXSLT_VERNUM #{PKG_VERSION.tr('.','')}" }.
- gsub(/RUBY_LIBXSLT_VER_MAJ\s+\d+/) { "RUBY_LIBXSLT_VER_MAJ #{maj}" }.
- gsub(/RUBY_LIBXSLT_VER_MIN\s+\d+/) { "RUBY_LIBXSLT_VER_MIN #{min}" }.
- gsub(/RUBY_LIBXSLT_VER_MIC\s+\d+/) { "RUBY_LIBXSLT_VER_MIC #{mic || 0}" }
- end
- mv('ext/xml/libxslt.h.new', 'ext/xml/libxslt.h')
- end
-end
-
-PKG_FILES = FileList[
- 'ext/xml/extconf.rb',
- '[A-Z]*',
- 'ext/xml/*.c',
- 'ext/xml/libxml-ruby/*.h',
- 'ext/xml/ruby_xslt*.h',
- 'ext/xml/libxslt.h',
- 'tests/**/*',
-]
-
-if ! defined?(Gem)
- warn "Package Target requires RubyGEMs"
-else
- spec = Gem::Specification.new do |s|
-
- #### Basic information.
-
- s.name = 'libxslt-ruby'
- s.version = PKG_VERSION
- s.summary = "LibXSLT bindings for Ruby"
- s.description = <<-EOF
- C-language bindings for Gnome LibXSLT and Ruby.
- Part of the LibXML-Ruby project.
- EOF
- s.extensions = 'ext/xml/extconf.rb'
-
- #### Which files are to be included in this gem?
- s.files = PKG_FILES.to_a
-
- #### dependencies
- s.add_dependency('libxml-ruby', '>= 0.3.6')
-
- #### Load-time details
- s.require_path = 'ext'
-
- #### Documentation and testing.
- s.has_rdoc = true
- s.extra_rdoc_files = rd.rdoc_files.reject { |fn| fn =~ /\.rb$/ }.to_a
- s.rdoc_options <<
- '--title' << 'Libxslt-Ruby API' <<
- '--main' << 'README' <<
- '-o' << 'rdoc'
-
- s.test_files = Dir.glob('tests/*runner.rb')
-
- #### Author and project details.
-
- s.author = "Sean Chittenden"
- s.email = "libxml-devel@rubyforge.org"
- s.homepage = "http://libxml.rubyforge.org"
- s.rubyforge_project = "libxml"
- end
-
- # Quick fix for Ruby 1.8.3 / YAML bug
- if (RUBY_VERSION == '1.8.3')
- def spec.to_yaml
- out = super
- out = '--- ' + out unless out =~ /^---/
- out
- end
- end
-
- package_task = Rake::GemPackageTask.new(spec) do |pkg|
- pkg.need_zip = true
- pkg.need_tar_gz = true
- pkg.package_dir = 'pkg'
- end
-
- desc "Build a full release"
- task :release => [:clobber, :update_version, :compile, :test, :package]
-end
View
32 libxslt/TODO
@@ -1,32 +0,0 @@
-$Id$
-
-XML::XSLT needs a class method that'll let it use a stylesheet that's
-already in memory. Something like: xsl = XML::XSLT.string(stylesheet)
-
-Need version constants to be available for both LIBXML and LIBXSLT
-
-Need a way of changing the IO stream used for printing the output
-
-Should have some way of turning on more debugging that what's there
-
-Need to add the ability to save to a file
-
-Ability to dump the tree instead of the result to a given IO stream (partially completed, iirc)
-
-Ability to dump the registered extension elements and functions to a given IO stream
-
-Ability to turn on and off the DTD loading phase
-
-Ability to increase the maximum depth of applying templates
-
-Some way of specifying that the incoming document is xhtml and not xml
-
-Some way of specifying that the incoming document is SGML docbook
-
-A way of setting parameters (key/value pairs) before the stylesheet gets processed
-
-A way of not telling the XSL engine to not fetch DTDs over a network
-
-A way of specifying the SGML catalogs to use
-
-A way of turning on XInclude processing of the document input
View
6 libxslt/ext/xml/.cvsignore
@@ -1,6 +0,0 @@
-libxml-ruby
-
-extconf.h
-Makefile
-*.log
-*.so
View
97 libxslt/ext/xml/extconf.rb
@@ -1,97 +0,0 @@
-#!/usr/local/bin/ruby -w
-
-# $Id$
-#
-# See the LICENSE file for copyright and distribution information
-
-require "mkmf"
-
-$preload = nil
-$LIBPATH.push(Config::CONFIG['libdir'])
-
-def crash(str)
- print(" extconf failure: %s\n", str)
- exit 1
-end
-
-dir_config('xml2')
-dir_config('xslt')
-#dir_config('libxml-ruby', '../../../libxml', '../../../libxml/ext/xml')
-
-unless have_library('m', 'atan')
- # try again for gcc 4.0
- saveflags = $CFLAGS
- $CFLAGS += ' -fno-builtin'
- unless have_library('m', 'atan')
- crash('need libm')
- end
- $CFLAGS = saveflags
-end
-
-unless have_library("z", "inflate")
- crash("need zlib")
-else
- $defs.push('-DHAVE_ZLIB_H')
-end
-
-unless (have_library('xml2', 'xmlXPtrNewRange') or
- find_library('xml2', '/opt/lib', '/usr/local/lib', '/usr/lib')) and
- (have_header('libxml/xmlversion.h') or
- find_header('libxml/xmlversion.h',
- '/opt/include/libxml2',
- '/usr/local/include/libxml2',
- '/usr/include/libxml2'))
- crash(<<EOL)
-need libxml2.
-
- Install the library or try one of the following options to extconf.rb:
-
- --with-xml2-dir=/path/to/libxml2
- --with-xml2-lib=/path/to/libxml2/lib
- --with-xml2-include=/path/to/libxml2/include
-EOL
-end
-
-unless (have_library('xslt','xsltApplyStylesheet') or
- find_library('xslt', '/opt/lib', '/usr/local/lib', '/usr/lib')) and
- (have_header('xslt.h') or
- find_header('xslt.h',
- '/opt/include/libxslt',
- '/usr/local/include/libxslt',
- '/usr/include/libxslt'))
- crash(<<EOL)
-need libxslt.
-
- Install the library or try one of the following options to extconf.rb:
-
- --with-xslt-dir=/path/to/libxslt
- --with-xslt-lib=/path/to/libxslt/lib
- --with-xslt-include=/path/to/libxslt/include
-EOL
-end
-
-unless have_header('libxml-ruby/libxml.h')
- crash(<<EOL)
-need headers for libxml-ruby.
-
- If you downloaded a release, this is a bug - please inform
- libxml-devel@rubyforge.org including the release version and
- download URL you obtained it from.
-
- If you checked libxslt-ruby out from CVS, you will need to
- obtain the headers from CVS (using the same version tag if
- applicable) and place them in directory 'ext/xml/libxml-ruby'.
-EOL
-end
-
-$LDFLAGS << ' -lexslt'
-#$LDFLAGS << ' -lxml'
-#$LDFLAGS << ' ' + `xslt-config --libs`.chomp
-#$LDFLAGS << ' ' + `xml2-config --libs`.chomp
-#$CFLAGS << ' ' + `xslt-config --cflags`.chomp
-#$CFLAGS << ' ' + `xml2-config --cflags`.chomp
-$CFLAGS = '-g -Wall ' + $CFLAGS + ' ' + $INCFLAGS
-
-
-create_header()
-create_makefile("xml/libxslt")
View
247 libxslt/ext/xml/libxslt.c
@@ -1,247 +0,0 @@
-/* $Id$ */
-
-/* Please see the LICENSE file for copyright and distribution information */
-
-#include "libxslt.h"
-#include "libxml/xmlversion.h"
-
-VALUE cXSLT;
-VALUE eXMLXSLTStylesheetRequireParsedDoc;
-
-/* call-seq:
- * xslt.doc => #&lt;XML::Document...&gt;
- *
- * Obtain the source XML::Document.
- */
-VALUE
-ruby_xslt_doc_get(VALUE self) {
- ruby_xslt *rxslt;
- Data_Get_Struct(self, ruby_xslt, rxslt);
- return(rxslt->xml_doc_obj);
-}
-
-/* call-seq:
- * xslt.doc = some_xml_document
- *
- * Set the source XML::Document.
- */
-VALUE
-ruby_xslt_doc_set(VALUE self, VALUE xml_doc_obj) {
- ruby_xslt *rxslt;
- ruby_xml_document *rxd;
- ruby_xslt_transform_context *rxtc;
-
- if (rb_obj_is_kind_of(xml_doc_obj, cXMLDocument) == Qfalse)
- rb_raise(rb_eTypeError, "Invalid argument: must be of type XML::Document");
-
- Data_Get_Struct(self, ruby_xslt, rxslt);
- rxslt->xml_doc_obj = xml_doc_obj;
-
- Data_Get_Struct(xml_doc_obj, ruby_xml_document, rxd);
- if (rxd->doc == NULL)
- return(Qnil);
-
- rxslt->ctxt = ruby_xslt_transform_context_new3(self);
- Data_Get_Struct(rxslt->ctxt, ruby_xslt_transform_context, rxtc);
-
- if (rxslt->xsp == NULL || rxd->doc == NULL)
- return(Qnil);
-
- rxtc->ctxt = xsltNewTransformContext(rxslt->xsp, rxd->doc) ;
-
- return(rxslt->xml_doc_obj);
-}
-
-/* call-seq:
- * xslt.filename => "filename.xsl"
- *
- * Obtain the stylesheet filename.
- */
-VALUE
-ruby_xslt_filename_get(VALUE self) {
- ruby_xslt *rxslt;
- Data_Get_Struct(self, ruby_xslt, rxslt);
-
- if (rxslt->data_type != RUBY_LIBXSLT_SRC_TYPE_FILE)
- return(Qnil);
- else
- return((VALUE)rxslt->data);
-}
-
-
-/* call-seq:
- * xslt.filename = "filename.xsl"
- *
- * Set the stylesheet filename.
- */
-VALUE
-ruby_xslt_filename_set(VALUE self, VALUE filename) {
- ruby_xslt *rxslt;
- Check_Type(filename, T_STRING);
- Data_Get_Struct(self, ruby_xslt, rxslt);
-
- if (rxslt->data_type != RUBY_LIBXSLT_SRC_TYPE_NULL)
- return(Qnil);
-
- rxslt->data_type = RUBY_LIBXSLT_SRC_TYPE_FILE;
- rxslt->data = (void *)filename;
- return(filename);
-}
-
-
-void
-ruby_xslt_free(ruby_xslt *rxslt) {
- if (rxslt != NULL)
- free(rxslt);
-}
-
-
-void
-ruby_xslt_mark(ruby_xslt *rxslt) {
- if (rxslt == NULL) return;
- if (!NIL_P(rxslt->ctxt)) rb_gc_mark(rxslt->ctxt);
- if (!NIL_P(rxslt->str)) rb_gc_mark(rxslt->str);
- if (!NIL_P(rxslt->xml_doc_obj)) rb_gc_mark(rxslt->xml_doc_obj);
-
- switch(rxslt->data_type) {
- case RUBY_LIBXSLT_SRC_TYPE_FILE:
- if (rxslt->data != NULL)
- rb_gc_mark((VALUE)rxslt->data);
- break;
- }
-}
-
-
-/* call-seq:
- * XML::XSLT.new => #&lt;XML::XSLT...&gt;
- *
- * Create a new XSLT instance. You will need to specify
- * a filename and document for the instance after it is
- * created.
- */
-VALUE
-ruby_xslt_new(VALUE class) {
- ruby_xslt *rxslt;
-
- rxslt = (ruby_xslt *)malloc(sizeof(ruby_xslt));
- if (rxslt == NULL)
- rb_raise(rb_eNoMemError, "No memory left for XSLT struct");
-
- rxslt->ctxt = Qnil;
- rxslt->data = NULL;
- rxslt->data_type = RUBY_LIBXSLT_SRC_TYPE_NULL;
- rxslt->str = Qnil;
- rxslt->xml_doc_obj = Qnil;
- rxslt->xsp = NULL;
-
- return(Data_Wrap_Struct(class, ruby_xslt_mark, ruby_xslt_free, rxslt));
-}
-
-/* call-seq:
- * XML::XSLT.file("filename.xsl") => #&lt;XML::XSLT...&gt;
- *
- * Create a new XSLT instance with the supplied stylesheet filename.
- */
-VALUE
-ruby_xslt_new_file(VALUE class, VALUE filename) {
- VALUE xslt;
-
- xslt = ruby_xslt_new(class);
- ruby_xslt_filename_set(xslt, filename);
- return(xslt);
-}
-
-/* call-seq:
- * xslt.parse => #&lt;XML::XSLT::Stylesheet...&gt;
- *
- * Parse the xsl source (specified by +filename+) and create
- * a +Stylesheet+ instance that will apply it against the
- * source document. If a parsed XML::Document isn't associated
- * with this +XSLT+ instance (via #doc=) then a
- * Stylesheet::RequireParsedDoc exception is raised.
- */
-VALUE
-ruby_xslt_parse(VALUE self) {
- ruby_xml_document *rxd;
- ruby_xslt *rxslt;
- ruby_xslt_stylesheet *xss;
- VALUE xssobj;
- xsltStylesheetPtr sheet;
-
- Data_Get_Struct(self, ruby_xslt, rxslt);
-
- if (rxslt->data_type == RUBY_LIBXSLT_SRC_TYPE_FILE) {
- /*xssobj = ruby_xslt_stylesheet_new(cXSLTStylesheet,
- xsltParseStylesheetFile((const xmlChar *)
- STR2CSTR(rxslt->data)));*/
- sheet = xsltParseStylesheetFile((const xmlChar *) STR2CSTR(rxslt->data));
-
- if (sheet) {
- xssobj = ruby_xslt_stylesheet_new(cXSLTStylesheet, sheet);
- Data_Get_Struct(xssobj, ruby_xslt_stylesheet, xss);
- xss->data = (void *)rb_obj_dup((VALUE)rxslt->data);
- xss->xml_doc_obj = rxslt->xml_doc_obj;
- } else
- xssobj = Qnil;
-
- } else if (rxslt->xml_doc_obj != Qnil) {
- Data_Get_Struct(rxslt->xml_doc_obj, ruby_xml_document, rxd);
- /*xssobj = ruby_xslt_stylesheet_new(cXSLTStylesheet,
- xsltParseStylesheetDoc(rxd->doc));*/
- sheet = xsltParseStylesheetDoc(rxd->doc);
- if (sheet) {
- xssobj = ruby_xslt_stylesheet_new(cXSLTStylesheet,sheet);
- Data_Get_Struct(xssobj, ruby_xslt_stylesheet, xss);
- xss->xml_doc_obj = rxslt->xml_doc_obj;
- } else
- xssobj = Qnil;
-
- } else {
- xssobj = Qnil;
- }
-
- return(xssobj);
-}
-
-#ifdef RDOC_NEVER_DEFINED
- mXML = rb_define_module("XML");
-#endif
-
-void
-Init_libxslt(void) {
- LIBXML_TEST_VERSION;
- mXML = rb_const_get(rb_cObject, rb_intern("XML"));
- cXMLDocument = rb_const_get(mXML, rb_intern("Document"));
-
- cXSLT = rb_define_class_under(mXML, "XSLT", rb_cObject);
-
- rb_define_const(cXSLT, "MAX_DEPTH", INT2NUM(xsltMaxDepth));
- rb_define_const(cXSLT, "MAX_SORT", INT2NUM(XSLT_MAX_SORT));
- rb_define_const(cXSLT, "ENGINE_VERSION", rb_str_new2(xsltEngineVersion));
- rb_define_const(cXSLT, "LIBXSLT_VERSION", INT2NUM(xsltLibxsltVersion));
- rb_define_const(cXSLT, "LIBXML_VERSION", INT2NUM(xsltLibxmlVersion));
- rb_define_const(cXSLT, "XSLT_NAMESPACE", rb_str_new2((const char*)XSLT_NAMESPACE));
- rb_define_const(cXSLT, "DEFAULT_VENDOR", rb_str_new2(XSLT_DEFAULT_VENDOR));
- rb_define_const(cXSLT, "DEFAULT_VERSION", rb_str_new2(XSLT_DEFAULT_VERSION));
- rb_define_const(cXSLT, "DEFAULT_URL", rb_str_new2(XSLT_DEFAULT_URL));
- rb_define_const(cXSLT, "NAMESPACE_LIBXSLT", rb_str_new2((const char*)XSLT_LIBXSLT_NAMESPACE));
- rb_define_const(cXSLT, "NAMESPACE_NORM_SAXON", rb_str_new2((const char*)XSLT_NORM_SAXON_NAMESPACE));
- rb_define_const(cXSLT, "NAMESPACE_SAXON", rb_str_new2((const char*)XSLT_SAXON_NAMESPACE));
- rb_define_const(cXSLT, "NAMESPACE_XT", rb_str_new2((const char*)XSLT_XT_NAMESPACE));
- rb_define_const(cXSLT, "NAMESPACE_XALAN", rb_str_new2((const char*)XSLT_XALAN_NAMESPACE));
-
- ruby_init_xslt_stylesheet();
- ruby_init_xslt_transform_context();
-
-
- rb_define_singleton_method(cXSLT, "file", ruby_xslt_new_file, 1);
- rb_define_singleton_method(cXSLT, "new", ruby_xslt_new, 0);
-
- rb_define_method(cXSLT, "doc", ruby_xslt_doc_get, 0);
- rb_define_method(cXSLT, "doc=", ruby_xslt_doc_set, 1);
- rb_define_method(cXSLT, "filename", ruby_xslt_filename_get, 0);
- rb_define_method(cXSLT, "filename=", ruby_xslt_filename_set, 1);
- rb_define_method(cXSLT, "parse", ruby_xslt_parse, 0);
-
- exsltRegisterAll();
-}
View
52 libxslt/ext/xml/libxslt.h
@@ -1,52 +0,0 @@
-/* $Id$ */
-
-/* Please see the LICENSE file for copyright and distribution information */
-
-#ifndef __RUBY_LIBXSLT_H__
-#define __RUBY_LIBXSLT_H__
-
-#include <ruby.h>
-#include <rubyio.h>
-#include <libxml/parser.h>
-#include <libxml/debugXML.h>
-#include <libxslt/extra.h>
-#include <libxslt/xslt.h>
-#include <libxslt/xsltInternals.h>
-#include <libxslt/transform.h>
-#include <libxslt/xsltutils.h>
-#include <libexslt/exslt.h>
-
-#include "libxml-ruby/libxml.h"
-#include "libxml-ruby/ruby_xml_document.h"
-#include "ruby_xslt_stylesheet.h"
-#include "ruby_xslt_transform_context.h"
-
-#define RUBY_LIBXSLT_VERSION "0.3.6"
-#define RUBY_LIBXSLT_VERNUM 036
-#define RUBY_LIBXSLT_VER_MAJ 0
-#define RUBY_LIBXSLT_VER_MIN 3
-#define RUBY_LIBXSLT_VER_MIC 6
-
-#define RUBY_LIBXSLT_SRC_TYPE_NULL 0
-#define RUBY_LIBXSLT_SRC_TYPE_FILE 1
-
-extern VALUE mXML;
-extern VALUE cXMLDocument;
-
-extern VALUE cXSLT;
-extern VALUE eXMLXSLTStylesheetRequireParsedDoc;
-
-typedef struct ruby_xslt {
- int data_type;
- void *data;
- VALUE str;
- VALUE xml_doc_obj;
- VALUE ctxt;
- xsltStylesheetPtr xsp;
-} ruby_xslt;
-
-#if ((RUBY_LIBXML_VER_MAJ != RUBY_LIBXSLT_VER_MAJ) || (RUBY_LIBXML_VER_MIN != RUBY_LIBXSLT_VER_MIN))
-#error "Incompatible LibXML-Ruby headers - please install same major/micro version"
-#endif
-
-#endif
View
298 libxslt/ext/xml/ruby_xslt_stylesheet.c
@@ -1,298 +0,0 @@
-/* $Id$ */
-
-/* See the LICENSE file for copyright and distribution information. */
-
-#include "libxslt.h"
-#include "ruby_xslt_stylesheet.h"
-
-VALUE cXSLTStylesheet;
-
-/* call-seq:
- * sheet.apply => (true|false)
- *
- * Apply this stylesheet transformation to the source
- * document.
- */
-VALUE
-ruby_xslt_stylesheet_apply(int argc, VALUE *argv, VALUE self) {
- ruby_xslt_stylesheet *xss;
- ruby_xml_document *rxd;
- const char **params;
- VALUE parameter, tmp;
- int i, len;
-
- Data_Get_Struct(self, ruby_xslt_stylesheet, xss);
-
- if (NIL_P(xss->xml_doc_obj))
- rb_raise(rb_eArgError, "Need a document object");
-
- Data_Get_Struct(xss->xml_doc_obj, ruby_xml_document, rxd);
-
- params = NULL;
-
- switch(argc) {
- case 0:
- break;
- case 1:
- parameter = argv[0];
-#if RUBY_VERSION_CODE >= 180
- if (TYPE(parameter) == T_HASH) {
- /* Convert parameter to an array */
- parameter = rb_hash_to_a(parameter);
- }
-#endif
-
- if (TYPE(parameter) == T_ARRAY) {
- /* A hash is better than an array, but we can live with an array of arrays */
- len = RARRAY(parameter)->len;
- params = (void *)ALLOC_N(char *, (len * 2) + 2);
- for (i=0; i < RARRAY(parameter)->len; i++) {
- tmp = RARRAY(parameter)->ptr[i];
-
- Check_Type(tmp, T_ARRAY);
- Check_Type(RARRAY(tmp)->ptr[0], T_STRING);
- Check_Type(RARRAY(tmp)->ptr[1], T_STRING);
-
- params[2*i] = RSTRING(RARRAY(tmp)->ptr[0])->ptr;
- params[2*i+1] = RSTRING(RARRAY(tmp)->ptr[1])->ptr;
- }
- params[2*i] = params[2*i+1] = 0;
- } else {
- /* I should test to see if the object responds to to_a and to_h before calling this, but oh well */
- rb_raise(rb_eTypeError, "xslt_stylesheet_appy: expecting a hash or an array of arrays as a parameter");
- }
-
- break;
- default:
- rb_raise(rb_eArgError, "wrong number of arguments (0 or 1)");
- }
-
- xss->parsed = ruby_xml_document_new(cXMLDocument,
- xsltApplyStylesheet(xss->xsp,
- rxd->doc, params));
-
- if (params) {
- free(params);
- }
-
- if (xss->parsed == Qnil)
- return(Qfalse);
- else
- return(Qtrue);
-}
-
-
-/* call-seq:
- * sheet.debug(to = $stdout) => (true|false)
- *
- * Output a debug dump of this stylesheet to the specified output
- * stream (an instance of IO, defaults to $stdout). Requires
- * libxml/libxslt be compiled with debugging enabled. If this
- * is not the case, a warning is triggered and the method returns
- * false.
- */
-VALUE
-ruby_xslt_stylesheet_debug(int argc, VALUE *argv, VALUE self) {
-#ifdef LIBXML_DEBUG_ENABLED
- OpenFile *fptr;
- VALUE io;
- FILE *out;
- ruby_xml_document *parsed;
- ruby_xslt_stylesheet *xss;
-
- Data_Get_Struct(self, ruby_xslt_stylesheet, xss);
- if (NIL_P(xss->parsed))
- rb_raise(eXMLXSLTStylesheetRequireParsedDoc, "must have a parsed XML result");
-
- switch (argc) {
- case 0:
- io = rb_stdout;
- break;
- case 1:
- io = argv[0];
- if (rb_obj_is_kind_of(io, rb_cIO) == Qfalse)
- rb_raise(rb_eTypeError, "need an IO object");
- break;
- default:
- rb_raise(rb_eArgError, "wrong number of arguments (0 or 1)");
- }
-
- Data_Get_Struct(xss->parsed, ruby_xml_document, parsed);
- if (parsed->doc == NULL)
- return(Qnil);
-
- GetOpenFile(io, fptr);
- rb_io_check_writable(fptr);
- out = GetWriteFile(fptr);
- xmlDebugDumpDocument(out, parsed->doc);
- return(Qtrue);
-#else
- rb_warn("libxml/libxslt was compiled without debugging support. Please recompile libxml/libxslt and their Ruby modules");
- return(Qfalse);
-#endif
-}
-
-
-void
-ruby_xslt_stylesheet_free(ruby_xslt_stylesheet *xss) {
- if (xss->xsp != NULL) {
- xsltFreeStylesheet(xss->xsp);
- xss->xsp = NULL;
- }
-
- free(xss);
-}
-
-
-void
-ruby_xslt_stylesheet_mark(ruby_xslt_stylesheet *xss) {
- if (!NIL_P(xss->parsed)) rb_gc_mark(xss->parsed);
- if (!NIL_P(xss->xml_doc_obj)) rb_gc_mark(xss->xml_doc_obj);
-
- switch (xss->data_type) {
- case RUBY_LIBXSLT_SRC_TYPE_FILE:
- if (xss->data != NULL)
- rb_gc_mark((VALUE)xss->data);
- break;
- }
-}
-
-
-VALUE
-ruby_xslt_stylesheet_new(VALUE class, xsltStylesheetPtr xsp) {
- ruby_xslt_stylesheet *xss;
-
- xss = ALLOC(ruby_xslt_stylesheet);
- xss->xsp = xsp;
- xss->xml_doc_obj = Qnil;
- xss->parsed = Qnil;
- xss->data_type = RUBY_LIBXSLT_SRC_TYPE_NULL;
- xss->data = NULL;
-
- return(Data_Wrap_Struct(cXSLTStylesheet, ruby_xslt_stylesheet_mark,
- ruby_xslt_stylesheet_free, xss));
-}
-
-// TODO should this automatically apply the sheet if not already,
-// given that we're unlikely to do much else with it?
-
-/* call-seq:
- * sheet.print(to = $stdout) => number_of_bytes
- *
- * Output the result of the transform to the specified output
- * stream (an IO instance, defaults to $stdout). You *must* call
- * +apply+ before this method or an exception will be raised.
- */
-VALUE
-ruby_xslt_stylesheet_print(int argc, VALUE *argv, VALUE self) {
- OpenFile *fptr;
- VALUE io;
- FILE *out;
- ruby_xml_document *parsed;
- ruby_xslt_stylesheet *xss;
- int bytes;
-
- Data_Get_Struct(self, ruby_xslt_stylesheet, xss);
- if (NIL_P(xss->parsed))
- rb_raise(eXMLXSLTStylesheetRequireParsedDoc, "must have a parsed XML result");
-
- switch (argc) {
- case 0:
- io = rb_stdout;
- break;
- case 1:
- io = argv[0];
- if (rb_obj_is_kind_of(io, rb_cIO) == Qfalse)
- rb_raise(rb_eTypeError, "need an IO object");
- break;
- default:
- rb_raise(rb_eArgError, "wrong number of arguments (0 or 1)");
- }
-
- Data_Get_Struct(xss->parsed, ruby_xml_document, parsed);
- if (parsed->doc == NULL)
- return(Qnil);
-
- GetOpenFile(io, fptr);
- rb_io_check_writable(fptr);
- out = GetWriteFile(fptr);
- bytes = xsltSaveResultToFile(out, parsed->doc, xss->xsp);
-
- return(INT2NUM(bytes));
-}
-
-// TODO this, too. Either way, to_s probably should have prereqs
-// like this, for one thing it makes IRB use tricky...
-
-/* call-seq:
- * sheet.to_s => "result"
- *
- * Obtain the result of the transform as a string. You *must* call
- * +apply+ before this method or an exception will be raised.
- */
-VALUE
-ruby_xslt_stylesheet_to_s(VALUE self) {
- ruby_xml_document *parsed;
- ruby_xslt_stylesheet *xss;
- xmlChar *str;
- int len;
-
- Data_Get_Struct(self, ruby_xslt_stylesheet, xss);
- if (NIL_P(xss->parsed))
- rb_raise(eXMLXSLTStylesheetRequireParsedDoc, "must have a parsed XML result");
- Data_Get_Struct(xss->parsed, ruby_xml_document, parsed);
- if (parsed->doc == NULL)
- return(Qnil);
-
- xsltSaveResultToString(&str, &len, parsed->doc, xss->xsp);
- if (str == NULL)
- return(Qnil);
- else
- return(rb_str_new((const char*)str,len));
-}
-
-
-
-/* call-seq:
- * sheet.save(io) => true
- *
- * Save the result of the transform to the supplied open
- * file (an IO instance). You *must* call +apply+ before
- * this method or an exception will be raised.
- */
-VALUE
-ruby_xslt_stylesheet_save(VALUE self, VALUE io) {
- ruby_xml_document *parsed;
- ruby_xslt_stylesheet *xss;
- OpenFile *fptr;
-
- if (rb_obj_is_kind_of(io, rb_cIO) == Qfalse)
- rb_raise(rb_eArgError, "Only accept IO objects for saving");
-
- GetOpenFile(io, fptr);
-
- Data_Get_Struct(self, ruby_xslt_stylesheet, xss);
- Data_Get_Struct(xss->parsed, ruby_xml_document, parsed);
-
- xsltSaveResultToFile(fptr->f, parsed->doc, xss->xsp);
-
- return(Qtrue);
-}
-
-#ifdef RDOC_NEVER_DEFINED
- mXML = rb_define_module("XML");
- cXSLT = rb_define_class_under(mXML, "XSLT", rb_cObject);
-#endif
-
-void
-ruby_init_xslt_stylesheet(void) {
- cXSLTStylesheet = rb_define_class_under(cXSLT, "Stylesheet", rb_cObject);
- eXMLXSLTStylesheetRequireParsedDoc =
- rb_define_class_under(cXSLTStylesheet, "RequireParsedDoc", rb_eException);
-
- rb_define_method(cXSLTStylesheet, "apply", ruby_xslt_stylesheet_apply, -1);
- rb_define_method(cXSLTStylesheet, "debug", ruby_xslt_stylesheet_debug, -1);
- rb_define_method(cXSLTStylesheet, "print", ruby_xslt_stylesheet_print, -1);
- rb_define_method(cXSLTStylesheet, "to_s", ruby_xslt_stylesheet_to_s, 0);
- rb_define_method(cXSLTStylesheet, "save", ruby_xslt_stylesheet_save, 1);
-}
View
21 libxslt/ext/xml/ruby_xslt_stylesheet.h
@@ -1,21 +0,0 @@
-/* $Id$ */
-
-/* Please see the LICENSE file for copyright and distribution information. */
-
-#ifndef __RUBY_LIBXSLT_STYLESHEET__
-#define __RUBY_LIBXSLT_STYLESHEET__
-
-extern VALUE cXSLTStylesheet;
-
-typedef struct ruby_xslt_stylesheet {
- int data_type;
- void *data;
- VALUE parsed; /* XML::Document # parsed xml document after xsl apply */
- VALUE xml_doc_obj; /* XML::Document */
- xsltStylesheetPtr xsp;
-} ruby_xslt_stylesheet;
-
-void ruby_init_xslt_stylesheet(void);
-VALUE ruby_xslt_stylesheet_new(VALUE class, xsltStylesheetPtr xsp);
-
-#endif /* __RUBY_LIBXSLT_STYLESHEET__ */
View
63 libxslt/ext/xml/ruby_xslt_transform_context.c
@@ -1,63 +0,0 @@
-/* $Id$ */
-
-/* Please see the LICENSE file for copyright and distribution information */
-
-#include "libxslt.h"
-#include "ruby_xslt_transform_context.h"
-#include "libxml-ruby/libxml.h"
-
-VALUE cXSLTTransformContext;
-
-void
-ruby_xslt_transform_context_free(ruby_xslt_transform_context *rxtc) {
- if (rxtc->ctxt != NULL) {
- xsltFreeTransformContext(rxtc->ctxt);
- rxtc->ctxt = NULL;
- }
- free(rxtc);
-}
-
-void
-ruby_xslt_transform_context_mark(ruby_xslt_transform_context *rxtc) {
- if (rxtc == NULL) return;
- if (!NIL_P(rxtc->xslt)) rb_gc_mark(rxtc->xslt);
-}
-
-
-VALUE
-ruby_xslt_transform_context_new(VALUE class, VALUE xslt,
- xsltTransformContextPtr ctxt) {
- ruby_xslt_transform_context *rxtc;
- rxtc = ALLOC(ruby_xslt_transform_context);
- ruby_xml_parser_count++;
- rxtc->ctxt = ctxt;
- rxtc->xslt = xslt;
- //fprintf(stderr,"ruby_xslt_transform_context_new 2\n");
- //if (class == Qfalse)
- //fprintf(stderr,"ruby_xslt_transform_context_new: EEEEK!\n");
- return(Data_Wrap_Struct(class, ruby_xslt_transform_context_mark,
- ruby_xslt_transform_context_free, rxtc));
-}
-
-
-VALUE
-ruby_xslt_transform_context_new2(VALUE class, VALUE xslt) {
- return(ruby_xslt_transform_context_new(class, xslt, NULL));
-}
-
-
-VALUE
-ruby_xslt_transform_context_new3(VALUE xslt) {
- return(ruby_xslt_transform_context_new2(cXSLTTransformContext, xslt));
-}
-
-#ifdef RDOC_NEVER_DEFINED
- mXML = rb_define_module("XML");
- cXSLT = rb_define_class_under(mXML, "XSLT", rb_cObject);
-#endif
-
-void
-ruby_init_xslt_transform_context(void) {
- cXSLTTransformContext =
- rb_define_class_under(cXSLT, "TransformContext", rb_cObject);
-}
View
22 libxslt/ext/xml/ruby_xslt_transform_context.h
@@ -1,22 +0,0 @@
-/* $Id$ */
-
-/* Please see the LICENSE file for copyright and distribution information */
-
-#ifndef __RUBY_XSLT_TRANSFORM_CONTEXT__
-#define __RUBY_XSLT_TRANSFORM_CONTEXT__
-
-extern VALUE cXSLTTransformContext;
-
-typedef struct ruby_xslt_transform_context {
- xsltTransformContextPtr ctxt;
- VALUE xslt;
-} ruby_xslt_transform_context;
-
-void ruby_init_xslt_transform_context(void);
-void ruby_xslt_transform_context_free(ruby_xslt_transform_context *ctxt);
-void ruby_xslt_transform_context_mark(ruby_xslt_transform_context *ctxt);
-VALUE ruby_xslt_transform_context_new(VALUE class, VALUE xslt, xsltTransformContextPtr ctxt);
-VALUE ruby_xslt_transform_context_new2(VALUE class, VALUE xslt);
-VALUE ruby_xslt_transform_context_new3(VALUE xslt);
-
-#endif
View
1 libxslt/tests/.cvsignore
@@ -1 +0,0 @@
-fuzface.html
View
34 libxslt/tests/commentary.dtd
@@ -1,34 +0,0 @@
-<!ELEMENT commentary (meta, body)>
-<!ELEMENT meta (author, version, date, id, title, subtitle?)>
-
-<!-- Metadata about the requirements -->
-<!ENTITY % string "#PCDATA">
-<!ENTITY % character "#PCDATA">
-<!ENTITY % letter "#PCDATA">
-<!ENTITY % number_att "CDATA">
-
-
-<!ELEMENT author (first_name, last_name, email)>
-
-<!ELEMENT first_name (%string;)>
-<!ELEMENT last_name (%string;)>
-<!ELEMENT email (%string;)>
-
-<!ELEMENT version (#PCDATA)>
-<!ELEMENT date (#PCDATA)>
-<!ELEMENT id (#PCDATA)>
-<!ELEMENT title (#PCDATA)>
-<!ELEMENT subtitle (#PCDATA)>
-
-<!ELEMENT body (para+)>
-
-
-<!ELEMENT para (#PCDATA|thought|url|ol)*>
-<!ATTLIST para
- style (default|ps) "default">
-
-<!ELEMENT ol (li+)>
-<!ELEMENT li (#PCDATA)>
-<!ELEMENT url (#PCDATA)>
-<!ELEMENT thought (#PCDATA)>
-
View
15 libxslt/tests/fuzface.rb
@@ -1,15 +0,0 @@
-#!/usr/local/bin/ruby -w
-
-require 'xml/libxml'
-require "#{File.dirname(__FILE__)}/../ext/xml/libxslt"
-
-xslt = XML::XSLT.file('fuzface.xsl')
-xslt.doc = XML::Document.file('fuzface.xml')
-s = xslt.parse
-s.apply
-
-File.open('fuzface.html', 'w') do |f|
- s.save(f)
-end
-
-s.print
View
154 libxslt/tests/fuzface.xml
@@ -1,154 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<?xml-stylesheet href="fuzface.xsl" type="text/xsl"?>
-
-<!DOCTYPE commentary SYSTEM "commentary.dtd">
-
-<commentary>
- <meta>
- <author>
- <first_name>Sean</first_name>
- <last_name>Chittenden</last_name>
- <email>sean@chittenden.org</email>
- </author>
- <version>$Version$</version>
- <date>$Date$</date>
- <id>$Id$</id>
- <title>Fuzface...</title>
- <subtitle>The Internet's a big place and here's some proof...</subtitle>
- </meta>
-
- <body>
- <para>
- I think it's a tragedy that I'm going to start off my new
- commentary by talking about facial hair and the Internet.
- Something about that just screams pathetic, but whatever: it's
- humor and that's life.
- </para>
-
- <para>
- I've been working at home for a while now, which has been great.
- I've been doing a lot of reading, good work, contributing to the
- FreeBSD project, and living life at my own pace. The problem?
- I don't have to interact with people, so I've let my appearance
- slide a bit, most notably I've gone two weeks without shaving
- and I have an awful hairy face.
- </para>
-
- <para>
- Nothing is worse than going for a hard run, coming back, and
- then bending your head down so that the hairs under your chin
- touch the hairs on your neck. This has to be one of the most
- disgusting/gross feelings I've experienced in a while. While
- today wasn't the first time I'd experienced such a slimy tangled
- mess, it is the first time I seriously considered shaving part
- of my face, but not all of it: I was considering a beard.
- </para>
-
- <para>
- Alright, so it's 5pm and I'm a sweaty post-run mess (it was 110
- degrees in direct sunlight according to my thermometer) and
- considering the possibility of growing a beard. Swifty nift?
- Maybe. This is something I'd never done before, let alone
- seriously consider. Normally I'd call my dad for such manly
- advice, but he is: a) normally in another state, and; b) in
- another country right now probably growing a beard (he's
- notorious for coming back from a trip with a gnarly unshaven
- face, sometimes he'll shape it into a decent beard). So, what's
- a tech-junkie to do? Hop on the Internet and see if Google's
- able to provide me with some inspiration.
- </para>
-
- <para>
- Sure enough, I typed in "pictures of bearded men" and I was able
- to find something: 14,000 pages of something to be exact.
- Anyway, so most of these were rinky dink sites, a few of them
- had some promise. One guy was trying to start a tradition where
- everyone grows a beard for New Years. As I was scrolling down
- the page trying to find some pictures, my mind was having the
- following thought process: <thought>This seems like a dumb
- idea... New Years provides a perfectly good excuse to kiss some
- total stranger that you've had your eye on for the duration of a
- New Years party. Why waste such an opportunity with a crappy
- kiss?</thought> And at about this point I said this page sucks,
- and flipped back to my search results.
- </para>
-
- <para>
- Since I'd never done this before, I didn't know what was
- fashionably correct in terms of where a guy should shave under
- his neck, or what the deal was... I knew there were lots of
- styles out there, just none that I could picture in my mind
- (save maybe Santa Claus and a few really gnarly beards that are
- long enough to be used as full-body covering. Oooh! And don't
- forget the Russian and Amish beards, those stand out in my mind
- too.). Google, being pretty comprehensive, and the Internet
- being huge, found the exact screwball page I was looking for:
- <url>http://fuzface-gallery.tripod.com/</url>
- </para>
-
- <para>
- I don't know if I really should be amazed at the sheer number of
- entries that Google returned, or that the Internet is big enough
- to house such random gallery of crap, but it is and it never
- ceases to amaze me... it's almost as amazing as the fact that
- some bozo spent the time to create such a page. Don't people
- have lives? Oh wait, I just visited his page... so back to my
- diatribe...
- </para>
-
- <para>
- There were tons of faces, lots of men, lots of hair, and plenty
- of styles to choose from. Page after page of faces and hair.
- Ugh. This wasn't getting any where and I was now entertaining
- the rebound though of shaving my head. Time to close my browser
- and hop in the shower: I reak. So what'd I do? Well, after
- looking through enough of those pictures, I decided a few
- things:
- </para>
-
- <para>
- <ol>
- <li>
- I'm amazed that the Internet is big enough to foster the
- creation of such random and utterly useless information. Then
- again, I've been on and using the Net since '95, so this
- shouldn't surprise me that much.
- </li>
-
- <li>
- There are a lot of guys out there with varying tastes in,
- shall we say, "facial hair styles," most of which I find
- pretty unappealing.
- </li>
-
- <li>
- I don't like beards. After one clogged drain, two
- reapplications of shaving cream, and a few pases with the
- razor, it took me about 5-10 minutes to get a nice cleanly
- shaven face.
- </li>
-
- <li>
- &lt;crass comment&gt;And - back me up here fellas, you can
- sympathize with this feeling after you get done looking
- through a magazine for a hair-cut style (ladies.. just smile
- and nod and pretend you care) - after looking at a few dozen
- pictures of men, I was able to safely reaffirm my desire for
- heterosexual relations (translation from Bill Clintonese: have
- sex with a woman). And with that thought in mind, I began to
- pine for the college porn collection of old. Mmmm,
- Playboy.&lt;/crass comment&gt;
- </li>
- </ol>
- </para>
-
- <para>
- ::grin:: Until next time. -Sean
- </para>
-
- <para style="ps">
- P.S. To the guys out there with beards, this is just my
- opinion: take it with a grain of salt.
- </para>
- </body>
-</commentary>
View
4 libxslt/tests/fuzface.xsl
@@ -1,4 +0,0 @@
-<?xml version="1.0" ?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<xsl:include href="ramblings.xsl" />
-</xsl:stylesheet>
View
46 libxslt/tests/ramblings.xsl
@@ -1,46 +0,0 @@
-<?xml version="1.0" ?>
-<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
-<xsl:template match="/">
- <xsl:element name="html">
- <xsl:element name="head">
- <xsl:element name="title">Ramblings - <xsl:value-of select="commentary/meta/title" /> - <xsl:value-of select="commentary/meta/subtitle" /></xsl:element>
- </xsl:element>
-
- <xsl:element name="body">
- <xsl:element name="h1"><xsl:value-of select="commentary/meta/title" /></xsl:element>
- <xsl:element name="h3"><xsl:value-of select="commentary/meta/subtitle" /></xsl:element>
- By: <xsl:value-of select="commentary/meta/author/first_name" /> <xsl:value-of select="commentary/meta/author/last_name" /><xsl:element name="br" />
- Date: <xsl:value-of select="commentary/meta/date" /><xsl:element name="br" />
-
- <xsl:for-each select="./commentary/body">
- <xsl:apply-templates />
- </xsl:for-each>
-
- </xsl:element>
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="para">
- <xsl:element name="p">
- <xsl:apply-templates />
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="ol">
- <xsl:element name="ol">
- <xsl:apply-templates select="li" />
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="li">
- <xsl:element name="li">
- <xsl:value-of select="." />
- </xsl:element>
-</xsl:template>
-
-<xsl:template match="thought">
- <xsl:element name="i">
- <xsl:value-of select="." />
- </xsl:element>
-</xsl:template>
-</xsl:stylesheet>
View
65 libxslt/tests/tc_libxslt.rb
@@ -1,65 +0,0 @@
-# $Id$
-begin
- require 'xml/libxml'
-rescue LoadError => orig
- require 'rubygems' and retry
- raise orig
-end
-
-$TDIR = File.dirname(__FILE__)
-require "#$TDIR/../ext/xml/libxslt"
-require 'test/unit'
-
-class TC_XSLT < Test::Unit::TestCase
- def setup()
- @xslt = XML::XSLT.file("#$TDIR/fuzface.xsl")
- @xslt.doc = XML::Document.file("#$TDIR/fuzface.xml")
- assert_instance_of(XML::XSLT, @xslt)
- assert_instance_of(XML::Document, @xslt.doc)
- f = File.open("#$TDIR/fuzface.xsl")
- assert_instance_of(File, f)
-
- @xslt2 = XML::XSLT.new()
- assert_instance_of(XML::XSLT, @xslt2)
- @xslt2.filename = "#$TDIR/fuzface.xsl"
- assert_instance_of(String, @xslt.filename)
-
- @stylesheet = @xslt.parse
- assert_instance_of(XML::XSLT::Stylesheet, @stylesheet)
- end
-
- def tear_down()
- @xslt = nil
- @xslt2 = nil
- @stylesheet = nil
- end
-
- def test_ruby_xslt_constants()
- assert_instance_of(Fixnum, XML::XSLT::MAX_DEPTH)
- assert_instance_of(Fixnum, XML::XSLT::MAX_SORT)
- assert_instance_of(String, XML::XSLT::ENGINE_VERSION)
- assert_instance_of(Fixnum, XML::XSLT::LIBXSLT_VERSION)
- assert_instance_of(Fixnum, XML::XSLT::LIBXML_VERSION)
- assert_instance_of(String, XML::XSLT::XSLT_NAMESPACE)
- assert_instance_of(String, XML::XSLT::DEFAULT_URL)
- assert_instance_of(String, XML::XSLT::DEFAULT_VENDOR)
- assert_instance_of(String, XML::XSLT::DEFAULT_VERSION)
- assert_instance_of(String, XML::XSLT::NAMESPACE_LIBXSLT)
- assert_instance_of(String, XML::XSLT::NAMESPACE_SAXON)
- assert_instance_of(String, XML::XSLT::NAMESPACE_XT)
- assert_instance_of(String, XML::XSLT::NAMESPACE_XALAN)
- assert_instance_of(String, XML::XSLT::NAMESPACE_NORM_SAXON)
- end
-
- def test_ruby_xslt_file()
- assert_instance_of(XML::XSLT, @xslt)
- end
-
- def test_ruby_xslt_new()
- assert_instance_of(XML::XSLT, @xslt2)
- end
-
- def test_ruby_xslt_parse()
- assert_instance_of(XML::XSLT::Stylesheet, @stylesheet)
- end
-end
View
41 libxslt/tests/tc_xslt_stylesheet.rb
@@ -1,41 +0,0 @@
-# $Id$
-begin
- require 'xml/libxml'
-rescue LoadError
- require 'rubygems' and retry
-end
-$TDIR = File.dirname(__FILE__)
-require "#$TDIR/../ext/xml/libxslt"
-require 'test/unit'
-
-class TC_XSLT_STYLESHEET < Test::Unit::TestCase
- def setup()
- @xslt = XML::XSLT.file("#$TDIR/fuzface.xsl")
- @xslt.doc = XML::Document.file("#$TDIR/fuzface.xml")
- assert_instance_of(XML::XSLT, @xslt)
- assert_instance_of(XML::Document, @xslt.doc)
- @stylesheet = @xslt.parse
- assert_instance_of(XML::XSLT::Stylesheet, @stylesheet)
- end
-
- def tear_down()
- @xslt = nil
- @stylesheet = nil
- end
-
- def test_ruby_xslt_parse()
- assert_instance_of(XML::XSLT::Stylesheet, @stylesheet)
- end
-
- def test_ruby_xslt_stylesheet_to_s()
- @stylesheet.apply
- str = @stylesheet.to_s
- assert_instance_of(String, str)
- end
-
- def test_ruby_xslt_stylesheet_save()
- assert_raises(ArgumentError) do
- @stylesheet.save("str")
- end
- end
-end
View
41 libxslt/tests/tc_xslt_stylesheet2.rb
@@ -1,41 +0,0 @@
-# $Id$
-begin
- require 'xml/libxml'
-rescue LoadError
- require 'rubygems' and retry
-end
-$TDIR = File.dirname(__FILE__)
-require "#$TDIR/../ext/xml/libxslt"
-require 'test/unit'
-
-class TC_XSLT_Stylesheet2 < Test::Unit::TestCase
- def setup()
- @xslt = XML::XSLT.file("#$TDIR/fuzface.xsl")
- @xslt.doc = XML::Document.file("#$TDIR/fuzface.xml")
- assert_instance_of(XML::XSLT, @xslt)
- assert_instance_of(XML::Document, @xslt.doc)
- @stylesheet = @xslt.parse
- assert_instance_of(XML::XSLT::Stylesheet, @stylesheet)
- end
-
- def tear_down()
- @xslt = nil
- @stylesheet = nil
- end
-
- def test_ruby_xslt_parse()
- assert_instance_of(XML::XSLT::Stylesheet, @stylesheet)
- end
-
- def test_ruby_xslt_stylesheet_to_s()
- assert_raises(XML::XSLT::Stylesheet::RequireParsedDoc) do
- str = @stylesheet.to_s
- end
- end
-
- def test_ruby_xslt_stylesheet_print()
- assert_raises(XML::XSLT::Stylesheet::RequireParsedDoc) do
- @stylesheet.print
- end
- end
-end
View
2 www/.cvsignore
@@ -1,2 +0,0 @@
-html
-.project
View
85 www/Rakefile
@@ -1,85 +0,0 @@
-# Standard Rakefile for custom Rote build
-#
-# Generated from:
-# $Id$
-#
-begin
- require 'rubygems'
-rescue LoadError
- nil # optional
-end
-
-require 'rake'
-require 'rake/clean'
-require 'rote'
-require 'rote/filters/redcloth'
-require 'rote/filters/rdoc'
-require 'rote/format/html'
-
-include Rote
-
-# Create a set of tasks with the prefix 'doc' to build the
-# documentation set. The directory layout is as for the
-# command-line wrapper (but can be changed of course).
-#
-# This creates the following tasks:
-#
-# * doc - transform/copy all modified pages / resources
-# * doc_pages - transform all modified pages
-# * doc_res - copy all modified resources
-# * doc_monitor - Start monitor mode, transform changed files automatically
-#
-# * [html/**/*] - Transform single page / resource unconditionally
-#
-# * clobber_doc - Remove output (hooks into main 'clobber' task)
-#
-# In addition to these tasks, you may also wish to define a 'doc_refresh' task
-# to be run whenever modified resources are processed in monitor mode.
-ws = Rote::DocTask.new(:doc) do |site|
- site.output_dir = 'html'
- site.layout_dir = 'doc/layouts'
-
- site.pages.dir = 'doc/pages'
- site.pages.include('**/*')
-
- site.res.dir = 'doc/res'
- site.res.include('**/*')
-
- site.ext_mapping(/thtml|textile/, 'html') do |page|
- page.extend Format::HTML
- page.page_filter Filters::RedCloth.new(:textile)
- end
-
- site.ext_mapping(/mhtml|markdown/, 'html') do |page|
- page.extend Format::HTML
- page.page_filter Filters::RedCloth.new(:markdown)
- end
-
- site.ext_mapping(/rdhtml|rdoc/, 'html') do |page|
- page.extend Format::HTML
- page.page_filter Filters::RDoc.new
- end
-
- site.ext_mapping(/html/, 'html') do |page|
- page.extend Format::HTML
- end
-end
-
-task :default => [:doc]
-
-# import user-level tasks
-import "#{ENV['HOME']}/.rotetasks.rf" if File.exists?("#{ENV['HOME']}/.rotetasks.rf")
-import 'local.rf' if File.exists?('local.rf')
-
-desc "Publish the documentation"
-task :pubdoc => [ :doc ] do
- unless ENV['RUBYFORGE_ACCT']
- raise "Need to set RUBYFORGE_ACCT to your rubyforge.org user name (e.g. 'fred')"
- end
- require 'rake/contrib/sshpublisher'
- Rake::SshDirPublisher.new(
- "#{ENV['RUBYFORGE_ACCT']}@rubyforge.org",
- "/var/www/gforge-projects/libxml",
- "html" ).upload
-end
-
View
33 www/doc/layouts/normal.html
@@ -1,33 +0,0 @@
-<html>
- <head>
- <title><%= @site_title %><%= if @page_title; ' - ' + @site_title; end %></title>
- <link rel='stylesheet' href='<%= link_rel '/stylesheets/normal.css' %>'/>
- </head>
- <body>
- <table>
- <tr valign="top">
- <td class='navlinks'>
- <strong>Navigation</strong><br/>
- <li><a class='nav' href="<%= link_rel '/index.html' %>">Home</a></li>
- <li><a class='nav' href="<%= link_rel '/install.html' %>">Installation</a></li>
- <li><a class='nav' href="<%= link_rel '/doc/' %>">Documentation</a></li>
- <li><a class='nav' href="http://rubyforge.org/projects/libxml">Project Page</a></li>
- <li><a class='nav' href="<%= link_rel '/license.html' %>">License</a></li>
- <br/>
- <strong>External</strong><br/>
- <li><a class='nav' href="http://xmlsoft.org/">Libxml2 project</a></li>
- </td>
- <td style="padding: 10px;">
- <%= @content_for_layout %>
- </td>
- </tr>
- </table>
-
- <div class='copyright'>
- Copyright &copy; 2001-2006 Libxml-Ruby project contributors.<br/>
- Website managed with<br/>
- <a href='http://rote.rubyforge.org/' target='_blank'><img src='<%= link_rel '/images/rote-tiny.png' %>' border="0" alt='Rote'/></a>
- </p>
- </body>
-</html>
-
View
11 www/doc/pages/COMMON.rb
@@ -1,11 +0,0 @@
-# Shared code for all pages below this directory.
-#
-# This is executed for every file transformed, in the binding of
-# the appropriate Rote::Page instance. Individual page sources
-# ([pagename].rb) override anything defined here.
-#
-# Any COMMON.rb files found in directories above this will also
-# be loaded.
-
-@site_title = "Ruby libxml Project"
-layout 'normal.html'
View
33 www/doc/pages/index.thtml
@@ -1,33 +0,0 @@
-h1. <span style="color: #901414">Libxml</span>-Ruby Project
-
-The <span style="color: #901414">Libxml-Ruby</span> project provides Ruby
-language bindings for the "GNOME Libxml2":http://xmlsoft.org XML toolkit.
-It is free software, released under the "MIT License":<%= link_rel '/license.html' %>
-
-Libxml-ruby's primary advantage over REXML is performance - if speed is your need,
-these are good libraries to consider, as demonstrated by the informal benchmark below.
-
-table{border: 1px solid black}.
-|\3. *Speed Comparison libxml vs. rexml* |
-|_.in seconds |_.libxml |_.rexml |
-|opening | 0.003954 | 0.104750 |
-|attribute_add | 0.001895 | 0.011114 |
-|subelems | 0.000585 | 0.004729 |
-|xpath | 0.013269 | 2.981499 |
-
-
-h2. Download
-
-You can find the latest release at:
-
- * "http://rubyforge.org/frs/?group_id=494":http://rubyforge.org/frs/?group_id=494
-
-Libxml-Ruby is also available for installation via "Rubygems":http://rubygems.rubyforge.org - see
-the "installation page":<%= link_rel '/install.html' %> for details.
-
-h2. Project Status
-
-The code has now been updated to work with Ruby 1.8, and is compiling cleanly
-and working well with GCC 4.x. We still have a number of open bugs to address,
-which is being done as we work toward a 0.4.0 release and the library is
-generally fairly stable in use.
View
59 www/doc/pages/install.thtml
@@ -1,59 +0,0 @@
-h2. Installation
-
-Libxml-Ruby supports installation via both the standard Ruby extconf install and
-"Rubygems":http://rubygems.rubyforge.org/ . In either case the requirements are
-the same - only the installation process differs.
-
-h3. Prerequisites
-
-libxml requires a few other libraries to be installed in order to build and
-function properly.
-
- * libm (math routines: very standard)
- * libz (zlib)
- * libiconv
- * libxml2
-
-We recommend GCC 4 be used for the build.
-
-h3. Installing with gems
-
-Installation via Gems is very simple - just issue the appropriate command,
-e.g:
-
- gem install -r libxml-ruby
-
-Note that depending on your setup you may need to run this as root:
-
- su -c 'gem install -r libxml-ruby'
-
-During installation Gems should build and install the extension to the correct
-location. If there are errors at this stage, Gem will report them and offer you
-the option to delete the extension.
-
-h3. Installing from the tarball
-
-Installation from the source tarball is only slightly more complex. Untar the
-archive somewhere appropriate, and change to the new directory this creates.
-If your environment requires no special configuration, you can simply type
-
- $ rake install
-
-to build, test, and install the extension.
-
-If you do need to pass options to extconf (to support a non-standard libxml2
-install location, for example) you will need to use make manually instead:
-
- $ cd ext/xml
- $ ruby extconf.rb [your-options]
- $ make
- $ [su -c ']make install[']
-
-Once the makefile is generated, the rest of the Rake tasks will function as
-intended, so you could run 'rake test' prior to installing, for example.
-
-h3. Installation problems
-
-If you experience problems during your build, please report them to the
-"mailing list":http://rubyforge.org/mail/?group_id=494 after searching the
-"archive":http://rubyforge.org/pipermail/libxml-devel/ .
View
20 www/doc/pages/license.html
@@ -1,20 +0,0 @@
-<pre><code>Copyright (c) 2002-2006 Sean Chittenden <sean@chittenden.org> and contributors
-Copyright (c) 2001 Wai-Sun "Squidster" Chia <waisun.chia@compaq.com>
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
-of the Software, and to permit persons to whom the Software is furnished to do
-so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.</code></pre>
View
BIN www/doc/res/images/rote-tiny.png
Deleted file not rendered
View
189 www/doc/res/stylesheets/normal.css
@@ -1,189 +0,0 @@
-/*
- * Uncopyrighted 2005 Ross Bamford.
- *
- * rosco at roscopeco dot co dot uk
- */
-body {
- background: #ffffff;
- color: #000000;
- font-family: arial, helvetica, sans-serif;
- font-size: 10px;
- padding: 0px;
- margin: 0px 0px 0px 0px;
-}
-
-/* * linky links *** */
-a:link {
- color: #cc3030;
- text-decoration: none;
-}
-
-a:hover {
- color: #df3b3b;
- text-decoration: underline;
-}
-
-a:active {
- color: #df3b3b;
- text-decoration: underline;
-}
-
-a:visited {
- color: #b02424;
- text-decoration: none;
-}
-
-a.nav:link {
- color: #cc3030;
- text-decoration: none;
- font-weight: bold;
- background: auto;
-}
-
-a.nav:hover {
- color: #df3b3b;
- text-decoration: underline;
- font-weight: bold;
- background: #c3c3c3;
-}
-
-a.nav:active {
- color: #df3b3b;
- text-decoration: underline;
- font-weight: bold;
- background: #c3c3c3;
-}
-
-a.nav:visited {
- color: #b02424;
- text-decoration: none;
- font-weight: bold;
- background: auto;
-}
-
-td.navlinks {
- padding: 10px;
- background: #f5fcf5; /* FFDDBB; */
- white-space: nowrap
-}
-
-div.copyright {
- /* Copyright bit on pages */
- color: #909090;
- position: relative;
- top: 5em;
- right: 2%;
- text-align: right;
- font-size: 8pt;
-}
-
-/* * page styles *** */
-
-h2 {
- border-bottom: thin #959595 solid;
-}
-
-h3 {
- border-bottom: thin #b8c8c8 solid;
-}
-
-h5 {
- border-bottom: thin #c0c0d8 solid;
-}
-
-div.note {
- background: #e8e8fa;
- border: thin dashed #3e5972;
- position: relative;
- width: 90%;
- left: 5%;
- right: 5%;
- text-align: right;
- font-size: 10pt;
- padding: 5px;
- margin-bottom: 5px;
-}
-
-/* * syntax ******** */
-pre.ruby {
- background: #f5f5f5;
- border: thin dashed #3e5972;
- padding: 10px;
- margin-left: 2em;
-}
-
-pre.ruby span.normal {
- color: #000000;
-}
-
-pre.ruby span.comment {
- color: #789a86;
- text-decoration: oblique;
-}
-
-pre.ruby span.ident {
- color: #0b0202;
-}
-
-pre.ruby span.punct {
- color: #8a7070;
-}
-
-pre.ruby span.symbol {
- color: #aa1010;
- font-weight: bold;
-}
-
-pre.ruby span.keyword {
- color: #903030;
- font-weight: bold;
-}
-
-pre.ruby span.constant {
- color: #3e5972;
- font-weight: bold;
-}
-
-pre.ruby span.string {
- color: #2020f0;
-}
-
-pre.ruby span.char {
- color: #2020f0;
- font-weight: bold;
-}
-
-pre.ruby span.number {
- color: #aa1010;
-}
-
-pre.ruby span.regex {