diff --git a/.classpath b/.classpath deleted file mode 100644 index b46784278..000000000 --- a/.classpath +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<classpath> - <classpathentry kind="src" path="src"/> - <classpathentry kind="lib" path="lib/runtime.jar"/> - <classpathentry kind="lib" path="lib/regexp.jar"/> - <classpathentry kind="lib" path="tools/java_cup.jar"/> - <classpathentry kind="lib" path="tools/JLex.jar"/> - <classpathentry kind="lib" path="lib/bcel-6.7.0.jar"/> - <classpathentry kind="lib" path="lib/endorsed/xml-apis.jar"/> - <classpathentry kind="lib" path="lib/endorsed/xercesImpl.jar"/> - <classpathentry kind="lib" path="lib/bsf.jar"/> - <classpathentry kind="lib" path="lib/commons-logging-1.2.jar"/> - <classpathentry kind="lib" path="lib/rhino-1.7.14.jar"/> - <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> - <classpathentry kind="output" path="build/classes"/> -</classpath> diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index a11736399..5ea42e580 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -35,34 +35,39 @@ jobs: java-version: 8 - name: 'Build Xalan jars' run: | - ant jar + mvn --no-transfer-progress clean compile site verify - uses: actions/checkout@v3 name: 'Checkout xalan-test' with: repository: apache/xalan-test path: xalan-test ref: master + - name: 'Cheat xalan-test up to be sibling of xalan-java' + run: | + mv xalan-test ..; ls .. - name: 'Run xalan-test tests' - working-directory: xalan-test + working-directory: ../xalan-test # NOTE: "alltest" target includes conformance tests known not to run in Xalan, # as well as having dependencies on some targets which have since been edited # out. The following is our typical minimal build test as documented in README, # minus conf.xsltc since that one is currently throwing four known failures and # isn't set up to say "but that's not a regression". - run: | - ant jar extensions.classes smoketest apitest -Dxalan.relpath=../ -Dparserjar=../lib/endorsed/xercesImpl.jar -Dxml-apis.jar=../lib/endorsed/xml-apis.jar -# ant fulldist is failing: in CI -# /home/runner/work/xalan-java/xalan-java/build.xml:1399: /home/runner/work/xalan-java/xalan-test does not exist. -# Error replicated on my system if there is not a sibling xalan-test. -# NOT replicated if sibling xalan-test directory is present -# Simplest fix would be to have the above test checkout emulate the dev environment; -# better would be to fix fulldist to intelligently check both locations; -# best might be to adopt xalan-test back into the xalan repository, if it's no longer being used elsewhere. - - name: 'Cheat xalan-test up to be sibling of xalan-java' - run: | - mv xalan-test ..; ls .. - - id: build_artifacts +# NOTE: Adjustments made for mvn build leaving things in a slightly different +# place than ant build did (and recreating /lib). run: | - ant fulldist + ls; ant -debug jar extensions.classes smoketest apitest -Dxalan.relpath=../xalan-java -Dparserjar=../xalan-java/lib/xercesImpl-2.12.2.jar -Dxml-apis.jar=../xalan-java/lib/xml-apis-1.4.01.jar +# Build distribution artifacts: Used to pull xalan-test back down as child and +# run fulldist: +# run: | +# ant fulldist +# fulldist isn't currently a separate target in the mvn build process +# A near-equivalent is being performed every time to build the .tar.gz +# and .zip distribution files. +# +# BUT NOTE that the binary distro has traditionally included +# xalan-test as a subdirectory; maven build doesn't yet pull that in. +# Discussion is in progress about whether it is (a) necessary, (b) a good +# idea. +# TODO: REVIEW. diff --git a/.gitignore b/.gitignore index d35296208..6c5d53050 100644 --- a/.gitignore +++ b/.gitignore @@ -1,36 +1,41 @@ -/bin/ -/build/ -/classes/ -/.idea/ +# Maven output +target/ +**/dependency-reduced-pom.xml + +# In Maven, dependencies are downloaded during build; +# we don't want to check them in +/tools/ + +# Xalan "Ant emulation" directories for xalan-test and distribution, +# created by Maven build. +# (xalan-test referenced dependencies from xalan-java; distro may be +# publishing from lib/ though I hope not.) +build/ +lib/ + +# Eclipse configuration +.settings/ +.project +.classpath + +# IntelliJ IDEA +.idea/ *.iml -.DS_Store -# We download the dependencies if they are missing -/lib/ -/tools/java_cup.jar -/tmp/ +# MacOS Finder +.DS_Store -# Generated sources +# XPath parser generated during compilation /src/org/apache/xalan/processor/XSLProcessorVersion.java /src/org/apache/xalan/xsltc/compiler/XPathLexer.java /src/org/apache/xalan/xsltc/compiler/XPathParser.java /src/org/apache/xalan/xsltc/compiler/sym.java -/xdocs/sources/xalan/DONE -/xdocs/sources/xalan/XSLTCDONE - -# The following are unpacked from zipfile -# NOTE: Might be simpler to just check 'em in unzipped. -/xdocs/style/graphics/ -/xdocs/style/loader.xml -/xdocs/style/resources/ -/xdocs/style/stylesheets/any2header.xsl -/xdocs/style/stylesheets/any2project.xsl -/xdocs/style/stylesheets/book2group.xsl -/xdocs/style/stylesheets/book2project.xsl -/xdocs/style/stylesheets/changes2document.xsl -/xdocs/style/stylesheets/context2footer.xsl -/xdocs/style/stylesheets/context2label.xsl -/xdocs/style/stylesheets/directory2project.xsl -/xdocs/style/stylesheets/document2html.xsl -/xdocs/style/stylesheets/faqs2document.xsl -/xdocs/style/stylesheets/group2document.xsl + +# Stylebook processing progress flags. +/stylebook/sources/xalan/DONE +/stylebook/sources/xalan/XSLTCDONE + +# Various temporary/work directories used by other tools +/bin/ +/classes/ +/tmp/ diff --git a/.project b/.project deleted file mode 100644 index 56d086ee9..000000000 --- a/.project +++ /dev/null @@ -1,33 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<projectDescription> - <name>xalan-j-trunk</name> - <comment></comment> - <projects> - </projects> - <buildSpec> - <buildCommand> - <name>org.eclipse.jdt.core.javabuilder</name> - <arguments> - </arguments> - </buildCommand> - </buildSpec> - <natures> - <nature>org.eclipse.jdt.core.javanature</nature> - </natures> -</projectDescription> diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index 5917cfb92..000000000 --- a/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,269 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 -org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve -org.eclipse.jdt.core.compiler.compliance=1.8 -org.eclipse.jdt.core.compiler.debug.lineNumber=generate -org.eclipse.jdt.core.compiler.debug.localVariable=generate -org.eclipse.jdt.core.compiler.debug.sourceFile=generate -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning -org.eclipse.jdt.core.compiler.release=disabled -org.eclipse.jdt.core.compiler.source=1.8 -org.eclipse.jdt.core.formatter.align_type_members_on_columns=false -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_enum_constant=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_explicit_constructor_call=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_arguments_in_qualified_allocation_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_assignment=0 -org.eclipse.jdt.core.formatter.alignment_for_binary_expression=16 -org.eclipse.jdt.core.formatter.alignment_for_compact_if=16 -org.eclipse.jdt.core.formatter.alignment_for_conditional_expression=80 -org.eclipse.jdt.core.formatter.alignment_for_enum_constants=0 -org.eclipse.jdt.core.formatter.alignment_for_expressions_in_array_initializer=16 -org.eclipse.jdt.core.formatter.alignment_for_multiple_fields=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_parameters_in_method_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_selector_in_method_invocation=16 -org.eclipse.jdt.core.formatter.alignment_for_superclass_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_enum_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_superinterfaces_in_type_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_constructor_declaration=16 -org.eclipse.jdt.core.formatter.alignment_for_throws_clause_in_method_declaration=16 -org.eclipse.jdt.core.formatter.blank_lines_after_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_after_package=1 -org.eclipse.jdt.core.formatter.blank_lines_before_field=0 -org.eclipse.jdt.core.formatter.blank_lines_before_first_class_body_declaration=0 -org.eclipse.jdt.core.formatter.blank_lines_before_imports=1 -org.eclipse.jdt.core.formatter.blank_lines_before_member_type=1 -org.eclipse.jdt.core.formatter.blank_lines_before_method=1 -org.eclipse.jdt.core.formatter.blank_lines_before_new_chunk=1 -org.eclipse.jdt.core.formatter.blank_lines_before_package=0 -org.eclipse.jdt.core.formatter.blank_lines_between_import_groups=1 -org.eclipse.jdt.core.formatter.blank_lines_between_type_declarations=1 -org.eclipse.jdt.core.formatter.brace_position_for_annotation_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_anonymous_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_array_initializer=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_block_in_case=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_constructor_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_constant=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_enum_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_method_declaration=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_switch=end_of_line -org.eclipse.jdt.core.formatter.brace_position_for_type_declaration=end_of_line -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_block_comment=false -org.eclipse.jdt.core.formatter.comment.clear_blank_lines_in_javadoc_comment=false -org.eclipse.jdt.core.formatter.comment.format_block_comments=true -org.eclipse.jdt.core.formatter.comment.format_header=false -org.eclipse.jdt.core.formatter.comment.format_html=true -org.eclipse.jdt.core.formatter.comment.format_javadoc_comments=true -org.eclipse.jdt.core.formatter.comment.format_line_comments=true -org.eclipse.jdt.core.formatter.comment.format_source_code=true -org.eclipse.jdt.core.formatter.comment.indent_parameter_description=true -org.eclipse.jdt.core.formatter.comment.indent_root_tags=true -org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags=insert -org.eclipse.jdt.core.formatter.comment.insert_new_line_for_parameter=insert -org.eclipse.jdt.core.formatter.comment.line_length=80 -org.eclipse.jdt.core.formatter.compact_else_if=true -org.eclipse.jdt.core.formatter.continuation_indentation=2 -org.eclipse.jdt.core.formatter.continuation_indentation_for_array_initializer=2 -org.eclipse.jdt.core.formatter.format_guardian_clause_on_one_line=false -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_annotation_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_constant_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_enum_declaration_header=true -org.eclipse.jdt.core.formatter.indent_body_declarations_compare_to_type_header=true -org.eclipse.jdt.core.formatter.indent_breaks_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_empty_lines=false -org.eclipse.jdt.core.formatter.indent_statements_compare_to_block=true -org.eclipse.jdt.core.formatter.indent_statements_compare_to_body=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_cases=true -org.eclipse.jdt.core.formatter.indent_switchstatements_compare_to_switch=false -org.eclipse.jdt.core.formatter.indentation.size=4 -org.eclipse.jdt.core.formatter.insert_new_line_after_annotation=insert -org.eclipse.jdt.core.formatter.insert_new_line_after_opening_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_at_end_of_file_if_missing=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_catch_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_closing_brace_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_else_in_if_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_finally_in_try_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_before_while_in_do_statement=do not insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_annotation_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_block=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_method_body=insert -org.eclipse.jdt.core.formatter.insert_new_line_in_empty_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_after_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_after_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_at_in_annotation_type_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_angle_bracket_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_after_closing_paren_in_cast=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_case=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_colon_in_labeled_statement=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_allocation_expression=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_constructor_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_constant_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_enum_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_explicitconstructorcall_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_increments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_for_inits=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_declaration_throws=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_method_invocation_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_field_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_multiple_local_declarations=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_parameterized_type_reference=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_superinterfaces=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_arguments=insert -org.eclipse.jdt.core.formatter.insert_space_after_comma_in_type_parameters=insert -org.eclipse.jdt.core.formatter.insert_space_after_ellipsis=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_opening_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_after_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_after_semicolon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_after_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_and_in_type_parameter=insert -org.eclipse.jdt.core.formatter.insert_space_before_assignment_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_at_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_binary_operator=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_cast=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_catch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_if=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_switch=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_synchronized=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_closing_paren_in_while=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_assert=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_case=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_default=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_colon_in_labeled_statement=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_constructor_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_constant_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_enum_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_explicitconstructorcall_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_increments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_for_inits=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_declaration_throws=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_method_invocation_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_field_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_multiple_local_declarations=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_superinterfaces=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_ellipsis=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_parameterized_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_arguments=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_angle_bracket_in_type_parameters=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_annotation_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_anonymous_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_array_initializer=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_block=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_constructor_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_constant=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_enum_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_method_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_brace_in_type_declaration=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_bracket_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_catch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_for=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_if=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_parenthesized_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_switch=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_synchronized=insert -org.eclipse.jdt.core.formatter.insert_space_before_opening_paren_in_while=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_return=insert -org.eclipse.jdt.core.formatter.insert_space_before_parenthesized_expression_in_throw=insert -org.eclipse.jdt.core.formatter.insert_space_before_postfix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_prefix_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_conditional=insert -org.eclipse.jdt.core.formatter.insert_space_before_question_in_wildcard=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_semicolon_in_for=do not insert -org.eclipse.jdt.core.formatter.insert_space_before_unary_operator=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_brackets_in_array_type_reference=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_braces_in_array_initializer=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_brackets_in_array_allocation_expression=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_annotation_type_member_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_constructor_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_enum_constant=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_declaration=do not insert -org.eclipse.jdt.core.formatter.insert_space_between_empty_parens_in_method_invocation=do not insert -org.eclipse.jdt.core.formatter.keep_else_statement_on_same_line=false -org.eclipse.jdt.core.formatter.keep_empty_array_initializer_on_one_line=false -org.eclipse.jdt.core.formatter.keep_imple_if_on_one_line=false -org.eclipse.jdt.core.formatter.keep_then_statement_on_same_line=false -org.eclipse.jdt.core.formatter.lineSplit=80 -org.eclipse.jdt.core.formatter.never_indent_block_comments_on_first_column=false -org.eclipse.jdt.core.formatter.never_indent_line_comments_on_first_column=false -org.eclipse.jdt.core.formatter.number_of_blank_lines_at_beginning_of_method_body=0 -org.eclipse.jdt.core.formatter.number_of_empty_lines_to_preserve=1 -org.eclipse.jdt.core.formatter.put_empty_statement_on_new_line=true -org.eclipse.jdt.core.formatter.tabulation.char=space -org.eclipse.jdt.core.formatter.tabulation.size=4 -org.eclipse.jdt.core.formatter.use_tabs_only_for_leading_indentations=false -org.eclipse.jdt.core.formatter.wrap_before_binary_operator=true diff --git a/.settings/org.eclipse.jdt.ui.prefs b/.settings/org.eclipse.jdt.ui.prefs deleted file mode 100644 index 7e642675d..000000000 --- a/.settings/org.eclipse.jdt.ui.prefs +++ /dev/null @@ -1,5 +0,0 @@ -#Mon Jul 14 00:07:56 EDT 2008 -eclipse.preferences.version=1 -formatter_profile=_Development -formatter_settings_version=11 -org.eclipse.jdt.ui.text.custom_code_templates=<?xml version\="1.0" encoding\="UTF-8"?><templates><template autoinsert\="true" context\="gettercomment_context" deleted\="false" description\="Comment for getter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.gettercomment" name\="gettercomment">/**\r\n * @return the ${bare_field_name}\r\n */</template><template autoinsert\="true" context\="settercomment_context" deleted\="false" description\="Comment for setter method" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.settercomment" name\="settercomment">/**\r\n * @param ${param} the ${bare_field_name} to set\r\n */</template><template autoinsert\="true" context\="constructorcomment_context" deleted\="false" description\="Comment for created constructors" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorcomment" name\="constructorcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="filecomment_context" deleted\="false" description\="Comment for created Java files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.filecomment" name\="filecomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="typecomment_context" deleted\="false" description\="Comment for created types" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.typecomment" name\="typecomment">/**\r\n * @author ${user}\r\n *\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="fieldcomment_context" deleted\="false" description\="Comment for fields" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.fieldcomment" name\="fieldcomment">/**\r\n * \r\n */</template><template autoinsert\="true" context\="methodcomment_context" deleted\="false" description\="Comment for non-overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodcomment" name\="methodcomment">/**\r\n * ${tags}\r\n */</template><template autoinsert\="true" context\="overridecomment_context" deleted\="false" description\="Comment for overriding methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.overridecomment" name\="overridecomment">/* (non-Javadoc)\r\n * ${see_to_overridden}\r\n */</template><template autoinsert\="true" context\="delegatecomment_context" deleted\="false" description\="Comment for delegate methods" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.delegatecomment" name\="delegatecomment">/**\r\n * ${tags}\r\n * ${see_to_target}\r\n */</template><template autoinsert\="false" context\="newtype_context" deleted\="false" description\="Newly created files" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.newtype" name\="newtype">/*\r\n * Licensed to the Apache Software Foundation (ASF) under one or more\r\n * contributor license agreements. See the NOTICE file distributed with\r\n * this work for additional information regarding copyright ownership.\r\n * The ASF licenses this file to You under the Apache License, Version 2.0\r\n * (the "License"); you may not use this file except in compliance with\r\n * the License. You may obtain a copy of the License at\r\n * \r\n * http\://www.apache.org/licenses/LICENSE-2.0\r\n * \r\n * Unless required by applicable law or agreed to in writing, software\r\n * distributed under the License is distributed on an "AS IS" BASIS,\r\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n * See the License for the specific language governing permissions and\r\n * limitations under the License.\r\n */\r\n\r\n${package_declaration}\r\n\r\n/**\r\n * @version $$Id\: $$\r\n */\r\n${type_declaration}</template><template autoinsert\="true" context\="classbody_context" deleted\="false" description\="Code in new class type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.classbody" name\="classbody">\r\n</template><template autoinsert\="true" context\="interfacebody_context" deleted\="false" description\="Code in new interface type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.interfacebody" name\="interfacebody">\r\n</template><template autoinsert\="true" context\="enumbody_context" deleted\="false" description\="Code in new enum type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.enumbody" name\="enumbody">\r\n</template><template autoinsert\="true" context\="annotationbody_context" deleted\="false" description\="Code in new annotation type bodies" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.annotationbody" name\="annotationbody">\r\n</template><template autoinsert\="true" context\="catchblock_context" deleted\="false" description\="Code in new catch blocks" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.catchblock" name\="catchblock">// ${todo} Auto-generated catch block\r\n${exception_var}.printStackTrace();</template><template autoinsert\="true" context\="methodbody_context" deleted\="false" description\="Code in created method stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.methodbody" name\="methodbody">// ${todo} Auto-generated method stub\r\n${body_statement}</template><template autoinsert\="true" context\="constructorbody_context" deleted\="false" description\="Code in created constructor stubs" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.constructorbody" name\="constructorbody">${body_statement}\r\n// ${todo} Auto-generated constructor stub</template><template autoinsert\="true" context\="getterbody_context" deleted\="false" description\="Code in created getters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.getterbody" name\="getterbody">return ${field};</template><template autoinsert\="true" context\="setterbody_context" deleted\="false" description\="Code in created setters" enabled\="true" id\="org.eclipse.jdt.ui.text.codetemplates.setterbody" name\="setterbody">${field} \= ${param};</template></templates> diff --git a/NOTICE.txt b/NOTICE.txt index 5c9ce77c9..e88972d09 100644 --- a/NOTICE.txt +++ b/NOTICE.txt @@ -10,16 +10,16 @@ Copyright 1999-2012 The Apache Software Foundation This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). + The Apache Software Foundation (http://www.apache.org/) ========================================================================= Portions of this software was originally based on the following: - - software copyright (c) 1999-2002, Lotus Development Corporation., - http://www.lotus.com. - - software copyright (c) 2001-2002, Sun Microsystems., - http://www.sun.com. - - software copyright (c) 2003, IBM Corporation., - http://www.ibm.com. + - software copyright (c) 1999-2002, Lotus Development Corporation, + http://www.lotus.com + - software copyright (c) 2001-2002, Sun Microsystems, + http://www.sun.com + - software copyright (c) 2003, IBM Corporation, + http://www.ibm.com ========================================================================= The binary distribution package (ie. jars, samples and documentation) of @@ -59,27 +59,27 @@ Copyright 1999-2022 The Apache Software Foundation This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). + The Apache Software Foundation (http://www.apache.org/) Portions of Apache Xerces Java in xercesImpl.jar and xml-apis.jar were originally based on the following: - - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. + - software copyright (c) 1999, IBM Corporation, http://www.ibm.com + - software copyright (c) 1999, Sun Microsystems, http://www.sun.com - voluntary contributions made by Paul Eng on behalf of the Apache Software Foundation that were originally developed at iClick, Inc., - software copyright (c) 1999. + software copyright (c) 1999 ========================================================================= Apache xml-commons xml-apis (redistribution of xml-apis.jar) Apache XML Commons - Copyright 2001-2003,2006 The Apache Software Foundation. + Copyright 2001-2003, 2006 The Apache Software Foundation This product includes software developed at - The Apache Software Foundation (http://www.apache.org/). + The Apache Software Foundation (http://www.apache.org/) Portions of this software were originally based on the following: - - software copyright (c) 1999, IBM Corporation., http://www.ibm.com. - - software copyright (c) 1999, Sun Microsystems., http://www.sun.com. - - software copyright (c) 2000 World Wide Web Consortium, http://www.w3.org + - software copyright (c) 1999, IBM Corporation, http://www.ibm.com + - software copyright (c) 1999, Sun Microsystems, http://www.sun.com + - software copyright (c) 2000, World Wide Web Consortium, http://www.w3.org diff --git a/README b/README index 0fd73e9dd..59b949aee 100644 --- a/README +++ b/README @@ -14,110 +14,201 @@ * See the License for the specific language governing permissions and * limitations under the License. --> - +Apache Xalan-Java Build, Test, and Release Notes Copyright 1999-2023 The Apache Software Foundation Authors: Gary Gregory <ggregory@apache.org> - Joe Kesselman + Joe Kesselman <jkesselm@apache.org> Mukul Gandhi <mukulg@apache.org> -This file primarily, contains instructions to the person(s) who shall be making an Apache XalanJ -release for distribution, along with the instructions about how to test XalanJ release before -recommending the release for distribution. +This document's primarily focused on building artifacts for production +releases of the Apache Xalan-J XSLT processor, but may be helpful for +others working with Xalan's source. + +(0) Prerequisites + +Official Xalan builds are currently being performed using Maven +version 6.3.6 and a Java 1.8 Development Kit. We recommend Eclipse +Temurun for the latter; it is available from +https://adoptium.net/temurin/releases/?version=8. Be sure to install +the JDK, not just the JRE. + +The xalan tests, however, are still relying on Apache Ant. You can +obtain this from https://ant.apache.org/bindownload.cgi. I have been +testing with Ant 1.10.12, but have successfully built with 1.9.16 as +well. -The details mentioned within this file, may also be used, by XalanJ source distribution users to -build and test XalanJ from the source distribution (except that, "git clone" steps as mentioned -within this file, might not be required to be run by XalanJ source distribution users). (1) Steps to build the XalanJ release -1) Do a git clone, of the relevant XalanJ branches: +1.1) Obtain the source for XalanJ and its test package. + +"Source Distribution" jarfiles are available which contain a snapshot +of a particular release of the source code; extracting them with "jar +-xf" will yield the xalan-java and xalan-test directories. + +Or (usually preferred) you can use "git clone" to obtain these from +either github.com. or gitbox.apache.org. New development takes place +on the branch currently called "master", which git will fetch by default: + + git clone https://github.com/apache/xalan-java.git + git clone https://github.com/apache/xalan-test.git + +(In the past this code was hosted at gitbox.apache.org, but that now +redirects to the github copy.) + +If you want to build a specific release rather than the development +version, you can obtain that by adding the release's branch name to +the git clone operation. For example, to get the code released as +version 2.7.1, you would issue the command + + git clone https://github.com/apache/xalan-java.git --single-branch --branch xalan-j_2_7_1 + +There will also usually be a _maint branch, which is used for development and testing of "hot fixes" that will be made available as new point releases (for example, 2.7.1.1). You would access this as + + git clone https://github.com/apache/xalan-java.git --single-branch --branch xalan-j_2_7_1_maint -git clone --single-branch https://gitbox.apache.org/repos/asf/xalan-java.git -b xalan-j_2_7_1_maint +Whether you perform the git clone operations or unpack the source +distribution jarfiles, each produces its own folder: xalan-java and +xalan-test. Since xalan-test looks for code to be tested via the path +../xalan-java, these will need to be children of the same parent +directory for the tests to run. -git clone https://gitbox.apache.org/repos/asf/xalan-test.git -This creates two folders: xalan-java and xalan-test. These folders need to be parallel to -each other, to be able to follow the XalanJ build and tests steps as described in this document, -for making a XalanJ release for distribution. +1.2) Set JAVA_HOME and ANT_HOME environment variable. On Linux, assuming +a standard installation of the JDK with the "alternatives" tooling, +the easiest way to be sure you have the right JDK may be to use the +command -2) Set JAVA_HOME and ANT_HOME environment variables, for example on Windows: + export ANT_HOME=/usr/share/ant + export JAVA_HOME=$(readlink -f /etc/alternatives/java_sdk_1.8.0) -set JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-8.0.352.8-hotspot\ +On Windows, you will probably need to set these more explicitly, and add them to your PATH: -set ANT_HOME=C:\java\apache-ant-1.10.12 + set ANT_HOME=C:\path\to\your\installed\apache-ant- + set JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-8.0.352.8-hotspot\ + set PATH=%JAVA_HOME%;%ANT_HOME%;%PATH% -3) Run the command, "build clean fulldist" from folder xalan-java. -For XalanJ source distribution users, this command needs to be run from, the root -of the XalanJ source distribution folder (i.e, from the source distribution folder, -which contains folders "src", "tools" etc). +1.3) Go to the xalan-java source directory (i.e, from the source +distribution folder, which contains folders "src", "tools" etc), and +from there run the clean-and-distribution-build command: -(2) Steps to run the XalanJ tests, on XalanJ implementation + On Linux, run ./mvnbuild.sh + On Windows, run ./mvnbuild.bat -Note that, for XalanJ source distribution users, XalanJ implementation shall be -produced (that XalanJ source distribution users, might want to test) by running -the build command "build clean fulldist" from the root of the XalanJ source -distribution folder. +This will build: + ./target/site/apidocs: Javadoc for the Xalan code base -1) Go to the XalanJ tests repos's, local git clone folder: -cd ..\xalan-test + ./target/site/design: Architecture documentation for Xalan + (probably outdated) -For XalanJ source distribution users, xalan-test folder is located at the root of the XalanJ -source distribution folder (i.e, parallel to folders "src", "tools" etc within the main XalanJ -codebase folder location), from where XalanJ source distribution users may run XalanJ -tests, by using the "build" script located at this folder location. + ./target/site/xsltc: Architecture documentation for the Xalan bytecode + compilation operations (probably outdated) -2) Set JAVA_HOME and ANT_HOME environment variables, for example: + ./build/*.jar: Executable jarfiles for the XML Serializer, the Xalan + XSLT Processor, some old xsltc samples and the @xsl.usage taglet + we used in producing the Javadoc/apidocs (see above). -set JAVA_HOME=C:\Program Files\Eclipse Adoptium\jdk-8.0.352.8-hotspot\ +1.4) IMPORTANT: Until we get xalan-test updated, you will need to go to the +xalan-java/build directory and manually copy or rename the jarfiles to +remove the version number: -set ANT_HOME=C:\java\apache-ant-1.10.12 + Linux: + mv xalan-*.jar xalan.jar + mv serializer-*.jar serializer.jar + Windows: + ren xalan-*.jar xalan.jar + ren serializer-*.jar serializer.jar -3) Run the command "build clean jar" from folder xalan-test. This produces -the file testxsl.jar that acts as main XalanJ test driver, within folder xalan-test/java/build. -4) Run the necessary XalanJ tests as follows, +(2) Steps to run the XalanJ tests, assuming you have already build +xalan-java as discussed above: -The tests described below within points 4.1, 4.2, 4.3 need to be run from folder xalan-test. +2.1) Go to the xalan-tests local folder. If you have cloned xalan-java +and xalan-test from Git, it will be a sibling of xalan-java. -4.1 Run the ant target "smoketest", using following two commands in sequence shown below +BUT: For XalanJ source distribution users, the xalan-test folder is +shipped as a child of the xalan-java source folder (i.e, parallel to +folders "src", "tools" etc within the main XalanJ codebase folder +location). In theory you *should* be able to run the tests directly +from here, but if you run into trouble try moving xalan-test up to be +a sibling of xalan-java. -build extensions.classes +2.2) Ensure the JAVA_HOME, ANT_HOME, and (on Windows) PATH environment +variables have been set as discussed above. -build smoketest +2.3) Go to the xalan-test folder, and from there run a clean source +build. Unfortunately we don't currently have a single target for this, +so you need to spell out some of the supporting packages: -The final result of the command "build smoketest" should be following, + Linux: ./build.sh clean jar extensions.classes bugzilla.classes jira.classes + Windows: build clean jar extensions.classes bugzilla.classes jira.classes + +The jar target builds the main XalanJ test driver, testxsl.jar, which +acts as main XalanJ test driver. The .classes targets build supporting +code specific to testing XSLT Extensions or some old issues reported +via Bugzilla or (more recently) Jira. + + +2.4) From the xalan-test directory, you can run the necessary XalanJ +tests as follows: + +2.4.1) The most important test set is smoketest. This exercises all +the testcases known to work in Apache Xalan-J, while avoiding some +which have open issues against them. + +Make sure you have built the jar and extensions.classes, as +above. Then, from the xalan-test directory: + + Linux: ./build.sh smoketest + Windows: build smoketest + +At the end of the test run, smoketest should report: smoketest-pass: [echo] [minitest] CONGRATULATIONS! The Smoketest passed! - -4.2 Run the ant target "apitest", using following command -build apitest -The final result of the command "build apitest" should be following, +2.4.2) Run the ant target "apitest", using following command + + Linux: ./build.sh apitest + Windows: build apitest + +At the end of the test run, apitest should report: apitest-pass-file-check: [echo] [minitest] CONGRATULATIONS! The api tests passed! -4.3 Run the ant target "conf.xsltc", using the following command -build conf.xsltc +2.4.3) Run the ant target "conf.xsltc", using the following command -The final result of the command "build conf.xsltc" should be following, + Linux: ./build.sh conf.xsltc + Windows: build conf.xsltc -[echo] [minitest] CONGRATULATIONS! The conf.xsltc tests passed! - -The XalanJ XSLTC processor, producing compiled translets, is known to have certain issues -as summarized by the following jira tickets, for the respective mentioned XalanJ conf.xsltc -test cases as mentioned below (users shall currently see, these xalanj test cases as failing, -within the test build conf.xsltc's output). +At the end of the test run, conf.xsltc should report: -1) output63 https://issues.apache.org/jira/browse/XALANJ-2642 -2) idkey49 https://issues.apache.org/jira/browse/XALANJ-2640 -3) math111 https://issues.apache.org/jira/browse/XALANJ-2641 -4) whitespace35 https://issues.apache.org/jira/browse/XALANJ-2643 +[echo] [minitest] CONGRATULATIONS! The conf.xsltc tests passed! -These XSLT transformation issues, do not exist with the XalanJ interpretive processor. +PLEASE NOTE that XSLTC has some known issues, which will cause FAIL +reports during this test. These are not considered regressions, and +are specialcased so conf.xsltc reports "passed" despite them. There +are Jira tickets open to address these bugs, and when fixes become +available we will again insist that these tests pass. + + output63 https://issues.apache.org/jira/browse/XALANJ-2642 + idkey49 https://issues.apache.org/jira/browse/XALANJ-2640 + math111 https://issues.apache.org/jira/browse/XALANJ-2641 + whitespace35 https://issues.apache.org/jira/browse/XALANJ-2643 + +2.4.4) Other test targets exist, which are either subsets of the above +or are considered less essential for regression testing. You may want +to read through the build.xml file to find them. NOTE that one target, +"api", is currently missing, which causes the "all" target to fail; we +need to clean that up at some point. + +2.5) When bugs are reported, tests should be added (at least to the +jira test set) to demonstrate the problem. When bugs are fixed, those +tests should be migrated either to the appropriate category or to the +"contrib" bucket if they don't fit nicely anywhere else. If the bug report was in error, the test demonstrating the (correct but unexpected) behavior may be either discarded, or moved as above if we think it's a useful illustration. \ No newline at end of file diff --git a/commits.xml b/ancient_history.commits.xml similarity index 100% rename from commits.xml rename to ancient_history.commits.xml diff --git a/build.bat b/build.bat deleted file mode 100644 index 25c89b866..000000000 --- a/build.bat +++ /dev/null @@ -1,70 +0,0 @@ -@echo off -rem -rem ========================================================================== -rem = Licensed to the Apache Software Foundation (ASF) under one or more -rem = contributor license agreements. See the NOTICE file distributed with -rem = this work for additional information regarding copyright ownership. -rem = The ASF licenses this file to You under the Apache License, Version 2.0 -rem = (the "License"); you may not use this file except in compliance with -rem = the License. You may obtain a copy of the License at -rem = -rem = http://www.apache.org/licenses/LICENSE-2.0 -rem = -rem = Unless required by applicable law or agreed to in writing, software -rem = distributed under the License is distributed on an "AS IS" BASIS, -rem = WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -rem = See the License for the specific language governing permissions and -rem = limitations under the License. -rem ========================================================================== -rem -rem build.bat: Build Xalan-J 2.x using Ant -rem Author: XalanJ team -rem -rem Usage: build [ant-options] [targets] -rem -rem Setup: -rem 1) You must set JAVA_HOME -rem -rem 2) You can set ANT_HOME if you use your own Ant install - -echo. -echo Xalan-J 2.x Build -echo ----------------- - -if "%JAVA_HOME%"=="" goto noJavaHome - -if exist "%JAVA_HOME%\lib\tools.jar" ( - set _CLASSPATH=%JAVA_HOME%\lib\tools.jar -) - -set _JAVACMD=%JAVA_HOME%\bin\java - -rem Default ANT_HOME to the one what user has set -if not "%ANT_HOME%"=="" set _ANT_HOME=%ANT_HOME% -if "%ANT_HOME%"=="" set _ANT_HOME=. - -if exist "%_ANT_HOME%\tools\ant.jar" ( - set _ANT_JARS=%_ANT_HOME%\tools\ant.jar -) else ( - set _ANT_JARS=%_ANT_HOME%\lib\ant.jar;%_ANT_HOME%\lib\ant-launcher.jar -) - -set _CLASSPATH=%_CLASSPATH%;%_ANT_JARS% - -set XERCES_ENDORSED_DIR_PATH=lib\endorsed - -@echo on -"%_JAVACMD%" -mx1024m -Djava.endorsed.dirs=%XERCES_ENDORSED_DIR_PATH% -classpath "%_CLASSPATH%" org.apache.tools.ant.Main %1 %2 %3 %4 %5 %6 %7 %8 %9 -@echo off - -goto end - -:noJavaHome -echo Warning: JAVA_HOME environment variable is not set - -:end -rem Cleanup environment variables -set _JAVACMD= -set _CLASSPATH= -set _ANT_HOME= -set _ANT_JARS= diff --git a/build.sh b/build.sh deleted file mode 100644 index 4f7ac97c1..000000000 --- a/build.sh +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/sh -# -#========================================================================= -# Copyright 2001-2023 The Apache Software Foundation. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#========================================================================= -# -# Name: build.sh -# Author: Joe Kesselman -# Fresh port from Mukul Gandhi's revised build.bat. -# WARNING: This currently does not include the hooks needed -# to make the script compatable with cygwin (unix/Linux shell -# and commands ported to run under Windows). See -# deprecated_build.sh to see how we handled the cygwin -# syntax differences back in 2001. These days, Windows users -# are more likely to use WSL, which simplifies matters. - -# See: build.xml - -# Setup: -# 1) You must set JAVA_HOME, for example, -# $ export JAVA_HOME=/etc/alternatives/java_sdk - -# 2) You can set ANT_HOME if you use your own Ant install, for example, -# $ export ANT_HOME=/usr/share/ant - -echo -echo Xalan-J test automation build -echo ----------------------------- - -if [ "$1" = "-h" ]; then - echo build.sh - executes Xalan Java-based test automation - echo Usage: build [target] [-D options] - echo Example: build api -DtestClass=TransformerAPITest -Dqetest.loggingLevel=30 - echo - echo You MUST export the JAVA_HOME environment variable to point to the JDK - echo You CAN export ANT_HOME environment variable if you use your own Ant install - - exit 1 -fi - -if [ "$JAVA_HOME" = "" ]; then - echo Warning: JAVA_HOME environment variable is not exported - echo You may have meant to set it to /etc/alternatives/java_sdk - exit 1 -fi - -if [ -f "$JAVA_HOME/lib/tools.jar" ]; then - CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar -fi - -JAVACMD=$JAVA_HOME/bin/java - -CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar - -# Since Linux has scoped environments, we don't need explicit temporary vars. -# Default is to use a copy of ant bundled with xalan-java. -if [ "$ANT_HOME" = "" ]; then - ANT_HOME=. -fi - -# Check user's ANT_HOME to make sure it actually has what we need -if [ -f "$ANT_HOME/tools/ant.jar" ]; then - ANT_JARS=$ANT_HOME/tools/ant.jar -else - ANT_JARS=$ANT_HOME/lib/ant.jar:$ANT_HOME/lib/ant-launcher.jar -fi - -CLASSPATH=$CLASSPATH:$ANT_JARS - -XERCES_ENDORSED_DIR_PATH=lib/endorsed - -XALAN_BUILD_DIR_PATH=../xalan-java/build:../build - -# Reminder: Note $* versus $@ distinction -echo Running:$JAVACMD -mx1024m -Djava.endorsed.dirs=$XERCES_ENDORSED_DIR_PATH -classpath "$CLASSPATH" org.apache.tools.ant.Main "$@" -$JAVACMD -mx1024m -Djava.endorsed.dirs=$XERCES_ENDORSED_DIR_PATH -classpath "$CLASSPATH" org.apache.tools.ant.Main "$@" - -echo "build.sh complete!" diff --git a/build.xml b/build.xml deleted file mode 100644 index 55c7d38e5..000000000 --- a/build.xml +++ /dev/null @@ -1,1936 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> - -<!-- =================================================================== - - Build file for Xalan-J 2.x - for use with the Jakarta Ant java build tool - -Setup instructions: - Before running an Ant build, you must - - - set the JAVA_HOME environment variable to the JDK root directory - - To build 'servlet' sample: Include Servlet SDK in your classpath - - To build docs/javadocs/xsltc: use JDK 1.2.x or higher - -Build Instructions: - To build, run - build.bat (win32) or build.sh (unix) [antoptions] [targets] - in the directory where this file is located; you should also be - able to use an installation of Ant v1.4.1 or later. - - build -projecthelp will show a list of supported targets. - - Developers: include a description="" attribute in all user-callable targets. - - If you build a target that depends on other targets, those other - targets are *usually* created in the correct order; however a - few of the larger targets like dist do not list all dependencies. - -Other Important Notes: -- 'dist' produces a .tar file that works with GNU compatible tar - programs, because that's what Ant does when it finds a path that's - longer than 100 characters (like in our docs). Sorry! - -- External build maintainers: look for GUMP: comments; developers - please use great caution when changing these lines! - -- Unusual build items: the docs and xsltc.compile targets leave - cruft in the source areas; various clean targets get most of this. - -Authors: - Shane Curcuru <shane_curcuru@lotus.com> - Don Leslie <donald_leslie@lotus.com> - -$Id$ -==================================================================== --> - -<project name="Xalan" default="jar" basedir="."> - - <property name="name" value="xalan"/> - <property name="year" value="2023"/> - <property name="build.debug" value="on"/> - <property name="compiler.target" value="1.8"/> - <property name="compiler.source" value="1.8"/> - <property name="compiler.nowarn" value="on"/> - - <!-- Xalan Java version information --> - <property name="version.VERSION" value="2"/> - <property name="version.RELEASE" value="7"/> - <property name="version.DEVELOPER" value=""/><!-- Set this to 'D' if a developer release; blank "" if maintenance release --> - <property name="version.MINOR" value="3"/><!-- EITHER the developer release number, or a maintenance release number --> - <property name="version" value="${version.VERSION}_${version.RELEASE}_${version.DEVELOPER}${version.MINOR}"/><!-- GUMP: version # of dist file --> - <property name="impl.version" value="${version.VERSION}.${version.RELEASE}.${version.DEVELOPER}${version.MINOR}"/><!-- Used in jar task for filtering MANIFEST.MF file --> - - <!-- Xerces Java version information --> - <property name="parser.version.VERSION" value="2"/> - <property name="parser.version.RELEASE" value="12"/> - <property name="parser.version.MINOR" value="2"/> - - <!-- Xalan Java directories --> - <!-- <property name="bin.dir" value="./bin"/> --> - <property name="build.dir" value="./build"/> - <property name="lib.dir" value="./lib"/> - <property name="endorsed.dir" value="${lib.dir}/endorsed"/> - <property name="samples.dir" value="./samples"/> - <property name="src.dir" value="./src"/> - <property name="tools.dir" value="./tools"/> - <property name="xdocs.dir" value="./xdocs"/> - - <property name="apachexml.reldir" value="org/apache/xml"/> - <property name="serializer.reldir" value="org/apache/xml/serializer"/> - <property name="xpath.reldir" value="org/apache/xpath"/> - <property name="xalan.reldir" value="org/apache/xalan"/> - <property name="domxpath.reldir" value="org/w3c/dom/xpath"/> - <property name="xsltc.reldir" value="${xalan.reldir}/xsltc"/> - - <!-- Jars to run Xalan Java (Interpretive, Compiled, or both) --> - <property name="xmlapis.jar.name" value="xml-apis.jar"/> - <property name="xmlapis.jar" value="${endorsed.dir}/${xmlapis.jar.name}"/> - <property name="parser.jar.name" value="xercesImpl.jar"/> - <property name="parser.jar" value="${endorsed.dir}/${parser.jar.name}"/> - <property name="bcel.jar.name" value="bcel-6.7.0.jar"/> - <property name="bcel.jar" value="${lib.dir}/${bcel.jar.name}"/> - <property name="runtime.jar.name" value="runtime.jar"/> - <property name="runtime.jar" value="${lib.dir}/${runtime.jar.name}"/> - <property name="regexp.jar.name" value="regexp.jar"/> - <property name="regexp.jar" value="${lib.dir}/${regexp.jar.name}"/> - - <!-- Jars to build Xalan Java (Interpretive, Compiled, or both) or build the docs --> - <property name="java_cup.jar.name" value="java_cup.jar"/> - <property name="java_cup.jar" value="${tools.dir}/${java_cup.jar.name}"/> - <property name="jlex.jar.name" value="JLex.jar"/> - <property name="jlex.jar" value="${tools.dir}/${jlex.jar.name}"/> - <property name="stylebook.jar.name" value="stylebook-1.0-b3_xalan-2.jar"/> - <property name="stylebook.jar" value="${tools.dir}/${stylebook.jar.name}"/> - <property name="doclet.jar.name" value="xalan2jdoc.jar"/> - <property name="doclet.jar" value="${tools.dir}/${doclet.jar.name}"/> - <property name="taglet.jar.name" value="xalan2jtaglet.jar"/> - <property name="taglet.jar" value="${tools.dir}/${taglet.jar.name}"/> - - <!-- Jars to build Xalan Java samples --> - <property name="servlet-api.jar.name" value="servlet-api-2.5.jar"/> - <property name="servlet-api.jar" value="${lib.dir}/${servlet-api.jar.name}"/> - <property name="javaee-api.jar.name" value="javaee-api-5.0-2.jar"/> - <property name="javaee-api.jar" value="${lib.dir}/${javaee-api.jar.name}"/> - <property name="brazil.jar.name" value="brazil-2.1.jar"/> - <property name="brazil.jar" value="${lib.dir}/${brazil.jar.name}"/> - - <!-- Relative locations of source directories --> - <property name="manifest.mf" value="./src/MANIFEST.MF"/> - <property name="manifest.xsltc.mf" value="./src/manifest.xsltc"/> - <property name="manifest.xalan-interpretive.mf" value="./src/manifest.xalan-interpretive"/> - <property name="XSLTInfo.props" value="./src/org/apache/xalan/res/XSLTInfo.properties"/> - <property name="generated.xpathparser" value="${src.dir}/${xsltc.reldir}/compiler/XPathParser.java"/> - <property name="generated.xpathlexer" value="${src.dir}/${xsltc.reldir}/compiler/XPathLexer.java"/> - <property name="generated.xpathsym" value="${src.dir}/${xsltc.reldir}/compiler/sym.java"/> - - <!-- Build and distribution output areas --> - <property name="build.xalan.jar" value="${build.dir}/${name}.jar"/><!-- GUMP: actual path/name of jar target output --> - <property name="build.xalan-unbundled.jar" value="${build.dir}/${name}-unbundled.jar"/> - <property name="build.xalan-interpretive.jar" value="${build.dir}/${name}.jar"/> - <property name="build.xsltc.jar" value="${build.dir}/xsltc.jar"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.docs" value="${build.dir}/docs"/> - <property name="build.samples" value="${build.dir}/samples"/> - <property name="build.servlet" value="${build.samples}/servlet"/> - <property name="build.apidocs" value="${build.docs}/apidocs"/> - <property name="dist.pkg" value="${name}-j_${version}"/><!-- GUMP: actual path/name of dist target .tar.gz/.zip--> - <property name="dist.file" value="${dist.pkg}"/> - <property name="dist.dir" value="${build.dir}/${dist.pkg}"/> - - <!-- xml-commons sources (for Javadoc) --> - <property name="xml-commons-srcs.tar.gz" value="${src.dir}/xml-commons-external-1.3.02-src.tar.gz"/> - <property name="xml-commons-srcs.tar" value="${build.dir}/xml-commons-external-1.3.02-src.tar"/> - - <!-- Documentation and samples information --> - <property name="Name-in-docs" value="Xalan-Java"/> - <property name="version.file" value="${xalan.reldir}/processor/XSLProcessorVersion.java"/> - - <property name="build.samples.jar" value="${build.dir}/xalansamples.jar"/> - <property name="build.servlet.war" value="${build.dir}/xalanservlet.war"/> - <property name="build.xsltc.applet.jar" value="${build.dir}/xsltcapplet.jar"/> - <property name="build.xsltc.brazil.jar" value="${build.dir}/xsltcbrazil.jar"/> - <property name="build.xsltc.ejb.jar" value="${build.dir}/xsltcejb.jar"/> - <property name="build.xsltc.servlet.jar" value="${build.dir}/xsltcservlet.jar"/> - - <property name="xdocs.book" value="${xdocs.dir}/sources/xalan-jlocal.xml"/> - <property name="xdocs.style" value="${xdocs.dir}/style"/> - <property name="xalanonly-styledocs" - value="dtd/xsl-html40s.dtd,dtd/spec.dtd,stylesheets/patterns.xsl,stylesheets/notice.xsl,stylesheets/spec.xsl,stylesheets/done.xsl,loaderdesign.xml,stylesheets/design2project.xsl,stylesheets/designdoc2html.xsl,stylesheets/xml2fo.xsl"/> - <property name="xalan.cmdline.class" value="org.apache.xalan.xslt.Process"/> - <property name="doc.generator" value="org.apache.stylebook.StyleBook"/> - <property name="doc.generator.styletargz" value="${xdocs.dir}/xml-site-style.tar.gz"/> - <property name="doc.generator.styletar" value="${xdocs.dir}/xml-site-style.tar"/> - - <property name="site.root" value="./xml-site"/> - <property name="site.dir" value="${site.root}/target/xalan-j"/> - <property name="site.book" value="${xdocs.dir}/sources/xalan-jsite.xml"/> - - <property name="xalan.apache.org.site.root" value="./xalan-apache-org-site"/> - <property name="xalan.apache.org.site.dir" value="${xalan.apache.org.site.root}/target/xalan-apache-org"/> - <property name="xalan.apache.org.site.book" value="${xdocs.dir}/sources/xalan-apache-org-site.xml"/> - - - <property name="xdocs.DONE.file" value="${xdocs.dir}/sources/xalan/DONE"/> - <property name="xdocs.XSLTCDONE.file" value="XSLTCDONE"/> - <property name="xdocs.XSLTCDONE.location" value="${xdocs.dir}/sources/xalan/${xdocs.XSLTCDONE.file}"/> - - - <!-- PROPERTIES TO COMPILE THE SERIALIZER ======================================= --> - <property name="serializer.src.dir" value="./src"/> - <property name="serializer.build.dir" value="./build"/> - <property name="serializer.build.classes" value="${serializer.build.dir}/serializer"/> - - <!-- PROPERTIES TO MAKE THE SERIALIZER JAR ======================================= --> - <property name="serializer.manifest.basename" value="MANIFEST.SERIALIZER"/> - <property name="serializer.manifest" value="${serializer.src.dir}/${serializer.manifest.basename}"/> - <property name="serializer.impl.version" value="${impl.version}"/> - <property name="serializer.java.version" value="${java.version}"/> - <property name="serializer.java.vendor" value="${java.vendor}"/> - <property name="serializer.jar.name" value="serializer.jar"/> - <property name="build.serializer.jar" value="${serializer.build.dir}/${serializer.jar.name}"/> - <property name="lib.serializer.jar" value="./lib/${serializer.jar.name}"/> - - <!-- Class paths used in various targets --> - <path id="docs.class.path"> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${parser.jar}" /> - <pathelement location="${bcel.jar}" /> - <pathelement location="${runtime.jar}" /> - <pathelement location="${stylebook.jar}" /> - <pathelement location="${doclet.jar}" /> - <pathelement location="${taglet.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${build.xalan.jar}" /> - </path> - <path id="samples.class.path"> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${parser.jar}" /> - <pathelement location="${build.xalan.jar}" /> - </path> - <path id="compile.class.path"> - <!-- Ensure the selected parser.jar file is used to compile against --> - <pathelement location="${build.classes}" /> - <pathelement location="${serializer.build.classes}" /> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${parser.jar}" /> - </path> - <path id="xslt.boot.class.path"> - <!-- Put this version of xalan in front of the jdk's for JDK 1.4+ --> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${parser.jar}" /> - <pathelement path="${sun.boot.class.path}" /> - </path> - <path id="compile.source.path"> - <dirset dir="${src.dir}" includes="/org/apache/**" /> - </path> - - <!-- patternsets for source and binary distribution packages --> - <patternset id="bin-distro"> - <include name="${dist.file}/LICENSE.txt"/> - <include name="${dist.file}/NOTICE.txt"/> - <include name="${dist.file}/readme.html"/> - <include name="${dist.file}/xalan.jar"/> - <!-- xsltc.jar will only be picked up if it has been built --> - <include name="${dist.file}/xsltc.jar"/> - <include name="${dist.file}/${xmlapis.jar.name}"/> - <include name="${dist.file}/${parser.jar.name}"/> - <include name="${dist.file}/${serializer.jar.name}"/> - <include name="${dist.file}/samples/"/> - <include name="${dist.file}/samples/xalansamples.jar"/> - <include name="${dist.file}/samples/xalanservlet.war"/> - <include name="${dist.file}/samples/xsltcapplet.jar"/> - <include name="${dist.file}/samples/xsltcbrazil.jar"/> - <include name="${dist.file}/samples/xsltcejb.jar"/> - <include name="${dist.file}/samples/xsltcservlet.jar"/> - <include name="${dist.file}/docs/"/> - </patternset> - <patternset id="bin-distro-nodocs"> - <include name="${dist.file}/LICENSE.txt"/> - <include name="${dist.file}/NOTICE.txt"/> - <include name="${dist.file}/readme.html"/> - <include name="${dist.file}/xalan.jar"/> - <!-- xsltc.jar will only be picked up if it has been built --> - <include name="${dist.file}/xsltc.jar"/> - <include name="${dist.file}/${xmlapis.jar.name}"/> - <include name="${dist.file}/${parser.jar.name}"/> - <include name="${dist.file}/${serializer.jar.name}"/> - <include name="${dist.file}/samples/"/> - <include name="${dist.file}/samples/xalansamples.jar"/> - <include name="${dist.file}/samples/xalanservlet.war"/> - <include name="${dist.file}/samples/xsltcapplet.jar"/> - <include name="${dist.file}/samples/xsltcbrazil.jar"/> - <include name="${dist.file}/samples/xsltcejb.jar"/> - <include name="${dist.file}/samples/xsltcservlet.jar"/> - </patternset> - <patternset id="src-distro"> - <include name="${dist.file}/LICENSE.txt"/> - <include name="${dist.file}/NOTICE.txt"/> - <include name="${dist.file}/*build.*"/> - <include name="${dist.file}/commits.xml"/> - <include name="${dist.file}/KEYS"/> - <include name="${dist.file}/readme.html"/> - <include name="${dist.file}/README"/> - <include name="${dist.file}/lib/"/> - <include name="${dist.file}/tools/"/> - <include name="${dist.file}/samples/"/> - <exclude name="${dist.file}/samples/xalansamples.jar"/> - <exclude name="${dist.file}/samples/xalanservlet.war"/> - <exclude name="${dist.file}/samples/xsltcapplet.jar"/> - <exclude name="${dist.file}/samples/xsltcbrazil.jar"/> - <exclude name="${dist.file}/samples/xsltcejb.jar"/> - <exclude name="${dist.file}/samples/xsltcservlet.jar"/> - <include name="${dist.file}/src/"/> - <include name="${dist.file}/xdocs/"/> - <include name="${dist.file}/build_srcdist_xalan.xml"/> - <include name="${dist.file}/build_srcdist_xalan_tests.xml"/> - <include name="${dist.file}/xalan-test/"/> - </patternset> - - <!-- XSLTC engine dependency .jar files --> - <patternset id="xsltc-deps-jars"> - <include name="${dist.file}/lib/${bcel.jar.name}"/> - <include name="${dist.file}/tools/${java_cup.jar.name}"/> - <include name="${dist.file}/tools/${jlex.jar.name}"/> - <include name="${dist.file}/lib/${runtime.jar.name}"/> - <include name="${dist.file}/lib/${regexp.jar.name}"/> - </patternset> - - <!-- =================================================================== --> - <!-- Creates output build directories and doc prerequistes --> - <!-- =================================================================== --> - <target name="prepare"> - <echo message="Project:${Name-in-docs} version:${version} build.xml $Revision$"/> - <mkdir dir="${build.dir}"/> - <mkdir dir="${build.classes}"/> - <!-- Note that all testing-related targets *must* depend on - this target, either directly or indirectly, to get - the tests-available property set for them. - --> - <available file="${test.relpath}" property="tests-available" /> - <available property="xerces.present" - classname="org.apache.xerces.parsers.SAXParser"/> - - <!-- Update version information. This copies the Version.src - file into Version.java, while replacing the following tokens - --> - <filter token="version.VERSION" value="${version.VERSION}"/> - <filter token="version.RELEASE" value="${version.RELEASE}"/> - <filter token="version.MINOR" value="${version.MINOR}"/> - <filter token="version.DEVELOPER" value="${version.DEVELOPER}"/> - <filter token="parser.version.VERSION" value="${parser.version.VERSION}"/> - <filter token="parser.version.RELEASE" value="${parser.version.RELEASE}"/> - <filter token="parser.version.MINOR" value="${parser.version.MINOR}"/> - <copy tofile="${src.dir}/${xalan.reldir}/Version.java" file="${src.dir}/${xalan.reldir}/Version.src" filtering="true"/> - <copy tofile="${src.dir}/${xalan.reldir}/processor/XSLProcessorVersion.java" file="${src.dir}/${xalan.reldir}/processor/XSLProcessorVersion.src" filtering="true"/> - <copy tofile="${src.dir}/${serializer.reldir}/Version.java" file="${src.dir}/${serializer.reldir}/Version.src" filtering="true"/> - <copy tofile="${xdocs.dir}/sources/entities.ent" file="${xdocs.dir}/sources/entities.src" filtering="true"/> - </target> - - <!-- Must depend on jar since we use Xalan to process xml files --> - <target name="prepare.docs" depends="jar,prepare.docs.nojardepends"/> - - <target name="prepare.docs.nojardepends"> - <mkdir dir="${build.docs}"/> - <mkdir dir="${build.apidocs}"/> - - <gunzip src="${doc.generator.styletargz}"/> - <untar src="${doc.generator.styletar}" dest="${xdocs.dir}"/> - <delete file="${doc.generator.styletar}"/> - - <!-- We use a sed script to extract Xalan-Java 2 commits from the repository into commits.xml - The following operation transforms commits.xml (just including source code commits) and - puts the result in xdocs/sources/xalan for inclusion in the readme.xml --> - <echo message="Transform commits.xml and put the result in ${xdocs.dir}"/> - <java fork="yes" classname="${xalan.cmdline.class}" > - <classpath refid="docs.class.path" /> - <arg line="-in commits.xml -xsl ${xdocs.style}/stylesheets/done.xsl -out ${xdocs.DONE.file} -param xsltcdone ${xdocs.XSLTCDONE.file}"/> - </java> - <echo message="Generate Xalan-J 2.x design document"/> - <java fork="yes" classname="${doc.generator}" > - <classpath refid="docs.class.path" /> - <arg line="loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./build/docs/design/ - ./xdocs/sources/xalandesign.xml ./xdocs/style"/> - </java> - </target> - - <!-- =================================================================== --> - <!-- Compile the DTM implementation and xml utilities --> - <!-- =================================================================== --> - <target name="xml.compile" depends="prepare,serializer.jar"> - <echo message="Compiling DTM implementation and utilities" /> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <include name="${apachexml.reldir}/**/*.java" /> - <!-- exclude the serializer --> - <exclude name="${serializer.reldir}/**/*.java" /> - <!-- Exclude file that depends upon presence of Xerces in build path --> - <exclude name="**/IncrementalSAXSource_Xerces.java" - unless="xerces.present" /> - <classpath refid="compile.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - <!-- Copy needed properties, resource, etc. files to be put into .jar file --> - <copy todir="${build.classes}"> - <fileset dir="${src.dir}" - includes="${apachexml.reldir}/**/*.properties" - excludes="${serializer.reldir}/**/*.properties" - /> - </copy> - </target> - - <!-- =================================================================== --> - <!-- Compile the Xalan interpreter source tree --> - <!-- =================================================================== --> - <target name="xalan-interpretive.compile" depends="xml.compile" - description="Compile the Xalan interpretive classes (skips XSLTC)" > - <echo message="Compiling Xalan interpretive classes" /> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <include name="${xpath.reldir}/**/*.java" /> - <include name="${domxpath.reldir}/**/*.java" /> - <include name="${xalan.reldir}/**/*.java" /> - <exclude name="${xsltc.reldir}/**/*.java" /> - <classpath refid="compile.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - <sourcepath refid="compile.source.path" /> - </javac> - <!-- Copy needed properties, resource, etc. files to be put into .jar file --> - <copy todir="${build.classes}"> - <fileset dir="${src.dir}" includes="**/*.properties,META-INF/services/*" excludes="**/XSLTInfo.properties"/> - </copy> - <filter token="impl.version" value="${impl.version}"/> - <copy todir="${build.classes}/org/apache/xalan/res" file="${XSLTInfo.props}" filtering="true"/> - </target> - - <!-- Compile all java sources (Xalan interpretive and XSLTC) --> - <target name="compile" depends="xalan-interpretive.compile,xsltc.compile" - description="Compile all java source files (Xalan interpretive + XSLTC)" > - </target> - - <!-- =================================================================== --> - <!-- Compile just the XSLTC compiler portion --> - <!-- =================================================================== --> - <path id="xsltc.class.path"> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${bcel.jar}" /> - <pathelement location="${jlex.jar}" /> - <pathelement location="${java_cup.jar}" /> - <pathelement location="${runtime.jar}" /> - <!-- build.classes needed for - org.apache.xalan.xsltc.util.JavaCupRedirect --> - <pathelement location="${build.classes}" /> - </path> - - <!-- Attempt to determine dependency info for generated sources --> - <target name="xsltc.prepare" depends="prepare" > - <!-- The first step compiles the utils directory, which includes - a special wrapper for the xsltc.codegen / java_cup step next. --> - <echo message="Compiling XSLTC utilities"/> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - includes="${xsltc.reldir}/util/**/*.java" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="xsltc.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - <!-- These tricky uptodate statements hopefully determine if we - actually need to generate the java_cup and jlex files - in the two sub-targets below - --> - <uptodate property="xsltc.java_cup.not_needed" targetfile="${generated.xpathparser}" > - <srcfiles dir="${src.dir}/${xsltc.reldir}/compiler" includes="xpath.cup" /> - </uptodate> - - <uptodate property="xsltc.jlex.not_needed" targetfile="${generated.xpathlexer}" > - <srcfiles dir="${src.dir}/${xsltc.reldir}/compiler" includes="xpath.lex" /> - </uptodate> - - <!-- Determine whether the support jars are already expanded --> - <available file="${build.classes}/org/apache/bcel" type="dir" property="xsltc.bcel_jar.not_needed" /> - <available file="${build.classes}/JLex" type="dir" property="xsltc.jlex_jar.not_needed" /> - <available file="${build.classes}/java_cup/Main.class" type="file" property="xsltc.java_cup_jar.not_needed" /> - <available file="${build.classes}/java_cup/runtime" type="dir" property="xsltc.runtime_jar.not_needed" /> - <available file="${build.classes}/org/apache/regexp" type="dir" property="xsltc.regexp_jar.not_needed" /> - </target> - - <!-- Generate the XPath parser sources for xsltc if needed --> - <target name="xsltc.java_cup" depends="xsltc.prepare" unless="xsltc.java_cup.not_needed"> - <!-- The second step generates sym.java and XPathParser.java. --> - <echo message="java_cup preparsing"/> - <java fork="yes" failonerror="true" - classname="org.apache.xalan.xsltc.util.JavaCupRedirect" > - <classpath refid="xsltc.class.path" /> - <!-- need to bootclasspath java_cup for JDKs that include JavaCupRedirect --> - <jvmarg value="-Xbootclasspath/p:${java_cup.jar}${path.separator}${runtime.jar}"/> - <!-- We're using JavaCupRedirect to call the java_cup application --> - <arg line="-parser XPathParser -expect 0 - -stdin ${src.dir}/${xsltc.reldir}/compiler/xpath.cup"/> - </java> - <echo message="java_cup move output files"/> - <move file="XPathParser.java" tofile="${generated.xpathparser}"/> - <move file="sym.java" tofile="${generated.xpathsym}"/> - </target> - - <!-- Generate the XPath lexer sources for xsltc if needed --> - <target name="xsltc.jlex" depends="xsltc.java_cup" unless="xsltc.jlex.not_needed"> - <!-- The third step generates XPathLexer.java. The lexiographical analyser - has to be generated after sym.java, so order is important. --> - <echo message="JLex preparsing"/> - <java fork="yes" failonerror="true" classname="JLex.Main" > - <classpath refid="xsltc.class.path" /> - <arg line="-static ${src.dir}/${xsltc.reldir}/compiler/xpath.lex"/> - </java> - <echo message="JLex move output file"/> - <move file="${src.dir}/${xsltc.reldir}/compiler/xpath.lex.java" tofile="${generated.xpathlexer}"/> - </target> - - <!-- Compile the main XSLTC classes --> - <target name="xsltc.compile" depends="xsltc.java_cup,xsltc.jlex,xml.compile" - description="Compile just the XSLTC classes" > - <echo message="Compiling remaining XSLTC classes"/> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - includes="${xsltc.reldir}/**/*.java" - excludes="${serializer.reldir}/**/*.java" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="xsltc.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - </target> - - <!-- Compile just the XSLTC classes w/o JLex, JCup recompilation --> - <target name="xsltc.fcompile" depends="xml.compile" - description="Compile just the XSLTC classes w/o JLex, JCup recompilation" > - <echo message="Compiling remaining XSLTC classes"/> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - includes="${xsltc.reldir}/**/*.java" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="xsltc.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - </target> - - <!-- Jar up the XSLTC classes w/o the support jars --> - <target name="xsltc.unbundledjar" depends="xsltc.compile" - description="Jar just the xsltc.jar file" > - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.xsltc.mf}" filtering="true"/> - <jar jarfile="${build.xsltc.jar}" manifest="${build.dir}/manifest.xsltc" basedir="${build.classes}" > - <patternset><!-- relative to jar/@basedir --> - <include name="org/apache/xml/**" /> - <include name="${xsltc.reldir}/**/*" /> - <exclude name="org/apache/xalan/xsltc/util/JavaCupRedirect*" /> - </patternset> - </jar> - </target> - - <!-- Copy license and readme files for XSLTC support jars --> - <target name="xsltc.copy-licenses" depends="xsltc.prepare"> - </target> - - <!-- A parametrized target which is used to copy and expand a XSLTC support jar --> - <target name="xsltc.copy-deps-jar" unless="${param_unless}"> - <!-- copy the jar file to the build/classes directory --> - <copy todir="${build.classes}" file="${lib.dir}/${param_jar_name}"/> - - <!-- unjar the jar file --> - <unjar src="${build.classes}/${param_jar_name}" dest="${build.classes}" /> - - <!-- remove the jar file --> - <delete file="${build.classes}/${param_jar_name}" /> - </target> - - <!-- Copy and expand the XSLTC support jars if needed --> - <target name="xsltc.copy-deps-jars" depends="xsltc.copy-licenses"> - <echo message="Copying XSLTC support jars" /> - <!-- copy the 3rd party support jar files --> - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.bcel_jar.not_needed" /> - <param name="param_jar_name" value="${bcel.jar.name}" /> - </antcall> - -<!-- We don't need to package the JLex or java_cup jars in the xalan.jar. - These are only required for building XSLTC, not for using XSLTC. - - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.jlex_jar.not_needed" /> - <param name="param_jar_name" value="${jlex.jar.name}" /> - </antcall> - - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.java_cup_jar.not_needed" /> - <param name="param_jar_name" value="${java_cup.jar.name}" /> - </antcall> ---> - - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.runtime_jar.not_needed" /> - <param name="param_jar_name" value="${runtime.jar.name}" /> - </antcall> - - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.regexp_jar.not_needed" /> - <param name="param_jar_name" value="${regexp.jar.name}" /> - </antcall> - - <!-- remove the old META-INF/MANIFEST.MF file --> - <delete file="${build.classes}/META-INF/MANIFEST.MF" quiet="true"/> - </target> - - <!-- =================================================================== --> - <!-- Creates the xsltc jar including all support jars --> - <!-- =================================================================== --> - <target name="xsltc.jar" depends="xsltc.compile,xsltc.copy-deps-jars" - description="Jar xsltc,xml,BCEL,JLex,java_cup,runtime and jakarta regexp"> - - <!-- create new META-INF dir w/ transformer factory default --> - <!-- GTM: comment this out so that bundled xsltc.jar does not have - service provider default until further notice 2/20/2002 - <mkdir dir="${build.dir}/xsltctmp/META-INF"/> - <mkdir dir="${build.dir}/xsltctmp/META-INF/services"/> - <copy todir="${build.dir}/xsltctmp/META-INF/services" - file="${src.dir}/${xsltc.reldir}/javax.xml.transform.TransformerFactory" - /> - --> - - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.xsltc.mf}" filtering="true"/> - - <!-- make bundled jar named xsltc.jar --> - <jar jarfile="${build.dir}/xsltc.jar" manifest="${build.dir}/manifest.xsltc" > - <fileset dir="${build.classes}"> - <include name="org/apache/xalan/xsltc/**"/> - <exclude name="org/apache/xalan/xsltc/util/JavaCupRedirect*" /> - </fileset> - <fileset dir="${build.classes}" includes="org/apache/xml/**" - excludes="${serializer.reldir}/**" /> - <fileset dir="${build.classes}" includes="org/apache/bcel/**" /> - <fileset dir="${build.classes}" includes="JLex/**" /> - <fileset dir="${build.classes}" includes="java_cup/**" /> - <fileset dir="${build.classes}" includes="org/apache/regexp/**" /> - </jar> - - </target> - - <!-- =================================================================== --> - <!-- Creates the xalan interpretive jar --> - <!-- =================================================================== --> - <target name="xalan-interpretive.jar" depends="xalan-interpretive.compile" - description="Jar up everything in Xalan interpretive (without XSLTC)" > - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.xalan-interpretive.mf}" filtering="true"/> - <jar jarfile="${build.xalan-interpretive.jar}" manifest="${build.dir}/manifest.xalan-interpretive" basedir="${build.classes}" > - <patternset><!-- relative to jar/@basedir --> - <include name="${apachexml.reldir}/**/*" /> - <include name="${xpath.reldir}/**/*" /> - <include name="${xalan.reldir}/**/*" /> - <include name="${domxpath.reldir}/**/*" /> - <include name="META-INF/services/*" /> - <exclude name="${xsltc.reldir}/**/*" /> - <exclude name="${serializer.reldir}/**/*" /> - </patternset> - </jar> - </target> - - <!-- =================================================================== --> - <!-- Creates the xalan unbundled jar (Xalan interpretive + XSLTC - --> - <!-- support jars --> - <!-- =================================================================== --> - <target name="unbundledjar" depends="xalan-interpretive.compile,xsltc.compile" - description="Jar up Xalan and XSLTC, without the XSLTC dependencies" > - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.mf}" filtering="true"/> - <jar jarfile="${build.xalan-unbundled.jar}" manifest="${build.dir}/MANIFEST.MF" basedir="${build.classes}" > - <patternset> - <include name="${apachexml.reldir}/**/*" /> - <include name="${xpath.reldir}/**/*" /> - <include name="${xalan.reldir}/**/*" /> - <include name="META-INF/services/*" /> - <exclude name="${xsltc.reldir}/util/JavaCupRedirect*" /> - <exclude name="${serializer.reldir}/**/*.*" /> - </patternset> - </jar> - </target> - - <!-- =================================================================== --> - <!-- Creates one big xalan jar (Xalan interpretive + XSLTC + support jars) --> - <!-- =================================================================== --> - <target name="jar" depends="xalan-interpretive.compile,xsltc.compile,xsltc.copy-deps-jars" - description="Jar up everything (Xalan, XSLTC and XSLTC dependencies)" > - - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.mf}" filtering="true"/> - - <!-- make bundled jar named xalan.jar --> - <jar jarfile="${build.xalan.jar}" manifest="${build.dir}/MANIFEST.MF" - basedir="${build.classes}" > - <patternset> - <exclude name="${xsltc.reldir}/util/JavaCupRedirect*" /> - <exclude name="${serializer.reldir}/**/*" /> - </patternset> - </jar> - - </target> - - <!-- =================================================================== --> - <!-- Default all target simply Creates the xalan JAR --> - <!-- =================================================================== --> - <target name="all" depends="serializer.jar,jar"><!-- 'Standardizing build.xml files' <bloritsch@apache.org> --> - <echo message="Redirect to jar target; please provide input on desired functionality of this target"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the samples (servlet excluded) and jars the class files --> - <!-- =================================================================== --> - <target name="samples" depends="jar,samples.nojardepends,xsltc.samples"/> - - <target name="samples.nojardepends" depends="xsltc.samples.nojardepends" - description="Compile and jar the samples (except servlet)" > - <property name="exclude" value="*.xml,*.xsl,*.txt,*.html,*.properties,*.out"/> - <mkdir dir="${build.samples}"/> - <!-- Since the samples are packageless, they must be compiled separately. --> - <javac srcdir="${samples.dir}/SimpleTransform" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/UseStylesheetPI" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/UseStylesheetParam" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/SAX2SAX" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/DOM2DOM" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/Pipe" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/UseXMLFilters" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/Trace" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/ApplyXPath" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/ApplyXPathDOM" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/trax" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/extensions" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/Validate" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/TransformThread" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/XPathAPI" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <jar jarfile="${build.samples.jar}" basedir="${build.samples}" - includes="*.class"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles all samples that require extra standard components in --> - <!-- order to compile. --> - <!-- =================================================================== --> - <target name="extra.std.samples" - depends="servlet,xsltc.applet,xsltc.ejb,xsltc.servlet"/> - - <target name="extra.std.samples.nojardepends" - depends="servlet.jardepends,xsltc.applet.nojardepends, - xsltc.ejb.jardepends,xsltc.servlet.jardepends"/> - - <!-- =================================================================== --> - <!-- Compiles all samples that require extra non-standard components in --> - <!-- order to compile. --> - <!-- =================================================================== --> - <target name="extra.nonstd.samples" depends="xsltc.brazil"/> - - <target name="extra.nonstd.samples.nojardepends" depends="xsltc.brazil.jardepends"/> - - <!-- =================================================================== --> - <!-- Compiles the sample servlet and jars the class files. --> - <!-- The javax.servlet and javax.servlet.http packages --> - <!-- must be on the classpath --> - <!-- =================================================================== --> - <target name="servlet" depends="jar,servlet.jardepends"/> - - <target name="servlet.jardepends" - description="Compile and jar the servlet samples in xalanservlet.war" > - <echo message="To compile the sample servlets, javax.servlet and javax.servlet.http must be on the classpath"/> - <mkdir dir="${build.servlet}"/> - <mkdir dir="${build.servlet}/WEB-INF/classes/servlet"/> - <mkdir dir="${build.servlet}/WEB-INF/lib"/> - <javac srcdir="${samples.dir}/servlet" - destdir="${build.servlet}/WEB-INF/classes" - debug="${build.debug}" - bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - <classpath location="${servlet-api.jar}" /> - </javac> - <copy todir="${build.servlet}/WEB-INF/classes/servlet"> - <fileset dir="${samples.dir}/servlet" includes="media.properties"/> - </copy> - <copy todir="${build.servlet}/WEB-INF"> - <fileset dir="${samples.dir}/servlet" includes="web.xml"/> - </copy> - <copy todir="${build.servlet}"> - <fileset dir="${samples.dir}/servlet" - includes="birds.xml, birds.xsl, booklist1.xsl, - booklist2.xsl, catalog.xml, fooparam.xml, fooparam.xsl, jspSample.jsp"/> - </copy> - <copy todir="${build.servlet}/WEB-INF/lib"> - <fileset dir="${lib.dir}" includes="${parser.jar.name}, ${xmlapis.jar.name}"/> - </copy> - <copy file="${build.xalan.jar}" todir="${build.servlet}/WEB-INF/lib" /> - <jar jarfile="${build.servlet.war}" - basedir="${build.servlet}" - includes="**"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles (does not jar) the translet samples. --> - <!-- For time being, classes are generated in place. --> - <!-- To run these samples, add xsltc.jar, runtime.jar, bcel.jar, --> - <!-- and java_cup.jar (all in the bin directory) to the classpath --> - <!-- --> - <!-- When we have straightened out classpath issues, --> - <!-- add samples in CompiledApplet, CompiledBrazil, CompiledEJB and --> - <!-- CompiledServlet. --> - <!-- =================================================================== --> - <target name="xsltc.samples" depends="jar,xsltc.samples.nojardepends"/> - - <target name="xsltc.samples.nojardepends"> - <mkdir dir="${build.samples}"/> - <javac srcdir="${samples.dir}/translets" - classpath="${build.xalan.jar}" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"/> - <javac srcdir="${samples.dir}/CompiledJAXP" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the XSLTC applet example and jars the class files. --> - <!-- =================================================================== --> - <target name="xsltc.applet" depends="jar,xsltc.applet.nojardepends"/> - - <target name="xsltc.applet.nojardepends"> - <mkdir dir="${build.samples}/CompiledApplet"/> - <javac srcdir="${samples.dir}/CompiledApplet" - destdir="${build.samples}/CompiledApplet" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"/> - <jar jarfile="${build.xsltc.applet.jar}" - basedir="${build.samples}/CompiledApplet" - includes="*.class"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the XSLTC brazil example and jars the class files. --> - <!-- =================================================================== --> - <target name="xsltc.brazil" depends="jar,xsltc.brazil.jardepends"/> - - <target name="xsltc.brazil.jardepends"> - <mkdir dir="${build.samples}/CompiledBrazil"/> - <javac srcdir="${samples.dir}/CompiledBrazil" - destdir="${build.samples}/CompiledBrazil" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath location="${brazil.jar}"/> - </javac> - <jar jarfile="${build.xsltc.brazil.jar}" - basedir="${build.samples}/CompiledBrazil" - includes="*.class"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the XSLTC EJB example and jars the class files. --> - <!-- ejb.jar must be on the classpath to compile this sample. --> - <!-- EJB 2.0 can be found at http://java.sun.com/products/ejb/docs.html --> - <!-- =================================================================== --> - <target name="xsltc.ejb" depends="jar,xsltc.ejb.jardepends"/> - - <target name="xsltc.ejb.jardepends"> - <mkdir dir="${build.samples}/CompiledEJB"/> - <javac srcdir="${samples.dir}/CompiledEJB" - destdir="${build.samples}/CompiledEJB" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath location="${javaee-api.jar}"/> - </javac> - <jar jarfile="${build.xsltc.ejb.jar}" - basedir="${build.samples}/CompiledEJB" - includes="*.class"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the XSLTC servlet example and jars the class files. --> - <!-- =================================================================== --> - <target name="xsltc.servlet" depends="jar,xsltc.servlet.jardepends" /> - - <target name="xsltc.servlet.jardepends"> - <mkdir dir="${build.samples}/CompiledServlet"/> - <javac srcdir="${samples.dir}/CompiledServlet" - destdir="${build.samples}/CompiledServlet" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - classpath="${build.xalan.jar}:${servlet-api.jar}" - nowarn="${compiler.nowarn}"> - </javac> - <jar jarfile="${build.xsltc.servlet.jar}" - basedir="${build.samples}/CompiledServlet" - includes="*.class"/> - </target> - - - <!-- =================================================================== --> - <!-- Generate HTML docs --> - <!-- =================================================================== --> - <target name="docs" depends="jar,docs.nojardepends,xsltc.docs"/> - - <target name="docs.nojardepends" depends="prepare.docs.nojardepends,autodocs" - description="Build the documentation (overview, readme, etc.)" > - <echo message="docs is human-usable target with dependencies"/> - </target> - - <target name="autodocs"> - <echo message="autodocs is for automated build process, without dependencies"/> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="targetDirectory=${build.docs} ${xdocs.book} ${xdocs.style}"/> - </java> - </target> - - <!-- =================================================================== --> - <!-- Creates the API documentation --> - <!-- =================================================================== --> - <target name="javadocs" depends="jar,javadocs.nojardepends"/> - - <target name="javadocs.nojardepends" depends="prepare.docs.nojardepends,autojavadocs" - description="Build the Javadocs for Xalan 2.x and jaxp sources" > - <echo message="javadocs is human-usable target with dependencies"/> - - <!-- Expand jaxp sources (JAXP 1.1, DOM 2, and SAX 2) into source tree for - inclusion in the Javadoc. --> - <!-- Note this is into the src area.--> - <gunzip src="${xml-commons-srcs.tar.gz}" dest="${build.dir}" /> - <untar src="${xml-commons-srcs.tar}" - dest="${src.dir}"> - <patternset> - <include name="**.java"/> - </patternset> - </untar> - - <delete file="${xml-commons-srcs.tar}"/> - - <antcall target="autojavadocs"/> - - <!-- remove the jaxp sources --> - <delete dir="${src.dir}/javax" /> - <delete dir="${src.dir}/org/w3c" /> - <delete dir="${src.dir}/org/xml" /> - <delete dir="${src.dir}/org/apache/xmlcommons" /> - <delete file="${src.dir}/manifest.commons" /> - - </target> - - <target name="autojavadocs" - depends="autojavadocs-1.4-or-higher-if,autojavadocs-non1.4-or-higher-if"> - <echo message="autojavadocs is for automated build process, without dependencies"/> - </target> - - <target name="check-using-java-1.4-or-higher"> - <condition property="using-java-1.4-or-higher"> - <not> - <or> - <equals arg1="${ant.java.version}" arg2="1.1"/> - <equals arg1="${ant.java.version}" arg2="1.2"/> - <equals arg1="${ant.java.version}" arg2="1.3"/> - </or> - </not> - </condition> - </target> - - <target name="autojavadocs-1.4-or-higher-if" if="using-java-1.4-or-higher" - depends="check-using-java-1.4-or-higher"> - <antcall target="autojavadocs-1.4-or-higher"/> - </target> - - <target name="autojavadocs-non1.4-or-higher-if" unless="using-java-1.4-or-higher" - depends="check-using-java-1.4-or-higher"> - <antcall target="autojavadocs-non1.4-or-higher"/> - </target> - - <target name="autojavadocs-1.4-or-higher"> - - <!-- Ant ignores destdir arg if doclet is set, so must send to doclet in doclet subelement--> - <javadoc - additionalparam="-breakiterator" - destdir="${build.apidocs}" - public="true" - sourcepath="${src.dir}" - overview="${src.dir}/javadocOverview.html" - packagenames="org.apache.*,org.xml.*,org.w3c.*,javax.xml.*" - author="true" - version="true" - use="true" - windowtitle="${Name-in-docs} ${impl.version}" - doctitle="${Name-in-docs} ${impl.version}" - bottom="Copyright © ${year} Apache XML Project. All Rights Reserved."> - <classpath refid="docs.class.path" /> - <taglet name="xalan2jtaglet.XSLUsageTag" path="${taglet.jar}"/> - <group title="Transformations API for XML (TrAX)" packages="javax.xml.transform*"/> - <group title="Java API for XML Parsing" packages="javax.xml.parsers"/> - <group title="Xalan Core" - packages="org.apache.xalan.processor:org.apache.xalan.templates:org.apache.xalan.transformer"/> - <group title="XPath" packages="org.apache.xpath*"/> - <group title="Document Table Model (DTM)" packages="org.apache.xml.dtm*"/> - <group title="Utilities" packages="org.apache.xml.utils*"/> - <group title="Xalan Other" packages="org.apache.xalan.client:org:org.apache.xalan.extensions:org.apache.xalan.res:org.apache.xalan.stree:org.apache.xalan.trace:org.apache.xalan.xslt"/> - <group title="Xalan Extensions" packages="org.apache.xalan.lib*"/> - <group title="Serializers" packages="org.apache.xml.serialize*, org.apache.xalan.serialize"/> - <group title="SAX 2" packages="org.xml.sax*"/> - <group title="DOM 2" packages="org.w3c.dom*"/> - <group title="XSLTC Core" - packages="org.apache.xalan.xsltc*"/> - </javadoc> - </target> - - <target name="autojavadocs-non1.4-or-higher"> - - <!-- Ant ignores destdir arg if doclet is set, so must send to doclet in doclet subelement--> - <javadoc - public="true" - sourcepath="${src.dir}" - overview="${src.dir}/javadocOverview.html" - packagenames="org.apache.*,org.xml.*,org.w3c.*,javax.xml.*" - author="true" - version="true" - use="true" - windowtitle="${Name-in-docs} ${impl.version}" - doctitle="${Name-in-docs} ${impl.version}" - bottom="Copyright © ${year} Apache XML Project. All Rights Reserved."> - <classpath refid="docs.class.path" /> - <doclet name="xalanjdoc.Standard" path="${doclet.jar}"> - <param name="-d" value="${build.apidocs}"/> - </doclet> - <group title="Transformations API for XML (TrAX)" packages="javax.xml.transform*"/> - <group title="Java API for XML Parsing" packages="javax.xml.parsers"/> - <group title="Xalan Core" - packages="org.apache.xalan.processor:org.apache.xalan.templates:org.apache.xalan.transformer"/> - <group title="XPath" packages="org.apache.xpath*"/> - <group title="Document Table Model (DTM)" packages="org.apache.xml.dtm*"/> - <group title="Utilities" packages="org.apache.xml.utils*"/> - <group title="Xalan Other" packages="org.apache.xalan.client:org:org.apache.xalan.extensions:org.apache.xalan.res:org.apache.xalan.stree:org.apache.xalan.trace:org.apache.xalan.xslt"/> - <group title="Xalan Extensions" packages="org.apache.xalan.lib*"/> - <group title="Serializers" packages="org.apache.xml.serialize*, org.apache.xalan.serialize"/> - <group title="SAX 2" packages="org.xml.sax*"/> - <group title="DOM 2" packages="org.w3c.dom*"/> - <group title="XSLTC Core" - packages="org.apache.xalan.xsltc*"/> - </javadoc> - </target> - - <!-- =================================================================== --> - <!-- Various targets to clean the build tree --> - <!-- =================================================================== --> - <target name="distclean" depends="clean" - description="Clean everything, including dist/jar/docs/xsltc.*" > - <delete dir="${dist.dir}"/> - </target> - - <target name="clean" depends="xsltc.clean" - description="Clean the ${build.dir} tree and doc outputs" > - <delete dir="${build.dir}"/> - <delete dir="${site.root}"/> - <delete dir="${xalan.apache.org.site.root}"/> - <delete quiet="true"> - <fileset dir="${xdocs.style}" excludes="${xalanonly-styledocs}"/> - </delete> - <delete file="${xdocs.DONE.file}"/> - <delete file="${xdocs.XSLTCDONE.location}"/> - <delete file="${src.dir}/${xalan.reldir}/Version.java"/> - <delete file="${src.dir}/${serializer.reldir}/Version.java"/> - <delete file="${src.dir}/${xalan.reldir}/processor/XSLProcessorVersion.java"/> - <delete file="${xdocs.dir}/sources/entities.ent"/> - <!-- Also delete files expanded from ${xml-commons-srcs.tar.gz}--> - <delete dir="${src.dir}/javax" includeEmptyDirs="true" quiet="true"/> - <delete dir="${src.dir}/org/xml" includeEmptyDirs="true" quiet="true"/> - <delete dir="${src.dir}/org/w3c" includeEmptyDirs="true" quiet="true"/> - <delete dir="${src.dir}/xdocs/style/graphics" includeEmptyDirs="true" quiet="true"/> - <delete dir="${src.dir}/xdocs/style/resources" includeEmptyDirs="true" quiet="true"/> - </target> - - <target name="xsltc.clean" - description="Clean miscellaneous generated sources from xsltc.compile" > - <delete file="${generated.xpathparser}" /> - <delete file="${generated.xpathsym}" /> - <delete file="${generated.xpathlexer}" /> - </target> - - <!-- =================================================================== --> - <!-- Install/Uninstall targets - not currently applicable --> - <!-- =================================================================== --> - <target name="install"><!-- 'Standardizing build.xml files' <bloritsch@apache.org> --> - <echo message="install target currently not supported in ${Name-in-docs}; try jar or dist instead"/> - </target> - <target name="uninstall"><!-- 'Standardizing build.xml files' <bloritsch@apache.org> --> - <echo message="uninstall target currently not supported in ${Name-in-docs}; try distclean instead"/> - </target> - - <!-- =================================================================== --> - <!-- Creates a distribution that depends only on standard pieces --> - <!-- =================================================================== --> - <target name="dist" depends="build.std.dist,autodist" - description="Create a .zip/.tar.gz distribution module containing - all components without dependencies on non-standard - jars that are not part of the build system." > - <echo message="dist is human-useable target for distribution, with only standard dependencies"/> - </target> - - <target name="dist-nodocs" depends="build.std.dist-nodocs,autodist-nodocs" - description="Create a .zip/.tar.gz distribution module containing - all components without dependencies on non-standard - jars that are not part of the build system." > - <echo message="dist-nodocs is human-useable target for distribution, with only standard dependencies and no documentation "/> - </target> - - <!-- =================================================================== --> - <!-- Creates a complete distribution in which the xalan.jar contains --> - <!-- the interpretive, compiled and the common packages --> - <!-- =================================================================== --> - <target name="fulldist" depends="build.nonstd.dist,autodist" - description="Create a .zip/.tar.gz distribution module containing - all components."> - <echo message="fulldist is human-useable target for distribution, with all dependencies"/> - </target> - - <target name="fulldist-nodocs" depends="build.nonstd.dist-nodocs,autodist-nodocs" - description="Create a .zip/.tar.gz distribution module containing - all components."> - <echo message="fulldist-nodocs is human-useable target for distribution, with all dependencies and no documentation"/> - </target> - - <!-- =================================================================== --> - <!-- Creates a complete distribution with separate xalan.jar and --> - <!-- xsltc.jar. The common packages are contained in each jar. --> - <!-- =================================================================== --> - <target name="fulldist-separatejars" depends="build.nonstd-separatejars.dist,autodist" - description="Create a .zip/.tar.gz distribution module containing - all components."> - <echo message="fulldist is human-useable target for distribution, with all dependencies"/> - </target> - - <target name="fulldist-separatejars-nodocs" depends="build.nonstd-separatejars.dist-nodocs,autodist-nodocs" - description="Create a .zip/.tar.gz distribution module containing - all components."> - <echo message="fulldist-separatejars-nodocs is human-useable target for distribution, with all dependencies and no documentation"/> - </target> - - <target name="build.std.dist" depends="build.std.parts"> - <property name="has.nonstd.parts" value="false"/> - </target> - <target name="build.std.dist-nodocs" depends="build.std.parts-nodocs"> - <property name="has.nonstd.parts" value="false"/> - </target> - - <target name="build.nonstd.dist" depends="build.std.parts,build.nonstd.parts"> - <property name="has.nonstd.parts" value="true"/> - </target> - <target name="build.nonstd.dist-nodocs" depends="build.std.parts-nodocs,build.nonstd.parts"> - <property name="has.nonstd.parts" value="true"/> - </target> - - <target name="build.nonstd-separatejars.dist" depends="build.std-separatejars.parts, - build.nonstd-separatejars.parts"> - <property name="has.nonstd.parts" value="true"/> - </target> - <target name="build.nonstd-separatejars.dist-nodocs" depends="build.std-separatejars.parts-nodocs, - build.nonstd-separatejars.parts"> - <property name="has.nonstd.parts" value="true"/> - </target> - - <target name="build.std.parts" - depends="jar,docs,javadocs,samples,extra.std.samples,xsltc.docs"/> - - <target name="build.std.parts-nodocs" - depends="jar,samples,extra.std.samples"/> - - <target name="build.std-separatejars.parts" - depends="xalan-interpretive.jar,xsltc.jar, - docs.nojardepends,javadocs.nojardepends, - samples.nojardepends,extra.std.samples.nojardepends, - xsltc.docs"/> - - <target name="build.std-separatejars.parts-nodocs" - depends="xalan-interpretive.jar,xsltc.jar, - samples.nojardepends,extra.std.samples.nojardepends"/> - - <target name="build.nonstd.parts" depends="extra.nonstd.samples"/> - <target name="build.nonstd-separatejars.parts" depends="extra.nonstd.samples.nojardepends"/> - - <!-- =================================================================== --> - <!-- Autodist targets. Used by the distribution targets. --> - <!-- =================================================================== --> - <target name="autodist-mkdirs"> - <mkdir dir="${dist.dir}"/> - <mkdir dir="${dist.dir}/lib"/> - <mkdir dir="${dist.dir}/lib/endorsed"/> - <mkdir dir="${dist.dir}/samples"/> - <mkdir dir="${dist.dir}/src"/> - <mkdir dir="${dist.dir}/tools"/> - <mkdir dir="${dist.dir}/xdocs"/> - </target> - - <target name="autodist-mkdirs-docs"> - <mkdir dir="${dist.dir}/docs"/> - <mkdir dir="${dist.dir}/docs/apidocs"/> - </target> - - <target name="autodist-copy-files"> - - <!-- Copy license files to distribution root --> - <copy todir="${dist.dir}"> - <fileset dir="."> - <include name="LICENSE.txt,NOTICE.txt"/> - </fileset> - </copy> - - <!-- Copy sources and source documentation --> - <copy todir="${dist.dir}/src"> - <fileset dir="${src.dir}" excludes="javax/**,org/xml/**,org/w3c/**"/><!-- exclude jaxp, sax, dom --> - </copy> - <copy todir="${dist.dir}/xdocs"> - <fileset dir="${xdocs.dir}"/> - </copy> - - <!-- Copy samples --> - <copy todir="${dist.dir}/samples"> - <fileset dir="${samples.dir}"/> - </copy> - - <!-- Copy tools; used for source distribution --> - <copy todir="${dist.dir}/tools"> - <fileset dir="${tools.dir}"> - <include name="*.*"/> - </fileset> - </copy> - - <!-- 1) Copy runtime libs; used for source distribution --> - <copy todir="${dist.dir}/lib"> - <fileset dir="${lib.dir}"> - <include name="*.*"/> - </fileset> - </copy> - - <!-- 2) Copy runtime libs; used for source distribution --> - <copy todir="${dist.dir}/lib/endorsed"> - <fileset dir="${endorsed.dir}"> - <include name="*.*"/> - </fileset> - </copy> - - <!-- Copy built jars --> - <copy file="${build.dir}/xalansamples.jar" todir="${dist.dir}/samples"/> - <copy file="${build.dir}/xalanservlet.war" todir="${dist.dir}/samples"/> - <copy file="${build.dir}/xsltcapplet.jar" todir="${dist.dir}/samples"/> - <copy file="${build.dir}/xsltcbrazil.jar" todir="${dist.dir}/samples" - failonerror="${has.nonstd.parts}"/> - <copy file="${build.dir}/xsltcejb.jar" todir="${dist.dir}/samples"/> - <copy file="${build.dir}/xsltcservlet.jar" todir="${dist.dir}/samples"/> - - <copy file="${build.xalan.jar}" todir="${dist.dir}" /> - - <!-- only copy the xsltc.jar file if it has been built --> - <copy todir="${dist.dir}"> - <fileset dir="${build.dir}" includes="xsltc.jar"/> - </copy> - <copy file="${build.serializer.jar}" todir="${dist.dir}" /> - - <copy file="${xmlapis.jar}" todir="${dist.dir}" /> - <copy file="${parser.jar}" todir="${dist.dir}" /> - - <antcall target="xalan-transform-build-file-for-src-distro"/> - - <antcall target="xalan-tests-create-for-src-distro"/> - - <copy todir="${dist.dir}"> - <fileset dir="." includes="readme.html,KEYS,build.xml,build.sh,deprecated_build.sh,build.bat, - commits.xml,LICENSE.txt,NOTICE.txt"/> - </copy> - </target> - - <target name="xalan-transform-build-file-for-src-distro"> - <copy file="./build_srcdist_xalan.xml" todir="${dist.dir}"/> - <copy file="./build_srcdist_xalan.xml" tofile="${dist.dir}/build.xml"/> - <!-- copy readme file as well --> - <copy file="./README" todir="${dist.dir}"/> - </target> - - <target name="xalan-tests-create-for-src-distro"> - <mkdir dir="${dist.dir}/xalan-test"/> - <copy todir="${dist.dir}/xalan-test"> - <fileset dir="${test.relpath}"> - <exclude name="build.xml"/> - </fileset> - </copy> - - <copy file="./build_srcdist_xalan_tests.xml" todir="${dist.dir}"/> - <copy file="./build_srcdist_xalan_tests.xml" tofile="${dist.dir}/xalan-test/build.xml"/> - - <delete dir="${dist.dir}/xalan-test/.git" /> - </target> - - <target name="autodist-copy-files-docs"> - <!-- Copy built documentation and javadoc --> - <copy todir="${dist.dir}/docs"> - <fileset dir="${build.docs}"/> - </copy> - </target> - - <target name="autodist-create-bin-packages"> - <tar tarfile="${build.dir}/${dist.pkg}-bin.tar" > - <tarfileset dir="${build.dir}"> - <patternset refid="bin-distro"/> - </tarfileset> - </tar> - <gzip src="${build.dir}/${dist.pkg}-bin.tar" zipfile="${build.dir}/${dist.pkg}-bin.tar.gz"/> - <delete file="${build.dir}/${dist.pkg}-bin.tar" /> - - <zip zipfile="${build.dir}/${dist.pkg}-bin.zip" > - <fileset dir="${build.dir}"> - <patternset refid="bin-distro"/> - </fileset> - </zip> - </target> - <target name="autodist-create-bin-packages-nodocs"> - <tar tarfile="${build.dir}/${dist.pkg}-bin-nodocs.tar" > - <tarfileset dir="${build.dir}"> - <patternset refid="bin-distro-nodocs"/> - </tarfileset> - </tar> - <gzip src="${build.dir}/${dist.pkg}-bin-nodocs.tar" zipfile="${build.dir}/${dist.pkg}-bin-nodocs.tar.gz"/> - <delete file="${build.dir}/${dist.pkg}-bin-nodocs.tar" /> - - <zip zipfile="${build.dir}/${dist.pkg}-bin-nodocs.zip" > - <fileset dir="${build.dir}"> - <patternset refid="bin-distro-nodocs"/> - </fileset> - </zip> - </target> - <target name="autodist-create-src-packages"> - <tar tarfile="${build.dir}/${dist.pkg}-src.tar" > - <tarfileset dir="${build.dir}"> - <patternset refid="src-distro"/> - <patternset refid="xsltc-deps-jars"/> - </tarfileset> - </tar> - <gzip src="${build.dir}/${dist.pkg}-src.tar" zipfile="${build.dir}/${dist.pkg}-src.tar.gz"/> - <delete file="${build.dir}/${dist.pkg}-src.tar" /> - - <zip zipfile="${build.dir}/${dist.pkg}-src.zip" > - <fileset dir="${build.dir}"> - <patternset refid="src-distro"/> - <patternset refid="xsltc-deps-jars"/> - </fileset> - </zip> - </target> - - <target name="autodist"> - <echo message="autodist is for automated build processes, without dependencies"/> - <antcall target="autodist-mkdirs"/> - <antcall target="autodist-mkdirs-docs"/> - <antcall target="autodist-copy-files"/> - <antcall target="autodist-copy-files-docs"/> - <antcall target="autodist-create-bin-packages"/> - <antcall target="autodist-create-src-packages"/> - </target> - - <target name="autodist-nodocs"> - <echo message="autodist-nodocs is for automated build processes, without dependencies"/> - <antcall target="autodist-mkdirs"/> - <antcall target="autodist-copy-files"/> - <antcall target="autodist-create-bin-packages-nodocs"/> - <antcall target="autodist-create-src-packages"/> - </target> - - <!-- =================================================================== --> - <!-- Creates the documentation tree for the xml.apache.org/xalan-j --> - <!-- website --> - <!-- =================================================================== --> - <target name="site" depends="prepare.docs,javadocs,xsltc.docs" - description="Build documentation for posting to the website" > - - <mkdir dir="${site.dir}/apidocs"/> - <mkdir dir="${site.dir}/design"/> - <mkdir dir="${site.dir}/xsltc"/> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="targetDirectory=${site.dir} ${site.book} ${xdocs.style}"/> - </java> - - <!-- put xalan design doc in the site design subdir --> - <copy todir="${site.dir}/design"> - <fileset dir="${build.docs}/design"/> - </copy> - <!-- put xsltc design doc in the site xsltc subdir --> - <copy todir="${site.dir}/xsltc"> - <fileset dir="${build.docs}/xsltc"/> - </copy> - - <!-- put in the javadoc --> - <copy todir="${site.dir}/apidocs"> - <fileset dir="${build.apidocs}"/> - </copy> - </target> - - <!-- =================================================================== --> - <!-- Creates the documentation tree for the xalan.apache.org website --> - <!-- =================================================================== --> - <target name="xalan.apache.org.site" - description="Build documentation for posting to the website" > - - <mkdir dir="${xalan.apache.org.site.dir}"/> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="targetDirectory=${xalan.apache.org.site.dir} ${xalan.apache.org.site.book} ${xdocs.style}"/> - </java> - - </target> - - <!-- =================================================================== --> - <!-- Compiles and runs mini/smoketest from xml-xalan\xalan-test, if present. --> - <!-- xml-xalan is a representative folder, that can contain folders xalan-java and xalan-test --> - <!-- =================================================================== --> - <property name="test.relpath" value="../xalan-test"/> - - <target name="minitest" depends="prepare,minitest-run,tests-not-available" - description="Run the Minitest from xml-xalan/xalan-test" > - <!-- This target simply asks the minitest-run worker target to - actually have the Minitest run (by the xalan-test/build.xml file); - we then also call the tests-not-available target in case - the user never checked out the tests. - --> - </target> - <target name="minitest-run" if="tests-available" depends="jar"> - <echo message=" [minitest] Calling ${test.relpath}/build.xml to run the Minitest" /> - <ant dir="${test.relpath}" antfile="build.xml" target="minitest.gump" > - </ant> - </target> - - <target name="smoketest" depends="prepare,smoketest-run,tests-not-available" - description="Run Smoketests (Minitest, conf, harness) from xml-xalan/xalan-test"> - </target> - <target name="smoketest-run" if="tests-available" depends="jar"> - <echo message=" [minitest] Calling ${test.relpath}/build.xml to run the Smoketest"/> - <ant dir="${test.relpath}" antfile="build.xml" target="smoketest.dev"> - </ant> - </target> - - <target name="smoketest.xsltc" depends="prepare,smoketest.xsltc-run,tests-not-available" - description="Run smoketest.xsltc from xml-xalan/xalan-test"> - </target> - <target name="smoketest.xsltc-run" if="tests-available" depends="jar"> - <echo message="Calling ${test.relpath}/build.xml to run the smoketest.xsltc" /> - <ant dir="${test.relpath}" antfile="build.xml" target="smoketest.xsltc"> - </ant> - </target> - - <target name="check" depends="smoketest"><!-- 'Standardizing build.xml files' <bloritsch@apache.org> --> - <echo message="Redirect to smoketest target"/> - </target> - - <!-- Called from various testing targets if the test dir doesn't exist. --> - <target name="tests-not-available" unless="tests-available" > - <echo message=" [tests] The tests do not seem to be present in ${test.relpath}" /> - <echo message=" [tests] You must have checked out from CVS to run the tests," /> - <echo message=" [tests] it is not included in binary distributions." /> - <echo message=" [tests] See http://xml.apache.org/xalan-j/test/ for more info." /> - </target> - - <!-- =================================================================== --> - <!-- Creates the xalan design document --> - <!-- =================================================================== --> - <target name="xalan-j2-design"> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=${build.dir}/docs/design/ - ${xdocs.dir}/sources/xalandesign.xml ${xdocs.style}"/> - </java> - </target> - - <!-- =================================================================== --> - <!-- Use FOP to create preliminary print (pdf) doc --> - <!-- Note: fop.jar and xml.jar (from xml-fop) must be on classpath --> - <!-- This is VERY preliminary, not yet for inclusion in distribution --> - <!-- =================================================================== --> - <!--Collate the xml sources into a single xml source with a litle extra structure --> - <target name="printerdocs" depends="prepare.docs"> - <echo message="NOTICE: requires fop.jar and xml.jar on the classpath"/> - <java fork="yes" - classname="${xalan.cmdline.class}" - classpathref="docs.class.path" > - <arg line="-xsl ${xdocs.dir}/sources/xalan-collate.xsl - -out xdocs/sources/xalan/xalan-collate.xml"/> - </java> - - <!-- Transform collation into Formatting Objects - (with a little work on links along the way) --> - <java fork="yes" - classname="${xalan.cmdline.class}" - classpathref="docs.class.path" > - <arg line="-in ${xdocs.dir}/sources/xalan/xalan-collate.xml - -param resourceFile '../../sources/xalan/resources.xml' - -param project ${Name-in-docs} - -xsl ${xdocs.style}/stylesheets/xml2fo.xsl - -out build/docs/xalan-collate.fo"/> - </java> - - <!-- Use FOP to generate a pdf file (classpath may need updating! -sc 18-Apr-01)--> - <java fork="yes" - classname="org.apache.fop.apps.CommandLine" - classpath="${build.xalan.jar}:${bin.dir}/fop.jar:${bin.dir}/w3c.jar"> - <arg line="${build.docs}/xalan-collate.fo build/docs/xalan.pdf"/> - </java> - </target> - - - <!-- =================================================================== --> - <!-- Build XSLTC design documentation. Eventually intend to incorporate --> - <!-- XSLTC into the Xalan book. --> - <!-- =================================================================== --> - - - <target name="xsltc.prepare.docs" depends="prepare.docs.nojardepends"> - <mkdir dir="${build.docs}/xsltc"/> - <!-- - <echo message="Transform xsltc_todo.xml and put the result in ${build.docs}/xsltc"/> - <java fork="yes" classname="${xalan.cmdline.class}"> - <classpath refid="docs.class.path" /> - <arg line="-in xsltc_todo.xml -xsl todo.xsl -out build/docs/xsltc/todo.html"/> - </java> --> - </target> - - <target name="xsltc.docs" depends="xsltc.prepare.docs"> - <echo message="Build the XSLTC Architectural documentation"/> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="targetDirectory=${build.docs}/xsltc ${xdocs.dir}/sources/xsltc.xml ${xdocs.style}"/> - </java> - <copy todir="${build.docs}/xsltc" - file="${xdocs.dir}/sources/xsltc/README.xslt" /> - <copy todir="${build.docs}/xsltc" - file="${xdocs.dir}/sources/xsltc/README.xsltc" /> - </target> - - <!-- pack all doc for transfer to website --> - <target name="pack.docs"> - <!--tar tarfile="./build/xalan-j-docs.tar" basedir="./xml-site/target/xalan-j" includes="**"/> - <gzip src="./build/xalan-j-docs.tar" zipfile="./build/xalan-j-docs.tar.gz"/--> - <zip zipfile="./build/xalan-j-docs.zip" basedir="./xml-site/target/xalan-j" includes="**"/> - </target> - - -<!-- #################################################### - # START OF SECTION TO BUILD STAND-ALONE SERIALIZER # - #################################################### --> - - <!-- try not to use other properties directly when building the serializer --> - <!-- either create new values, or copy, just in case we separate into --> - <!-- a totally new build.xml file --> - <property name="serializer.build.debug" value="${build.debug}" /> - - - <!-- PROPERTIES TO MAKE THE SOURCE DISTRIBUTION ========================== --> - <property name="serializer.name" value="serializer" /> - <property name="serializer.version" value="${version}" /> - <property name="serializer.dist.file" value="${serializer.name}-j_${serializer.version}"/> - <property name="serializer.dist.dir" value="${serializer.build.dir}/${serializer.dist.file}"/> - - <!-- patternset for source distribution packages --> - <patternset id="serializer-src-distro" > - <!-- some license and legal stuff --> - <include name="${serializer.dist.file}/LICENSE.txt"/> - <include name="${serializer.dist.file}/NOTICE.txt"/> - <include name="${serializer.dist.file}/KEYS"/> - - <!-- The build stuff that uses Ant and this file itself, build.xml - this is getting into a strange loop but the source distribution - needs to build, and it uses this file, build.xml to do so ... --> - <include name="${serializer.dist.file}/build.bat"/> - <include name="${serializer.dist.file}/build.sh"/> - <include name="${serializer.dist.file}/build.xml"/> - - <!-- The source code that the source distribution would build --> - <include name="${serializer.dist.file}/src/${serializer.reldir}/**/*.java" /> - <include name="${serializer.dist.file}/src/${serializer.reldir}/**/*.properties" /> - <include name="${serializer.dist.file}/src/${serializer.manifest.basename}" /> - - <!-- We need Ant in order to run build.xml in the source distribution --> - <include name="${serializer.dist.file}/tools/ant.jar"/> - <include name="${serializer.dist.file}/tools/antRun"/> - <include name="${serializer.dist.file}/tools/antRun.bat"/> - - <!-- The serializer needs this jar in order to build --> - <include name="${serializer.dist.file}/xml-apis.jar"/> - - <!-- Ant needs an XML parser in order to read in the build.xml, so it - can even do the build ... this is a strange loop ... --> - <include name="${serializer.dist.file}/xercesImpl.jar"/> - </patternset> - - <!-- patternset for binary distribution packages ... if needed - <patternset id="serializer-bin-distro" > - <include name="${serializer.dist.file}/LICENSE.txt"/> - <include name="${serializer.dist.file}/NOTICE.txt"/> - <include name="${serializer.dist.file}/KEYS"/> - <include name="${serializer.dist.file}/${serializer.name}.jar"/> - <include name="${serializer.dist.file}/${xmlapis.jar.name}"/> - <include name="${serializer.dist.file}/${parser.jar.name}"/> - </patternset> - --> - - <!-- =================================================================== --> - <!-- Creates the Serializer jar --> - <!-- =================================================================== --> - <target name="serializer.jar" - depends="serializer.prepare,serializer.compile" - description="Build the serializer and created serializer.jar" > - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${serializer.impl.version}"/> - <filter token="java.version" value="${serializer.java.version}"/> - <filter token="java.vendor" value="${serializer.java.vendor}"/> - <copy todir="${serializer.build.dir}" file="${serializer.manifest}" filtering="true"/> - - <jar jarfile="${build.serializer.jar}" - manifest="${serializer.build.dir}/${serializer.manifest.basename}" - basedir="${serializer.build.classes}" > - <patternset><!-- relative to jar/@basedir --> - <include name="${serializer.reldir}/**/*" /> - </patternset> - </jar> - </target> - - <target name="serializer.prepare"> - <mkdir dir="${serializer.build.dir}"/> - <mkdir dir="${serializer.build.classes}"/> - </target> - - <target name="serializer.compile"> - <echo message="Compiling the Serializer" /> - <javac srcdir="${serializer.src.dir}" - destdir="${serializer.build.classes}" - debug="${serializer.build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <include name="${serializer.reldir}/**/*.java" /> - <classpath refid="compile.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - <!-- Copy needed properties, resource, etc. files to be put into .jar file --> - <copy todir="${serializer.build.classes}"> - <fileset dir="${serializer.src.dir}" includes="${serializer.reldir}/**/*.properties"/> - </copy> - - </target> - - - <!-- =================================================================== --> - <!-- Creates the API documentation --> - <!-- =================================================================== --> - <target name="serializer.javadocs" - description="Build the Javadocs for the Serializer" > - <echo message="javadocs is human-usable target with dependencies"/> - - <mkdir dir="${build.docs}"/> - <mkdir dir="${build.apidocs}"/> - <antcall target="serializer.autojavadocs"/> - </target> - - <target name="serializer.autojavadocs" - depends="serializer.autojavadocs-1.4-or-higher-if,serializer.autojavadocs-non1.4-or-higher-if"> - <echo message="serializer.autojavadocs is for automated build process, without dependencies"/> - </target> - - <target name="serializer.autojavadocs-1.4-or-higher-if" if="using-java-1.4-or-higher" - depends="check-using-java-1.4-or-higher"> - <antcall target="serializer.autojavadocs-1.4-or-higher"/> - </target> - - <target name="serializer.autojavadocs-non1.4-or-higher-if" unless="using-java-1.4-or-higher" - depends="check-using-java-1.4-or-higher"> - <antcall target="serializer.autojavadocs-non1.4-or-higher"/> - </target> - - <target name="serializer.autojavadocs-1.4-or-higher"> - - <!-- Ant ignores destdir arg if doclet is set, so must send to doclet in doclet subelement--> - <javadoc - additionalparam="-breakiterator" - destdir="${build.apidocs}" - public="true" - sourcepath="${src.dir}" - packagenames="org.apache.*" - author="true" - version="true" - use="true" - windowtitle="${Name-in-docs} Serializer ${impl.version}" - doctitle="${Name-in-docs} Serializer ${impl.version}" - bottom="Copyright © ${year} Apache XML Project. All Rights Reserved."> - <classpath refid="docs.class.path" /> - <taglet name="xalan2jtaglet.XSLUsageTag" path="${taglet.jar}"/> - <group title="Serializer" packages="org.apache.xml.serialize*"/> - </javadoc> - </target> - - <target name="serializer.autojavadocs-non1.4-or-higher"> - <!-- Ant ignores destdir arg if doclet is set, so must send to doclet in doclet subelement--> - <javadoc - public="true" - sourcepath="${src.dir}" - packagenames="org.apache.*" - author="true" - version="true" - use="true" - windowtitle="${Name-in-docs} Serializer ${impl.version}" - doctitle="${Name-in-docs} Serializer ${impl.version}" - bottom="Copyright © ${year} Apache XML Project. All Rights Reserved."> - <classpath refid="docs.class.path" /> - <doclet name="xalanjdoc.Standard" path="${doclet.jar}"> - <param name="-d" value="${build.apidocs}"/> - </doclet> - <group title="Serializer" packages="org.apache.xml.serialize*"/> - </javadoc> - </target> - - - <!-- =================================================================== --> - <!-- Create the serializer source distribution --> - <!-- =================================================================== --> - <target name="serializer-dist" - depends="serializer.jar" - description="Build the serializer source distribution .tar and .zip"> - <antcall target="serializer-autodist-mkdirs"/> - <antcall target="serializer-autodist-copy-files"/> - <!-- <antcall target="serializer-autodist-create-bin-packages"/> --> - <antcall target="serializer-autodist-create-src-packages"/> - </target> - - <target name="serializer-autodist-mkdirs"> - <echo message="Serializer: making distribution directories" /> - <mkdir dir="${serializer.dist.dir}"/> - <mkdir dir="${serializer.dist.dir}/src"/> - <mkdir dir="${serializer.dist.dir}/tools"/> - </target> - - <target name="serializer-autodist-copy-files"> - <!-- Copy bin directory, which includes preexisting checked-in .jar files --> -<!-- <copy todir="${serializer.dist.dir}/bin"> - <fileset dir="${serializer.bin.dir}" /> - </copy> --> - - <echo message="Serializer: copy source files to ${serializer.dist.dir}/src" /> - <echo message=" ... from ${serializer.src.dir}/${serializer.reldir}" /> - <!-- Copy sources --> - <copy todir="${serializer.dist.dir}/src/${serializer.reldir}"> - <fileset dir="${serializer.src.dir}/${serializer.reldir}"/> - </copy> - <!-- Copy the manifest --> - <copy file="${serializer.src.dir}/${serializer.manifest.basename}" - todir="${serializer.dist.dir}/src" /> - - <!-- Copy built jars --> - <copy file="${build.serializer.jar}" todir="${serializer.dist.dir}" /> - - <!-- Copy runtime jars --> - <copy file="${lib.dir}/${xmlapis.jar.name}" todir="${serializer.dist.dir}" /> - <copy file="${lib.dir}/${parser.jar.name}" todir="${serializer.dist.dir}" /> - - <!-- Copy licenses --> - <copy todir="${serializer.dist.dir}"> - <fileset dir="." - includes="LICENSE.txt,NOTICE.txt"/> - </copy> - - <!-- Copy tools --> - <copy todir="${serializer.dist.dir}/tools"> - <fileset dir="./tools" includes="ant*"/> - </copy> - - <copy todir="${serializer.dist.dir}"> - <fileset dir="." includes="KEYS,build.xml,build.sh,build.bat"/> - </copy> - </target> - - <target name="serializer-autodist-create-bin-packages"> - <tar tarfile="${serializer.build.dir}/${serializer.dist.file}-bin.tar" > - <tarfileset dir="${serializer.build.dir}"> - <patternset refid="serializer-bin-distro"/> - </tarfileset> - </tar> - <gzip src="${serializer.build.dir}/${serializer.dist.file}-bin.tar" - zipfile="${serializer.build.dir}/${serializer.dist.file}-bin.tar.gz"/> - - <!-- - <delete file="${serializer.build.dir}/${serializer.dist.file}-bin.tar" /> - --> - - <zip zipfile="${serializer.build.dir}/${serializer.dist.file}-bin.zip" > - <fileset dir="${serializer.build.dir}"> - <patternset refid="serializer-bin-distro"/> - </fileset> - </zip> - </target> - - <target name="serializer-autodist-create-src-packages"> - <tar tarfile="${serializer.build.dir}/${serializer.dist.file}-src.tar" > - <tarfileset dir="${serializer.build.dir}"> - <patternset refid="serializer-src-distro"/> - </tarfileset> - </tar> - <gzip src="${serializer.build.dir}/${serializer.dist.file}-src.tar" zipfile="${serializer.build.dir}/${serializer.dist.file}-src.tar.gz"/> - - <delete file="${serializer.build.dir}/${serializer.dist.file}-src.tar" /> - - <zip zipfile="${serializer.build.dir}/${serializer.dist.file}-src.zip" > - <fileset dir="${serializer.build.dir}"> - <patternset refid="serializer-src-distro"/> - </fileset> - </zip> - </target> -<!-- ################################################## - # END OF SECTION TO BUILD STAND-ALONE SERIALIZER # - ################################################## --> - -</project> diff --git a/build_srcdist_xalan.xml b/build_srcdist_xalan.xml deleted file mode 100644 index 4b2d9d5d9..000000000 --- a/build_srcdist_xalan.xml +++ /dev/null @@ -1,1944 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> - -<!-- =================================================================== - - Build file for Xalan-J 2.x - for use with the Jakarta Ant java build tool - -Setup instructions: - Before running an Ant build, you must - - - set the JAVA_HOME environment variable to the JDK root directory - - To build 'servlet' sample: Include Servlet SDK in your classpath - - To build docs/javadocs/xsltc: use JDK 1.2.x or higher - -Build Instructions: - To build, run - build.bat (win32) or build.sh (unix) [antoptions] [targets] - in the directory where this file is located; you should also be - able to use an installation of Ant v1.4.1 or later. - - build -projecthelp will show a list of supported targets. - - Developers: include a description="" attribute in all user-callable targets. - - If you build a target that depends on other targets, those other - targets are *usually* created in the correct order; however a - few of the larger targets like dist do not list all dependencies. - -Other Important Notes: -- 'dist' produces a .tar file that works with GNU compatible tar - programs, because that's what Ant does when it finds a path that's - longer than 100 characters (like in our docs). Sorry! - -- External build maintainers: look for GUMP: comments; developers - please use great caution when changing these lines! - -- Unusual build items: the docs and xsltc.compile targets leave - cruft in the source areas; various clean targets get most of this. - -Authors: - Shane Curcuru <shane_curcuru@lotus.com> - Don Leslie <donald_leslie@lotus.com> - -This file has been written, to enable building XalanJ from XalanJ -source distribution. This file is largely, a copy of the file build.xml -provided by XalanJ xalan-java git repos. - -$Id$ -==================================================================== --> - -<project name="Xalan" default="jar" basedir="."> - - <property name="name" value="xalan"/> - <property name="year" value="2023"/> - <property name="build.debug" value="on"/> - <property name="compiler.target" value="1.8"/> - <property name="compiler.source" value="1.8"/> - <property name="compiler.nowarn" value="on"/> - - <!-- Xalan Java version information --> - <property name="version.VERSION" value="2"/> - <property name="version.RELEASE" value="7"/> - <property name="version.DEVELOPER" value=""/><!-- Set this to 'D' if a developer release; blank "" if maintenance release --> - <property name="version.MINOR" value="3"/><!-- EITHER the developer release number, or a maintenance release number --> - <property name="version" value="${version.VERSION}_${version.RELEASE}_${version.DEVELOPER}${version.MINOR}"/><!-- GUMP: version # of dist file --> - <property name="impl.version" value="${version.VERSION}.${version.RELEASE}.${version.DEVELOPER}${version.MINOR}"/><!-- Used in jar task for filtering MANIFEST.MF file --> - - <!-- Xerces Java version information --> - <property name="parser.version.VERSION" value="2"/> - <property name="parser.version.RELEASE" value="12"/> - <property name="parser.version.MINOR" value="2"/> - - <!-- Xalan Java directories --> - <!-- <property name="bin.dir" value="./bin"/> --> - <property name="build.dir" value="./build"/> - <property name="lib.dir" value="./lib"/> - <property name="endorsed.dir" value="${lib.dir}/endorsed"/> - <property name="samples.dir" value="./samples"/> - <property name="src.dir" value="./src"/> - <property name="tools.dir" value="./tools"/> - <property name="xdocs.dir" value="./xdocs"/> - - <property name="apachexml.reldir" value="org/apache/xml"/> - <property name="serializer.reldir" value="org/apache/xml/serializer"/> - <property name="xpath.reldir" value="org/apache/xpath"/> - <property name="xalan.reldir" value="org/apache/xalan"/> - <property name="domxpath.reldir" value="org/w3c/dom/xpath"/> - <property name="xsltc.reldir" value="${xalan.reldir}/xsltc"/> - - <!-- Jars to run Xalan Java (Interpretive, Compiled, or both) --> - <property name="xmlapis.jar.name" value="xml-apis.jar"/> - <property name="xmlapis.jar" value="${endorsed.dir}/${xmlapis.jar.name}"/> - <property name="parser.jar.name" value="xercesImpl.jar"/> - <property name="parser.jar" value="${endorsed.dir}/${parser.jar.name}"/> - <property name="bcel.jar.name" value="bcel-6.7.0.jar"/> - <property name="bcel.jar" value="${lib.dir}/${bcel.jar.name}"/> - <property name="runtime.jar.name" value="runtime.jar"/> - <property name="runtime.jar" value="${lib.dir}/${runtime.jar.name}"/> - <property name="regexp.jar.name" value="regexp.jar"/> - <property name="regexp.jar" value="${lib.dir}/${regexp.jar.name}"/> - - <!-- Jars to build Xalan Java (Interpretive, Compiled, or both) or build the docs --> - <property name="java_cup.jar.name" value="java_cup.jar"/> - <property name="java_cup.jar" value="${tools.dir}/${java_cup.jar.name}"/> - <property name="jlex.jar.name" value="JLex.jar"/> - <property name="jlex.jar" value="${tools.dir}/${jlex.jar.name}"/> - <property name="stylebook.jar.name" value="stylebook-1.0-b3_xalan-2.jar"/> - <property name="stylebook.jar" value="${tools.dir}/${stylebook.jar.name}"/> - <property name="doclet.jar.name" value="xalan2jdoc.jar"/> - <property name="doclet.jar" value="${tools.dir}/${doclet.jar.name}"/> - <property name="taglet.jar.name" value="xalan2jtaglet.jar"/> - <property name="taglet.jar" value="${tools.dir}/${taglet.jar.name}"/> - - <!-- Jars to build Xalan Java samples --> - <property name="servlet-api.jar.name" value="servlet-api-2.5.jar"/> - <property name="servlet-api.jar" value="${lib.dir}/${servlet-api.jar.name}"/> - <property name="javaee-api.jar.name" value="javaee-api-5.0-2.jar"/> - <property name="javaee-api.jar" value="${lib.dir}/${javaee-api.jar.name}"/> - <property name="brazil.jar.name" value="brazil-2.1.jar"/> - <property name="brazil.jar" value="${lib.dir}/${brazil.jar.name}"/> - - <!-- Relative locations of source directories --> - <property name="manifest.mf" value="./src/MANIFEST.MF"/> - <property name="manifest.xsltc.mf" value="./src/manifest.xsltc"/> - <property name="manifest.xalan-interpretive.mf" value="./src/manifest.xalan-interpretive"/> - <property name="XSLTInfo.props" value="./src/org/apache/xalan/res/XSLTInfo.properties"/> - <property name="generated.xpathparser" value="${src.dir}/${xsltc.reldir}/compiler/XPathParser.java"/> - <property name="generated.xpathlexer" value="${src.dir}/${xsltc.reldir}/compiler/XPathLexer.java"/> - <property name="generated.xpathsym" value="${src.dir}/${xsltc.reldir}/compiler/sym.java"/> - - <!-- Build and distribution output areas --> - <property name="build.xalan.jar" value="${build.dir}/${name}.jar"/><!-- GUMP: actual path/name of jar target output --> - <property name="build.xalan-unbundled.jar" value="${build.dir}/${name}-unbundled.jar"/> - <property name="build.xalan-interpretive.jar" value="${build.dir}/${name}.jar"/> - <property name="build.xsltc.jar" value="${build.dir}/xsltc.jar"/> - <property name="build.classes" value="${build.dir}/classes"/> - <property name="build.docs" value="${build.dir}/docs"/> - <property name="build.samples" value="${build.dir}/samples"/> - <property name="build.servlet" value="${build.samples}/servlet"/> - <property name="build.apidocs" value="${build.docs}/apidocs"/> - <property name="dist.pkg" value="${name}-j_${version}"/><!-- GUMP: actual path/name of dist target .tar.gz/.zip--> - <property name="dist.file" value="${dist.pkg}"/> - <property name="dist.dir" value="${build.dir}/${dist.pkg}"/> - - <!-- xml-commons sources (for Javadoc) --> - <property name="xml-commons-srcs.tar.gz" value="${src.dir}/xml-commons-external-1.3.02-src.tar.gz"/> - <property name="xml-commons-srcs.tar" value="${build.dir}/xml-commons-external-1.3.02-src.tar"/> - - <!-- Documentation and samples information --> - <property name="Name-in-docs" value="Xalan-Java"/> - <property name="version.file" value="${xalan.reldir}/processor/XSLProcessorVersion.java"/> - - <property name="build.samples.jar" value="${build.dir}/xalansamples.jar"/> - <property name="build.servlet.war" value="${build.dir}/xalanservlet.war"/> - <property name="build.xsltc.applet.jar" value="${build.dir}/xsltcapplet.jar"/> - <property name="build.xsltc.brazil.jar" value="${build.dir}/xsltcbrazil.jar"/> - <property name="build.xsltc.ejb.jar" value="${build.dir}/xsltcejb.jar"/> - <property name="build.xsltc.servlet.jar" value="${build.dir}/xsltcservlet.jar"/> - - <property name="xdocs.book" value="${xdocs.dir}/sources/xalan-jlocal.xml"/> - <property name="xdocs.style" value="${xdocs.dir}/style"/> - <property name="xalanonly-styledocs" - value="dtd/xsl-html40s.dtd,dtd/spec.dtd,stylesheets/patterns.xsl,stylesheets/notice.xsl,stylesheets/spec.xsl,stylesheets/done.xsl,loaderdesign.xml,stylesheets/design2project.xsl,stylesheets/designdoc2html.xsl,stylesheets/xml2fo.xsl"/> - <property name="xalan.cmdline.class" value="org.apache.xalan.xslt.Process"/> - <property name="doc.generator" value="org.apache.stylebook.StyleBook"/> - <property name="doc.generator.styletargz" value="${xdocs.dir}/xml-site-style.tar.gz"/> - <property name="doc.generator.styletar" value="${xdocs.dir}/xml-site-style.tar"/> - - <property name="site.root" value="./xml-site"/> - <property name="site.dir" value="${site.root}/target/xalan-j"/> - <property name="site.book" value="${xdocs.dir}/sources/xalan-jsite.xml"/> - - <property name="xalan.apache.org.site.root" value="./xalan-apache-org-site"/> - <property name="xalan.apache.org.site.dir" value="${xalan.apache.org.site.root}/target/xalan-apache-org"/> - <property name="xalan.apache.org.site.book" value="${xdocs.dir}/sources/xalan-apache-org-site.xml"/> - - - <property name="xdocs.DONE.file" value="${xdocs.dir}/sources/xalan/DONE"/> - <property name="xdocs.XSLTCDONE.file" value="XSLTCDONE"/> - <property name="xdocs.XSLTCDONE.location" value="${xdocs.dir}/sources/xalan/${xdocs.XSLTCDONE.file}"/> - - - <!-- PROPERTIES TO COMPILE THE SERIALIZER ======================================= --> - <property name="serializer.src.dir" value="./src"/> - <property name="serializer.build.dir" value="./build"/> - <property name="serializer.build.classes" value="${serializer.build.dir}/serializer"/> - - <!-- PROPERTIES TO MAKE THE SERIALIZER JAR ======================================= --> - <property name="serializer.manifest.basename" value="MANIFEST.SERIALIZER"/> - <property name="serializer.manifest" value="${serializer.src.dir}/${serializer.manifest.basename}"/> - <property name="serializer.impl.version" value="${impl.version}"/> - <property name="serializer.java.version" value="${java.version}"/> - <property name="serializer.java.vendor" value="${java.vendor}"/> - <property name="serializer.jar.name" value="serializer.jar"/> - <property name="build.serializer.jar" value="${serializer.build.dir}/${serializer.jar.name}"/> - <property name="lib.serializer.jar" value="./lib/${serializer.jar.name}"/> - - <!-- Class paths used in various targets --> - <path id="docs.class.path"> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${parser.jar}" /> - <pathelement location="${bcel.jar}" /> - <pathelement location="${runtime.jar}" /> - <pathelement location="${stylebook.jar}" /> - <pathelement location="${doclet.jar}" /> - <pathelement location="${taglet.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${build.xalan.jar}" /> - <pathelement path="${java.class.path}" /> - </path> - <path id="samples.class.path"> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${parser.jar}" /> - <pathelement location="${build.xalan.jar}" /> - <pathelement path="${java.class.path}" /> - </path> - <path id="compile.class.path"> - <!-- Ensure the selected parser.jar file is used to compile against --> - <pathelement location="${build.classes}" /> - <pathelement location="${serializer.build.classes}" /> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${parser.jar}" /> - <pathelement path="${java.class.path}" /> - </path> - - <path id="xslt.boot.class.path"> - <!-- Put this version of xalan in front of the jdk's for JDK 1.4+ --> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${parser.jar}" /> - <pathelement path="${sun.boot.class.path}" /> - </path> - - <path id="compile.source.path"> - <dirset dir="${src.dir}" includes="/org/apache/**" /> - </path> - - <!-- patternsets for source and binary distribution packages --> - <patternset id="bin-distro"> - <include name="${dist.file}/LICENSE.txt"/> - <include name="${dist.file}/NOTICE.txt"/> - <include name="${dist.file}/readme.html"/> - <include name="${dist.file}/xalan.jar"/> - <!-- xsltc.jar will only be picked up if it has been built --> - <include name="${dist.file}/xsltc.jar"/> - <include name="${dist.file}/${xmlapis.jar.name}"/> - <include name="${dist.file}/${parser.jar.name}"/> - <include name="${dist.file}/${serializer.jar.name}"/> - <include name="${dist.file}/samples/"/> - <include name="${dist.file}/samples/xalansamples.jar"/> - <include name="${dist.file}/samples/xalanservlet.war"/> - <include name="${dist.file}/samples/xsltcapplet.jar"/> - <include name="${dist.file}/samples/xsltcbrazil.jar"/> - <include name="${dist.file}/samples/xsltcejb.jar"/> - <include name="${dist.file}/samples/xsltcservlet.jar"/> - <include name="${dist.file}/docs/"/> - </patternset> - <patternset id="bin-distro-nodocs"> - <include name="${dist.file}/LICENSE.txt"/> - <include name="${dist.file}/NOTICE.txt"/> - <include name="${dist.file}/readme.html"/> - <include name="${dist.file}/xalan.jar"/> - <!-- xsltc.jar will only be picked up if it has been built --> - <include name="${dist.file}/xsltc.jar"/> - <include name="${dist.file}/${xmlapis.jar.name}"/> - <include name="${dist.file}/${parser.jar.name}"/> - <include name="${dist.file}/${serializer.jar.name}"/> - <include name="${dist.file}/samples/"/> - <include name="${dist.file}/samples/xalansamples.jar"/> - <include name="${dist.file}/samples/xalanservlet.war"/> - <include name="${dist.file}/samples/xsltcapplet.jar"/> - <include name="${dist.file}/samples/xsltcbrazil.jar"/> - <include name="${dist.file}/samples/xsltcejb.jar"/> - <include name="${dist.file}/samples/xsltcservlet.jar"/> - </patternset> - <patternset id="src-distro"> - <include name="${dist.file}/LICENSE.txt"/> - <include name="${dist.file}/NOTICE.txt"/> - <include name="${dist.file}/*build.*"/> - <include name="${dist.file}/commits.xml"/> - <include name="${dist.file}/KEYS"/> - <include name="${dist.file}/readme.html"/> - <include name="${dist.file}/README"/> - <include name="${dist.file}/lib/"/> - <include name="${dist.file}/tools/"/> - <include name="${dist.file}/samples/"/> - <exclude name="${dist.file}/samples/xalansamples.jar"/> - <exclude name="${dist.file}/samples/xalanservlet.war"/> - <exclude name="${dist.file}/samples/xsltcapplet.jar"/> - <exclude name="${dist.file}/samples/xsltcbrazil.jar"/> - <exclude name="${dist.file}/samples/xsltcejb.jar"/> - <exclude name="${dist.file}/samples/xsltcservlet.jar"/> - <include name="${dist.file}/src/"/> - <include name="${dist.file}/xdocs/"/> - <include name="${dist.file}/build_srcdist_xalan.xml"/> - <include name="${dist.file}/build_srcdist_xalan_tests.xml"/> - <include name="${dist.file}/xalan-test/"/> - </patternset> - - <!-- XSLTC engine dependency .jar files --> - <patternset id="xsltc-deps-jars"> - <include name="${dist.file}/lib/${bcel.jar.name}"/> - <include name="${dist.file}/tools/${java_cup.jar.name}"/> - <include name="${dist.file}/tools/${jlex.jar.name}"/> - <include name="${dist.file}/lib/${runtime.jar.name}"/> - <include name="${dist.file}/lib/${regexp.jar.name}"/> - </patternset> - - <!-- =================================================================== --> - <!-- Creates output build directories and doc prerequistes --> - <!-- =================================================================== --> - <target name="prepare"> - <echo message="Project:${Name-in-docs} version:${version} build.xml $Revision$"/> - <mkdir dir="${build.dir}"/> - <mkdir dir="${build.classes}"/> - <!-- Note that all testing-related targets *must* depend on - this target, either directly or indirectly, to get - the tests-available property set for them. - --> - <available file="${test.relpath}" property="tests-available" /> - <available property="xerces.present" - classname="org.apache.xerces.parsers.SAXParser"/> - - <!-- Update version information. This copies the Version.src - file into Version.java, while replacing the following tokens - --> - <filter token="version.VERSION" value="${version.VERSION}"/> - <filter token="version.RELEASE" value="${version.RELEASE}"/> - <filter token="version.MINOR" value="${version.MINOR}"/> - <filter token="version.DEVELOPER" value="${version.DEVELOPER}"/> - <filter token="parser.version.VERSION" value="${parser.version.VERSION}"/> - <filter token="parser.version.RELEASE" value="${parser.version.RELEASE}"/> - <filter token="parser.version.MINOR" value="${parser.version.MINOR}"/> - <copy tofile="${src.dir}/${xalan.reldir}/Version.java" file="${src.dir}/${xalan.reldir}/Version.src" filtering="true"/> - <copy tofile="${src.dir}/${xalan.reldir}/processor/XSLProcessorVersion.java" file="${src.dir}/${xalan.reldir}/processor/XSLProcessorVersion.src" filtering="true"/> - <copy tofile="${src.dir}/${serializer.reldir}/Version.java" file="${src.dir}/${serializer.reldir}/Version.src" filtering="true"/> - <copy tofile="${xdocs.dir}/sources/entities.ent" file="${xdocs.dir}/sources/entities.src" filtering="true"/> - </target> - - <!-- Must depend on jar since we use Xalan to process xml files --> - <target name="prepare.docs" depends="jar,prepare.docs.nojardepends"/> - - <target name="prepare.docs.nojardepends"> - <mkdir dir="${build.docs}"/> - <mkdir dir="${build.apidocs}"/> - - <gunzip src="${doc.generator.styletargz}"/> - <untar src="${doc.generator.styletar}" dest="${xdocs.dir}"/> - <delete file="${doc.generator.styletar}"/> - - <!-- We use a sed script to extract Xalan-Java 2 commits from the repository into commits.xml - The following operation transforms commits.xml (just including source code commits) and - puts the result in xdocs/sources/xalan for inclusion in the readme.xml --> - <echo message="Transform commits.xml and put the result in ${xdocs.dir}"/> - <java fork="yes" classname="${xalan.cmdline.class}" > - <classpath refid="docs.class.path" /> - <arg line="-in commits.xml -xsl ${xdocs.style}/stylesheets/done.xsl -out ${xdocs.DONE.file} -param xsltcdone ${xdocs.XSLTCDONE.file}"/> - </java> - <echo message="Generate Xalan-J 2.x design document"/> - <java fork="yes" classname="${doc.generator}" > - <classpath refid="docs.class.path" /> - <arg line="loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./build/docs/design/ - ./xdocs/sources/xalandesign.xml ./xdocs/style"/> - </java> - </target> - - <!-- =================================================================== --> - <!-- Compile the DTM implementation and xml utilities --> - <!-- =================================================================== --> - <target name="xml.compile" depends="prepare,serializer.jar"> - <echo message="Compiling DTM implementation and utilities" /> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <include name="${apachexml.reldir}/**/*.java" /> - <!-- exclude the serializer --> - <exclude name="${serializer.reldir}/**/*.java" /> - <!-- Exclude file that depends upon presence of Xerces in build path --> - <exclude name="**/IncrementalSAXSource_Xerces.java" - unless="xerces.present" /> - <classpath refid="compile.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - <!-- Copy needed properties, resource, etc. files to be put into .jar file --> - <copy todir="${build.classes}"> - <fileset dir="${src.dir}" - includes="${apachexml.reldir}/**/*.properties" - excludes="${serializer.reldir}/**/*.properties" - /> - </copy> - </target> - - <!-- =================================================================== --> - <!-- Compile the Xalan interpreter source tree --> - <!-- =================================================================== --> - <target name="xalan-interpretive.compile" depends="xml.compile" - description="Compile the Xalan interpretive classes (skips XSLTC)" > - <echo message="Compiling Xalan interpretive classes" /> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <include name="${xpath.reldir}/**/*.java" /> - <include name="${domxpath.reldir}/**/*.java" /> - <include name="${xalan.reldir}/**/*.java" /> - <exclude name="${xsltc.reldir}/**/*.java" /> - <classpath refid="compile.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - <sourcepath refid="compile.source.path" /> - </javac> - <!-- Copy needed properties, resource, etc. files to be put into .jar file --> - <copy todir="${build.classes}"> - <fileset dir="${src.dir}" includes="**/*.properties,META-INF/services/*" excludes="**/XSLTInfo.properties"/> - </copy> - <filter token="impl.version" value="${impl.version}"/> - <copy todir="${build.classes}/org/apache/xalan/res" file="${XSLTInfo.props}" filtering="true"/> - </target> - - <!-- Compile all java sources (Xalan interpretive and XSLTC) --> - <target name="compile" depends="xalan-interpretive.compile,xsltc.compile" - description="Compile all java source files (Xalan interpretive + XSLTC)" > - </target> - - <!-- =================================================================== --> - <!-- Compile just the XSLTC compiler portion --> - <!-- =================================================================== --> - <path id="xsltc.class.path"> - <pathelement location="${xmlapis.jar}" /> - <pathelement location="${build.serializer.jar}" /> - <pathelement location="${bcel.jar}" /> - <pathelement location="${jlex.jar}" /> - <pathelement location="${java_cup.jar}" /> - <pathelement location="${runtime.jar}" /> - <!-- build.classes needed for - org.apache.xalan.xsltc.util.JavaCupRedirect --> - <pathelement location="${build.classes}" /> - <pathelement path="${java.class.path}" /> - </path> - - <!-- Attempt to determine dependency info for generated sources --> - <target name="xsltc.prepare" depends="prepare" > - <!-- The first step compiles the utils directory, which includes - a special wrapper for the xsltc.codegen / java_cup step next. --> - <echo message="Compiling XSLTC utilities"/> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - includes="${xsltc.reldir}/util/**/*.java" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="xsltc.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - <!-- These tricky uptodate statements hopefully determine if we - actually need to generate the java_cup and jlex files - in the two sub-targets below - --> - <uptodate property="xsltc.java_cup.not_needed" targetfile="${generated.xpathparser}" > - <srcfiles dir="${src.dir}/${xsltc.reldir}/compiler" includes="xpath.cup" /> - </uptodate> - - <uptodate property="xsltc.jlex.not_needed" targetfile="${generated.xpathlexer}" > - <srcfiles dir="${src.dir}/${xsltc.reldir}/compiler" includes="xpath.lex" /> - </uptodate> - - <!-- Determine whether the support jars are already expanded --> - <available file="${build.classes}/org/apache/bcel" type="dir" property="xsltc.bcel_jar.not_needed" /> - <available file="${build.classes}/JLex" type="dir" property="xsltc.jlex_jar.not_needed" /> - <available file="${build.classes}/java_cup/Main.class" type="file" property="xsltc.java_cup_jar.not_needed" /> - <available file="${build.classes}/java_cup/runtime" type="dir" property="xsltc.runtime_jar.not_needed" /> - <available file="${build.classes}/org/apache/regexp" type="dir" property="xsltc.regexp_jar.not_needed" /> - </target> - - <!-- Generate the XPath parser sources for xsltc if needed --> - <target name="xsltc.java_cup" depends="xsltc.prepare" unless="xsltc.java_cup.not_needed"> - <!-- The second step generates sym.java and XPathParser.java. --> - <echo message="java_cup preparsing"/> - <java fork="yes" failonerror="true" - classname="org.apache.xalan.xsltc.util.JavaCupRedirect" > - <classpath refid="xsltc.class.path" /> - <!-- need to bootclasspath java_cup for JDKs that include JavaCupRedirect --> - <jvmarg value="-Xbootclasspath/p:${java_cup.jar}${path.separator}${runtime.jar}"/> - <!-- We're using JavaCupRedirect to call the java_cup application --> - <arg line="-parser XPathParser -expect 0 - -stdin ${src.dir}/${xsltc.reldir}/compiler/xpath.cup"/> - </java> - <echo message="java_cup move output files"/> - <move file="XPathParser.java" tofile="${generated.xpathparser}"/> - <move file="sym.java" tofile="${generated.xpathsym}"/> - </target> - - <!-- Generate the XPath lexer sources for xsltc if needed --> - <target name="xsltc.jlex" depends="xsltc.java_cup" unless="xsltc.jlex.not_needed"> - <!-- The third step generates XPathLexer.java. The lexiographical analyser - has to be generated after sym.java, so order is important. --> - <echo message="JLex preparsing"/> - <java fork="yes" failonerror="true" classname="JLex.Main" > - <classpath refid="xsltc.class.path" /> - <arg line="-static ${src.dir}/${xsltc.reldir}/compiler/xpath.lex"/> - </java> - <echo message="JLex move output file"/> - <move file="${src.dir}/${xsltc.reldir}/compiler/xpath.lex.java" tofile="${generated.xpathlexer}"/> - </target> - - <!-- Compile the main XSLTC classes --> - <target name="xsltc.compile" depends="xsltc.java_cup,xsltc.jlex,xml.compile" - description="Compile just the XSLTC classes" > - <echo message="Compiling remaining XSLTC classes"/> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - includes="${xsltc.reldir}/**/*.java" - excludes="${serializer.reldir}/**/*.java" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="xsltc.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - </target> - - <!-- Compile just the XSLTC classes w/o JLex, JCup recompilation --> - <target name="xsltc.fcompile" depends="xml.compile" - description="Compile just the XSLTC classes w/o JLex, JCup recompilation" > - <echo message="Compiling remaining XSLTC classes"/> - <javac srcdir="${src.dir}" - destdir="${build.classes}" - includes="${xsltc.reldir}/**/*.java" - debug="${build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="xsltc.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - </target> - - <!-- Jar up the XSLTC classes w/o the support jars --> - <target name="xsltc.unbundledjar" depends="xsltc.compile" - description="Jar just the xsltc.jar file" > - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.xsltc.mf}" filtering="true"/> - <jar jarfile="${build.xsltc.jar}" manifest="${build.dir}/manifest.xsltc" basedir="${build.classes}" > - <patternset><!-- relative to jar/@basedir --> - <include name="org/apache/xml/**" /> - <include name="${xsltc.reldir}/**/*" /> - <exclude name="org/apache/xalan/xsltc/util/JavaCupRedirect*" /> - </patternset> - </jar> - </target> - - <!-- Copy license and readme files for XSLTC support jars --> - <target name="xsltc.copy-licenses" depends="xsltc.prepare"> - </target> - - <!-- A parametrized target which is used to copy and expand a XSLTC support jar --> - <target name="xsltc.copy-deps-jar" unless="${param_unless}"> - <!-- copy the jar file to the build/classes directory --> - <copy todir="${build.classes}" file="${lib.dir}/${param_jar_name}"/> - - <!-- unjar the jar file --> - <unjar src="${build.classes}/${param_jar_name}" dest="${build.classes}" /> - - <!-- remove the jar file --> - <delete file="${build.classes}/${param_jar_name}" /> - </target> - - <!-- Copy and expand the XSLTC support jars if needed --> - <target name="xsltc.copy-deps-jars" depends="xsltc.copy-licenses"> - <echo message="Copying XSLTC support jars" /> - <!-- copy the 3rd party support jar files --> - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.bcel_jar.not_needed" /> - <param name="param_jar_name" value="${bcel.jar.name}" /> - </antcall> - -<!-- We don't need to package the JLex or java_cup jars in the xalan.jar. - These are only required for building XSLTC, not for using XSLTC. - - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.jlex_jar.not_needed" /> - <param name="param_jar_name" value="${jlex.jar.name}" /> - </antcall> - - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.java_cup_jar.not_needed" /> - <param name="param_jar_name" value="${java_cup.jar.name}" /> - </antcall> ---> - - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.runtime_jar.not_needed" /> - <param name="param_jar_name" value="${runtime.jar.name}" /> - </antcall> - - <antcall target="xsltc.copy-deps-jar"> - <param name="param_unless" value="xsltc.regexp_jar.not_needed" /> - <param name="param_jar_name" value="${regexp.jar.name}" /> - </antcall> - - <!-- remove the old META-INF/MANIFEST.MF file --> - <delete file="${build.classes}/META-INF/MANIFEST.MF" quiet="true"/> - </target> - - <!-- =================================================================== --> - <!-- Creates the xsltc jar including all support jars --> - <!-- =================================================================== --> - <target name="xsltc.jar" depends="xsltc.compile,xsltc.copy-deps-jars" - description="Jar xsltc,xml,BCEL,JLex,java_cup,runtime and jakarta regexp"> - - <!-- create new META-INF dir w/ transformer factory default --> - <!-- GTM: comment this out so that bundled xsltc.jar does not have - service provider default until further notice 2/20/2002 - <mkdir dir="${build.dir}/xsltctmp/META-INF"/> - <mkdir dir="${build.dir}/xsltctmp/META-INF/services"/> - <copy todir="${build.dir}/xsltctmp/META-INF/services" - file="${src.dir}/${xsltc.reldir}/javax.xml.transform.TransformerFactory" - /> - --> - - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.xsltc.mf}" filtering="true"/> - - <!-- make bundled jar named xsltc.jar --> - <jar jarfile="${build.dir}/xsltc.jar" manifest="${build.dir}/manifest.xsltc" > - <fileset dir="${build.classes}"> - <include name="org/apache/xalan/xsltc/**"/> - <exclude name="org/apache/xalan/xsltc/util/JavaCupRedirect*" /> - </fileset> - <fileset dir="${build.classes}" includes="org/apache/xml/**" - excludes="${serializer.reldir}/**" /> - <fileset dir="${build.classes}" includes="org/apache/bcel/**" /> - <fileset dir="${build.classes}" includes="JLex/**" /> - <fileset dir="${build.classes}" includes="java_cup/**" /> - <fileset dir="${build.classes}" includes="org/apache/regexp/**" /> - </jar> - - </target> - - <!-- =================================================================== --> - <!-- Creates the xalan interpretive jar --> - <!-- =================================================================== --> - <target name="xalan-interpretive.jar" depends="xalan-interpretive.compile" - description="Jar up everything in Xalan interpretive (without XSLTC)" > - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.xalan-interpretive.mf}" filtering="true"/> - <jar jarfile="${build.xalan-interpretive.jar}" manifest="${build.dir}/manifest.xalan-interpretive" basedir="${build.classes}" > - <patternset><!-- relative to jar/@basedir --> - <include name="${apachexml.reldir}/**/*" /> - <include name="${xpath.reldir}/**/*" /> - <include name="${xalan.reldir}/**/*" /> - <include name="${domxpath.reldir}/**/*" /> - <include name="META-INF/services/*" /> - <exclude name="${xsltc.reldir}/**/*" /> - <exclude name="${serializer.reldir}/**/*" /> - </patternset> - </jar> - </target> - - <!-- =================================================================== --> - <!-- Creates the xalan unbundled jar (Xalan interpretive + XSLTC - --> - <!-- support jars --> - <!-- =================================================================== --> - <target name="unbundledjar" depends="xalan-interpretive.compile,xsltc.compile" - description="Jar up Xalan and XSLTC, without the XSLTC dependencies" > - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.mf}" filtering="true"/> - <jar jarfile="${build.xalan-unbundled.jar}" manifest="${build.dir}/MANIFEST.MF" basedir="${build.classes}" > - <patternset> - <include name="${apachexml.reldir}/**/*" /> - <include name="${xpath.reldir}/**/*" /> - <include name="${xalan.reldir}/**/*" /> - <include name="META-INF/services/*" /> - <exclude name="${xsltc.reldir}/util/JavaCupRedirect*" /> - <exclude name="${serializer.reldir}/**/*.*" /> - </patternset> - </jar> - </target> - - <!-- =================================================================== --> - <!-- Creates one big xalan jar (Xalan interpretive + XSLTC + support jars) --> - <!-- =================================================================== --> - <target name="jar" depends="xalan-interpretive.compile,xsltc.compile,xsltc.copy-deps-jars" - description="Jar up everything (Xalan, XSLTC and XSLTC dependencies)" > - - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${impl.version}"/> - <filter token="java.version" value="${java.version}"/> - <filter token="java.vendor" value="${java.vendor}"/> - <copy todir="${build.dir}" file="${manifest.mf}" filtering="true"/> - - <!-- make bundled jar named xalan.jar --> - <jar jarfile="${build.xalan.jar}" manifest="${build.dir}/MANIFEST.MF" - basedir="${build.classes}" > - <patternset> - <exclude name="${xsltc.reldir}/util/JavaCupRedirect*" /> - <exclude name="${serializer.reldir}/**/*" /> - </patternset> - </jar> - - </target> - - <!-- =================================================================== --> - <!-- Default all target simply Creates the xalan JAR --> - <!-- =================================================================== --> - <target name="all" depends="serializer.jar,jar"><!-- 'Standardizing build.xml files' <bloritsch@apache.org> --> - <echo message="Redirect to jar target; please provide input on desired functionality of this target"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the samples (servlet excluded) and jars the class files --> - <!-- =================================================================== --> - <target name="samples" depends="jar,samples.nojardepends,xsltc.samples"/> - - <target name="samples.nojardepends" depends="xsltc.samples.nojardepends" - description="Compile and jar the samples (except servlet)" > - <property name="exclude" value="*.xml,*.xsl,*.txt,*.html,*.properties,*.out"/> - <mkdir dir="${build.samples}"/> - <!-- Since the samples are packageless, they must be compiled separately. --> - <javac srcdir="${samples.dir}/SimpleTransform" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/UseStylesheetPI" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/UseStylesheetParam" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/SAX2SAX" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/DOM2DOM" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/Pipe" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/UseXMLFilters" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/Trace" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/ApplyXPath" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/ApplyXPathDOM" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/trax" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/extensions" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/Validate" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/TransformThread" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <javac srcdir="${samples.dir}/XPathAPI" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - </javac> - <jar jarfile="${build.samples.jar}" basedir="${build.samples}" - includes="*.class"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles all samples that require extra standard components in --> - <!-- order to compile. --> - <!-- =================================================================== --> - <target name="extra.std.samples" - depends="servlet,xsltc.applet,xsltc.ejb,xsltc.servlet"/> - - <target name="extra.std.samples.nojardepends" - depends="servlet.jardepends,xsltc.applet.nojardepends, - xsltc.ejb.jardepends,xsltc.servlet.jardepends"/> - - <!-- =================================================================== --> - <!-- Compiles all samples that require extra non-standard components in --> - <!-- order to compile. --> - <!-- =================================================================== --> - <target name="extra.nonstd.samples" depends="xsltc.brazil"/> - - <target name="extra.nonstd.samples.nojardepends" depends="xsltc.brazil.jardepends"/> - - <!-- =================================================================== --> - <!-- Compiles the sample servlet and jars the class files. --> - <!-- The javax.servlet and javax.servlet.http packages --> - <!-- must be on the classpath --> - <!-- =================================================================== --> - <target name="servlet" depends="jar,servlet.jardepends"/> - - <target name="servlet.jardepends" - description="Compile and jar the servlet samples in xalanservlet.war" > - <echo message="To compile the sample servlets, javax.servlet and javax.servlet.http must be on the classpath"/> - <mkdir dir="${build.servlet}"/> - <mkdir dir="${build.servlet}/WEB-INF/classes/servlet"/> - <mkdir dir="${build.servlet}/WEB-INF/lib"/> - <javac srcdir="${samples.dir}/servlet" - destdir="${build.servlet}/WEB-INF/classes" - debug="${build.debug}" - bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath refid="samples.class.path" /> - <classpath location="${servlet-api.jar}" /> - </javac> - <copy todir="${build.servlet}/WEB-INF/classes/servlet"> - <fileset dir="${samples.dir}/servlet" includes="media.properties"/> - </copy> - <copy todir="${build.servlet}/WEB-INF"> - <fileset dir="${samples.dir}/servlet" includes="web.xml"/> - </copy> - <copy todir="${build.servlet}"> - <fileset dir="${samples.dir}/servlet" - includes="birds.xml, birds.xsl, booklist1.xsl, - booklist2.xsl, catalog.xml, fooparam.xml, fooparam.xsl, jspSample.jsp"/> - </copy> - <copy todir="${build.servlet}/WEB-INF/lib"> - <fileset dir="${lib.dir}" includes="${parser.jar.name}, ${xmlapis.jar.name}"/> - </copy> - <copy file="${build.xalan.jar}" todir="${build.servlet}/WEB-INF/lib" /> - <jar jarfile="${build.servlet.war}" - basedir="${build.servlet}" - includes="**"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles (does not jar) the translet samples. --> - <!-- For time being, classes are generated in place. --> - <!-- To run these samples, add xsltc.jar, runtime.jar, bcel.jar, --> - <!-- and java_cup.jar (all in the bin directory) to the classpath --> - <!-- --> - <!-- When we have straightened out classpath issues, --> - <!-- add samples in CompiledApplet, CompiledBrazil, CompiledEJB and --> - <!-- CompiledServlet. --> - <!-- =================================================================== --> - <target name="xsltc.samples" depends="jar,xsltc.samples.nojardepends"/> - - <target name="xsltc.samples.nojardepends"> - <mkdir dir="${build.samples}"/> - <javac srcdir="${samples.dir}/translets" - classpath="${java.class.path}:${build.xalan.jar}" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"/> - <javac srcdir="${samples.dir}/CompiledJAXP" - destdir="${build.samples}" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the XSLTC applet example and jars the class files. --> - <!-- =================================================================== --> - <target name="xsltc.applet" depends="jar,xsltc.applet.nojardepends"/> - - <target name="xsltc.applet.nojardepends"> - <mkdir dir="${build.samples}/CompiledApplet"/> - <javac srcdir="${samples.dir}/CompiledApplet" - destdir="${build.samples}/CompiledApplet" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"/> - <jar jarfile="${build.xsltc.applet.jar}" - basedir="${build.samples}/CompiledApplet" - includes="*.class"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the XSLTC brazil example and jars the class files. --> - <!-- =================================================================== --> - <target name="xsltc.brazil" depends="jar,xsltc.brazil.jardepends"/> - - <target name="xsltc.brazil.jardepends"> - <mkdir dir="${build.samples}/CompiledBrazil"/> - <javac srcdir="${samples.dir}/CompiledBrazil" - destdir="${build.samples}/CompiledBrazil" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath location="${brazil.jar}"/> - </javac> - <jar jarfile="${build.xsltc.brazil.jar}" - basedir="${build.samples}/CompiledBrazil" - includes="*.class"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the XSLTC EJB example and jars the class files. --> - <!-- ejb.jar must be on the classpath to compile this sample. --> - <!-- EJB 2.0 can be found at http://java.sun.com/products/ejb/docs.html --> - <!-- =================================================================== --> - <target name="xsltc.ejb" depends="jar,xsltc.ejb.jardepends"/> - - <target name="xsltc.ejb.jardepends"> - <mkdir dir="${build.samples}/CompiledEJB"/> - <javac srcdir="${samples.dir}/CompiledEJB" - destdir="${build.samples}/CompiledEJB" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <classpath location="${javaee-api.jar}"/> - </javac> - <jar jarfile="${build.xsltc.ejb.jar}" - basedir="${build.samples}/CompiledEJB" - includes="*.class"/> - </target> - - <!-- =================================================================== --> - <!-- Compiles the XSLTC servlet example and jars the class files. --> - <!-- =================================================================== --> - <target name="xsltc.servlet" depends="jar,xsltc.servlet.jardepends" /> - - <target name="xsltc.servlet.jardepends"> - <mkdir dir="${build.samples}/CompiledServlet"/> - <javac srcdir="${samples.dir}/CompiledServlet" - destdir="${build.samples}/CompiledServlet" excludes="${exclude}" - debug="${build.debug}" bootclasspathref="xslt.boot.class.path" - target="${compiler.target}" source="${compiler.source}" - classpath="${build.xalan.jar}:${servlet-api.jar}" - nowarn="${compiler.nowarn}"> - </javac> - <jar jarfile="${build.xsltc.servlet.jar}" - basedir="${build.samples}/CompiledServlet" - includes="*.class"/> - </target> - - - <!-- =================================================================== --> - <!-- Generate HTML docs --> - <!-- =================================================================== --> - <target name="docs" depends="jar,docs.nojardepends,xsltc.docs"/> - - <target name="docs.nojardepends" depends="prepare.docs.nojardepends,autodocs" - description="Build the documentation (overview, readme, etc.)" > - <echo message="docs is human-usable target with dependencies"/> - </target> - - <target name="autodocs"> - <echo message="autodocs is for automated build process, without dependencies"/> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="targetDirectory=${build.docs} ${xdocs.book} ${xdocs.style}"/> - </java> - </target> - - <!-- =================================================================== --> - <!-- Creates the API documentation --> - <!-- =================================================================== --> - <target name="javadocs" depends="jar,javadocs.nojardepends"/> - - <target name="javadocs.nojardepends" depends="prepare.docs.nojardepends,autojavadocs" - description="Build the Javadocs for Xalan 2.x and jaxp sources" > - <echo message="javadocs is human-usable target with dependencies"/> - - <!-- Expand jaxp sources (JAXP 1.1, DOM 2, and SAX 2) into source tree for - inclusion in the Javadoc. --> - <!-- Note this is into the src area.--> - <gunzip src="${xml-commons-srcs.tar.gz}" dest="${build.dir}" /> - <untar src="${xml-commons-srcs.tar}" - dest="${src.dir}"> - <patternset> - <include name="**.java"/> - </patternset> - </untar> - - <delete file="${xml-commons-srcs.tar}"/> - - <antcall target="autojavadocs"/> - - <!-- remove the jaxp sources --> - <delete dir="${src.dir}/javax" /> - <delete dir="${src.dir}/org/w3c" /> - <delete dir="${src.dir}/org/xml" /> - <delete dir="${src.dir}/org/apache/xmlcommons" /> - <delete file="${src.dir}/manifest.commons" /> - - </target> - - <target name="autojavadocs" - depends="autojavadocs-1.4-or-higher-if,autojavadocs-non1.4-or-higher-if"> - <echo message="autojavadocs is for automated build process, without dependencies"/> - </target> - - <target name="check-using-java-1.4-or-higher"> - <condition property="using-java-1.4-or-higher"> - <not> - <or> - <equals arg1="${ant.java.version}" arg2="1.1"/> - <equals arg1="${ant.java.version}" arg2="1.2"/> - <equals arg1="${ant.java.version}" arg2="1.3"/> - </or> - </not> - </condition> - </target> - - <target name="autojavadocs-1.4-or-higher-if" if="using-java-1.4-or-higher" - depends="check-using-java-1.4-or-higher"> - <antcall target="autojavadocs-1.4-or-higher"/> - </target> - - <target name="autojavadocs-non1.4-or-higher-if" unless="using-java-1.4-or-higher" - depends="check-using-java-1.4-or-higher"> - <antcall target="autojavadocs-non1.4-or-higher"/> - </target> - - <target name="autojavadocs-1.4-or-higher"> - - <!-- Ant ignores destdir arg if doclet is set, so must send to doclet in doclet subelement--> - <javadoc - additionalparam="-breakiterator" - destdir="${build.apidocs}" - public="true" - sourcepath="${src.dir}" - overview="${src.dir}/javadocOverview.html" - packagenames="org.apache.*,org.xml.*,org.w3c.*,javax.xml.*" - author="true" - version="true" - use="true" - windowtitle="${Name-in-docs} ${impl.version}" - doctitle="${Name-in-docs} ${impl.version}" - bottom="Copyright © ${year} Apache XML Project. All Rights Reserved."> - <classpath refid="docs.class.path" /> - <taglet name="xalan2jtaglet.XSLUsageTag" path="${taglet.jar}"/> - <group title="Transformations API for XML (TrAX)" packages="javax.xml.transform*"/> - <group title="Java API for XML Parsing" packages="javax.xml.parsers"/> - <group title="Xalan Core" - packages="org.apache.xalan.processor:org.apache.xalan.templates:org.apache.xalan.transformer"/> - <group title="XPath" packages="org.apache.xpath*"/> - <group title="Document Table Model (DTM)" packages="org.apache.xml.dtm*"/> - <group title="Utilities" packages="org.apache.xml.utils*"/> - <group title="Xalan Other" packages="org.apache.xalan.client:org:org.apache.xalan.extensions:org.apache.xalan.res:org.apache.xalan.stree:org.apache.xalan.trace:org.apache.xalan.xslt"/> - <group title="Xalan Extensions" packages="org.apache.xalan.lib*"/> - <group title="Serializers" packages="org.apache.xml.serialize*, org.apache.xalan.serialize"/> - <group title="SAX 2" packages="org.xml.sax*"/> - <group title="DOM 2" packages="org.w3c.dom*"/> - <group title="XSLTC Core" - packages="org.apache.xalan.xsltc*"/> - </javadoc> - </target> - - <target name="autojavadocs-non1.4-or-higher"> - - <!-- Ant ignores destdir arg if doclet is set, so must send to doclet in doclet subelement--> - <javadoc - public="true" - sourcepath="${src.dir}" - overview="${src.dir}/javadocOverview.html" - packagenames="org.apache.*,org.xml.*,org.w3c.*,javax.xml.*" - author="true" - version="true" - use="true" - windowtitle="${Name-in-docs} ${impl.version}" - doctitle="${Name-in-docs} ${impl.version}" - bottom="Copyright © ${year} Apache XML Project. All Rights Reserved."> - <classpath refid="docs.class.path" /> - <doclet name="xalanjdoc.Standard" path="${doclet.jar}"> - <param name="-d" value="${build.apidocs}"/> - </doclet> - <group title="Transformations API for XML (TrAX)" packages="javax.xml.transform*"/> - <group title="Java API for XML Parsing" packages="javax.xml.parsers"/> - <group title="Xalan Core" - packages="org.apache.xalan.processor:org.apache.xalan.templates:org.apache.xalan.transformer"/> - <group title="XPath" packages="org.apache.xpath*"/> - <group title="Document Table Model (DTM)" packages="org.apache.xml.dtm*"/> - <group title="Utilities" packages="org.apache.xml.utils*"/> - <group title="Xalan Other" packages="org.apache.xalan.client:org:org.apache.xalan.extensions:org.apache.xalan.res:org.apache.xalan.stree:org.apache.xalan.trace:org.apache.xalan.xslt"/> - <group title="Xalan Extensions" packages="org.apache.xalan.lib*"/> - <group title="Serializers" packages="org.apache.xml.serialize*, org.apache.xalan.serialize"/> - <group title="SAX 2" packages="org.xml.sax*"/> - <group title="DOM 2" packages="org.w3c.dom*"/> - <group title="XSLTC Core" - packages="org.apache.xalan.xsltc*"/> - </javadoc> - </target> - - <!-- =================================================================== --> - <!-- Various targets to clean the build tree --> - <!-- =================================================================== --> - <target name="distclean" depends="clean" - description="Clean everything, including dist/jar/docs/xsltc.*" > - <delete dir="${dist.dir}"/> - </target> - - <target name="clean" depends="xsltc.clean" - description="Clean the ${build.dir} tree and doc outputs" > - <delete dir="${build.dir}"/> - <delete dir="${site.root}"/> - <delete dir="${xalan.apache.org.site.root}"/> - <delete quiet="true"> - <fileset dir="${xdocs.style}" excludes="${xalanonly-styledocs}"/> - </delete> - <delete file="${xdocs.DONE.file}"/> - <delete file="${xdocs.XSLTCDONE.location}"/> - <delete file="${src.dir}/${xalan.reldir}/Version.java"/> - <delete file="${src.dir}/${serializer.reldir}/Version.java"/> - <delete file="${src.dir}/${xalan.reldir}/processor/XSLProcessorVersion.java"/> - <delete file="${xdocs.dir}/sources/entities.ent"/> - <!-- Also delete files expanded from ${xml-commons-srcs.tar.gz}--> - <delete dir="${src.dir}/javax" includeEmptyDirs="true" quiet="true"/> - <delete dir="${src.dir}/org/xml" includeEmptyDirs="true" quiet="true"/> - <delete dir="${src.dir}/org/w3c" includeEmptyDirs="true" quiet="true"/> - <delete dir="${src.dir}/xdocs/style/graphics" includeEmptyDirs="true" quiet="true"/> - <delete dir="${src.dir}/xdocs/style/resources" includeEmptyDirs="true" quiet="true"/> - </target> - - <target name="xsltc.clean" - description="Clean miscellaneous generated sources from xsltc.compile" > - <delete file="${generated.xpathparser}" /> - <delete file="${generated.xpathsym}" /> - <delete file="${generated.xpathlexer}" /> - </target> - - <!-- =================================================================== --> - <!-- Install/Uninstall targets - not currently applicable --> - <!-- =================================================================== --> - <target name="install"><!-- 'Standardizing build.xml files' <bloritsch@apache.org> --> - <echo message="install target currently not supported in ${Name-in-docs}; try jar or dist instead"/> - </target> - <target name="uninstall"><!-- 'Standardizing build.xml files' <bloritsch@apache.org> --> - <echo message="uninstall target currently not supported in ${Name-in-docs}; try distclean instead"/> - </target> - - <!-- =================================================================== --> - <!-- Creates a distribution that depends only on standard pieces --> - <!-- =================================================================== --> - <target name="dist" depends="build.std.dist,autodist" - description="Create a .zip/.tar.gz distribution module containing - all components without dependencies on non-standard - jars that are not part of the build system." > - <echo message="dist is human-useable target for distribution, with only standard dependencies"/> - </target> - - <target name="dist-nodocs" depends="build.std.dist-nodocs,autodist-nodocs" - description="Create a .zip/.tar.gz distribution module containing - all components without dependencies on non-standard - jars that are not part of the build system." > - <echo message="dist-nodocs is human-useable target for distribution, with only standard dependencies and no documentation "/> - </target> - - <!-- =================================================================== --> - <!-- Creates a complete distribution in which the xalan.jar contains --> - <!-- the interpretive, compiled and the common packages --> - <!-- =================================================================== --> - <target name="fulldist" depends="build.nonstd.dist,autodist" - description="Create a .zip/.tar.gz distribution module containing - all components."> - <echo message="fulldist is human-useable target for distribution, with all dependencies"/> - </target> - - <target name="fulldist-nodocs" depends="build.nonstd.dist-nodocs,autodist-nodocs" - description="Create a .zip/.tar.gz distribution module containing - all components."> - <echo message="fulldist-nodocs is human-useable target for distribution, with all dependencies and no documentation"/> - </target> - - <!-- =================================================================== --> - <!-- Creates a complete distribution with separate xalan.jar and --> - <!-- xsltc.jar. The common packages are contained in each jar. --> - <!-- =================================================================== --> - <target name="fulldist-separatejars" depends="build.nonstd-separatejars.dist,autodist" - description="Create a .zip/.tar.gz distribution module containing - all components."> - <echo message="fulldist is human-useable target for distribution, with all dependencies"/> - </target> - - <target name="fulldist-separatejars-nodocs" depends="build.nonstd-separatejars.dist-nodocs,autodist-nodocs" - description="Create a .zip/.tar.gz distribution module containing - all components."> - <echo message="fulldist-separatejars-nodocs is human-useable target for distribution, with all dependencies and no documentation"/> - </target> - - <target name="build.std.dist" depends="build.std.parts"> - <property name="has.nonstd.parts" value="false"/> - </target> - <target name="build.std.dist-nodocs" depends="build.std.parts-nodocs"> - <property name="has.nonstd.parts" value="false"/> - </target> - - <target name="build.nonstd.dist" depends="build.std.parts,build.nonstd.parts"> - <property name="has.nonstd.parts" value="true"/> - </target> - <target name="build.nonstd.dist-nodocs" depends="build.std.parts-nodocs,build.nonstd.parts"> - <property name="has.nonstd.parts" value="true"/> - </target> - - <target name="build.nonstd-separatejars.dist" depends="build.std-separatejars.parts, - build.nonstd-separatejars.parts"> - <property name="has.nonstd.parts" value="true"/> - </target> - <target name="build.nonstd-separatejars.dist-nodocs" depends="build.std-separatejars.parts-nodocs, - build.nonstd-separatejars.parts"> - <property name="has.nonstd.parts" value="true"/> - </target> - - <target name="build.std.parts" - depends="jar,docs,javadocs,samples,extra.std.samples,xsltc.docs"/> - - <target name="build.std.parts-nodocs" - depends="jar,samples,extra.std.samples"/> - - <target name="build.std-separatejars.parts" - depends="xalan-interpretive.jar,xsltc.jar, - docs.nojardepends,javadocs.nojardepends, - samples.nojardepends,extra.std.samples.nojardepends, - xsltc.docs"/> - - <target name="build.std-separatejars.parts-nodocs" - depends="xalan-interpretive.jar,xsltc.jar, - samples.nojardepends,extra.std.samples.nojardepends"/> - - <target name="build.nonstd.parts" depends="extra.nonstd.samples"/> - <target name="build.nonstd-separatejars.parts" depends="extra.nonstd.samples.nojardepends"/> - - <!-- =================================================================== --> - <!-- Autodist targets. Used by the distribution targets. --> - <!-- =================================================================== --> - <target name="autodist-mkdirs"> - <mkdir dir="${dist.dir}"/> - <mkdir dir="${dist.dir}/lib"/> - <mkdir dir="${dist.dir}/lib/endorsed"/> - <mkdir dir="${dist.dir}/samples"/> - <mkdir dir="${dist.dir}/src"/> - <mkdir dir="${dist.dir}/tools"/> - <mkdir dir="${dist.dir}/xdocs"/> - </target> - - <target name="autodist-mkdirs-docs"> - <mkdir dir="${dist.dir}/docs"/> - <mkdir dir="${dist.dir}/docs/apidocs"/> - </target> - - <target name="autodist-copy-files"> - - <!-- Copy license files to distribution root --> - <copy todir="${dist.dir}"> - <fileset dir="."> - <include name="LICENSE.txt,NOTICE.txt"/> - </fileset> - </copy> - - <!-- Copy sources and source documentation --> - <copy todir="${dist.dir}/src"> - <fileset dir="${src.dir}" excludes="javax/**,org/xml/**,org/w3c/**"/><!-- exclude jaxp, sax, dom --> - </copy> - <copy todir="${dist.dir}/xdocs"> - <fileset dir="${xdocs.dir}"/> - </copy> - - <!-- Copy samples --> - <copy todir="${dist.dir}/samples"> - <fileset dir="${samples.dir}"/> - </copy> - - <!-- Copy tools; used for source distribution --> - <copy todir="${dist.dir}/tools"> - <fileset dir="${tools.dir}"> - <include name="*.*"/> - </fileset> - </copy> - - <!-- 1) Copy runtime libs; used for source distribution --> - <copy todir="${dist.dir}/lib"> - <fileset dir="${lib.dir}"> - <include name="*.*"/> - </fileset> - </copy> - - <!-- 2) Copy runtime libs; used for source distribution --> - <copy todir="${dist.dir}/lib/endorsed"> - <fileset dir="${endorsed.dir}"> - <include name="*.*"/> - </fileset> - </copy> - - <!-- Copy built jars --> - <copy file="${build.dir}/xalansamples.jar" todir="${dist.dir}/samples"/> - <copy file="${build.dir}/xalanservlet.war" todir="${dist.dir}/samples"/> - <copy file="${build.dir}/xsltcapplet.jar" todir="${dist.dir}/samples"/> - <copy file="${build.dir}/xsltcbrazil.jar" todir="${dist.dir}/samples" - failonerror="${has.nonstd.parts}"/> - <copy file="${build.dir}/xsltcejb.jar" todir="${dist.dir}/samples"/> - <copy file="${build.dir}/xsltcservlet.jar" todir="${dist.dir}/samples"/> - - <copy file="${build.xalan.jar}" todir="${dist.dir}" /> - - <!-- only copy the xsltc.jar file if it has been built --> - <copy todir="${dist.dir}"> - <fileset dir="${build.dir}" includes="xsltc.jar"/> - </copy> - <copy file="${build.serializer.jar}" todir="${dist.dir}" /> - - <copy file="${xmlapis.jar}" todir="${dist.dir}" /> - <copy file="${parser.jar}" todir="${dist.dir}" /> - - <antcall target="xalan-transform-build-file-for-src-distro"/> - - <antcall target="xalan-tests-create-for-src-distro"/> - - <copy todir="${dist.dir}"> - <fileset dir="." includes="readme.html,KEYS,build.xml,build.sh,deprecated_build.sh,build.bat, - commits.xml,LICENSE.txt,NOTICE.txt"/> - </copy> - </target> - - <target name="xalan-transform-build-file-for-src-distro"> - <copy file="./build_srcdist_xalan.xml" todir="${dist.dir}"/> - <copy file="./build_srcdist_xalan.xml" tofile="${dist.dir}/build.xml"/> - </target> - - <target name="xalan-tests-create-for-src-distro"> - <mkdir dir="${dist.dir}/xalan-test"/> - <copy todir="${dist.dir}/xalan-test"> - <fileset dir="${test.relpath}"> - <exclude name="build.xml"/> - </fileset> - </copy> - - <copy file="./build_srcdist_xalan_tests.xml" todir="${dist.dir}"/> - <copy file="./build_srcdist_xalan_tests.xml" tofile="${dist.dir}/xalan-test/build.xml"/> - - <delete dir="${dist.dir}/xalan-test/.git" /> - </target> - - <target name="autodist-copy-files-docs"> - <!-- Copy built documentation and javadoc --> - <copy todir="${dist.dir}/docs"> - <fileset dir="${build.docs}"/> - </copy> - </target> - - <target name="autodist-create-bin-packages"> - <tar tarfile="${build.dir}/${dist.pkg}-bin.tar" > - <tarfileset dir="${build.dir}"> - <patternset refid="bin-distro"/> - </tarfileset> - </tar> - <gzip src="${build.dir}/${dist.pkg}-bin.tar" zipfile="${build.dir}/${dist.pkg}-bin.tar.gz"/> - <delete file="${build.dir}/${dist.pkg}-bin.tar" /> - - <zip zipfile="${build.dir}/${dist.pkg}-bin.zip" > - <fileset dir="${build.dir}"> - <patternset refid="bin-distro"/> - </fileset> - </zip> - </target> - <target name="autodist-create-bin-packages-nodocs"> - <tar tarfile="${build.dir}/${dist.pkg}-bin-nodocs.tar" > - <tarfileset dir="${build.dir}"> - <patternset refid="bin-distro-nodocs"/> - </tarfileset> - </tar> - <gzip src="${build.dir}/${dist.pkg}-bin-nodocs.tar" zipfile="${build.dir}/${dist.pkg}-bin-nodocs.tar.gz"/> - <delete file="${build.dir}/${dist.pkg}-bin-nodocs.tar" /> - - <zip zipfile="${build.dir}/${dist.pkg}-bin-nodocs.zip" > - <fileset dir="${build.dir}"> - <patternset refid="bin-distro-nodocs"/> - </fileset> - </zip> - </target> - <target name="autodist-create-src-packages"> - <tar tarfile="${build.dir}/${dist.pkg}-src.tar" > - <tarfileset dir="${build.dir}"> - <patternset refid="src-distro"/> - <patternset refid="xsltc-deps-jars"/> - </tarfileset> - </tar> - <gzip src="${build.dir}/${dist.pkg}-src.tar" zipfile="${build.dir}/${dist.pkg}-src.tar.gz"/> - <delete file="${build.dir}/${dist.pkg}-src.tar" /> - - <zip zipfile="${build.dir}/${dist.pkg}-src.zip" > - <fileset dir="${build.dir}"> - <patternset refid="src-distro"/> - <patternset refid="xsltc-deps-jars"/> - </fileset> - </zip> - </target> - - <target name="autodist"> - <echo message="autodist is for automated build processes, without dependencies"/> - <antcall target="autodist-mkdirs"/> - <antcall target="autodist-mkdirs-docs"/> - <antcall target="autodist-copy-files"/> - <antcall target="autodist-copy-files-docs"/> - <antcall target="autodist-create-bin-packages"/> - <antcall target="autodist-create-src-packages"/> - </target> - - <target name="autodist-nodocs"> - <echo message="autodist-nodocs is for automated build processes, without dependencies"/> - <antcall target="autodist-mkdirs"/> - <antcall target="autodist-copy-files"/> - <antcall target="autodist-create-bin-packages-nodocs"/> - <antcall target="autodist-create-src-packages"/> - </target> - - <!-- =================================================================== --> - <!-- Creates the documentation tree for the xml.apache.org/xalan-j --> - <!-- website --> - <!-- =================================================================== --> - <target name="site" depends="prepare.docs,javadocs,xsltc.docs" - description="Build documentation for posting to the website" > - - <mkdir dir="${site.dir}/apidocs"/> - <mkdir dir="${site.dir}/design"/> - <mkdir dir="${site.dir}/xsltc"/> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="targetDirectory=${site.dir} ${site.book} ${xdocs.style}"/> - </java> - - <!-- put xalan design doc in the site design subdir --> - <copy todir="${site.dir}/design"> - <fileset dir="${build.docs}/design"/> - </copy> - <!-- put xsltc design doc in the site xsltc subdir --> - <copy todir="${site.dir}/xsltc"> - <fileset dir="${build.docs}/xsltc"/> - </copy> - - <!-- put in the javadoc --> - <copy todir="${site.dir}/apidocs"> - <fileset dir="${build.apidocs}"/> - </copy> - </target> - - <!-- =================================================================== --> - <!-- Creates the documentation tree for the xalan.apache.org website --> - <!-- =================================================================== --> - <target name="xalan.apache.org.site" - description="Build documentation for posting to the website" > - - <mkdir dir="${xalan.apache.org.site.dir}"/> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="targetDirectory=${xalan.apache.org.site.dir} ${xalan.apache.org.site.book} ${xdocs.style}"/> - </java> - - </target> - - <!-- =================================================================== --> - <!-- Compiles and runs mini/smoketest from xml-xalan\xalan-test, if present. --> - <!-- xml-xalan is a representative folder, that can contain folders xalan-java and xalan-test --> - <!-- =================================================================== --> - <property name="test.relpath" value="xalan-test"/> - - <target name="minitest" depends="prepare,minitest-run,tests-not-available" - description="Run the Minitest from xml-xalan/xalan-test" > - <!-- This target simply asks the minitest-run worker target to - actually have the Minitest run (by the xalan-test/build.xml file); - we then also call the tests-not-available target in case - the user never checked out the tests. - --> - </target> - <target name="minitest-run" if="tests-available" depends="jar"> - <echo message=" [minitest] Calling ${test.relpath}/build.xml to run the Minitest" /> - <ant dir="${test.relpath}" antfile="build.xml" target="minitest.gump" > - </ant> - </target> - - <target name="smoketest" depends="prepare,smoketest-run,tests-not-available" - description="Run Smoketests (Minitest, conf, harness) from xml-xalan/xalan-test"> - </target> - <target name="smoketest-run" if="tests-available" depends="jar"> - <echo message=" [minitest] Calling ${test.relpath}/build.xml to run the Smoketest"/> - <ant dir="${test.relpath}" antfile="build.xml" target="smoketest.dev"> - </ant> - </target> - - <target name="smoketest.xsltc" depends="prepare,smoketest.xsltc-run,tests-not-available" - description="Run smoketest.xsltc from xml-xalan/xalan-test"> - </target> - <target name="smoketest.xsltc-run" if="tests-available" depends="jar"> - <echo message="Calling ${test.relpath}/build.xml to run the smoketest.xsltc" /> - <ant dir="${test.relpath}" antfile="build.xml" target="smoketest.xsltc"> - </ant> - </target> - - <target name="check" depends="smoketest"><!-- 'Standardizing build.xml files' <bloritsch@apache.org> --> - <echo message="Redirect to smoketest target"/> - </target> - - <!-- Called from various testing targets if the test dir doesn't exist. --> - <target name="tests-not-available" unless="tests-available" > - <echo message=" [tests] The tests do not seem to be present in ${test.relpath}" /> - <echo message=" [tests] You must have checked out from CVS to run the tests," /> - <echo message=" [tests] it is not included in binary distributions." /> - <echo message=" [tests] See http://xml.apache.org/xalan-j/test/ for more info." /> - </target> - - <!-- =================================================================== --> - <!-- Creates the xalan design document --> - <!-- =================================================================== --> - <target name="xalan-j2-design"> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=${build.dir}/docs/design/ - ${xdocs.dir}/sources/xalandesign.xml ${xdocs.style}"/> - </java> - </target> - - <!-- =================================================================== --> - <!-- Use FOP to create preliminary print (pdf) doc --> - <!-- Note: fop.jar and xml.jar (from xml-fop) must be on classpath --> - <!-- This is VERY preliminary, not yet for inclusion in distribution --> - <!-- =================================================================== --> - <!--Collate the xml sources into a single xml source with a litle extra structure --> - <target name="printerdocs" depends="prepare.docs"> - <echo message="NOTICE: requires fop.jar and xml.jar on the classpath"/> - <java fork="yes" - classname="${xalan.cmdline.class}" - classpathref="docs.class.path" > - <arg line="-xsl ${xdocs.dir}/sources/xalan-collate.xsl - -out xdocs/sources/xalan/xalan-collate.xml"/> - </java> - - <!-- Transform collation into Formatting Objects - (with a little work on links along the way) --> - <java fork="yes" - classname="${xalan.cmdline.class}" - classpathref="docs.class.path" > - <arg line="-in ${xdocs.dir}/sources/xalan/xalan-collate.xml - -param resourceFile '../../sources/xalan/resources.xml' - -param project ${Name-in-docs} - -xsl ${xdocs.style}/stylesheets/xml2fo.xsl - -out build/docs/xalan-collate.fo"/> - </java> - - <!-- Use FOP to generate a pdf file (classpath may need updating! -sc 18-Apr-01)--> - <java fork="yes" - classname="org.apache.fop.apps.CommandLine" - classpath="${java.class.path}:${build.xalan.jar}:${bin.dir}/fop.jar:${bin.dir}/w3c.jar"> - <arg line="${build.docs}/xalan-collate.fo build/docs/xalan.pdf"/> - </java> - </target> - - - <!-- =================================================================== --> - <!-- Build XSLTC design documentation. Eventually intend to incorporate --> - <!-- XSLTC into the Xalan book. --> - <!-- =================================================================== --> - - - <target name="xsltc.prepare.docs" depends="prepare.docs.nojardepends"> - <mkdir dir="${build.docs}/xsltc"/> - <!-- - <echo message="Transform xsltc_todo.xml and put the result in ${build.docs}/xsltc"/> - <java fork="yes" classname="${xalan.cmdline.class}"> - <classpath refid="docs.class.path" /> - <arg line="-in xsltc_todo.xml -xsl todo.xsl -out build/docs/xsltc/todo.html"/> - </java> --> - </target> - - <target name="xsltc.docs" depends="xsltc.prepare.docs"> - <echo message="Build the XSLTC Architectural documentation"/> - <java fork="yes" - classname="${doc.generator}" - classpathref="docs.class.path" > - <arg line="targetDirectory=${build.docs}/xsltc ${xdocs.dir}/sources/xsltc.xml ${xdocs.style}"/> - </java> - <copy todir="${build.docs}/xsltc" - file="${xdocs.dir}/sources/xsltc/README.xslt" /> - <copy todir="${build.docs}/xsltc" - file="${xdocs.dir}/sources/xsltc/README.xsltc" /> - </target> - - <!-- pack all doc for transfer to website --> - <target name="pack.docs"> - <!--tar tarfile="./build/xalan-j-docs.tar" basedir="./xml-site/target/xalan-j" includes="**"/> - <gzip src="./build/xalan-j-docs.tar" zipfile="./build/xalan-j-docs.tar.gz"/--> - <zip zipfile="./build/xalan-j-docs.zip" basedir="./xml-site/target/xalan-j" includes="**"/> - </target> - - -<!-- #################################################### - # START OF SECTION TO BUILD STAND-ALONE SERIALIZER # - #################################################### --> - - <!-- try not to use other properties directly when building the serializer --> - <!-- either create new values, or copy, just in case we separate into --> - <!-- a totally new build.xml file --> - <property name="serializer.build.debug" value="${build.debug}" /> - - - <!-- PROPERTIES TO MAKE THE SOURCE DISTRIBUTION ========================== --> - <property name="serializer.name" value="serializer" /> - <property name="serializer.version" value="${version}" /> - <property name="serializer.dist.file" value="${serializer.name}-j_${serializer.version}"/> - <property name="serializer.dist.dir" value="${serializer.build.dir}/${serializer.dist.file}"/> - - <!-- patternset for source distribution packages --> - <patternset id="serializer-src-distro" > - <!-- some license and legal stuff --> - <include name="${serializer.dist.file}/LICENSE.txt"/> - <include name="${serializer.dist.file}/NOTICE.txt"/> - <include name="${serializer.dist.file}/KEYS"/> - - <!-- The build stuff that uses Ant and this file itself, build.xml - this is getting into a strange loop but the source distribution - needs to build, and it uses this file, build.xml to do so ... --> - <include name="${serializer.dist.file}/build.bat"/> - <include name="${serializer.dist.file}/build.sh"/> - <include name="${serializer.dist.file}/build.xml"/> - - <!-- The source code that the source distribution would build --> - <include name="${serializer.dist.file}/src/${serializer.reldir}/**/*.java" /> - <include name="${serializer.dist.file}/src/${serializer.reldir}/**/*.properties" /> - <include name="${serializer.dist.file}/src/${serializer.manifest.basename}" /> - - <!-- We need Ant in order to run build.xml in the source distribution --> - <include name="${serializer.dist.file}/tools/ant.jar"/> - <include name="${serializer.dist.file}/tools/antRun"/> - <include name="${serializer.dist.file}/tools/antRun.bat"/> - - <!-- The serializer needs this jar in order to build --> - <include name="${serializer.dist.file}/xml-apis.jar"/> - - <!-- Ant needs an XML parser in order to read in the build.xml, so it - can even do the build ... this is a strange loop ... --> - <include name="${serializer.dist.file}/xercesImpl.jar"/> - </patternset> - - <!-- patternset for binary distribution packages ... if needed - <patternset id="serializer-bin-distro" > - <include name="${serializer.dist.file}/LICENSE.txt"/> - <include name="${serializer.dist.file}/NOTICE.txt"/> - <include name="${serializer.dist.file}/KEYS"/> - <include name="${serializer.dist.file}/${serializer.name}.jar"/> - <include name="${serializer.dist.file}/${xmlapis.jar.name}"/> - <include name="${serializer.dist.file}/${parser.jar.name}"/> - </patternset> - --> - - <!-- =================================================================== --> - <!-- Creates the Serializer jar --> - <!-- =================================================================== --> - <target name="serializer.jar" - depends="serializer.prepare,serializer.compile" - description="Build the serializer and created serializer.jar" > - <!-- Copy over the manifest, with filtering (for version number) --> - <filter token="impl.version" value="${serializer.impl.version}"/> - <filter token="java.version" value="${serializer.java.version}"/> - <filter token="java.vendor" value="${serializer.java.vendor}"/> - <copy todir="${serializer.build.dir}" file="${serializer.manifest}" filtering="true"/> - - <jar jarfile="${build.serializer.jar}" - manifest="${serializer.build.dir}/${serializer.manifest.basename}" - basedir="${serializer.build.classes}" > - <patternset><!-- relative to jar/@basedir --> - <include name="${serializer.reldir}/**/*" /> - </patternset> - </jar> - </target> - - <target name="serializer.prepare"> - <mkdir dir="${serializer.build.dir}"/> - <mkdir dir="${serializer.build.classes}"/> - </target> - - <target name="serializer.compile"> - <echo message="Compiling the Serializer" /> - <javac srcdir="${serializer.src.dir}" - destdir="${serializer.build.classes}" - debug="${serializer.build.debug}" - target="${compiler.target}" source="${compiler.source}" - nowarn="${compiler.nowarn}"> - <include name="${serializer.reldir}/**/*.java" /> - <classpath refid="compile.class.path" /> - <bootclasspath refid="xslt.boot.class.path" /> - </javac> - <!-- Copy needed properties, resource, etc. files to be put into .jar file --> - <copy todir="${serializer.build.classes}"> - <fileset dir="${serializer.src.dir}" includes="${serializer.reldir}/**/*.properties"/> - </copy> - - </target> - - - <!-- =================================================================== --> - <!-- Creates the API documentation --> - <!-- =================================================================== --> - <target name="serializer.javadocs" - description="Build the Javadocs for the Serializer" > - <echo message="javadocs is human-usable target with dependencies"/> - - <mkdir dir="${build.docs}"/> - <mkdir dir="${build.apidocs}"/> - <antcall target="serializer.autojavadocs"/> - </target> - - <target name="serializer.autojavadocs" - depends="serializer.autojavadocs-1.4-or-higher-if,serializer.autojavadocs-non1.4-or-higher-if"> - <echo message="serializer.autojavadocs is for automated build process, without dependencies"/> - </target> - - <target name="serializer.autojavadocs-1.4-or-higher-if" if="using-java-1.4-or-higher" - depends="check-using-java-1.4-or-higher"> - <antcall target="serializer.autojavadocs-1.4-or-higher"/> - </target> - - <target name="serializer.autojavadocs-non1.4-or-higher-if" unless="using-java-1.4-or-higher" - depends="check-using-java-1.4-or-higher"> - <antcall target="serializer.autojavadocs-non1.4-or-higher"/> - </target> - - <target name="serializer.autojavadocs-1.4-or-higher"> - - <!-- Ant ignores destdir arg if doclet is set, so must send to doclet in doclet subelement--> - <javadoc - additionalparam="-breakiterator" - destdir="${build.apidocs}" - public="true" - sourcepath="${src.dir}" - packagenames="org.apache.*" - author="true" - version="true" - use="true" - windowtitle="${Name-in-docs} Serializer ${impl.version}" - doctitle="${Name-in-docs} Serializer ${impl.version}" - bottom="Copyright © ${year} Apache XML Project. All Rights Reserved."> - <classpath refid="docs.class.path" /> - <taglet name="xalan2jtaglet.XSLUsageTag" path="${taglet.jar}"/> - <group title="Serializer" packages="org.apache.xml.serialize*"/> - </javadoc> - </target> - - <target name="serializer.autojavadocs-non1.4-or-higher"> - <!-- Ant ignores destdir arg if doclet is set, so must send to doclet in doclet subelement--> - <javadoc - public="true" - sourcepath="${src.dir}" - packagenames="org.apache.*" - author="true" - version="true" - use="true" - windowtitle="${Name-in-docs} Serializer ${impl.version}" - doctitle="${Name-in-docs} Serializer ${impl.version}" - bottom="Copyright © ${year} Apache XML Project. All Rights Reserved."> - <classpath refid="docs.class.path" /> - <doclet name="xalanjdoc.Standard" path="${doclet.jar}"> - <param name="-d" value="${build.apidocs}"/> - </doclet> - <group title="Serializer" packages="org.apache.xml.serialize*"/> - </javadoc> - </target> - - - <!-- =================================================================== --> - <!-- Create the serializer source distribution --> - <!-- =================================================================== --> - <target name="serializer-dist" - depends="serializer.jar" - description="Build the serializer source distribution .tar and .zip"> - <antcall target="serializer-autodist-mkdirs"/> - <antcall target="serializer-autodist-copy-files"/> - <!-- <antcall target="serializer-autodist-create-bin-packages"/> --> - <antcall target="serializer-autodist-create-src-packages"/> - </target> - - <target name="serializer-autodist-mkdirs"> - <echo message="Serializer: making distribution directories" /> - <mkdir dir="${serializer.dist.dir}"/> - <mkdir dir="${serializer.dist.dir}/src"/> - <mkdir dir="${serializer.dist.dir}/tools"/> - </target> - - <target name="serializer-autodist-copy-files"> - <!-- Copy bin directory, which includes preexisting checked-in .jar files --> -<!-- <copy todir="${serializer.dist.dir}/bin"> - <fileset dir="${serializer.bin.dir}" /> - </copy> --> - - <echo message="Serializer: copy source files to ${serializer.dist.dir}/src" /> - <echo message=" ... from ${serializer.src.dir}/${serializer.reldir}" /> - <!-- Copy sources --> - <copy todir="${serializer.dist.dir}/src/${serializer.reldir}"> - <fileset dir="${serializer.src.dir}/${serializer.reldir}"/> - </copy> - <!-- Copy the manifest --> - <copy file="${serializer.src.dir}/${serializer.manifest.basename}" - todir="${serializer.dist.dir}/src" /> - - <!-- Copy built jars --> - <copy file="${build.serializer.jar}" todir="${serializer.dist.dir}" /> - - <!-- Copy runtime jars --> - <copy file="${lib.dir}/${xmlapis.jar.name}" todir="${serializer.dist.dir}" /> - <copy file="${lib.dir}/${parser.jar.name}" todir="${serializer.dist.dir}" /> - - <!-- Copy licenses --> - <copy todir="${serializer.dist.dir}"> - <fileset dir="." - includes="LICENSE.txt,NOTICE.txt"/> - </copy> - - <!-- Copy tools --> - <copy todir="${serializer.dist.dir}/tools"> - <fileset dir="./tools" includes="ant*"/> - </copy> - - <copy todir="${serializer.dist.dir}"> - <fileset dir="." includes="KEYS,build.xml,build.sh,build.bat"/> - </copy> - </target> - - <target name="serializer-autodist-create-bin-packages"> - <tar tarfile="${serializer.build.dir}/${serializer.dist.file}-bin.tar" > - <tarfileset dir="${serializer.build.dir}"> - <patternset refid="serializer-bin-distro"/> - </tarfileset> - </tar> - <gzip src="${serializer.build.dir}/${serializer.dist.file}-bin.tar" - zipfile="${serializer.build.dir}/${serializer.dist.file}-bin.tar.gz"/> - - <!-- - <delete file="${serializer.build.dir}/${serializer.dist.file}-bin.tar" /> - --> - - <zip zipfile="${serializer.build.dir}/${serializer.dist.file}-bin.zip" > - <fileset dir="${serializer.build.dir}"> - <patternset refid="serializer-bin-distro"/> - </fileset> - </zip> - </target> - - <target name="serializer-autodist-create-src-packages"> - <tar tarfile="${serializer.build.dir}/${serializer.dist.file}-src.tar" > - <tarfileset dir="${serializer.build.dir}"> - <patternset refid="serializer-src-distro"/> - </tarfileset> - </tar> - <gzip src="${serializer.build.dir}/${serializer.dist.file}-src.tar" zipfile="${serializer.build.dir}/${serializer.dist.file}-src.tar.gz"/> - - <delete file="${serializer.build.dir}/${serializer.dist.file}-src.tar" /> - - <zip zipfile="${serializer.build.dir}/${serializer.dist.file}-src.zip" > - <fileset dir="${serializer.build.dir}"> - <patternset refid="serializer-src-distro"/> - </fileset> - </zip> - </target> -<!-- ################################################## - # END OF SECTION TO BUILD STAND-ALONE SERIALIZER # - ################################################## --> - -</project> diff --git a/build_srcdist_xalan_tests.xml b/build_srcdist_xalan_tests.xml deleted file mode 100644 index 2416aeb7f..000000000 --- a/build_srcdist_xalan_tests.xml +++ /dev/null @@ -1,1783 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. ---> -<project name="testxsl" default="jar" basedir="."> -<description> -build.xml:$Revision$ -Ant 1.4.1+ build script for compiling and running Xalan-J tests. - -Note that this is a slightly unusual Ant build.xml file, since we -support both compiling/packaging the Xalan-J tests themselves, as -well as a number of targets designed to execute the tests once -they're built. - -In general the compilation targets (i.e. ones that compile the -test classes themselves) do list their dependencies explicitly. -Targets that serve to execute tests do not normally list any -dependencies - users must manually 'build jar' first. - -@author shane_curcuru@lotus.com -@see build.bat - -This file has been written, to enable running XalanJ tests from -XalanJ source distribution. This file is largely, a copy of the -file build.xml provided by XalanJ xalan-test git repos. - -</description> - -<!-- Note: A number of property names may seem a little odd. I've - explicitly tried to reduce property name collisions between - this file and xml-xalan/java/build.xml to try to simplify - maintenance (or at least to separate the dev stuff from the - testing stuff). Suggestions for improvements (along with - maintenance strategies) accepted. ---> - - <!-- ================================================================== --> - <!-- Initialize: define various properties about locations, jars, etc. --> - <!-- ================================================================== --> - <!-- First, read in the user's own default properties, if they exist --> - <property name="local.properties" value="my.test.properties"/> - <property file="${local.properties}" /> - <!-- Then, read in the default checked-in properties --> - <property file="test.properties" /> - - <property name="smoketest.conf.excludes" value="${smoketest.conf.normal.excludes};${smoketest.conf.supplemental.excludes}"/> - <property name="smoketest.xsltc.conf.excludes" value="${smoketest.xsltc.conf.normal.excludes};${smoketest.xsltc.conf.supplemental.excludes}"/> - <!-- Also provide environment properties with a special prefix which - allows us to detect if JARDIR is set. - --> - <property environment="ENV" /> - - <property name="year" value="2000-2023"/> - <!-- Properties related to compiling the tests --> - <property name="build.compiler" value="classic"/> - <property name="compiler" value="${build.compiler}"/> - <property name="debug" value="on"/> - <property name="compiler.nowarn" value="on"/> - - <!-- Specific locations related to building test code/docs --> - <property name="test.src.dir" value="java/src"/> - <property name="test.root" value="org/apache/qetest/"/> - <property name="test.dir" value="${test.src.dir}/${test.root}"/> - <property name="test.tools.dir" value="./tools"/> - <property name="test.build.dir" value="java/build"/> - <property name="test.build.docs" value="${test.build.dir}/docs"/> - <property name="test.build.apidocs" value="${test.build.docs}/apidocs"/> - <property name="tests.bugzilla.dir" value="tests/bugzilla"/> - <property name="tests.bugzilla.build.dir" value="tests/bugzilla/build"/> - <property name="extensions.dir" value="tests/extensions"/> - <property name="tests.extensions.dir" value="${extensions.dir}/java"/> - <property name="tests.extensions.build.dir" value="${extensions.dir}/java/build"/> - - <!-- Names/locations of .jar files we build --> - <property name="testxsl.jar.name" value="testxsl.jar"/> - <property name="qetest.jar.name" value="qetest.jar"/> - <property name="testxsl.jar" value="${test.build.dir}/${testxsl.jar.name}"/> - <property name="qetest.jar" value="${test.build.dir}/${qetest.jar.name}"/> - - <!-- Specific locations related to Xalan code, which should be in a sister tree to us --> - <property name="xalan.relpath" value="./.."/> - <property name="xalan.lib.dir" value="${xalan.relpath}/lib"/> - <property name="xalan.tools.dir" value="${xalan.relpath}/tools"/> - <property name="xalan.build.dir" value="${xalan.relpath}/build"/> - <property name="xalan.xdocs.dir" value="${xalan.relpath}/xdocs"/> - <property name="xalan.generator.styletargz" value="${xalan.xdocs.dir}/xml-site-style.tar.gz"/> - - <!-- Various names/locations of dependent jars --> - <property name="xalan.jar" value="${xalan.build.dir}/xalan.jar"/> - <property name="xalan.unbundled.jar" - value="${xalan.build.dir}/xalan-unbundled.jar"/> - <property name="xsltc.jar" value="${xalan.build.dir}/xsltc.jar"/> - <property name="ser.jar" value="${xalan.build.dir}/serializer.jar"/> - <property name="xml-apis.jar" value="${xalan.lib.dir}/xml-apis.jar"/> - <property name="parserjar" value="${xalan.lib.dir}/xercesImpl.jar"/> - - <!-- JTidy is used by the XSLTC comparator --> - <!--<property name="jtidy.jar" value="${test.tools.dir}/Tidy.jar"/>--> - <property name="jtidy.jar" value="${test.tools.dir}/jtidy-1.0.3.jar"/> - - <!-- The Mozilla Rhino jar is needed, to run Javascript extensions tests --> - <property name="js.jar" value="${xalan.relpath}/lib/rhino-1.7.14.jar"/> - - <!-- The Bean Scripting Framework is required for extensions written in languages - other than Java. Xalan Java will attempt to use the Jakarta BSF implementation - by default (see the "extensions" target). For more information, see the - Apache Commons BSF project https://commons.apache.org/proper/commons-bsf/. - --> - <property name="bsf.jar" value="${xalan.relpath}/lib/bsf.jar"/> - - <property name="commons-logging.jar" value="${xalan.relpath}/lib/commons-logging-1.2.jar"/> - - <!-- Documentation-specific files and locations --> - <property name="stylebook.jar" value="${xalan.tools.dir}/stylebook-1.0-b3_xalan-2.jar"/> - <property name="doclet.jar" value="${xalan.tools.dir}/xalan2jdoc.jar"/> - <property name="test.xdocs.dir" value="java/xdocs"/> - <property name="test.generator.styletar" value="${test.xdocs.dir}/xml-site-style.tar"/> - <property name="test.xdocs.book" value="${test.xdocs.dir}/sources/xalantest.xml"/> - <property name="test.xdocs.style" value="${test.xdocs.dir}/style"/> - <property name="doc.generator" value="org.apache.stylebook.StyleBook"/> - <path id="test.docs.class.path"> - <pathelement location="${stylebook.jar}" /> - <pathelement location="${doclet.jar}" /> - <pathelement location="${jtidy.jar}" /> - <pathelement location="${xalan.jar}" /> - <pathelement location="${ser.jar}" /> - <pathelement location="${xml-apis.jar}" /> - <pathelement location="${parserjar}" /> - </path> - - <!-- Note: given that many of the tests interact with xerces and - xalan classes, and that Ant may use these classes (especially parser - ones) I've found it's best to fork the tests. - Later I'd like to give the user the option to fork or not, since - while forking is slower and problematic on some systems, it is - also a safer testing environment (since the Ant classes and the - parser aren't already loaded, etc.) - --> - <property name="fork-tests" value="yes"/> - <!-- Property to have the Ant build fail when a test has an - error (not necessarily a fail). Needs improvement. - --> - <property name="fail-on-error" value="yes"/> - - <!-- ================================================================== --> - <!-- Initialize: define classpaths for use within specific targets --> - <!-- ================================================================== --> - <!-- Classpath used when compiling tests --> - <path id="compiletest.class.path"> - <pathelement location="${xalan.jar}" /> - <pathelement location="${xsltc.jar}" /> <!-- add this so we can test the - separate jar distribution --> - <pathelement location="${ser.jar}" /> - <pathelement location="${xml-apis.jar}" /> - <pathelement location="${parserjar}" /> - <pathelement location="${jtidy.jar}" /> - </path> - - <!-- Classpath used when running API tests --> - <path id="api.class.path"> - <pathelement location="${xalan.jar}" /> - <pathelement location="${ser.jar}" /> - <pathelement location="${xml-apis.jar}" /> - <pathelement location="${parserjar}" /> - <pathelement location="${testxsl.jar}" /> - <pathelement location="${jtidy.jar}" /> - </path> - - <path id="testxsl.class.path"> - <pathelement location="${testxsl.jar}" /> - </path> - - <!-- Classpath used when running conf or conformance tests --> - <path id="conf.class.path"> - <pathelement location="${xalan.jar}" /> - <pathelement location="${ser.jar}" /> - <pathelement location="${xml-apis.jar}" /> - <pathelement location="${parserjar}" /> - <pathelement location="${testxsl.jar}" /> - <pathelement location="${jtidy.jar}" /> - </path> - - <!-- Boot class path for JDK 1.4+ --> - <path id="boot.class.path"> - <pathelement location="${xml-apis.jar}" /> - <pathelement location="${parserjar}" /> - <pathelement location="${ser.jar}" /> - <pathelement location="${xalan.jar}" /> - <!--<pathelement location="${xsltc.jar}" />--> <!-- add this so we can test the - separate jar distribution --> - <pathelement path="${sun.boot.class.path}" /> - </path> - - <!-- Gump build xml-xalan2-smoketest should use xalan.unbundled.jar --> - <path id="boot.class.path.gump"> - <pathelement location="${sun.boot.class.path}" /> - </path> - - <!-- Classpath used when running perf or performance tests --> - <path id="perf.class.path"> - <path refid="conf.class.path" /> - </path> - - <!-- Classpath used when running EXSLT tests --> - <path id="exslt.class.path"> - <path refid="conf.class.path" /> - </path> - - <!-- Classpath used when running contrib or user-contributed tests --> - <path id="contrib.class.path"> - <path refid="conf.class.path" /> - </path> - - <!-- Classpath used when running Bugzilla tests --> - <path id="bugzilla.class.path"> - <path refid="api.class.path" /> - <pathelement location="${tests.bugzilla.build.dir}" /> - </path> - - <!-- Classpath used when running extensions tests --> - <path id="extensions.class.path"> - <pathelement location="${xalan.jar}" /> - <path refid="testxsl.class.path" /> - <pathelement location="${commons-logging.jar}" /> - <pathelement location="${bsf.jar}" /> - <pathelement location="${js.jar}" /> - <pathelement location="${jtidy.jar}" /> - <pathelement location="${tests.extensions.build.dir}" /> - <pathelement location="${tests.bugzilla.build.dir}" /> - <!-- Add more pathelements if we add more Java extensions dirs --> - </path> - - <!-- Classpath used when build/running xslt20 XPath 2.0 RWAPI tests --> - <path id="rwapitest.class.path"> - <path refid="api.class.path" /> - <pathelement location="${xalan.build.dir}/xpathapi.jar" /> - </path> - - <!-- ================================================================== --> - <!-- Initialize: Define an Ant task that executes Xalan test automation --> - <!-- ================================================================== --> - <taskdef name="xalantest" classname="org.apache.qetest.xsl.XSLTestAntTask"> - <classpath> - <!-- Needed so this build file can run: this refers to - a precompiled version of XSLTestAntTask.class that - is checked in: normally at runtime, it should come - from the testxsl.jar file instead of below. - --> - <pathelement location="${test.src.dir}" /> - <pathelement location="${test.build.dir}" /> - <pathelement location="${testxsl.jar}" /> - </classpath> - </taskdef> - - <!-- This Ant task checks, the 'api' tests pass or fail status, by inspecting - content within test result XML documents --> - <taskdef name="apiTestsResultTask" classname="org.apache.qetest.xsl.XSLApiTestsResultTask"> - <classpath> - <pathelement location="${test.src.dir}" /> - <pathelement location="${test.build.dir}" /> - <pathelement location="${testxsl.jar}" /> - </classpath> - </taskdef> - - <!-- This Ant task, runs XalanJ xsltc tests --> - <taskdef name="xsltcTestsTask" classname="org.apache.qetest.xsl.XsltcTestsTask"> - <classpath> - <pathelement location="${test.src.dir}" /> - <pathelement location="${test.build.dir}" /> - <pathelement location="${testxsl.jar}" /> - </classpath> - </taskdef> - - <!-- ================================================================== --> - <!-- Base target for running tests with specified properties. Actual --> - <!-- work is handled by dependent tasks, at most one of which should be --> - <!-- executed. --> - <!-- ================================================================== --> - <target name="run.xalantest" depends="run.xalantest.default,run.xalantest.transfact"/> - - <target name="run.xalantest.default" unless="sysprop.transfact" > - <antcall target="run.xalantest.default.gump"/> - <antcall target="run.xalantest.default.normal"/> - </target> - - <target name="run.xalantest.default.gump" if="gump" > - <xalantest test="${testClass}" - testType="${testType}" - classpathref="${xalantest.classpathref}" - bootclasspathref="boot.class.path.gump" - fork="${fork-tests}" - failonerror="${fail-on-error}" /> - </target> - - <target name="run.xalantest.default.normal" unless="gump" > - <xalantest test="${testClass}" - testType="${testType}" - classpathref="${xalantest.classpathref}" - bootclasspathref="boot.class.path" - fork="${fork-tests}" - failonerror="${fail-on-error}" /> - </target> - - <target name="run.xalantest.transfact" if="sysprop.transfact" > - <antcall target="run.xalantest.transfact.gump"/> - <antcall target="run.xalantest.transfact.normal"/> - </target> - - <target name="run.xalantest.transfact.gump" if="gump"> - <xalantest test="${testClass}" - testType="${testType}" - classpathref="${xalantest.classpathref}" - bootclasspathref="boot.class.path.gump" - fork="${fork-tests}" - failonerror="${fail-on-error}" > - <!-- Explicitly set TransformerFactory property to use --> - <sysproperty key="javax.xml.transform.TransformerFactory" - value="${sysprop.transfact}" /> - </xalantest> - </target> - - <target name="run.xalantest.transfact.normal" unless="gump"> - <xalantest test="${testClass}" - testType="${testType}" - classpathref="${xalantest.classpathref}" - bootclasspathref="boot.class.path" - fork="${fork-tests}" - failonerror="${fail-on-error}" > - <!-- Explicitly set TransformerFactory property to use --> - <sysproperty key="javax.xml.transform.TransformerFactory" - value="${sysprop.transfact}" /> - </xalantest> - </target> - - <target name="run.xalan-extension-test" > - <!-- <antcall target="run.xalan-extension-test.gump"/> --> - <antcall target="run.xalan-extension-test.normal"/> - </target> - - <target name="run.xalan-extension-test.gump" if="gump"> - <xalantest test="${testClass}" - testType="${testType}" - classpathref="${xalantest.classpathref}" - bootclasspathref="boot.class.path.gump" - fork="${fork-tests}" - failonerror="${fail-on-error}" > - <sysproperty key="org.apache.xalan.extensions.bsf.BSFManager" - value="${sysprop.BSFManager}" /> - </xalantest> - </target> - - <target name="run.xalan-extension-test.normal"> - <xalantest test="${testClass}" - testType="${testType}" - classpathref="${xalantest.classpathref}" - bootclasspathref="boot.class.path" - fork="${fork-tests}" - failonerror="${fail-on-error}" > - <sysproperty key="org.apache.xalan.extensions.bsf.BSFManager" - value="${sysprop.BSFManager}" /> - </xalantest> - </target> - - <!-- ================================================================== --> - <!-- Initialize: setup for compiling, doc building, running tests --> - <!-- ================================================================== --> - <target name="init.test" - description="Prepare timestamp, echo version for debugging"> - <echo message="Using parserjar ${parserjar}" /> - <tstamp /> - </target> - - <target name="init.build" depends="init.test" - description="Prepare build output tree, copy prebuilts"> - <!-- Note this is case-sensitive, even on Windows! --> - <!-- Note JARDIR support should probably be removed, since it's a maintenance hassle Jul-02 -sc --> - <echo message="Your ==JARDIR== is set to ==${ENV.JARDIR}==" /> - <echo message="JVM Classpath is ${java.class.path}" /> - <mkdir dir="${test.build.dir}" /> - <mkdir dir="${test.build.dir}/${test.root}" /> - <!-- Also copy over precompiled external processor wrapper classes --> - <copy todir="${test.build.dir}/${test.root}/xslwrapper" > - <fileset dir="${test.dir}xslwrapper"> - <include name="**/*.class" /> - <include name="**/*.properties" /> - </fileset> - </copy> - <!-- Also copy over precompiled Ant class (why do we suddenly need this? -sc) --> - <copy todir="${test.build.dir}/${test.root}/xsl" > - <fileset dir="${test.dir}xsl"> - <include name="**/*.class" /> - </fileset> - </copy> - </target> - - <target name="init.docs" depends="init.build" - description="Prepare output tree for documentation"> - <mkdir dir="${test.build.apidocs}" /> - <!-- Copy the Xalan-specific version of doc files and untargz them --> - <gunzip src="${xalan.generator.styletargz}" dest="${test.generator.styletar}"/> - <untar src="${test.generator.styletar}" dest="${test.xdocs.dir}"/> - <delete file="${test.generator.styletar}"/> - </target> - - - <!-- ================================================================== --> - <!-- Run tests: the normal StylesheetTestletDriver on the conf suite --> - <!-- ================================================================== --> - <target name="conf" description="Run TestletDriver over the conf tree" - depends="init.test"> - <!-- Set the default conformance test driver, user may override --> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan conf test: ${testClass}" /> - <property name="testType" value="conf." /> - - <mkdir dir="results-conf"/> - - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="conf.class.path" /> - </antcall> - - <!--<property name="scan.outputDir" value="${conf.outputDir}"/>--> - <property name="scan.outputDir" value="results-conf"/> - <antcall target="scan"/> - </target> - - <target name="conf.dom" description="Run TestletDriver over conf with DOM excludes"> - <antcall target="conf"> - <param name="conf.excludes" value="${trax.dom.excludes}"/> - <param name="conf.flavor" value="trax.dom"/> - </antcall> - </target> - - <target name="conf.one" description="Run a single conf test"> - <antcall target="conf"> - <param name="testClass" value="org.apache.qetest.xsl.StylesheetDriver" /> - </antcall> - </target> - - <target name="conf.xsltc.dom" description="Run TestletDriver over conf with DOM excludes"> - <antcall target="conf.xsltc"> - <param name="conf.xsltc.excludes" value="${trax.dom.excludes}"/> - <param name="conf.xsltc.flavor" value="trax.dom"/> - </antcall> - </target> - - <target name="conf.trace" description="Run TestletDriver over the conf tree"> - <property name="conf.trace" value="on"/> - <antcall target="conf"/> - </target> - - <!-- ================================================================== --> - <!-- Run tests: the normal StylesheetTestletDriver on the EXSLT suite --> - <!-- ================================================================== --> - <target name="exslt" description="Run TestletDriver over the exslt tree" - depends="init.test"> - <!-- Set the default conformance test driver, user may override --> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan exslt test: ${testClass}" /> - <property name="testType" value="exslt." /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="exslt.class.path" /> - </antcall> - <property name="scan.outputDir" value="${exslt.outputDir}"/> - <antcall target="scan"/> - </target> - - <target name="exslt.dom" description="Run TestletDriver over exslt with DOM excludes"> - <antcall target="exslt"> - <param name="exslt.excludes" value="${trax.dom.excludes}"/> - <param name="exslt.flavor" value="trax.dom"/> - </antcall> - </target> - - <target name="exslt.one" description="Run a single exslt test"> - <antcall target="exslt"> - <param name="testClass" value="org.apache.qetest.xsl.StylesheetDriver" /> - </antcall> - </target> - - <target name="exslt.xsltc.dom" description="Run TestletDriver over exslt with DOM excludes"> - <antcall target="exslt.xsltc"> - <param name="exslt.xsltc.excludes" value="${trax.dom.excludes}"/> - <param name="exslt.xsltc.flavor" value="trax.dom"/> - </antcall> - </target> - - <target name="exslt.trace" description="Run TestletDriver over the conf tree"> - <property name="exslt.trace" value="on"/> - <antcall target="exslt"/> - </target> - - <!-- ================================================================== --> - <!-- Run tests: the normal StylesheetTestletDriver on the accept suite --> - <!-- ================================================================== --> - <target name="accept" description="Run TestletDriver over the accept tree"> - <!--<echo message="Executing Xalan accept test." />--> - - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan conf test: ${testClass}" /> - - <property name="qetest.summaryFile" value="Accept.xml" /> - <property name="testType" value="accept." /> - - <mkdir dir="results-accept"/> - - <!--<antcall target="conf"/>--> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="conf.class.path" /> - </antcall> - - <property name="scan.outputDir" value="results-accept"/> - <antcall target="scan"/> - </target> - - <!--<target name="accept.xsltc" description="Run TestletDriver over the accept tree"> - <property name="testType" value="accept.xsltc." /> - <property name="qetest.summaryFile" value="Accept.xml" /> - <property name="scan.outputDir" value="${accept.xsltc.outputDir}"/> - <property name="use-processor" value="${accept.xsltc.processor}"/> - <antcall target="conf.xsltc" /> - </target>--> - - <target name="accept.trace" description="Run TestletDriver over the accept tree"> - <property name="accept.trace" value="on"/> - <antcall target="accept"/> - </target> - - <!-- ================================================================== --> - <!-- Run tests: the StylesheetErrorTestlet on the conferr suite --> - <!-- ================================================================== --> - <target name="conferr" description="Run TestletDriver over the conferr negative test tree" - depends="init.test"> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan conf test: ${testClass}" /> - <property name="testType" value="conferr." /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="conf.class.path" /> - </antcall> - <antcall target="scan"> - <param name="scan.outputDir" value="${conferr.outputDir}"/> - </antcall> - </target> - - - <target name="conferr.xsltc" description="Run TestletDriver over the conferr negative test tree" depends="init.test"> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan conferr test-xsltc: ${testClass}" /> - <property name="testType" value="conferr.xsltc." /> - - <!-- Set indent-number to 0 to match Xalan's default indentation --> - <property name="${testType}Processor.setAttribute.indent-number" value="0" /> - - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="conf.class.path" /> - <!-- Explicitly set TransformerFactory property to use xsltc --> - <param name="sysprop.transfact" - value="org.apache.xalan.xsltc.trax.TransformerFactoryImpl" /> - </antcall> - <antcall target="scan"> - <param name="scan.outputDir" value="${conferr.xsltc.outputDir}" /> - </antcall> - </target> - - <!-- ================================================================== --> - <!-- Run tests: the normal StylesheetTestletDriver on the perf suite --> - <!-- ================================================================== --> - <target name="perf" description="Run TestletDriver over the perf tree" - depends="init.test"> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan perf test: ${testClass}" /> - <property name="testType" value="perf." /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="perf.class.path" /> - </antcall> - <antcall target="scan"> - <param name="scan.outputDir" value="${perf.outputDir}"/> - </antcall> - </target> - - <!-- ================================================================== --> - <!-- Run tests: the normal StylesheetTestletDriver on the contrib suite --> - <!-- ================================================================== --> - <target name="contrib" description="Run TestletDriver over the contrib tree" - depends="init.test"> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan contrib test: ${testClass}" /> - <property name="testType" value="contrib." /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="contrib.class.path" /> - </antcall> - <antcall target="scan"> - <param name="scan.outputDir" value="${contrib.outputDir}"/> - </antcall> - </target> - - <!-- ================================================================== --> - <!-- Run tests: the ThreadedTestletDriver on threads.filelist --> - <!-- ================================================================== --> - <target name="threads" description="Run ThreadedTestletDriver on threads.filelist" - depends="init.test"> - <!-- Set special threaded test driver and filelist, user may override --> - <property name="testClass" value="org.apache.qetest.xsl.ThreadedTestletDriver" /> - <echo message="Executing Xalan threads test: ${testClass}" /> - <property name="testType" value="threads." /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="api.class.path" /> - </antcall> - </target> - - - <!-- Run specific named API tests. - - What tests this build target runs, are defined within test.properties file - (please see the section, 'Various tests, that run for ant build.xml's "apitest" - target' within ./test.properties file). - --> - <target name="apitest" description="Run specific API tests" depends="init.test"> - <property name="testClass" value="org.apache.qetest.xsl.XSLTestHarness" /> - <property name="testType" value="api." /> - - <mkdir dir="results-api"/> - - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="api.class.path" /> - </antcall> - - <condition property="apitest-file-check-passed"> - <and> - <available file="results-api/Pass-DOMResultAPITest.xml" /> - <available file="results-api/Pass-DOMSourceAPITest.xml" /> - <available file="results-api/Pass-DTMDumpTest.xml" /> - <available file="results-api/Pass-EmbeddedStylesheetTest.xml" /> - <available file="results-api/Pass-ErrorListenerAPITest.xml" /> - <available file="results-api/Pass-ErrorListenerTest.xml" /> - <available file="results-api/Pass-SAXResultAPITest.xml" /> - <available file="results-api/Pass-SAXSourceAPITest.xml" /> - <available file="results-api/Pass-SAXTransformerFactoryAPITest.xml" /> - <available file="results-api/Pass-SerializedStylesheetTest.xml" /> - <available file="results-api/Pass-SystemIDResolverAPITest.xml" /> - <available file="results-api/Pass-TemplatesHandlerAPITest.xml" /> - <available file="results-api/Pass-TestDTM.xml" /> - <available file="results-api/Pass-TestDTMIter.xml" /> - <available file="results-api/Pass-TestDTMTrav.xml" /> - <available file="results-api/Pass-TestXPathAPI.xml" /> - <available file="results-api/Pass-TraceListenerTest.xml" /> - <available file="results-api/Pass-TransformerFactoryAPITest.xml" /> - <available file="results-api/Pass-TransformerHandlerAPITest.xml" /> - <available file="results-api/Pass-TransformerHandlerTest.xml" /> - <available file="results-api/Pass-TransformStateAPITest.xml" /> - <available file="results-api/Pass-URIResolverTest.xml" /> - </and> - </condition> - - <antcall target="scan"> - <!--<param name="scan.outputDir" value="${api.outputDir}"/>--> - <param name="scan.outputDir" value="results-api"/> - </antcall> - - <antcall target="apitest-pass-file-check"/> - - <apiTestsResultTask resultDir="results-api" fileNamePrefix="Pass-"/> - - <echo message=" [minitest] CONGRATULATIONS! The api tests passed!" /> - </target> - - <!-- ================================================================== --> - <!-- Run tests: Run all available API tests --> - <!-- ================================================================== --> - <target name="harness" description="Run all listed API harness.tests"> - <antcall target="api"> - <param name="testClass" value="org.apache.qetest.xsl.XSLTestHarness"/> - <param name="qetest.tests" value="${harness.tests}"/> - <!-- Below line is in case we run ThreadedTestletDriver --> - <param name="qetest.testlet" value="${harness.threads.testlet}"/> - <param name="qetest.fileList" value="${harness.threads.fileList}"/> - </antcall> - <antcall target="scan"> - <param name="scan.outputDir" value="${api.outputDir}"/> - </antcall> - </target> - - <!-- ================================================================== --> - <!-- Run tests: all Bugzilla testlets to regress bugs --> - <!-- ================================================================== --> - <target name="bugzilla" description="Run all Bugzilla Testlets and tests to regress bugs" - depends="init.test"> - <echo message="Executing Xalan Bugzilla Testlets and tests to regress bugs" /> - <property name="testClass" value="org.apache.qetest.xsl.BugzillaTestletDriver" /> - <property name="testType" value="bugzilla." /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="bugzilla.class.path" /> - </antcall> - <echo message="If you got ClassNotFound, did you 'build bugzilla.classes' first?" /> - </target> - - <!-- ================================================================== --> - <!-- Run tests: various extensions tests --> - <!-- ================================================================== --> - <target name="extensions" - description="Run extensions tests. Non-Java extensions will use the Apache BSF implementation." - depends="init.test"> - <echo message="Executing Xalan extensions tests. Non-Java extensions will use the Apache BSF implementation." /> - <!-- Set the default conformance test driver, user may - override; note test.properties:extensions.testlet= - --> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <property name="testType" value="extensions." /> - - <mkdir dir="results-extensions"/> - - <antcall target="run.xalan-extension-test"> - <param name="xalantest.classpathref" value="extensions.class.path" /> - <param name="sysprop.BSFManager" value="org.apache.bsf.BSFManager" /> - </antcall> - <property name="scan.outputDir" value="results-extensions"/> - <antcall target="scan"/> - <echo message="If you got ClassNotFound, did you 'build extensions.classes' first?" /> - </target> - - <target name="extensions-with-ibm-bsf" - description="Run extensions tests. - Non-Java extensions will use the IBM BSF implementation." - depends="init.test"> - <echo message="Executing Xalan extensions tests. Non-Java extensions will use the IBM BSF implementation." /> - <!-- Set the default conformance test driver, user may - override; note test.properties:extensions.testlet= - --> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <property name="testType" value="extensions.with-ibm-bsf." /> - <property name="scan.outputDir" value="${extensions.with-ibm-bsf.outputDir}"/> - - <antcall target="run.xalan-extension-test"> - <param name="extensions.outputDir" value="${extensions.with-ibm-bsf.outputDir}" /> - <param name="xalantest.classpathref" value="extensions.class.path" /> - <param name="sysprop.BSFManager" value="com.ibm.bsf.BSFManager" /> - </antcall> - <antcall target="scan"/> - <echo message="If you got ClassNotFound, did you 'build extensions.classes' first?" /> - </target> - - <target name="rwapi" description="Run TestletDriver with xslt20 XPath2.0 RWAPI tests" - depends="init.test,compile.rwapi,jar"> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan conf test: ${testClass}" /> - <property name="testType" value="conf." /> - <property name="conf.testlet" value="org.apache.qetest.rwapi.XPathASTTestlet" /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" value="rwapitest.class.path" /> - </antcall> - <property name="scan.outputDir" value="${conf.outputDir}"/> - <antcall target="scan"/> - </target> - <!-- ================================================================== --> - <!-- Run tests: Run the Xalan-J 2.x Minitest --> - <!-- ================================================================== --> - <!-- This target doesn't actually do anything itself - it merely - depends on other targets, in order, to first run the whole - Minitest, then to log to Ant whether the test didn't pass - (i.e. failed, incomplete, error or ambiguous) or passed. - --> - <target name="minitest" - description="Run the Xalan-J 2.x Minitest" - depends="minitest-execute,minitest-notpass,minitest-pass"> - </target> - - <target name="minitest.gump" - description="Compile and Run the Xalan-J 2.x Minitest" - depends="jar"> - <antcall target="minitest"> - <param name="gump" value="boot.class.path.gump"/> - </antcall> - </target> - <target name="minitest-execute"> - <echo message="About to execute the Minitest..." /> - <antcall target="api"> - <param name="testClass" value="org.apache.qetest.trax.Minitest"/> - <param name="testType" value="minitest."/> - </antcall> - <available file="${minitest.passFile}" property="minitest-passed" /> - </target> - <target name="minitest-notpass" unless="minitest-passed"> - <echo message=" [minitest] ERROR! The Minitest failed!" /> - <echo message=" [minitest] See details in ${minitest.logFile}, output is in ${minitest.outputDir}" /> - <echo message=" [minitest] Please fix any Minitest problems before checking in!" /> - <fail message="Please fix any Minitest problems before checking in!" /> - </target> - <target name="minitest-pass" if="minitest-passed"> - <echo message=" [minitest] CONGRATULATIONS! The Minitest passed!" /> - <echo message=" [minitest] See details in ${minitest.logFile}" /> - </target> - - <!-- ================================================================== --> - <!-- Run tests: Run the Xalan-J 2.x Smoketest, including several tests --> - <!-- Note: this target is frequently called from outside of this file! --> - <!-- ================================================================== --> - <!--<target name="smoketest" - description="Run the Xalan-J 2.x Smoketest" - depends="minitest-execute,extensions.classes,smoketest-execute,minitest-notpass,minitest-pass,smoketest-notpass,smoketest-pass"> - </target>--> - <target name="smoketest" - description="Run the Xalan-J 2.x Smoketest" - depends="smoketest-execute,smoketest-notpass,smoketest-pass"> - </target> - <target name="smoketest.xsltc" - description="Run the Xalan-J 2.x XSLTC Smoketest" - depends="jar,smoketest.xsltc-execute,smoketest.xsltc-notpass,smoketest.xsltc-pass"> - </target> - - <!-- The following compiles the minimum to run the smoketests, runs them, - and creates distros just of the results and existing tree, - without actually running the docs - this is to ensure that - doc build errors in the tests won't affect GUMP runs. - --> - <target name="smoketest.dev" - description="Run the Xalan-J 2.x Smoketest with dependencies" - depends="jar,minitest-execute,extensions.classes,smoketest-execute,minitest-notpass,minitest-pass,smoketest-notpass,smoketest-pass"> - </target> - - <target name="smoketest.gump" - description="Run the Xalan-J 2.x Smoketest in automated builds with dependencies"> - <antcall target="minitest.gump"> - <param name="gump" value="boot.class.path.gump"/> - </antcall> - <antcall target="extensions.classes"/> - <antcall target="smoketest-execute.gump"> - <param name="gump" value="boot.class.path.gump"/> - </antcall> - - <!-- This compiles the minimum to run the smoketests, runs them, - and creates distros just of the results and existing tree, - without actually running the docs - this is to ensure that - doc build errors in the tests won't affect GUMP runs. - --> - </target> - - <!-- This target smoketest-execute.gump is a subtarget which is called - from smoketest.gump. - --> - <target name="smoketest-execute.gump" - description="Run the Xalan-J 2.x Smoketest for Gump build " - depends="smoketest-execute,smoketest-results-dist,dist-nodeps, - smoketest-notpass,smoketest-pass"> - </target> - - <target name="smoketest-execute"> - <echo message="About to execute XalanJ2 extensions tests..." /> - <antcall target="extensions"> - <param name="testType" value="smoketest.extensions."/> - </antcall> - - <echo message="About to execute Conformance tests..." /> - <antcall target="conf"> - <param name="testType" value="smoketest.conf."/> - </antcall> - - <echo message="About to execute Accept tests..." /> - <antcall target="accept"> - <param name="testType" value="smoketest.accept."/> - </antcall> - - <condition property="smoketest-passed"> - <and> - <available file="${smoketest.extensions.passFile}" /> - <available file="${smoketest.conf.passFile}" /> - <available file="${smoketest.accept.passFile}" /> - </and> - </condition> - <antcall target="scan"> - <param name="scan.outputDir" value="smoketest"/> - </antcall> - </target> - - <target name="smoketest.xsltc-execute"> - <echo message="About to execute Conformance tests..." /> - <antcall target="conf.xsltc"> - <param name="testType" value="smoketest.xsltc.conf."/> - </antcall> - - <echo message="About to execute Accept tests..." /> - <antcall target="accept.xsltc"> - <param name="testType" value="smoketest.xsltc.accept."/> - </antcall> - - <condition property="smoketest.xsltc-passed"> - <and> - <available file="${smoketest.xsltc.conf.passFile}" /> - <available file="${smoketest.xsltc.accept.passFile}" /> - </and> - </condition> - <antcall target="scan"> - <param name="scan.outputDir" value="smoketest.xsltc"/> - </antcall> - </target> - - <target name="smoketest-notpass" unless="smoketest-passed"> - <echo message=" [minitest] ERROR! The Smoketest failed!" /> - <echo message=" [minitest] See details in ${smoketest.conf.logFile}, output is in ${smoketest.conf.outputDir}" /> - <echo message=" [minitest] See details in ${smoketest.api.logFile}, output is in ${smoketest.api.outputDir}" /> - <echo message=" [minitest] See details in ${smoketest.extensions.logFile}, output is in ${smoketest.extensions.outputDir}" /> - <echo message=" [minitest] Please fix any smoketest problems before checking in!" /> - <fail message="Please fix any smoketest problems before checking in!" /> - </target> - - <target name="smoketest-pass" if="smoketest-passed"> - <echo message=" [minitest] CONGRATULATIONS! The Smoketest passed!" /> - <echo message=" [minitest] Details are in ${smoketest.extensions.logFile}, ${smoketest.conf.logFile}, ${smoketest.accept.logFile}" /> - </target> - - <target name="apitest-pass-file-check" unless="apitest-file-check-passed"> - <echo message=" [minitest] ERROR! The api tests failed!" /> - <fail message="Please fix any api tests problems before checking in!" /> - </target> - - <target name="smoketest.xsltc-notpass" unless="smoketest.xsltc-passed"> - <echo message=" [minitest] ERROR! The Smoketest failed!" /> - <echo message=" [minitest] See details in ${smoketest.xsltc.conf.logFile}, output is in ${smoketest.xsltc.conf.outputDir}" /> - <echo message=" [minitest] See details in ${smoketest.xsltc.accept.logFile}, output is in ${smoketest.xsltc.accept.outputDir}" /> - <echo message=" [minitest] Please fix any smoketest problems before checking in!" /> - <fail message="Please fix any smoketest problems before checking in!" /> - </target> - <target name="smoketest.xsltc-pass" if="smoketest.xsltc-passed"> - <echo message=" [minitest] CONGRATULATIONS! The Smoketest passed!" /> - <echo message=" [minitest] Details are in ${smoketest.xsltc.conf.logFile}, ${smoketest.xsltc.accept.logFile}" /> - </target> - - <target name="smoketest-results-dist" depends="init.test"> - <property name="tarzip-backref" value="../.."/> - <property name="tarzip-fwdref" value="xml-xalan/test"/> - <!-- tar.gz the automation and batch files, etc. --> - <!-- # smoketest parent output location: used in test.properties/build.xml --> - <tar tarfile="${test.build.dir}/xalan-smoketest-${DSTAMP}.tar"> - <tarfileset dir="${tarzip-backref}"> - <include name="${tarzip-fwdref}/${smoketest.outputDir}/"/> - </tarfileset> - </tar> - <gzip src="${test.build.dir}/xalan-smoketest-${DSTAMP}.tar" - zipfile="${test.build.dir}/xalan-smoketest-${DSTAMP}.tar.gz"/> - <delete file="${test.build.dir}/xalan-smoketest-${DSTAMP}.tar"/> - - <zip zipfile="${test.build.dir}/xalan-smoketest-${DSTAMP}.zip" > - <zipfileset dir="${tarzip-backref}"> - <include name="${tarzip-fwdref}/${smoketest.outputDir}/"/> - </zipfileset> - </zip> - </target> - - <!-- ================================================================== --> - <!-- Run tests: A whole bunch of tests - used before posting builds, etc--> - <!-- ================================================================== --> - <target name="alltest" - description="Run nearly *all* available Xalan-J 2.x tests with defaults" - depends="all,alltest.other,alltest.conf,alltest.accept,alltest.contrib"> - <!-- Ensure that one last scan gets run of the whole output set - (Note that when we call sub-targets, some of our subdirs - may have had sub-scans done as well) --> - <antcall target="scan"> - <param name="scan.outputDir" value="results-alltest"/> - </antcall> - - </target> - <target name="alltest.features" - description="Re-Run nearly *all* available Xalan-J 2.x tests with setAttribute features set" - depends="all,alltest.other"> - <property name="alltest.resultDir" value="results-alltest" /> - <antcall target="alltest.conf"> - <param name="alltest.resultDir" value="${alltest.resultDir}/inctrue"/> - <param name="conf.Processor.setAttribute.http://xml.apache.org/xalan/features/incremental" value="true"/> - </antcall> - <antcall target="alltest.conf"> - <param name="alltest.resultDir" value="${alltest.resultDir}/optfalse"/> - <param name="conf.Processor.setAttribute.http://xml.apache.org/xalan/features/optimize" value="false"/> - </antcall> - <antcall target="alltest.contrib"> - <param name="alltest.resultDir" value="${alltest.resultDir}/inctrue"/> - <param name="conf.Processor.setAttribute.http://xml.apache.org/xalan/features/incremental" value="true"/> - </antcall> - <antcall target="alltest.contrib"> - <param name="alltest.resultDir" value="${alltest.resultDir}/optfalse"/> - <param name="conf.Processor.setAttribute.http://xml.apache.org/xalan/features/optimize" value="false"/> - </antcall> - <antcall target="scan"> - <param name="scan.outputDir" value="${alltest.resultDir}"/> - </antcall> - </target> - - <target name="alltest.other"> - <property name="alltest.resultDir" value="results-alltest" /> - <echo message="About to execute various API, extensions, bugzilla tests, results under ${alltest.resultDir}/..." /> - <!-- Run all individual API tests through the harness --> - <antcall target="harness"> - <param name="api.outputDir" value="${alltest.resultDir}/harness"/> - <param name="api.logFile" value="${alltest.resultDir}/harness/results.xml"/> - </antcall> - <!-- Run other misc tests --> - <antcall target="extensions"> - <param name="extensions.outputDir" value="${alltest.resultDir}/extensions"/> - <param name="extensions.logFile" value="${alltest.resultDir}/extensions/results.xml"/> - </antcall> - <antcall target="bugzilla"> - <param name="bugzilla.outputDir" value="${alltest.resultDir}/bugzilla"/> - <param name="bugzilla.logFile" value="${alltest.resultDir}/bugzilla/results.xml"/> - </antcall> - <!-- Run the threading tests once --> - <antcall target="threads"> - <param name="threads.outputDir" value="${alltest.resultDir}/threads"/> - <param name="threads.logFile" value="${alltest.resultDir}/threads/results.xml"/> - </antcall> - <!-- Run the perf tests just with streams, which gives best perf data --> - <antcall target="perf"> - <param name="perf.flavor" value="trax.stream"/> - <param name="perf.fileList" value="perf.filelist"/> - <param name="perf.outputDir" value="${alltest.resultDir}/perf"/> - <param name="perf.logFile" value="${alltest.resultDir}/perf/results.xml"/> - </antcall> - <antcall target="scan"> - <param name="scan.outputDir" value="${alltest.resultDir}"/> - </antcall> - </target> - - <target name="alltest.contrib"> - <property name="alltest.resultDir" value="results-alltest" /> - <property name="alltest.contrib.resultDir" value="${alltest.resultDir}/contrib" /> - <echo message="About to execute contrib tests with all flavors, results into ${alltest.contrib.resultDir}/..." /> - - <antcall target="contrib"> - <param name="contrib.flavor" value="trax.systemId"/> - <param name="contrib.outputDir" value="${alltest.contrib.resultDir}/systemId"/> - <param name="contrib.logFile" value="${alltest.contrib.resultDir}/systemId/results.xml"/> - </antcall> - <antcall target="contrib"> - <param name="contrib.flavor" value="trax.file"/> - <param name="contrib.outputDir" value="${alltest.contrib.resultDir}/file"/> - <param name="contrib.logFile" value="${alltest.contrib.resultDir}/file/results.xml"/> - </antcall> - <antcall target="contrib"> - <param name="contrib.flavor" value="trax.dom"/> - <param name="contrib.outputDir" value="${alltest.contrib.resultDir}/dom"/> - <param name="contrib.logFile" value="${alltest.contrib.resultDir}/dom/results.xml"/> - </antcall> - <antcall target="contrib"> - <param name="contrib.flavor" value="trax.sax"/> - <param name="contrib.outputDir" value="${alltest.contrib.resultDir}/sax"/> - <param name="contrib.logFile" value="${alltest.contrib.resultDir}/sax/results.xml"/> - </antcall> - <antcall target="contrib"> - <param name="contrib.flavor" value="trax.localPath"/> - <param name="contrib.outputDir" value="${alltest.contrib.resultDir}/localPath"/> - <param name="contrib.logFile" value="${alltest.contrib.resultDir}/localPath/results.xml"/> - </antcall> - <antcall target="contrib"> - <param name="contrib.flavor" value="trax.stream"/> - <param name="contrib.outputDir" value="${alltest.contrib.resultDir}/stream"/> - <param name="contrib.logFile" value="${alltest.contrib.resultDir}/stream/results.xml"/> - </antcall> - </target> - - <target name="alltest.conf"> - <property name="alltest.resultDir" value="results-alltest" /> - <property name="alltest.conf.resultDir" value="${alltest.resultDir}/conf" /> - <echo message="About to execute conf tests with all flavors, results into ${alltest.conf.resultDir}/..." /> - <!-- Run full conf test with each major available flavor into - specific output directories; note any user options will - override for all test calls. - Also exclude the currently failing tests in the - smoketest if use.excludes is set. - --> - <condition property="conf.excludes" value="${smoketest.conf.excludes}"> - <equals arg1="${use.excludes}" arg2="true" /> - </condition> - <antcall target="conf"> - <param name="conf.flavor" value="trax.systemId"/> - <param name="conf.excludes" value="${conf.excludes}"/> - <param name="conf.outputDir" value="${alltest.conf.resultDir}/systemId"/> - <param name="conf.logFile" value="${alltest.conf.resultDir}/systemId/results.xml"/> - </antcall> - <antcall target="conf"> - <param name="conf.flavor" value="trax.file"/> - <param name="conf.excludes" value="${conf.excludes}"/> - <param name="conf.outputDir" value="${alltest.conf.resultDir}/file"/> - <param name="conf.logFile" value="${alltest.conf.resultDir}/file/results.xml"/> - </antcall> - <antcall target="conf"> - <param name="conf.flavor" value="trax.dom"/> - <!-- Note DOM always has additional exclusions in conf tests--> - <param name="conf.excludes" value="${trax.dom.excludes};${conf.excludes}"/> - <param name="conf.outputDir" value="${alltest.conf.resultDir}/dom"/> - <param name="conf.logFile" value="${alltest.conf.resultDir}/dom/results.xml"/> - </antcall> - <antcall target="conf"> - <param name="conf.flavor" value="trax.sax"/> - <param name="conf.excludes" value="${conf.excludes}"/> - <param name="conf.outputDir" value="${alltest.conf.resultDir}/sax"/> - <param name="conf.logFile" value="${alltest.conf.resultDir}/sax/results.xml"/> - </antcall> - <antcall target="conf"> - <param name="conf.flavor" value="trax.localPath"/> - <param name="conf.excludes" value="${conf.excludes}"/> - <param name="conf.outputDir" value="${alltest.conf.resultDir}/localPath"/> - <param name="conf.logFile" value="${alltest.conf.resultDir}/localPath/results.xml"/> - </antcall> - <antcall target="conf"> - <param name="conf.flavor" value="trax.stream"/> - <param name="conf.excludes" value="${conf.excludes}"/> - <param name="conf.outputDir" value="${alltest.conf.resultDir}/stream"/> - <param name="conf.logFile" value="${alltest.conf.resultDir}/stream/results.xml"/> - </antcall> - <!-- we should really run conferr with each flavor --> - <antcall target="conferr"> - <param name="conferr.flavor" value="trax.systemId"/> - <param name="conferr.outputDir" value="${alltest.conf.resultDir}/conferr"/> - <param name="conferr.logFile" value="${alltest.conf.resultDir}/conferr/results.xml"/> - <!-- Note that conferr doesn't currently use gold files, - but we need to set the goldDir anyway for convenience - --> - <param name="conferr.goldDir" value="${alltest.conf.resultDir}/conferr-gold"/> - </antcall> - <!-- To be updated: also use at least one run of ErrorHandlerTestlet --> - <antcall target="conf"> - <param name="conf.testlet" value="org.apache.qetest.xsl.ErrorHandlerTestlet"/> - <param name="conf.flavor" value="trax.stream"/> - <param name="conf.excludes" value="${conf.excludes}"/> - <param name="conf.outputDir" value="${alltest.conf.resultDir}/streamEH"/> - <param name="conf.logFile" value="${alltest.conf.resultDir}/streamEH/results.xml"/> - </antcall> - </target> - - <target name="alltest.accept"> - <property name="alltest.resultDir" value="results-alltest" /> - <property name="alltest.accept.resultDir" value="${alltest.resultDir}/accept" /> - <echo message="About to execute accept tests with all flavors, results into ${alltest.accept.resultDir}/..." /> - <!-- Run full accept test with each major available flavor into - specific output directories; note any user options will - override for all test calls. - Also exclude the currently failing tests in the - smoketest if use.excludes is set. - --> - <condition property="accept.excludes" value="${smoketest.accept.excludes}"> - <equals arg1="${use.excludes}" arg2="true" /> - </condition> - <antcall target="accept"> - <param name="accept.flavor" value="trax.systemId"/> - <param name="accept.excludes" value="${accept.excludes}"/> - <param name="accept.outputDir" value="${alltest.accept.resultDir}/systemId"/> - <param name="accept.logFile" value="${alltest.accept.resultDir}/systemId/results.xml"/> - </antcall> - <antcall target="accept"> - <param name="accept.flavor" value="trax.file"/> - <param name="accept.excludes" value="${accept.excludes}"/> - <param name="accept.outputDir" value="${alltest.accept.resultDir}/file"/> - <param name="accept.logFile" value="${alltest.accept.resultDir}/file/results.xml"/> - </antcall> - <antcall target="accept"> - <param name="accept.flavor" value="trax.dom"/> - <!-- Note DOM always has additional exclusions in accept tests--> - <param name="accept.excludes" value="${trax.dom.excludes};${accept.excludes}"/> - <param name="accept.outputDir" value="${alltest.accept.resultDir}/dom"/> - <param name="accept.logFile" value="${alltest.accept.resultDir}/dom/results.xml"/> - </antcall> - <antcall target="accept"> - <param name="accept.flavor" value="trax.sax"/> - <param name="accept.excludes" value="${accept.excludes}"/> - <param name="accept.outputDir" value="${alltest.accept.resultDir}/sax"/> - <param name="accept.logFile" value="${alltest.accept.resultDir}/sax/results.xml"/> - </antcall> - <antcall target="accept"> - <param name="accept.flavor" value="trax.localPath"/> - <param name="accept.excludes" value="${accept.excludes}"/> - <param name="accept.outputDir" value="${alltest.accept.resultDir}/localPath"/> - <param name="accept.logFile" value="${alltest.accept.resultDir}/localPath/results.xml"/> - </antcall> - <antcall target="accept"> - <param name="accept.flavor" value="trax.stream"/> - <param name="accept.excludes" value="${accept.excludes}"/> - <param name="accept.outputDir" value="${alltest.accept.resultDir}/stream"/> - <param name="accept.logFile" value="${alltest.accept.resultDir}/stream/results.xml"/> - </antcall> - <!-- we should really run accept with each flavor --> - </target> - - <target name="alltest.conf.xsltc"> - <property name="alltest.xsltc.resultDir" value="results-alltest.xsltc" /> - <property name="alltest.conf.xsltc.resultDir" value="${alltest.xsltc.resultDir}/conf" /> - <echo message="About to execute xsltc.conf tests with all flavors, results into ${alltest.conf.xsltc.resultDir}/..." /> - <!-- Run full conf test with each major available flavor into - specific output directories; note any user options will - override for all test calls. - Also exclude the currently failing tests in the - smoketest if use.excludes is set. - --> - <condition property="conf.xsltc.excludes" value="${smoketest.conf.xsltc.excludes}"> - <equals arg1="${use.excludes}" arg2="true" /> - </condition> - <antcall target="conf.xsltc"> - <param name="conf.xsltc.flavor" value="trax.systemId"/> - <param name="conf.xsltc.excludes" value="${conf.xsltc.excludes}"/> - <param name="conf.xsltc.outputDir" value="${alltest.conf.xsltc.resultDir}/systemId"/> - <param name="conf.xsltc.logFile" value="${alltest.conf.xsltc.resultDir}/systemId/results.xml"/> - </antcall> - <antcall target="conf.xsltc"> - <param name="conf.xsltc.flavor" value="trax.file"/> - <param name="conf.xsltc.excludes" value="${conf.xsltc.excludes}"/> - <param name="conf.xsltc.outputDir" value="${alltest.conf.xsltc.resultDir}/file"/> - <param name="conf.xsltc.logFile" value="${alltest.conf.xsltc.resultDir}/file/results.xml"/> - </antcall> - <antcall target="conf.xsltc"> - <param name="conf.xsltc.flavor" value="trax.dom"/> - <!-- Note DOM always has additional exclusions in conf tests--> - <param name="conf.xsltc.excludes" value="${trax.dom.excludes};${conf.xsltc.excludes}"/> - <param name="conf.xsltc.outputDir" value="${alltest.conf.xsltc.resultDir}/dom"/> - <param name="conf.xsltc.logFile" value="${alltest.conf.xsltc.resultDir}/dom/results.xml"/> - </antcall> - <antcall target="conf.xsltc"> - <param name="conf.xsltc.flavor" value="trax.sax"/> - <param name="conf.xsltc.excludes" value="${conf.xsltc.excludes}"/> - <param name="conf.xsltc.outputDir" value="${alltest.conf.xsltc.resultDir}/sax"/> - <param name="conf.xsltc.logFile" value="${alltest.conf.xsltc.resultDir}/sax/results.xml"/> - </antcall> - <antcall target="conf.xsltc"> - <param name="conf.xsltc.flavor" value="trax.localPath"/> - <param name="conf.xsltc.excludes" value="${conf.xsltc.excludes}"/> - <param name="conf.xsltc.outputDir" value="${alltest.conf.xsltc.resultDir}/localPath"/> - <param name="conf.xsltc.logFile" value="${alltest.conf.xsltc.resultDir}/localPath/results.xml"/> - </antcall> - <antcall target="conf.xsltc"> - <param name="conf.xsltc.flavor" value="trax.stream"/> - <param name="conf.xsltc.excludes" value="${conf.xsltc.excludes}"/> - <param name="conf.xsltc.outputDir" value="${alltest.conf.xsltc.resultDir}/stream"/> - <param name="conf.xsltc.logFile" value="${alltest.conf.xsltc.resultDir}/stream/results.xml"/> - </antcall> - </target> - - <target name="alltest.accept.xsltc"> - <property name="alltest.xsltc.resultDir" value="results-alltest.xsltc" /> - <property name="alltest.accept.xsltc.resultDir" value="${alltest.xsltc.resultDir}/accept" /> - <echo message="About to execute xsltc.accept tests with all flavors, results into ${alltest.accept.xsltc.resultDir}/..." /> - <!-- Run full accept test with each major available flavor into - specific output directories; note any user options will - override for all test calls. - Also exclude the currently failing tests in the - smoketest if use.excludes is set. - --> - <condition property="accept.xsltc.excludes" value="${smoketest.accept.xsltc.excludes}"> - <equals arg1="${use.excludes}" arg2="true" /> - </condition> - <antcall target="accept.xsltc"> - <param name="accept.xsltc.flavor" value="trax.systemId"/> - <param name="accept.xsltc.excludes" value="${accept.xsltc.excludes}"/> - <param name="accept.xsltc.outputDir" value="${alltest.accept.xsltc.resultDir}/systemId"/> - <param name="accept.xsltc.logFile" value="${alltest.accept.xsltc.resultDir}/systemId/results.xml"/> - </antcall> - <antcall target="accept.xsltc"> - <param name="accept.xsltc.flavor" value="trax.file"/> - <param name="accept.xsltc.excludes" value="${accept.xsltc.excludes}"/> - <param name="accept.xsltc.outputDir" value="${alltest.accept.xsltc.resultDir}/file"/> - <param name="accept.xsltc.logFile" value="${alltest.accept.xsltc.resultDir}/file/results.xml"/> - </antcall> - <antcall target="accept.xsltc"> - <param name="accept.xsltc.flavor" value="trax.dom"/> - <!-- Note DOM always has additional exclusions in accept tests--> - <param name="accept.xsltc.excludes" value="${trax.dom.excludes};${accept.xsltc.excludes}"/> - <param name="accept.xsltc.outputDir" value="${alltest.accept.xsltc.resultDir}/dom"/> - <param name="accept.xsltc.logFile" value="${alltest.accept.xsltc.resultDir}/dom/results.xml"/> - </antcall> - <antcall target="accept.xsltc"> - <param name="accept.xsltc.flavor" value="trax.sax"/> - <param name="accept.xsltc.excludes" value="${accept.xsltc.excludes}"/> - <param name="accept.xsltc.outputDir" value="${alltest.accept.xsltc.resultDir}/sax"/> - <param name="accept.xsltc.logFile" value="${alltest.accept.xsltc.resultDir}/sax/results.xml"/> - </antcall> - <antcall target="accept.xsltc"> - <param name="accept.xsltc.flavor" value="trax.localPath"/> - <param name="accept.xsltc.excludes" value="${accept.xsltc.excludes}"/> - <param name="accept.xsltc.outputDir" value="${alltest.accept.xsltc.resultDir}/localPath"/> - <param name="accept.xsltc.logFile" value="${alltest.accept.xsltc.resultDir}/localPath/results.xml"/> - </antcall> - <antcall target="accept.xsltc"> - <param name="accept.xsltc.flavor" value="trax.stream"/> - <param name="accept.xsltc.excludes" value="${accept.xsltc.excludes}"/> - <param name="accept.xsltc.outputDir" value="${alltest.accept.xsltc.resultDir}/stream"/> - <param name="accept.xsltc.logFile" value="${alltest.accept.xsltc.resultDir}/stream/results.xml"/> - </antcall> - </target> - - <target name="alltest.conf.trace"> - <property name="conf.trace" value="on"/> - <antcall target="alltest.conf"/> - </target> - - <target name="alltest.accept.trace"> - <property name="accept.trace" value="on"/> - <antcall target="alltest.accept"/> - </target> - - <target name="test" - depends="alltest" - description="Alias for alltest"> - </target> - - <target name="check" - depends="alltest" - description="Alias for alltest"> - </target> - - <target name="scan" - description="Run a simple ResultScanner on a tree of test results"> - <property name="scan.outputDir" value="results-alltest" /> - <property name="scan.logFile" value="${scan.outputDir}/ResultReport" /> - <java classname="org.apache.qetest.xsl.ResultScanner" - classpathref="conf.class.path" - fork="yes" > - <arg line="${scan.outputDir} ${scan.logFile}"/> - </java> - </target> - <!-- ================================================================== --> - <!-- Build Tests: Compile/jar targets for each 'layer' of testing code --> - <!-- ================================================================== --> - <target name="compile.qetest" depends="init.build" - description="Compile base qetest files; no Xalan dependencies"> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}*.java" - debug="${debug}" nowarn="${compiler.nowarn}"/> - </target> - - - <target name="jar.qetest" depends="compile.qetest" - description="Jar base qetest files; no Xalan dependencies"> - <jar jarfile="${qetest.jar}" - basedir="${test.build.dir}" - includes="${test.root}*.java,${test.root}*.properties" /> - </target> - - - <!-- This step should be dependent upon general XML/XSL - functionality like SAX, DOM, JAXP and the like, but - should not directly depend on Xalan - --> - <target name="compile.xsl" depends="compile.qetest" - description="Compile TransformWrapper and associated classes"> - <!-- This javac has no dependencies --> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}xslwrapper/TransformWrapperHelper.java,${test.root}xslwrapper/TransformWrapper.java,${test.root}xslwrapper/TransformWrapperFactory.java" - debug="${debug}" nowarn="${compiler.nowarn}"/> - <!-- This javac depends on JAXP, SAX, DOM; hence the specific classpathref --> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}xsl/*.java" - debug="${debug}" - classpathref="compiletest.class.path" nowarn="${compiler.nowarn}"/> - </target> - - <target name="compile.trax.xslwrappers" depends="compile.xsl" - description="Compile Trax*Wrapper xslwrappers only"> - <!-- Should only be dependent on JAXP, not Xalan specifically --> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}xslwrapper/Trax*Wrapper.java,${test.root}xslwrapper/TraxWrapperUtils.java,${test.root}xslwrapper/XalanProcessWrapper.java" - debug="${debug}" - classpathref="compiletest.class.path" nowarn="${compiler.nowarn}"/> - </target> - - <target name="compile.trax" depends="compile.xsl,compile.trax.xslwrappers" - description="Compile various JAXP-based API tests"> - <!-- Should only be dependent on JAXP, not Xalan specifically --> - <!-- Separate javac steps to avoid compiler oddities --> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}trax/*.java" - debug="${debug}" - classpathref="compiletest.class.path" - nowarn="${compiler.nowarn}"/> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}trax/stream/*.java" - debug="${debug}" - classpathref="compiletest.class.path" - nowarn="${compiler.nowarn}"/> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}trax/dom/*.java" - debug="${debug}" - classpathref="compiletest.class.path" - nowarn="${compiler.nowarn}"/> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}trax/sax/*.java" - debug="${debug}" - classpathref="compiletest.class.path" - nowarn="${compiler.nowarn}"/> - </target> - - <target name="compile" depends="compile.trax"> - <echo message="Compile Xalan-J 2.x specific tests" /> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}xalanj2/*.java,${test.root}dtm/*.java" - excludes="${test.root}dtm/xsltcDocCode.java" - debug="${debug}" - classpathref="compiletest.class.path" - nowarn="${compiler.nowarn}"/> - </target> - - <target name="compile.rwapi" depends="compile"> - <echo message="Compile xslt20 / XPath2.0 RWAPI tests" /> - <javac srcdir="${test.src.dir}" - destdir="${test.build.dir}" - includes="${test.root}rwapi/*.*" - debug="${debug}" - classpathref="rwapitest.class.path" - nowarn="${compiler.nowarn}"/> - </target> - - <!-- Note that this target must *not* depend on any XSLTC tests, - which have to be compiled separately; otherwise the - smoketest will fail. - --> - <target name="jar" depends="compile" - description="Build testxsl.jar with all available tests"> - <jar jarfile="${testxsl.jar}" - basedir="${test.build.dir}" - includes="**/*.class,**/*.properties" /> - </target> - - <!-- excludes="Bugzilla1288.java"; test refers to removed classes --> - <target name="bugzilla.classes" depends="jar" - description="Compile any bugzilla testlet classes"> - <mkdir dir="${tests.bugzilla.build.dir}" /> - <javac srcdir="${tests.bugzilla.dir}" - destdir="${tests.bugzilla.build.dir}" - debug="${debug}" - excludes="Bugzilla1288.java" - classpathref="bugzilla.class.path" - nowarn="${compiler.nowarn}"/> - </target> - - <target name="extensions.classes" depends="jar" - description="Compile any extensions test classes"> - <mkdir dir="${tests.extensions.build.dir}" /> - <javac srcdir="${tests.extensions.dir}" - destdir="${tests.extensions.build.dir}" - debug="${debug}" - classpathref="extensions.class.path" - nowarn="${compiler.nowarn}"/> - <!-- Add more javac calls if we add more Java extensions dirs --> - </target> - - <!-- This target compiles both the main tests and test drivers - in testxsl.jar from the java/ directory, as well as - various other classes in subdirs under tests/ - --> - <target name="all" description="Build testxsl.jar *and* compile .java under tests/" - depends="jar,bugzilla.classes,extensions.classes"> - </target> - - <target name="main" - depends="all" - description="Alias for all"> - </target> - - <!-- =================================================================== --> - <!-- Various targets to clean the build tree --> - <!-- =================================================================== --> - <target name="distclean" depends="clean" - description="Clean everything, including most test results!" > - <delete dir="${alltest.resultDir}" /> - <delete dir="${api.outputDir}" /> - <delete dir="${conf.outputDir}" /> - <delete dir="${perf.outputDir}" /> - <delete dir="${contrib.outputDir}" /> - <delete dir="${smoketest.outputDir}" /> - </target> - - <target name="clean" - description="Clean up the compiled tests and docs"> - <delete dir="${test.build.dir}"/> - <delete dir="${tests.bugzilla.build.dir}"/> - <delete dir="${tests.extensions.build.dir}"/> - <delete dir="${xdocs.style}"/> <!-- init.build.docs creates this tree --> - </target> - - - <!-- ================================================================== --> - <!-- Build docs: Creates the User's Guide --> - <!-- ================================================================== --> - <target name="docs" depends="init.docs" - description="Build the framework/overview docs for tests"> - <java fork="yes" - classname="${doc.generator}" - classpathref="test.docs.class.path" > - <arg line="targetDirectory=${test.build.docs} ${test.xdocs.book} ${test.xdocs.style}"/> - </java> - </target> - - <!-- ================================================================== --> - <!-- Build docs: Creates the Javadoc API documentation --> - <!-- ================================================================== --> - <target name="javadocs" depends="init.docs" - description="Build the Javadocs for tests"> - - <!-- Ant 1.2 ignores destdir arg if doclet is set, so must send to doclet in doclet subelement dleslie--> - <!-- But: Ant 1.3 fails if you *don't* provide destdir attr... curcuru--> - <javadoc - sourcepath="${test.src.dir}" - packagenames="org.apache.qetest,org.apache.qetest.xslwrapper,org.apache.qetest.xsl,org.apache.qetest.trax,org.apache.qetest.trax.dom,org.apache.qetest.trax.sax,org.apache.qetest.trax.stream,org.apache.qetest.xalanj2" - protected="true" - author="true" - version="true" - use="true" - windowtitle="Xalan Testing Framework" - doctitle="Xalan Testing Framework" - bottom="Copyright © ${year} The Apache Software Foundation. All rights reserved." - destdir="${test.build.apidocs}"> - <classpath refid="test.docs.class.path" /> - <doclet name="xalanjdoc.Standard" path="${doclet.jar}"> - <param name="-d" value="${test.build.apidocs}"/> - </doclet> - <group title="QETEST Independent Framework" packages="org.apache.qetest"/> - <group title="Xalan Framework and Base tests" packages="org.apache.qetest.xsl:org.apache.qetest.xslwrapper"/> - <group title="JAXP/TrAX Generic Tests" packages="org.apache.qetest.trax:org.apache.qetest.trax.dom:org.apache.qetest.trax.sax:org.apache.qetest.trax.stream:"/> - <group title="Xalan-J 2.x Specific Tests" packages="org.apache.qetest.xalanj2:org.apache.qetest.xsltc:org.apache.qetest.dtm"/> - </javadoc> - </target> - - <target name="printerdocs" depends="init.docs"> - <echo message="${ant.project.name} currently doesn't support printerdocs; try docs or javadocs instead."/> - </target> - - <!-- =================================================================== --> - <!-- Build distribution - simple zip/tar.gz for sharing tests --> - <!-- =================================================================== --> - <target name="dist" depends="all,docs,javadocs,dist-nodeps" - description="Build a simple distribution module incl. docs"> - </target> - - <target name="dist-nodeps" depends="init.build" - description="Build a simple distribution module, without depends"> - <echo message="Create .zip/.tar/gz in ${test.build.dir}" /> - - <!-- Build .tars, then .gzs, then cleanup .tars before doing .zips --> - <!-- Note ../.. paths to ensure archives start with - top-level xml-xalan/test/blah directories - --> - <property name="tarzip-backref" value="../.."/> - <property name="tarzip-fwdref" value="xml-xalan/test"/> - - <!-- tar.gz just the xml/xsl/out test files --> - <tar tarfile="${test.build.dir}/xalan-tests-${DSTAMP}.tar"> - <tarfileset dir="${tarzip-backref}"> - <include name="${tarzip-fwdref}/tests/"/> - </tarfileset> - </tar> - <gzip src="${test.build.dir}/xalan-tests-${DSTAMP}.tar" - zipfile="${test.build.dir}/xalan-tests-${DSTAMP}.tar.gz"/> - <delete file="${test.build.dir}/xalan-tests-${DSTAMP}.tar"/> - - <!-- tar.gz the automation and batch files, etc. --> - <tar tarfile="${test.build.dir}/xalan-automation-${DSTAMP}.tar"> - <tarfileset dir="${tarzip-backref}"> - <include name="${tarzip-fwdref}/*.*"/> - <include name="${tarzip-fwdref}/${testxsl.jar}"/> - <include name="${tarzip-fwdref}/${test.build.dir}/${test.root}"/> - <include name="${tarzip-fwdref}/${test.build.docs}/"/> - <include name="${tarzip-fwdref}/${test.build.apidocs}/"/> - <include name="${tarzip-fwdref}/java/xdocs/"/> - <include name="${tarzip-fwdref}/java/src/"/> - <include name="${tarzip-fwdref}/bin/"/> - </tarfileset> - </tar> - <gzip src="${test.build.dir}/xalan-automation-${DSTAMP}.tar" - zipfile="${test.build.dir}/xalan-automation-${DSTAMP}.tar.gz"/> - <delete file="${test.build.dir}/xalan-automation-${DSTAMP}.tar"/> - - <!-- Zip just the xml/xsl/out test files --> - <zip zipfile="${test.build.dir}/xalan-tests-${DSTAMP}.zip" > - <zipfileset dir="${tarzip-backref}"> - <include name="${tarzip-fwdref}/tests/"/> - </zipfileset> - </zip> - <!-- Zip the automation and batch files, etc. --> - <zip zipfile="${test.build.dir}/xalan-automation-${DSTAMP}.zip" > - <zipfileset dir="${tarzip-backref}"> - <include name="${tarzip-fwdref}/*.*"/> - <include name="${tarzip-fwdref}/${testxsl.jar}"/> - <include name="${tarzip-fwdref}/${test.build.dir}/${test.root}"/> - <include name="${tarzip-fwdref}/${test.build.docs}/"/> - <include name="${tarzip-fwdref}/${test.build.apidocs}/"/> - <include name="${tarzip-fwdref}/java/xdocs/"/> - <include name="${tarzip-fwdref}/java/src/"/> - <include name="${tarzip-fwdref}/bin/"/> - </zipfileset> - </zip> - - <!-- tar.gz just the documentation for potential posting to the website --> - <tar tarfile="${test.build.dir}/xalan-docs-${DSTAMP}.tar"> - <tarfileset dir=".."> - <include name="test/${test.build.docs}/"/> - <include name="test/${test.build.apidocs}/"/> - <include name="test/README.html"/> - </tarfileset> - </tar> - <gzip src="${test.build.dir}/xalan-docs-${DSTAMP}.tar" - zipfile="${test.build.dir}/xalan-docs-${DSTAMP}.tar.gz"/> - <delete file="${test.build.dir}/xalan-docs-${DSTAMP}.tar"/> - <zip zipfile="${test.build.dir}/xalan-docs-${DSTAMP}.zip" > - <zipfileset dir=".."> - <include name="test/${test.build.docs}/"/> - <include name="test/${test.build.apidocs}/"/> - <include name="test/README.html"/> - </zipfileset> - </zip> - - </target> - - <target name="export" depends="jar" - description="Build a very simple export of just the important sources"> - <!-- Note that Shane has external dependencies on this target --> - <!-- Zip only the sources used in the plain 'jar' target --> - <zip zipfile="${test.build.dir}/testxsl-src-${DSTAMP}.zip" > - <zipfileset dir="java"> - <include name="src/"/> - <!-- Don't copy qetesttest due to JUnit dependency --> - <exclude name="src/${test.root}qetesttest/"/> - </zipfileset> - </zip> - - </target> - - <!-- ================================================================== --> - <!-- Special: Targets specific to XSLTC which requires extra .jars --> - <!-- This section will be updated as xsltc integrates more with xalan --> - <!-- ================================================================== --> - <!-- Actually, I'd like to figure out some sneaky Ant trick to - allow swapping of parts of classpaths (i.e. swap in xsltc.jar - and related files instead of xalan.jar; likewise replace - xercesImpl.jar with the PARSER_JAR defined outside) to clean - this section up. But for the time being I'm planning on - simply maintaining separate-but-equal targets.xsltc - --> - - <path id="xsltc.runtime.class.path"> - <pathelement location="${xalan.build.dir}/xalan.jar" /> - - <!-- add xsltc.jar so we can test the separate jar distribution --> - <pathelement location="${xalan.build.dir}/xsltc.jar" /> - <pathelement location="${ser.jar}" /> - - <pathelement location="${testxsl.jar}" /> - <pathelement location="${parserjar}" /> - <pathelement location="${xml-apis.jar}" /> - <pathelement location="${jtidy.jar}" /> - </path> - <path id="xsltc.compile.class.path"> - <pathelement location="${xalan.build.dir}/xalan.jar" /> - - <!-- add xsltc.jar so we can test the separate jar distribution --> - <pathelement location="${xalan.build.dir}/xsltc.jar" /> - - <pathelement location="${testxsl.jar}" /> - <pathelement location="${parserjar}" /> - <pathelement location="${xml-apis.jar}" /> - <pathelement location="${jtidy.jar}" /> - <!-- Note addition of . to the classpath to enable loading - of translets; this needs more work and coordination - with tests and translet output dirs. - --> - <pathelement location="." /> - </path> - - <target name="conf.xsltc" description="Run TestletDriver over the conf tree using xsltc"> - <!-- Set the default conformance test driver, user may override --> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan-xsltc conf test: ${testClass}" /> - <!-- Special: allow explicit test.properties overrides for inputDir, etc for xsltc --> - <property name="testType" value="conf.xsltc." /> - <!-- Set indent-number to 0 to match Xalan's default indentation --> - <property name="${testType}Processor.setAttribute.indent-number" value="0"/> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" - value="xsltc.runtime.class.path" /> - <!-- Explicitly set TransformerFactory property to use xsltc --> - <param name="sysprop.transfact" - value="org.apache.xalan.xsltc.trax.TransformerFactoryImpl" /> - </antcall> - <property name="scan.outputDir" value="${conf.xsltc.outputDir}"/> - <antcall target="scan" /> - - <mkdir dir="results-xsltc-compile-verification-tests"/> - - <xsltcTestsTask inputDir="tests/xsltc/attribset" - resultDir="results-xsltc-compile-verification-tests" - bootclasspathref="boot.class.path"/> - - <echo message=""/> - <echo message=" [minitest] Completed, running the 'xsltc compilation error verification' tests, and these have passed" /> - <echo message=" [minitest] See details of the 'xsltc compilation error verification' test results, at results-xsltc-compile-verification-tests/actual_test_results.xml" /> - - <echo message=""/> - - <echo message=" [minitest] CONGRATULATIONS! The conf.xsltc tests passed!" /> - </target> - - <target name="perf.xsltc" description="Run TestletDriver over the perf tree using xsltc"> - <!-- Set the default conformance test driver, user may override --> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Xalan-xsltc perf test: ${testClass}" /> - <!-- Special: allow explicit test.properties overrides for inputDir, etc for xsltc --> - <property name="testType" value="perf.xsltc." /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" - value="xsltc.runtime.class.path" /> - <!-- Explicitly set TransformerFactory property to use xsltc --> - <param name="sysprop.transfact" - value="org.apache.xalan.xsltc.trax.TransformerFactoryImpl" /> - </antcall> - <antcall target="scan"> - <param name="scan.outputDir" value="${perf.xsltc.outputDir}"/> - </antcall> - </target> - - - <target name="perf.saxon" description="Run TestletDriver over the perf tree using Saxon"> - <!-- New addition, NOT TESTED --> - <!-- Set the default conformance test driver, user may override --> - <property name="testClass" value="org.apache.qetest.xsl.StylesheetTestletDriver" /> - <echo message="Executing Saxon perf test: ${testClass}" /> - <!-- Special: allow explicit test.properties overrides for inputDir, etc for Saxon --> - <property name="testType" value="perf.saxon." /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" - value="saxon.runtime.class.path" /> - <!-- Explicitly set TransformerFactory property to use saxon --> - <param name="sysprop.transfact" - value="org.saxon.trax.TransformerFactoryImpl" /> - </antcall> - <antcall target="scan"> - <param name="scan.outputDir" value="${perf.saxon.outputDir}"/> - </antcall> - </target> - - <!-- ================================================================== --> - <!-- Run tests: a specific named API test with xsltc code --> - <!-- ================================================================== --> - <target name="api.xsltc" description="Run a specific API test with xsltc code" - depends="init.test"> - <!-- Note no default is set; also testClass is not prefixed! --> - <echo message="Executing Xalan-xsltc api test: ${testClass}" /> - <property name="testType" value="api." /> - <antcall target="run.xalantest"> - <param name="xalantest.classpathref" - value="xsltc.compile.class.path" /> - <!-- Explicitly set TransformerFactory property to use xsltc --> - <param name="sysprop.transfact" - value="org.apache.xalan.xsltc.trax.TransformerFactoryImpl" /> - </antcall> - </target> - - <!-- =================================================================== --> - <!-- Install/Uninstall targets - not currently applicable --> - <!-- =================================================================== --> - <target name="install"> - <echo message="${ant.project.name} currently doesn't support (un)installation; try jar or api instead"/> - </target> - <target name="uninstall"> - <echo message="${ant.project.name} currently doesn't support (un)installation; try distclean instead"/> - </target> - -</project> diff --git a/deprecated_build.sh b/deprecated_build.sh deleted file mode 100644 index e21d6e133..000000000 --- a/deprecated_build.sh +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh -# -#========================================================================= -# Licensed to the Apache Software Foundation (ASF) under one or more -# contributor license agreements. See the NOTICE file distributed with -# this work for additional information regarding copyright ownership. -# The ASF licenses this file to You under the Apache License, Version 2.0 -# (the "License"); you may not use this file except in compliance with -# the License. You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -#========================================================================= -# -# Name: build.sh Build Xalan-J 2.x using Ant -# Author: Shane Curcuru - -# Alternatively, you can just call "ant" - -echo "Xalan-J 2.x Build" -echo "-------------" - -_JAVACMD=$JAVA_HOME/bin/java -if [ "$JAVA_HOME" = "" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." - _JAVACMD=java -fi - -# Default locations of jars we depend on to run Ant on our build.xml file -if [ "$ANT_HOME" = "" ] ; then - ANT_HOME=. -fi -if [ "$ANT_JAR" = "" ] ; then - ANT_JAR=./tools/ant.jar -fi -if [ "$PARSER_JAR" = "" ] ; then - PARSER_JAR=./lib/endorsed/xercesImpl.jar -fi - -if [ "$XML_APIS_JAR" = "" ] ; then - XML_APIS_JAR=./lib/endorsed/xml-apis.jar -fi - -# Use _underscore prefix to not conflict with user's settings -# Default to UNIX-style pathing -CLPATHSEP=: -# if we're on a Windows box make it ; -uname | grep WIN && CLPATHSEP=\; -_CLASSPATH="$ANT_JAR${CLPATHSEP}$XML_APIS_JAR${CLPATHSEP}$PARSER_JAR${CLPATHSEP}$CLASSPATH" - -# Attempt to automatically add system classes to _CLASSPATH -if [ -f $JAVA_HOME/lib/tools.jar ] ; then - _CLASSPATH=${_CLASSPATH}${CLPATHSEP}${JAVA_HOME}/lib/tools.jar -fi - -if [ -f $JAVA_HOME/lib/classes.zip ] ; then - _CLASSPATH=${_CLASSPATH}${CLPATHSEP}${JAVA_HOME}/lib/classes.zip -fi - - -echo "Starting Ant with targets: $@" -echo " ...with classpath: $_CLASSPATH" - -"$_JAVACMD" $JAVA_OPTS -Dant.home=$ANT_HOME -classpath "$_CLASSPATH" org.apache.tools.ant.Main $@ - - - - diff --git a/distribution/pom.xml b/distribution/pom.xml new file mode 100644 index 000000000..76b19fe47 --- /dev/null +++ b/distribution/pom.xml @@ -0,0 +1,112 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>xalan</groupId> + <artifactId>xalan-j</artifactId> + <version>2.7.3</version> + </parent> + + <artifactId>distribution</artifactId> + <name>distribution</name> + <packaging>pom</packaging> + + <!-- Depend on modules containing source code that needs to be compiled + before being able to create a binary distribution + --> + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </dependency> + <!-- When I add dependencies on the samples, maven complains that + dependencies.dependency.version is missing. I'm not sure + why, since they should be picking up the project version like + xalan and serializer. For now, it appears I can cheat and + not explicitly sequence these, but ... ugh? + TODO: REVIEW. + --> + <!-- <dependency> --> + <!-- <groupId>xalan</groupId> --> + <!-- <artifactId>xalansamples</artifactId> --> + <!-- </dependency> --> + <!-- <dependency> --> + <!-- <groupId>xalan</groupId> --> + <!-- <artifactId>xalanservlet</artifactId> --> + <!-- </dependency> --> + <!-- <dependency> --> + <!-- <groupId>xalan</groupId> --> + <!-- <artifactId>xsltcapplet</artifactId> --> + <!-- </dependency> --> + <!-- <dependency> --> + <!-- <groupId>xalan</groupId> --> + <!-- <artifactId>xsltcejb</artifactId> --> + <!-- </dependency> --> + <!-- <dependency> --> + <!-- <groupId>xalan</groupId> --> + <!-- <artifactId>xsltcbrazil</artifactId> --> + <!-- </dependency> --> + <!-- <dependency> --> + <!-- <groupId>xalan</groupId> --> + <!-- <artifactId>xsltcservlet</artifactId> --> + <!-- </dependency> --> + </dependencies> + + <profiles> + <profile> + <id>create-distros</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <artifactId>maven-assembly-plugin</artifactId> + <version>3.6.0</version> + <executions> + <execution> + <id>distro-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <finalName>${project.parent.build.finalName}</finalName> + <outputDirectory>../build</outputDirectory> + <descriptors> + <descriptor>src/assembly/bin.xml</descriptor> + </descriptors> + </configuration> + </execution> + <execution> + <id>source-release-assembly</id> + <phase>package</phase> + <goals> + <goal>single</goal> + </goals> + <configuration> + <finalName>${project.parent.build.finalName}</finalName> + <outputDirectory>../build</outputDirectory> + <descriptors> + <descriptor>src/assembly/src.xml</descriptor> + </descriptors> + <tarLongFileMode>gnu</tarLongFileMode> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/distribution/src/assembly/bin.xml b/distribution/src/assembly/bin.xml new file mode 100644 index 000000000..0d84acd71 --- /dev/null +++ b/distribution/src/assembly/bin.xml @@ -0,0 +1,105 @@ +<!-- Maven assembly plugin configuration for executable packaging + See https://maven.apache.org/plugins/maven-assembly-plugin/faq.html#module-binaries +--> +<assembly xmlns="http://maven.apache.org/ASSEMBLY/2.2.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/ASSEMBLY/2.2.0 http://maven.apache.org/xsd/assembly-2.2.0.xsd"> + <id>bin</id> + <formats> + <format>zip</format> + <format>tar.gz</format> + </formats> + <includeBaseDirectory>false</includeBaseDirectory> + <moduleSets> + <moduleSet> + <useAllReactorProjects>true</useAllReactorProjects> + <includes> + <include>xalan:serializer</include> + <include>xalan:xalan</include> + </includes> + <binaries> + <outputDirectory>${project.parent.name}_${project.parent.version}</outputDirectory> + <unpack>false</unpack> + <dependencySets> + <dependencySet> + <excludes> + <exclude>org.jboss.spec.javax.rmi:jboss-rmi-api_1.0_spec</exclude> + </excludes> + </dependencySet> + </dependencySets> + </binaries> + </moduleSet> + <moduleSet> + <useAllReactorProjects>true</useAllReactorProjects> + <includes> + <include>xalan:xalansamples</include> + <include>xalan:xalanservlet</include> + <include>xalan:xsltcapplet</include> + <include>xalan:xsltcbrazil</include> + <include>xalan:xsltcejb</include> + <include>xalan:xsltcservlet</include> + </includes> + <binaries> + <outputDirectory>${project.parent.name}_${project.parent.version}/samples</outputDirectory> + <unpack>false</unpack> + <dependencySets> + <dependencySet> + <excludes> + <exclude>bcel-*</exclude> + <exclude>commons-lang3-*</exclude> + <exclude>java-cup-runtime**</exclude> + <exclude>regexp-*</exclude> + <exclude>serializer-*</exclude> + <exclude>xalan-*</exclude> + </excludes> + </dependencySet> + </dependencySets> + </binaries> + </moduleSet> + </moduleSets> + <fileSets> + <!-- The above isn't picking up Xerces and xml-apis, for whatever reason. + Ugly empirical solution.Should these have been copied into build/? + TODO REVIEW: Improve! + --> + <fileSet> + <directory>${rootlocation}/lib</directory> + <outputDirectory>${project.parent.name}_${project.parent.version}</outputDirectory> + <includes> + <include>xercesImpl*.jar</include> + <include>xml-apis*.jar</include> + </includes> + </fileSet> + <!-- In Maven builds, LICENSE and NOTICE go into META-INF --> + <fileSet> + <directory>..</directory> + <outputDirectory>META-INF</outputDirectory> + <includes> + <include>LICENSE.txt</include> + <include>NOTICE.txt</include> + </includes> + </fileSet> + <!-- Rename site to docs for back-compatibility. --> + <fileSet> + <directory>../target/site</directory> + <outputDirectory>${project.parent.name}_${project.parent.version}/docs</outputDirectory> + </fileSet> + <!-- Include source for samples --> + <fileSet> + <directory>../samples</directory> + <outputDirectory>${project.parent.name}_${project.parent.version}/samples</outputDirectory> + <excludes> + <exclude>target/**</exclude> + <exclude>src/site/**</exclude> + </excludes> + </fileSet> + <!-- Include (generated) html for samples --> + <fileSet> + <directory>../samples/target/site/</directory> + <outputDirectory>${project.parent.name}_${project.parent.version}/samples</outputDirectory> + <includes> + <include>**/*.html</include> + </includes> + </fileSet> + </fileSets> +</assembly> diff --git a/distribution/src/assembly/src.xml b/distribution/src/assembly/src.xml new file mode 100644 index 000000000..76bbf9003 --- /dev/null +++ b/distribution/src/assembly/src.xml @@ -0,0 +1,119 @@ +<?xml version='1.0' encoding='UTF-8'?> +<!-- Based upon Apache standard Source Release Assembly, + with customizations as needed for Xalan's source + release bundle. + + 1) Has to start scan from parent project, not current project. + Coded to .. now; should probably use a ${...parent...} reference +--> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one + or more contributor license agreements. See the NOTICE file + distributed with this work for additional information + regarding copyright ownership. The ASF licenses this file + to you under the Apache License, Version 2.0 (the + "License"); you may not use this file except in compliance + with the License. You may obtain a copy of the License at + +http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> + +<assembly> + <id>src</id> + <formats> + <format>zip</format> + <format>tar.gz</format> + </formats> + + <fileSets> + <!-- main project directory structure --> + <fileSet> + <directory>..</directory> <!-- Standard: was . --> + <outputDirectory>/</outputDirectory> + <!-- Since this is a "developer quickstart" bundle, we can not use + default excludes and must suppress target, intermediate, + and development state files. See + https://maven.apache.org/plugins/maven-assembly-plugin/advanced-descriptor-topics.html + --> + <useDefaultExcludes>false</useDefaultExcludes> + <excludes> + <!-- Note: May need to use negative lookahead if /target/ occurs + under src or someplace else that we want to keep it. + --> + <exclude>**/target/**</exclude> <!-- build output (anywhere) --> + <exclude>lib/**</exclude> <!-- build output (at top level> --> + <exclude>build/**</exclude> <!-- build output (at top level> --> + + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/).*${project.basedir}.*]</exclude> + + <!-- NOTE: Most of the following excludes should not be required + if the standard release process is followed. This is because the + release plugin checks out project sources into a location like + target/checkout, then runs the build from there. The result is + a source-release archive that comes from a pretty clean directory + structure. + + HOWEVER, if the release plugin is configured to run extra goals + or generate a project website, it's definitely possible that some + of these files will be present. So, it's safer to exclude them. + --> + + <!-- Emacs --> + <exclude>%regex[\~$]</exclude> <!-- backup --> + <exclude>%regex[/\#.*\#$]</exclude> <!-- snapshot --> + + <!-- IDEs --> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.project]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.classpath]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.idea]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?[^/]*\.iws]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?[^/]*\.iml]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?]</exclude> + + <!-- misc --> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?cobertura\.ser]</exclude> + + <!-- release-plugin temp files --> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup]</exclude> + <exclude>%regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?release\.properties]</exclude> + </excludes> + </fileSet> + + <!-- license, notice, etc. calculated at build time --> + <fileSet> + <directory>../maven-shared-archive-resources/META-INF</directory> + <outputDirectory>/</outputDirectory> + </fileSet> + <!-- Specific files *not* calculated at build --> + <fileSet> + <directory>..</directory> + <outputDirectory>/</outputDirectory> + <includes> + <!-- Files in project root --> + <include>KEYS</include> + <include>README</include> + <include>LICENSE.txt</include> + <include>NOTICE.txt</include> + <include>*.bat</include> + <include>*.sh</include> + <!-- Files which weren't being picked up by standard defaults --> + <include>**/pom.xml</include> + <include>**/stylebook/**</include> + </includes> + </fileSet> + </fileSets> + +</assembly> diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml new file mode 100644 index 000000000..b440dfe9e --- /dev/null +++ b/integration-tests/pom.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <parent> + <groupId>xalan</groupId> + <artifactId>xalan-j</artifactId> + <version>2.7.3</version> + </parent> + + <artifactId>integration-tests</artifactId> + <packaging>pom</packaging> + + <!-- Add all modules here which potentially ought to be integration-tested --> + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalansamples</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <!-- Integration tests using our own packaged JARs --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-invoker-plugin</artifactId> + <executions> + <execution> + <id>integration-test</id> + <goals> + <goal>install</goal> + <goal>run</goal> + </goals> + </execution> + </executions> + <configuration> + <projectsDirectory>src/it</projectsDirectory> + <cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo> + <postBuildHookScript>verify</postBuildHookScript> + <localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath> + <goals> + <goal>clean</goal> + <goal>test</goal> + </goals> + <settingsFile>src/it/settings.xml</settingsFile> + <scriptVariables> + <projectVersion>${project.version}</projectVersion> + </scriptVariables> + <streamLogsOnFailures>true</streamLogsOnFailures> + <!-- Use this to limit IT to one or a few tests --> + <!--<invokerTest>VersionCheck_*Boot*</invokerTest>--> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/invoker.properties b/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/invoker.properties new file mode 100644 index 000000000..3fe5fc416 --- /dev/null +++ b/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/invoker.properties @@ -0,0 +1,4 @@ +# These are default values set in the Maven Invoker plugin configuration +#invoker.goals = clean test +#invoker.buildResult = success +#invoker.debug = false diff --git a/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/pom.xml b/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/pom.xml new file mode 100644 index 000000000..0cc458029 --- /dev/null +++ b/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/pom.xml @@ -0,0 +1,64 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.xalan.it</groupId> + <artifactId>versions</artifactId> + <version>0.0.1-SNAPSHOT</version> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + <version>@project.version@</version> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>@project.version@</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>@maven-compiler-plugin.version@</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>@exec-maven-plugin.version@</version> + <executions> + <execution> + <id>display-versions</id> + <phase>test</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <mainClass>Versions</mainClass> + <executable>java</executable> + <arguments> + <argument>-Xbootclasspath/a:${settings.localRepository}/xalan/serializer/@project.version@/serializer-@project.version@.jar${path.separator}${settings.localRepository}/xalan/xalan/@project.version@/xalan-@project.version@.jar</argument> + <argument>-classpath</argument> + <argument>${project.build.outputDirectory}</argument> + <argument>Versions</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/src/main/java/Versions.java b/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/src/main/java/Versions.java new file mode 100644 index 000000000..31c4666eb --- /dev/null +++ b/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/src/main/java/Versions.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.apache.xalan.Version; +import org.apache.xalan.processor.XSLProcessorVersion; + +public class Versions { + private static Class<?>[] versionClasses = { + Version.class, + XSLProcessorVersion.class, + org.apache.xml.serializer.Version.class + }; + + public static void main(String[] args) throws ReflectiveOperationException { + for (Class<?> versionClass : versionClasses) + System.out.printf("Class %s is %s boot classpath%n", + versionClass.getName(), + versionClass.getClassLoader() == null ? "on" : "not on" + ); + for (Class<?> versionClass : versionClasses) + System.out.println(versionClass.getMethod("getVersion").invoke(null)); + } +} diff --git a/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/verify.groovy b/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/verify.groovy new file mode 100644 index 000000000..588068a08 --- /dev/null +++ b/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/verify.groovy @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Replace leading zeroes in dev drop version number, e.g. 'D07' to 'D7', +// because this is what the version classes do, too +projectVersion = projectVersion.replaceAll("\\.D0*", ".D") + +def buildLogLines = new File(basedir, "build.log").readLines() +def expectedLogLines = [ + 'Class org.apache.xalan.Version is on boot classpath', + 'Class org.apache.xalan.processor.XSLProcessorVersion is on boot classpath', + 'Class org.apache.xml.serializer.Version is on boot classpath', + "Xalan Java $projectVersion", + "Xalan Processor Java $projectVersion", + "Xalan Serializer Java $projectVersion" +] + +// Find first expected log output line +def index = buildLogLines.indexOf(expectedLogLines[0]) +assert index > 0 : "First expected log line not found" +// Verify that all expected log lines exist in the expected order +assert buildLogLines[index..index + 5] == expectedLogLines : "Expected log lines not found" diff --git a/integration-tests/src/it/VersionCheck_JarsOnClasspath/invoker.properties b/integration-tests/src/it/VersionCheck_JarsOnClasspath/invoker.properties new file mode 100644 index 000000000..3fe5fc416 --- /dev/null +++ b/integration-tests/src/it/VersionCheck_JarsOnClasspath/invoker.properties @@ -0,0 +1,4 @@ +# These are default values set in the Maven Invoker plugin configuration +#invoker.goals = clean test +#invoker.buildResult = success +#invoker.debug = false diff --git a/integration-tests/src/it/VersionCheck_JarsOnClasspath/pom.xml b/integration-tests/src/it/VersionCheck_JarsOnClasspath/pom.xml new file mode 100644 index 000000000..3461449ed --- /dev/null +++ b/integration-tests/src/it/VersionCheck_JarsOnClasspath/pom.xml @@ -0,0 +1,57 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.xalan.it</groupId> + <artifactId>versions</artifactId> + <version>0.0.1-SNAPSHOT</version> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + <version>@project.version@</version> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>@project.version@</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>@maven-compiler-plugin.version@</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>@exec-maven-plugin.version@</version> + <executions> + <execution> + <id>display-versions</id> + <phase>test</phase> + <goals> + <goal>java</goal> + </goals> + <configuration> + <mainClass>Versions</mainClass> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/integration-tests/src/it/VersionCheck_JarsOnClasspath/src/main/java/Versions.java b/integration-tests/src/it/VersionCheck_JarsOnClasspath/src/main/java/Versions.java new file mode 100644 index 000000000..31c4666eb --- /dev/null +++ b/integration-tests/src/it/VersionCheck_JarsOnClasspath/src/main/java/Versions.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.apache.xalan.Version; +import org.apache.xalan.processor.XSLProcessorVersion; + +public class Versions { + private static Class<?>[] versionClasses = { + Version.class, + XSLProcessorVersion.class, + org.apache.xml.serializer.Version.class + }; + + public static void main(String[] args) throws ReflectiveOperationException { + for (Class<?> versionClass : versionClasses) + System.out.printf("Class %s is %s boot classpath%n", + versionClass.getName(), + versionClass.getClassLoader() == null ? "on" : "not on" + ); + for (Class<?> versionClass : versionClasses) + System.out.println(versionClass.getMethod("getVersion").invoke(null)); + } +} diff --git a/integration-tests/src/it/VersionCheck_JarsOnClasspath/verify.groovy b/integration-tests/src/it/VersionCheck_JarsOnClasspath/verify.groovy new file mode 100644 index 000000000..2c9cc23d5 --- /dev/null +++ b/integration-tests/src/it/VersionCheck_JarsOnClasspath/verify.groovy @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Replace leading zeroes in dev drop version number, e.g. 'D07' to 'D7', +// because this is what the version classes do, too +projectVersion = projectVersion.replaceAll("\\.D0*", ".D") + +def buildLogLines = new File(basedir, "build.log").readLines() +def expectedLogLines = [ + 'Class org.apache.xalan.Version is not on boot classpath', + 'Class org.apache.xalan.processor.XSLProcessorVersion is not on boot classpath', + 'Class org.apache.xml.serializer.Version is not on boot classpath', + "Xalan Java $projectVersion", + "Xalan Processor Java $projectVersion", + "Xalan Serializer Java $projectVersion" +] + +// Find first expected log output line +def index = buildLogLines.indexOf(expectedLogLines[0]) +assert index > 0 : "First expected log line not found" +// Verify that all expected log lines exist in the expected order +assert buildLogLines[index..index + 5] == expectedLogLines : "Expected log lines not found" diff --git a/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/invoker.properties b/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/invoker.properties new file mode 100644 index 000000000..2333c022b --- /dev/null +++ b/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/invoker.properties @@ -0,0 +1,4 @@ +invoker.goals = clean verify +# These are default values set in the Maven Invoker plugin configuration +#invoker.buildResult = success +#invoker.debug = false diff --git a/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/pom.xml b/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/pom.xml new file mode 100644 index 000000000..f0be644d4 --- /dev/null +++ b/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/pom.xml @@ -0,0 +1,87 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + + <groupId>org.apache.xalan.it</groupId> + <artifactId>versions</artifactId> + <version>0.0.1-SNAPSHOT</version> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + </properties> + + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + <version>@project.version@</version> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>@project.version@</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>@maven-compiler-plugin.version@</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>@maven-shade-plugin.version@</version> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + <configuration> + <relocations> + <relocation> + <pattern>org.apache.xalan</pattern> + <shadedPattern>shaded.org.apache.xalan</shadedPattern> + </relocation> + <relocation> + <pattern>org.apache.xml.serializer</pattern> + <shadedPattern>shaded.org.apache.xml.serializer</shadedPattern> + </relocation> + </relocations> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>@exec-maven-plugin.version@</version> + <executions> + <execution> + <id>display-versions</id> + <phase>verify</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <mainClass>Versions</mainClass> + <executable>java</executable> + <arguments> + <argument>-Xbootclasspath/a:${build.directory}/${build.finalName}.jar</argument> + <argument>Versions</argument> + </arguments> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> +</project> diff --git a/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/src/main/java/Versions.java b/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/src/main/java/Versions.java new file mode 100644 index 000000000..31c4666eb --- /dev/null +++ b/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/src/main/java/Versions.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +import org.apache.xalan.Version; +import org.apache.xalan.processor.XSLProcessorVersion; + +public class Versions { + private static Class<?>[] versionClasses = { + Version.class, + XSLProcessorVersion.class, + org.apache.xml.serializer.Version.class + }; + + public static void main(String[] args) throws ReflectiveOperationException { + for (Class<?> versionClass : versionClasses) + System.out.printf("Class %s is %s boot classpath%n", + versionClass.getName(), + versionClass.getClassLoader() == null ? "on" : "not on" + ); + for (Class<?> versionClass : versionClasses) + System.out.println(versionClass.getMethod("getVersion").invoke(null)); + } +} diff --git a/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/verify.groovy b/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/verify.groovy new file mode 100644 index 000000000..6d12efc2d --- /dev/null +++ b/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/verify.groovy @@ -0,0 +1,37 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +// Replace leading zeroes in dev drop version number, e.g. 'D07' to 'D7', +// because this is what the version classes do, too +projectVersion = projectVersion.replaceAll("\\.D0*", ".D") + +def buildLogLines = new File(basedir, "build.log").readLines() +def expectedLogLines = [ + 'Class shaded.org.apache.xalan.Version is on boot classpath', + 'Class shaded.org.apache.xalan.processor.XSLProcessorVersion is on boot classpath', + 'Class shaded.org.apache.xml.serializer.Version is on boot classpath', + "Xalan Java $projectVersion", + "Xalan Processor Java $projectVersion", + "Xalan Serializer Java $projectVersion" +] + +// Find first expected log output line +def index = buildLogLines.indexOf(expectedLogLines[0]) +assert index > 0 : "First expected log line not found" +// Verify that all expected log lines exist in the expected order +assert buildLogLines[index..index + 5] == expectedLogLines : "Expected log lines not found" diff --git a/integration-tests/src/it/settings.xml b/integration-tests/src/it/settings.xml new file mode 100644 index 000000000..68f4b2ddd --- /dev/null +++ b/integration-tests/src/it/settings.xml @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="UTF-8"?> + +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +--> + +<settings> + <profiles> + <profile> + <id>it-repo</id> + <activation> + <activeByDefault>true</activeByDefault> + </activation> + <repositories> + <repository> + <id>local.central</id> + <url>@localRepositoryUrl@</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </repository> + </repositories> + <pluginRepositories> + <pluginRepository> + <id>local.central</id> + <url>@localRepositoryUrl@</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>true</enabled> + </snapshots> + </pluginRepository> + </pluginRepositories> + </profile> + </profiles> +</settings> diff --git a/lib/bcel-6.7.0.jar b/lib/bcel-6.7.0.jar deleted file mode 100644 index fb36e1d38..000000000 Binary files a/lib/bcel-6.7.0.jar and /dev/null differ diff --git a/lib/brazil-2.1.jar b/lib/brazil-2.1.jar deleted file mode 100644 index 78a1e784f..000000000 Binary files a/lib/brazil-2.1.jar and /dev/null differ diff --git a/lib/bsf.jar b/lib/bsf.jar deleted file mode 100644 index 302896730..000000000 Binary files a/lib/bsf.jar and /dev/null differ diff --git a/lib/commons-logging-1.2.jar b/lib/commons-logging-1.2.jar deleted file mode 100644 index 93a3b9f6d..000000000 Binary files a/lib/commons-logging-1.2.jar and /dev/null differ diff --git a/lib/endorsed/xercesImpl.jar b/lib/endorsed/xercesImpl.jar deleted file mode 100644 index ccbae9f45..000000000 Binary files a/lib/endorsed/xercesImpl.jar and /dev/null differ diff --git a/lib/endorsed/xml-apis.jar b/lib/endorsed/xml-apis.jar deleted file mode 100644 index 4f677fc86..000000000 Binary files a/lib/endorsed/xml-apis.jar and /dev/null differ diff --git a/lib/javaee-api-5.0-2.jar b/lib/javaee-api-5.0-2.jar deleted file mode 100644 index 65acd770a..000000000 Binary files a/lib/javaee-api-5.0-2.jar and /dev/null differ diff --git a/lib/regexp.jar b/lib/regexp.jar deleted file mode 100644 index 713441c52..000000000 Binary files a/lib/regexp.jar and /dev/null differ diff --git a/lib/rhino-1.7.14.jar b/lib/rhino-1.7.14.jar deleted file mode 100644 index ad47a2015..000000000 Binary files a/lib/rhino-1.7.14.jar and /dev/null differ diff --git a/lib/runtime.jar b/lib/runtime.jar deleted file mode 100644 index c74baf197..000000000 Binary files a/lib/runtime.jar and /dev/null differ diff --git a/lib/servlet-api-2.5.jar b/lib/servlet-api-2.5.jar deleted file mode 100644 index b0537c4db..000000000 Binary files a/lib/servlet-api-2.5.jar and /dev/null differ diff --git a/mvnbuild.bat b/mvnbuild.bat new file mode 100644 index 000000000..7fe831aad --- /dev/null +++ b/mvnbuild.bat @@ -0,0 +1 @@ +mvn clean package site diff --git a/mvnbuild.sh b/mvnbuild.sh new file mode 100755 index 000000000..7fe831aad --- /dev/null +++ b/mvnbuild.sh @@ -0,0 +1 @@ +mvn clean package site diff --git a/pom.xml b/pom.xml new file mode 100644 index 000000000..c5d459543 --- /dev/null +++ b/pom.xml @@ -0,0 +1,593 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <!-- KNOWN ISSUES: + "Production" tgz/zip files need to be copied to ant-like build/ + xalan-test integration + + Footnote: To get dependency tree from a multi-module project, use the + command "mvn compile dependency:tree" so everything is in scope. + --> + <packaging>pom</packaging> + + <modelVersion>4.0.0</modelVersion> + <groupId>xalan</groupId> + <artifactId>xalan-j</artifactId> + <version>2.7.3</version> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <stylebook.classpath> + "stylebook/stylebook-1.0-b3_xalan-2.jar${path.separator}serializer/target/classes${path.separator}xalan/target/classes${path.separator}" + </stylebook.classpath> + <maven-compiler-plugin.version>3.11.0</maven-compiler-plugin.version> + <exec-maven-plugin.version>3.1.0</exec-maven-plugin.version> + <maven-shade-plugin.version>3.5.1</maven-shade-plugin.version> + <junit-jupiter.version>5.10.1</junit-jupiter.version> + <!-- TODO: Upgrade to 5.x after dropping requirement to build on JDK 8 --> + <mockito.version>4.11.0</mockito.version> + <maven-javadoc-plugin.version>3.6.0</maven-javadoc-plugin.version> + <maven-source-plugin.version>3.3.0</maven-source-plugin.version> + </properties> + + <modules> + <module>serializer</module> + <module>xalan</module> + <module>xalansamples</module> + <module>xalanservlet</module> + <module>xsltcapplet</module> + <module>xsltcbrazil</module> + <module>xsltcejb</module> + <module>xsltcservlet</module> + <!-- The binary mode of maven-assembly-plugin needs to run after all the + other modules have created their artifacts. Standard solution to + achieve this sequencing is to make it a separate module which + depends on all the others. See + https://maven.apache.org/plugins/maven-assembly-plugin/faq.html#module-binaries + --> + <module>distribution</module> + </modules> + + <profiles> + <profile> + <id>jdk8</id> + <activation> + <jdk>[,9)</jdk> + </activation> + <properties> + <xalan.taglet.artifactId>xalan2jtaglet</xalan.taglet.artifactId> + </properties> + <modules> + <module>xalan2jtaglet</module> + </modules> + </profile> + <profile> + <id>jdk9+</id> + <activation> + <jdk>[9,)</jdk> + </activation> + <properties> + <xalan.taglet.artifactId>xalan2jtaglet_jdk9</xalan.taglet.artifactId> + <!-- + JDK 21 starts warning about dynamic agent attachment by Mockito, if + not present, but the option is also accepted by JDK 9+. + --> + <maven-surefire-plugin.argLine>-XX:+EnableDynamicAgentLoading</maven-surefire-plugin.argLine> + </properties> + <modules> + <module>xalan2jtaglet_jdk9</module> + </modules> + </profile> + <profile> + <id>create-docs</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <!-- StyleBook processing. + NOTE: Stylebook as it has been calls System.exit() on its way out. + That means running exec:java will malfunction since it'll blow out + the entire Maven process. Workaround is to invoke Stylebook from + the command line with exec:exec. Proper fix is to remove that + behavior from Stylebook's code and have it exit more cleanly, + or to have exec optionally fork a process for java. + The latter is in development. + --> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>exec-maven-plugin</artifactId> + <version>${exec-maven-plugin.version}</version> + <inherited>false</inherited> <!-- Run only in xalan-j parent --> + <executions> + <execution> + <id>Xalan2 design documentation</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>java</executable> + <commandlineArgs>-cp ${stylebook.classpath} org.apache.stylebook.StyleBook + loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/design/ + ./stylebook/sources/xalandesign.xml ./stylebook/style</commandlineArgs> + </configuration> + </execution> + + <execution> + <id>Xalan2 compiled (xsltc) documentation</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>java</executable> + <commandlineArgs>-cp ${stylebook.classpath} org.apache.stylebook.StyleBook + loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/xsltc/ + ./stylebook/sources/xsltc.xml ./stylebook/style</commandlineArgs> + </configuration> + </execution> + <execution> + <id>Xalan2 interpretive documentation</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>java</executable> + <commandlineArgs>-cp ${stylebook.classpath} org.apache.stylebook.StyleBook + loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/xalan + ./stylebook/sources/xalan-jsite.xml ./stylebook/style</commandlineArgs> + </configuration> + </execution> + + <!-- Diff tells me that the -jlocal output is almost + identical to the -jsite output despite the slight + difference in the .xml files used as their + sources. (The only effective difference appears to be + that -jlocal doesn't produce the index or charter + documents.) I'm not convinced that's enough difference + to merit generating both, but until I better grok why + this duplication was done in the first place I'm + hesitant to remove it. (jkesselm, 20231105) --> + <execution> + <id>Xalan2 interpretive documentation, local</id> + <phase>package</phase> + <goals> + <goal>exec</goal> + </goals> + <configuration> + <executable>java</executable> + <commandlineArgs>-cp ${stylebook.classpath} org.apache.stylebook.StyleBook + loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/xalan/local + ./stylebook/sources/xalan-jlocal.xml ./stylebook/style</commandlineArgs> + </configuration> + </execution> + </executions> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>integration-tests</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <modules> + <module>integration-tests</module> + </modules> + </profile> + </profiles> + + <build> + <pluginManagement> + <!-- Standardized configuration for plugins used by child modules, + though not invoked by parent module --> + <plugins> + <!-- Copy produced jarfile up to xalan-java/build/, + renaming to remove the version number, for + backward compatibility with things built for the + Ant builds. + --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.6.1</version> + <executions> + <execution> + <id>copy-artifact</id> + <phase>package</phase> + <goals> + <goal>copy</goal> + </goals> + <configuration> + <artifactItems> + <artifactItem> + <!-- Copy built artifact to ../build --> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + </artifactItem> + <artifactItem> + <!-- Also copy without the "-${project.version}" suffix + (but with the filetype), for backward compatibility + with Ant build's behavior + --> + <groupId>${project.groupId}</groupId> + <artifactId>${project.artifactId}</artifactId> + <version>${project.version}</version> + <type>${project.packaging}</type> + <!-- stripVersion does not seem to do what's needed, so: --> + <destFileName>${project.artifactId}.${project.packaging}</destFileName> + </artifactItem> + </artifactItems> + <outputDirectory>${rootlocation}/build</outputDirectory> + </configuration> + </execution> + <execution> + <id>copy-dependencies</id> + <phase>package</phase> + <goals> + <goal>copy-dependencies</goal> + </goals> + <configuration> + <outputDirectory>${rootlocation}/lib</outputDirectory> + <overWriteReleases>false</overWriteReleases> + <overWriteSnapshots>false</overWriteSnapshots> + <overWriteIfNewer>true</overWriteIfNewer> + <!-- Our own artifacts are in 'build' already --> + <excludeGroupIds>xalan</excludeGroupIds> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven-compiler-plugin.version}</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + <!-- Unit tests --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + <version>3.2.2</version> + <configuration> + <argLine>${maven-surefire-plugin.argLine}</argLine> + </configuration> + </plugin> + <!-- Integration tests using our own packaged JARs --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-invoker-plugin</artifactId> + <version>3.6.0</version> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>3.5.0</version> + <executions> + <execution> + <id>root-location</id> + <goals> + <goal>rootlocation</goal> + </goals> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <version>${maven-shade-plugin.version}</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>${maven-javadoc-plugin.version}</version> + + <configuration> + <!-- Deactivate doclint checks in order to suppress errors --> + <doclint>none</doclint> + <!-- Generate class use xref, making javadocs considerably bigger, + but also more informative. Just navigate to any documented + class or package and click on the "Use" link between "Class" + and "Tree". --> + <use>true</use> + <!-- FIXME: Why does it fail without this parameter? --> + <javadocVersion>8</javadocVersion> + <source>1.8</source> + + <!-- Custom taglet. Make sure to make each module using this plugin + depend on xalan:${xalan.taglet.artifactId} with scope + 'provided', because the dependency is only used during build + time. --> + <taglets> + <taglet> + <tagletClass>xalan2jtaglet.XSLUsageTag</tagletClass> + </taglet> + </taglets> + <tagletArtifact> + <groupId>xalan</groupId> + <artifactId>${xalan.taglet.artifactId}</artifactId> + <version>${project.version}</version> + </tagletArtifact> + + <!-- Group package names by topic. Empty groups will not be + rendered, i.e. it does not hurt to specify all groups in the + global configuration. --> + <groups> + <group> + <title>XPath</title> + <packages>org.apache.xpath*</packages> + </group> + <group> + <title>Document Table Model (DTM)</title> + <packages>org.apache.xml.dtm*</packages> + </group> + <group> + <title>Utilities</title> + <packages>org.apache.xml.utils*</packages> + </group> + <group> + <title>Xalan Other</title> + <packages>org.apache.xalan.client:org:org.apache.xalan.extensions:org.apache.xalan.res:org.apache.xalan.stree:org.apache.xalan.trace:org.apache.xalan.xslt</packages> + </group> + <group> + <title>Xalan Extensions</title> + <packages>org.apache.xalan.lib*</packages> + </group> + <group> + <title>Serializers</title> + <packages>org.apache.xml.serialize*:org.apache.xalan.serialize</packages> + </group> + <group> + <title>SAX 2</title> + <packages>org.xml.sax*</packages> + </group> + <group> + <title>DOM 2</title> + <packages>org.w3c.dom*</packages> + </group> + <group> + <title>XSLTC Core</title> + <packages>org.apache.xalan.xsltc*</packages> + </group> + <group> + <title>Samples</title> + <packages>samples*</packages> + </group> + </groups> + </configuration> + + <executions> + <execution> + <id>javadoc-jar</id> + <phase>package</phase> + <goals> + <goal>jar</goal> + </goals> + </execution> + </executions> + + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + <version>${maven-source-plugin.version}</version> + <executions> + <execution> + <id>source-jar</id> + <phase>package</phase> + <goals> + <goal>jar-no-fork</goal> + </goals> + </execution> + </executions> + </plugin> + + </plugins> + </pluginManagement> + + <sourceDirectory>src/main/java</sourceDirectory> + <resources> + <resource> + <directory>META-INF</directory> + <includes> + <include>LICENSE.txt</include> + <include>NOTICE.txt</include> + </includes> + </resource> + <resource> + <directory>resources</directory> + <includes> + <include>**/*.properties</include> + </includes> + </resource> + </resources> + <plugins> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-site-plugin</artifactId> + <version>3.7.1</version> + </plugin> + + <!-- Maven finds this without assistance, but grumbles about + unspecified plugin version, so... --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-project-info-reports-plugin</artifactId> + <version>3.4.5</version> + </plugin> + + <!-- During cleaning phase, empty directories ./build and ./lib, which + are normally not present except in the parent module. + --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-clean-plugin</artifactId> + <version>3.3.2</version> + <configuration> + <filesets> + <fileset> + <directory>./build</directory> + <followSymlinks>false</followSymlinks> + </fileset> + <fileset> + <directory>./lib</directory> + <followSymlinks>false</followSymlinks> + </fileset> + </filesets> + </configuration> + </plugin> + + <!-- Two more files to copy to the site directory --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + <version>3.0.2</version> + <executions> + <execution> + <id>copy-resources</id> + <phase>package</phase> + <goals> + <goal>copy-resources</goal> + </goals> + <configuration> + <outputDirectory>${basedir}/target/site/xsltc</outputDirectory> + <resources> + <resource> + <directory>stylebook/sources/xsltc</directory> + <includes> + <include>README.x*</include> + </includes> + </resource> + </resources> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + </plugin> + + </plugins> + </build> + + <dependencyManagement> + <dependencies> + + <!-- Our own modules --> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalansamples</artifactId> + <version>${project.version}</version> + </dependency> + + <!-- For javadoc generation only. Which of the two 'xalan2jtaglet*' + artifacts is used, is determined automatically by Maven profiles + based on the JDK used during the build. The result will be in + property ${xalan.taglet.artifactId}, which is what modules generating + javadocs should depend on with 'provided' scope. --> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan2jtaglet</artifactId> + <version>${project.version}</version> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan2jtaglet_jdk9</artifactId> + <version>${project.version}</version> + </dependency> + + <!-- Test dependencies --> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-params</artifactId> + <version>${junit-jupiter.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-inline</artifactId> + <version>${mockito.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-junit-jupiter</artifactId> + <version>${mockito.version}</version> + <scope>test</scope> + </dependency> + + </dependencies> + </dependencyManagement> + + <reporting> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <configuration> + <!-- FIXME: Without this exclude, the build only works if module + 'xalan2jtaglet' was first installed locally or deployed to + a remote repository. I.e., we have to use something like + 'mvn clean install', at least for the taglet module. + 'mvn clean package site' on top level is not enough for a + build when the local Maven repo is clean. + --> + <excludePackageNames>xalan2jtaglet</excludePackageNames> + </configuration> + + <reportSets> + <reportSet> + <id>aggregate</id> + <inherited>false</inherited> + <reports> + <report>aggregate</report> + </reports> + </reportSet> + <reportSet> + <id>default</id> + <reports> + <report>javadoc</report> + </reports> + </reportSet> + </reportSets> + </plugin> + </plugins> + </reporting> + +</project> diff --git a/samples/CompiledBrazil/README.brazil b/samples/CompiledBrazil/README.brazil deleted file mode 100644 index ee5fe58f8..000000000 --- a/samples/CompiledBrazil/README.brazil +++ /dev/null @@ -1,55 +0,0 @@ -============================================================ -CONTENTS OF THIS DOCUMENT: - - o) HOW TO PROVIDE XSL TRANSFORMATIONS AS A WEB SERVICE - o) HOW TO INVOKE TRANSLETS FROM A BRAZIL HANDLER - ------------------------------------------------------------- -HOW TO PROVIDE XSL TRANSFORMATIONS AS A WEB SERVICE - -This sample code illustrates how Xalan/XSLTC can be used to -offer XSL transformations as a web service without using a -full web server. We have chosen to use the Brazil prototype -for the web interface, available from Sunlabs: - http://www.sun.com/research/brazil/ -but we could easily have used some other web interface such -as Tomcat. The supplied Java code implements a Brazil -"handler", which very much resembles a servlet. - -The CompiledEJB and CompiledServlet sample code -demonstrate other approaches to providing XSL transformations -as a web service. - ------------------------------------------------------------- -HOW TO INVOKE TRANSLETS FROM A BRAZIL HANDLER - -The CompiledBrazil directory contains the example source code: - - TransformHandler.java - -This file contains a minimal implementation of an XSL -transformation handler. You can find a precompiled version -in xsltcbrazil.jar. - -Compile any stylesheets you're interested in into translets. -Set your CLASSPATH to include xalan.jar, xercesImpl.jar, -xml-apis.jar, your translet classes and the Brazil server -jar file. - -You can now set up the Brazil server to service requests by -using the following command: - -$ java -Djavax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl \ - sunlabs.brazil.server.Main -port 8080 \ - -handler TransformHandler - -In a browser, you can enter a URI similar to the following: - - http://localhost:8080/?translet=myTrans&document=myDoc - -where "myTrans" is the URI of a stylesheet that you've -compiled into a translet and "myDoc" is URI of an XML document -you'd like to process using that stylesheet. The result of -the transformation will be displayed in your browser. ------------------------------------------------------------- -END OF README diff --git a/samples/extensions/sql/ext-connection/ExternalConnection.java b/samples/extensions/sql/ext-connection/ExternalConnection.java deleted file mode 100644 index 753e474f9..000000000 --- a/samples/extensions/sql/ext-connection/ExternalConnection.java +++ /dev/null @@ -1,105 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * $Id$ - */ -// Imported TraX classes -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.Transformer; -import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerConfigurationException; - -import org.apache.xalan.lib.sql.DefaultConnectionPool; -import org.apache.xalan.lib.sql.ConnectionPoolManager; - - -// Imported java classes -import java.io.StringReader; -import java.io.FileOutputStream; -import java.io.FileNotFoundException; -import java.io.IOException; - -/** - * Use the TraX interface to perform a transformation in the simplest manner possible - * (3 statements). - */ -public class ExternalConnection -{ - public static void main(String[] args) - throws TransformerException, TransformerConfigurationException, - FileNotFoundException, IOException - { - - // Create a connection to the database server - // Up the connection pool count for testing - DefaultConnectionPool cp = new DefaultConnectionPool(); - cp.setDriver("org.apache.derby.jdbc.EmbeddedDriver"); - cp.setURL("jdbc:derby:sampleDB"); - //cp.setUser("sa"); - //cp.setPassword(""); - cp.setMinConnections(10); - cp.setPoolEnabled(true); - - // Now let's register our connection pool so we can use - // in a stylesheet - ConnectionPoolManager pm = new ConnectionPoolManager(); - pm.registerPool("extpool", cp); - - - // Use the static TransformerFactory.newInstance() method to instantiate - // a TransformerFactory. The javax.xml.transform.TransformerFactory - // system property setting determines the actual class to instantiate -- - // org.apache.xalan.transformer.TransformerImpl. - TransformerFactory tFactory = TransformerFactory.newInstance(); - - // Grab the Name of the Stylesheet from the command line - if (args.length == 0) - { - System.out.println("You must provide the path and name to a stylesheet to process"); - System.exit(0); - } - - String stylesheet = args[0]; - System.out.println("Transforming Stylesheet " + stylesheet); - - // Use the TransformerFactory to instantiate a Transformer that will work with - // the stylesheet you specify. This method call also processes the stylesheet - // into a compiled Templates object. - Transformer transformer = tFactory.newTransformer( - new StreamSource(stylesheet)); - - // For this transformation, all the required information is in the stylesheet, so generate - // a minimal XML source document for the input. - // Note: the command-line processor (org.apache.xalan.xslt.Process) uses this strategy when - // the user does not provide an -IN parameter. - StringReader reader = - new StringReader("<?xml version=\"1.0\"?> <doc/>"); - - // Use the Transformer to apply the associated Templates object to an XML document - // and write the output to a file. - transformer.transform( - new StreamSource(reader), - new StreamResult(new FileOutputStream("dbtest-out.html"))); - - System.out.println("************* The result is in dbtest-out.html *************"); - - cp.setPoolEnabled(false); - } -} diff --git a/samples/servlet/media.properties b/samples/servlet/media.properties deleted file mode 100644 index 45db095f4..000000000 --- a/samples/servlet/media.properties +++ /dev/null @@ -1,60 +0,0 @@ -## -# Licensed to the Apache Software Foundation (ASF) under one -# or more contributor license agreements. See the NOTICE file -# distributed with this work for additional information -# regarding copyright ownership. The ASF licenses this file -# to you under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -## -# -# $Id$ -# -# This property file is used by com.lotus.xsl.server.DefaultApplyXSL. -# -# Each line below specifies a mapping rule between a value contained in the HTTP request's user-Agent -# field and a value to be scanned for in XSL stylesheet(s) associated with the XML data. This mapping -# enables relationships to be defined between client capabilities and stylesheets capable of acting -# on these capabilities. -# -# The rules defined below are order-significant. In other words, if the first rule is unsuccessful, -# the second rule will be tried, etc. The media value "unknown" will be used when no rules are -# satisfied. -# -# Example: -# -# Mapping rules of... -# -# MSIE=explorer -# MSPIE=pocketexplorer -# -# ...and XML data that contains XSL stylesheet associations of... -# -# <?xml-stylesheet media="explorer" href="alldata.xsl" type="text/xsl"?> -# <?xml-stylesheet alternate="yes" media="pocketexplorer" href="somedata.xsl" type="text/xsl"?> -# -# ...and an HTTP request that contains a user-Agent value of... -# -# foo MSPIE bar -# -# ...will apply the XSL stylesheet somedata.xsl. -# -MSIE=explorer -MSPIE=pocketexplorer -HandHTTP=handweb -Mozilla=netscape -Lynx=lynx -Opera=opera -Java=java -AvantGo=avantgo -Nokia=nokia -UP.Browser=up -DoCoMo=imode diff --git a/serializer/pom.xml b/serializer/pom.xml new file mode 100644 index 000000000..13d420f44 --- /dev/null +++ b/serializer/pom.xml @@ -0,0 +1,153 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>xalan</groupId> + <artifactId>xalan-j</artifactId> + <version>2.7.3</version> + </parent> + + <artifactId>serializer</artifactId> + <name>Apache XML Serializer</name> + <description>Apache's XML serialization layer, as used in the Xalan XSLT processor</description> + + <dependencies> + <!-- For javadoc generation only, hence 'provided' scope --> + <dependency> + <groupId>xalan</groupId> + <artifactId>${xalan.taglet.artifactId}</artifactId> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.apache.bcel/bcel --> + <dependency> + <groupId>org.apache.bcel</groupId> + <artifactId>bcel</artifactId> + <version>6.7.0</version> + </dependency> + <!-- https://mvnrepository.com/artifact/commons-logging/commons-logging --> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/javax/javaee-api --> + <dependency> + <groupId>javax</groupId> + <artifactId>javaee-api</artifactId> + <version>6.0</version> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> <!-- jakata servlet is at 6.0 --> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/xerces/xercesImpl --> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.12.2</version> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/xml-apis/xml-apis --> + <dependency> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + <version>1.4.01</version> + <!-- We were actually using 1.4.02 in the Ant build. --> + <scope>provided</scope> + </dependency> + + <!-- Test dependencies --> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-params</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-inline</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-junit-jupiter</artifactId> + <scope>test</scope> + </dependency> + + </dependencies> + + <build> + + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> + + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + </plugin> + <!-- Copy generated jarfile up to xalan-java/build/, + for backward compatibility with Ant builds. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + + </build> + + <profiles> + <profile> + <id>create-javadocs</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>create-sources</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/src/MANIFEST.SERIALIZER b/serializer/src/main/java/MANIFEST.SERIALIZER similarity index 100% rename from src/MANIFEST.SERIALIZER rename to serializer/src/main/java/MANIFEST.SERIALIZER diff --git a/src/org/apache/xml/serializer/AttributesImplSerializer.java b/serializer/src/main/java/org/apache/xml/serializer/AttributesImplSerializer.java similarity index 100% rename from src/org/apache/xml/serializer/AttributesImplSerializer.java rename to serializer/src/main/java/org/apache/xml/serializer/AttributesImplSerializer.java diff --git a/src/org/apache/xml/serializer/CharInfo.java b/serializer/src/main/java/org/apache/xml/serializer/CharInfo.java similarity index 100% rename from src/org/apache/xml/serializer/CharInfo.java rename to serializer/src/main/java/org/apache/xml/serializer/CharInfo.java diff --git a/src/org/apache/xml/serializer/DOM3Serializer.java b/serializer/src/main/java/org/apache/xml/serializer/DOM3Serializer.java similarity index 98% rename from src/org/apache/xml/serializer/DOM3Serializer.java rename to serializer/src/main/java/org/apache/xml/serializer/DOM3Serializer.java index 82e6470da..d05c37743 100644 --- a/src/org/apache/xml/serializer/DOM3Serializer.java +++ b/serializer/src/main/java/org/apache/xml/serializer/DOM3Serializer.java @@ -45,7 +45,7 @@ * <p> * Example: * <pre> - * public class TestDOM3 { + * public class TestDOM3 { * * public static void main(String args[]) throws Exception { * // Get document to serialize @@ -55,7 +55,8 @@ * System.out.println(test.testDOM3LS()); * } * - * public org.w3c.dom.Document getDocument() throws Exception { + * // Javadoc needs an @code hint or it complains about angle brackets + * public org.w3c.dom.Document getDocument() throws Exception {@code * // Create a simple DOM Document. * javax.xml.parsers.DocumentBuilderFactory factory = * javax.xml.parsers.DocumentBuilderFactory.newInstance(); diff --git a/src/org/apache/xml/serializer/DOMSerializer.java b/serializer/src/main/java/org/apache/xml/serializer/DOMSerializer.java similarity index 100% rename from src/org/apache/xml/serializer/DOMSerializer.java rename to serializer/src/main/java/org/apache/xml/serializer/DOMSerializer.java diff --git a/src/org/apache/xml/serializer/ElemContext.java b/serializer/src/main/java/org/apache/xml/serializer/ElemContext.java similarity index 100% rename from src/org/apache/xml/serializer/ElemContext.java rename to serializer/src/main/java/org/apache/xml/serializer/ElemContext.java diff --git a/src/org/apache/xml/serializer/ElemDesc.java b/serializer/src/main/java/org/apache/xml/serializer/ElemDesc.java similarity index 100% rename from src/org/apache/xml/serializer/ElemDesc.java rename to serializer/src/main/java/org/apache/xml/serializer/ElemDesc.java diff --git a/src/org/apache/xml/serializer/EmptySerializer.java b/serializer/src/main/java/org/apache/xml/serializer/EmptySerializer.java similarity index 91% rename from src/org/apache/xml/serializer/EmptySerializer.java rename to serializer/src/main/java/org/apache/xml/serializer/EmptySerializer.java index fba7de2cc..3bcd49ddd 100644 --- a/src/org/apache/xml/serializer/EmptySerializer.java +++ b/serializer/src/main/java/org/apache/xml/serializer/EmptySerializer.java @@ -50,43 +50,66 @@ public class EmptySerializer implements SerializationHandler { protected static final String ERR = "EmptySerializer method not over-ridden"; /** - * @see SerializationHandler#asContentHandler() + * Architectural placeholder, overridden in derived classes + * @throws IOException if one arises in override implementation. */ - protected void couldThrowIOException() throws IOException { return; // don't do anything. } + /** + * Architectural placeholder, overridden in derived classes + * @throws SAXException if one arises in override implementation. + */ protected void couldThrowSAXException() throws SAXException { return; // don't do anything. } + /** + * Architectural placeholder, overridden in derived classes + * @param chars char[] containing content being serialized + * @param off integer offset into chars, start of content under consideration + * @param len integer character count, length of content under consideration + * @throws SAXException if one arises in override implementation. + */ protected void couldThrowSAXException(char[] chars, int off, int len) throws SAXException { return; // don't do anything. } + /** + * Architectural placeholder, overridden in derived classes + * @param elemQName qualified name of element being serialized + * @throws SAXException if one arises in override implementation. + */ protected void couldThrowSAXException(String elemQName) throws SAXException { return; // don't do anything. } + /** + * Architectural placeholder, overridden in derived classes + * @throws Exception (unknown which type) if one arises in override implementation. + */ protected void couldThrowException() throws Exception { return; // don't do anything. } + /** + * Architectural placeholder, overridden in derived implementation. + * A handler method might be invoked, or inlined, from this location. + */ void aMethodIsCalled() { // throw new RuntimeException(err); return; } - - /** + /** * @see SerializationHandler#asContentHandler() */ public ContentHandler asContentHandler() throws IOException @@ -94,14 +117,14 @@ public ContentHandler asContentHandler() throws IOException couldThrowIOException(); return null; } - /** + /** * @see SerializationHandler#setContentHandler(org.xml.sax.ContentHandler) */ public void setContentHandler(ContentHandler ch) { aMethodIsCalled(); } - /** + /** * @see SerializationHandler#close() */ public void close() @@ -109,6 +132,7 @@ public void close() aMethodIsCalled(); } /** + * @return Properties object describing the serializer's configuration * @see SerializationHandler#getOutputFormat() */ public Properties getOutputFormat() @@ -117,6 +141,7 @@ public Properties getOutputFormat() return null; } /** + * @return the OutputStream that this serializer would write to * @see SerializationHandler#getOutputStream() */ public OutputStream getOutputStream() @@ -125,6 +150,7 @@ public OutputStream getOutputStream() return null; } /** + * @return the Writer this serializer uses to write to the OutputStream * @see SerializationHandler#getWriter() */ public Writer getWriter() @@ -133,6 +159,7 @@ public Writer getWriter() return null; } /** + * return * @see SerializationHandler#reset() */ public boolean reset() @@ -155,6 +182,7 @@ public void setCdataSectionElements(Vector URI_and_localNames) aMethodIsCalled(); } /** + * @return previous state of this flag, so it can be restored if desired. * @see SerializationHandler#setEscaping(boolean) */ public boolean setEscaping(boolean escape) throws SAXException @@ -217,7 +245,7 @@ public void setTransformer(Transformer transformer) public Transformer getTransformer() { aMethodIsCalled(); - return null; + return null; } /** * @see SerializationHandler#flushPending() @@ -559,7 +587,14 @@ public String getVersion() return null; } /** - * @see XSLOutputAttributes#setCdataSectionElements + /** + * I believe this is intended to be a convenience front-end for the + * version which takes a Vector. + * @see #setCdataSectionElements(java.util.Vector) + * @param h Hashtable listing the element types (as opposed to datatypes) + * to be handled as CData. + * @throws Exception if the request can't be fulfilled (details + * depend on implementation) */ public void setCdataSectionElements(Hashtable h) throws Exception { diff --git a/src/org/apache/xml/serializer/EncodingInfo.java b/serializer/src/main/java/org/apache/xml/serializer/EncodingInfo.java similarity index 96% rename from src/org/apache/xml/serializer/EncodingInfo.java rename to serializer/src/main/java/org/apache/xml/serializer/EncodingInfo.java index 840405b2f..e3fc76705 100644 --- a/src/org/apache/xml/serializer/EncodingInfo.java +++ b/serializer/src/main/java/org/apache/xml/serializer/EncodingInfo.java @@ -42,9 +42,9 @@ * <code>m_last</code>). It will handle a certain range of values * explicitly (<code>m_explFirst</code> to <code>m_explLast</code>). * If the unicode point is before that explicit range, that is it - * is in the range <code>m_first <= value < m_explFirst</code>, then it will delegate to another EncodingInfo object for The root + * is in the range <code>m_first <= value < m_explFirst</code>, then it will delegate to another EncodingInfo object for The root * of such a tree, m_before. Likewise for values in the range - * <code>m_explLast < value <= m_last</code>, but delgating to <code>m_after</code> + * <code>m_explLast < value <= m_last</code>, but delgating to <code>m_after</code> * <p> * Actually figuring out if a code point is in the encoding is expensive. So the * purpose of this tree is to cache such determinations, and not to build the @@ -97,6 +97,7 @@ public final class EncodingInfo extends Object * This is not a public API. It returns true if the * char in question is in the encoding. * @param ch the char in question. + * @return true if the character is a member of the encoding's charset * <p> * This method is not a public API. * @xsl.usage internal @@ -118,6 +119,7 @@ public boolean isInEncoding(char ch) { * character formed by the high/low pair is in the encoding. * @param high a char that the a high char of a high/low surrogate pair. * @param low a char that is the low char of a high/low surrogate pair. + * @return true if the character is a member of the encoding's charset * <p> * This method is not a public API. * @xsl.usage internal @@ -167,23 +169,24 @@ public EncodingInfo(String name, String javaName, char highChar) */ private interface InEncoding { /** - * Returns true if the char is in the encoding + * @return true if the char is in the encoding */ public boolean isInEncoding(char ch); /** - * Returns true if the high/low surrogate pair forms + * @return true if the high/low surrogate pair forms * a character that is in the encoding. */ public boolean isInEncoding(char high, char low); } /** - * This class implements the + * This class implements the InEncoding interface */ private class EncodingImpl implements InEncoding { - - + /** + * @return true if the char is in the encoding + */ public boolean isInEncoding(char ch1) { final boolean ret; int codePoint = Encodings.toCodePoint(ch1); @@ -231,6 +234,10 @@ public boolean isInEncoding(char ch1) { return ret; } + /** + * @return true if the high/low surrogate pair forms + * a character that is in the encoding. + */ public boolean isInEncoding(char high, char low) { final boolean ret; int codePoint = Encodings.toCodePoint(high,low); @@ -551,6 +558,7 @@ else if (data[0] == '?' && ch != '?') * If the value returned is '\u0000' it means that every character must be tested * with an isInEncoding method {@link #isInEncoding(char)} or {@link #isInEncoding(char, char)} * for surrogate pairs. + * @return highest character in lowest group of characters handled by this encoding * <p> * This method is not a public API. * @xsl.usage internal diff --git a/src/org/apache/xml/serializer/Encodings.java b/serializer/src/main/java/org/apache/xml/serializer/Encodings.java similarity index 100% rename from src/org/apache/xml/serializer/Encodings.java rename to serializer/src/main/java/org/apache/xml/serializer/Encodings.java diff --git a/src/org/apache/xml/serializer/ExtendedContentHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ExtendedContentHandler.java similarity index 90% rename from src/org/apache/xml/serializer/ExtendedContentHandler.java rename to serializer/src/main/java/org/apache/xml/serializer/ExtendedContentHandler.java index 8cf35d3ff..df3358eb0 100644 --- a/src/org/apache/xml/serializer/ExtendedContentHandler.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ExtendedContentHandler.java @@ -54,7 +54,7 @@ public interface ExtendedContentHandler extends org.xml.sax.ContentHandler * @param type the attribute type typically character data (CDATA) * @param value the value of the attribute * @param XSLAttribute true if the added attribute is coming from an xsl:attribute element - * @throws SAXException + * @throws SAXException if attribute could not be written to output */ public void addAttribute( String uri, @@ -67,7 +67,7 @@ public void addAttribute( /** * Add attributes to the current element * @param atts the attributes to add. - * @throws SAXException + * @throws SAXException if attributes could not be written to output */ public void addAttributes(org.xml.sax.Attributes atts) throws org.xml.sax.SAXException; @@ -75,8 +75,8 @@ public void addAttributes(org.xml.sax.Attributes atts) * Add an attribute to the current element. The namespace URI of the * attribute will be calculated from the prefix of qName. The local name * will be derived from qName and the type will be assumed to be "CDATA". - * @param qName - * @param value + * @param qName Qualified Name of the attribute to be added + * @param value String value of the attribute to be added */ public void addAttribute(String qName, String value); @@ -84,7 +84,7 @@ public void addAttributes(org.xml.sax.Attributes atts) * This method is used to notify of a character event, but passing the data * as a character String rather than the standard character array. * @param chars the character data - * @throws SAXException + * @throws SAXException if characters could not be written to output */ public void characters(String chars) throws SAXException; @@ -92,7 +92,7 @@ public void addAttributes(org.xml.sax.Attributes atts) * This method is used to notify of a character event, but passing the data * as a DOM Node rather than the standard character array. * @param node a DOM Node containing text. - * @throws SAXException + * @throws SAXException if characters could not be written to output */ public void characters(org.w3c.dom.Node node) throws org.xml.sax.SAXException; /** @@ -105,7 +105,7 @@ public void addAttributes(org.xml.sax.Attributes atts) * the localName from the qualified name and derive the namespaceURI from * its implementation. * @param elemName the fully qualified element name. - * @throws SAXException + * @throws SAXException if end tag could not be written to output */ public void endElement(String elemName) throws SAXException; @@ -119,8 +119,7 @@ public void addAttributes(org.xml.sax.Attributes atts) * @param uri the namespace URI of the element * @param localName the local name (without prefix) of the element * @param qName the qualified name of the element - * - * @throws SAXException + * @throws SAXException if start tag could not be written to output */ public void startElement(String uri, String localName, String qName) throws org.xml.sax.SAXException; @@ -128,9 +127,10 @@ public void startElement(String uri, String localName, String qName) /** * This method is used to notify of the start of an element * @param qName the fully qualified name of the element - * @throws SAXException + * @throws SAXException if start tag could not be written to output */ public void startElement(String qName) throws SAXException; + /** * This method is used to notify that a prefix mapping is to start, but * after an element is started. The SAX method call @@ -147,7 +147,7 @@ public void startElement(String uri, String localName, String qName) * * @param uri the namespace URI being declared * @param prefix the prefix that maps to the given namespace - * @throws SAXException + * @throws SAXException if namespace declaration could not be processed */ public void namespaceAfterStartElement(String uri, String prefix) throws SAXException; @@ -163,7 +163,7 @@ public void namespaceAfterStartElement(String uri, String prefix) * @return boolean false if the prefix mapping was already in effect (in * other words we are just re-declaring), true if this is a new, never * before seen mapping for the element. - * @throws SAXException + * @throws SAXException if namespace declaration could not be processed */ public boolean startPrefixMapping( String prefix, @@ -173,7 +173,7 @@ public boolean startPrefixMapping( /** * Notify of an entity reference. * @param entityName the name of the entity - * @throws SAXException + * @throws SAXException if entity reference could not be written to output */ public void entityReference(String entityName) throws SAXException; @@ -239,6 +239,7 @@ public boolean startPrefixMapping( * @param qName the fully qualified attribute name. * @param value the attribute value * @param flags a bitwise flag + * @throws SAXException if attribute could not be added to output */ public void addUniqueAttribute(String qName, String value, int flags) throws SAXException; @@ -259,7 +260,7 @@ public void addUniqueAttribute(String qName, String value, int flags) * @param rawName the qualified name of the attribute * @param type the attribute type typically character data (CDATA) * @param value the value of the attribute - * @throws SAXException + * @throws SAXException if attribute could not be added to output */ public void addAttribute( String uri, diff --git a/src/org/apache/xml/serializer/ExtendedLexicalHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ExtendedLexicalHandler.java similarity index 95% rename from src/org/apache/xml/serializer/ExtendedLexicalHandler.java rename to serializer/src/main/java/org/apache/xml/serializer/ExtendedLexicalHandler.java index bb7f90f53..837e32485 100644 --- a/src/org/apache/xml/serializer/ExtendedLexicalHandler.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ExtendedLexicalHandler.java @@ -33,7 +33,7 @@ public interface ExtendedLexicalHandler extends org.xml.sax.ext.LexicalHandler * This method is used to notify of a comment * @param comment the comment, but unlike the SAX comment() method this * method takes a String rather than a character array. - * @throws SAXException + * @throws SAXException if comment could not be processed */ public void comment(String comment) throws SAXException; } diff --git a/src/org/apache/xml/serializer/Method.java b/serializer/src/main/java/org/apache/xml/serializer/Method.java similarity index 100% rename from src/org/apache/xml/serializer/Method.java rename to serializer/src/main/java/org/apache/xml/serializer/Method.java diff --git a/src/org/apache/xml/serializer/NamespaceMappings.java b/serializer/src/main/java/org/apache/xml/serializer/NamespaceMappings.java similarity index 96% rename from src/org/apache/xml/serializer/NamespaceMappings.java rename to serializer/src/main/java/org/apache/xml/serializer/NamespaceMappings.java index 91d25d342..0497c8656 100644 --- a/src/org/apache/xml/serializer/NamespaceMappings.java +++ b/serializer/src/main/java/org/apache/xml/serializer/NamespaceMappings.java @@ -33,22 +33,22 @@ * * <p>For example: * <pre> - * <chapter xmlns:p1="def"> - * <paragraph xmlns:p2="ghi"> - * <sentance xmlns:p3="jkl"> - * </sentance> - * </paragraph> - * <paragraph xlmns:p4="mno"> - * </paragraph> - * </chapter> + * <chapter xmlns:p1="def"> + * <paragraph xmlns:p2="ghi"> + * <sentence xmlns:p3="jkl"> + * </sentence> + * </paragraph> + * <paragraph xlmns:p4="mno"> + * </paragraph> + * </chapter> * </pre> * - * When the <chapter> element is encounted the prefix "p1" associated with uri + * When the <chapter> element is encounted the prefix "p1" associated with uri * "def" is pushed on the stack with depth 1. - * When the first <paragraph> is encountered "p2" and "ghi" are pushed with + * When the first <paragraph> is encountered "p2" and "ghi" are pushed with * depth 2. - * When the <sentance> is encountered "p3" and "jkl" are pushed with depth 3. - * When </sentance> occurs the popNamespaces(3) will pop "p3"/"jkl" off the + * When the <sentence> is encountered "p3" and "jkl" are pushed with depth 3. + * When </sentence> occurs the popNamespaces(3) will pop "p3"/"jkl" off the * stack. Of course popNamespaces(2) would pop anything with depth 2 or * greater. * @@ -221,6 +221,7 @@ boolean popNamespace(String prefix) * @param prefix a String with the prefix for a qualified name * @param uri a String with the uri to which the prefix is to map * @param elemDepth the depth of current declaration + * @return true if binding succeeded, false otherwise */ public boolean pushNamespace(String prefix, String uri, int elemDepth) { diff --git a/src/org/apache/xml/serializer/ObjectFactory.java b/serializer/src/main/java/org/apache/xml/serializer/ObjectFactory.java similarity index 100% rename from src/org/apache/xml/serializer/ObjectFactory.java rename to serializer/src/main/java/org/apache/xml/serializer/ObjectFactory.java diff --git a/src/org/apache/xml/serializer/OutputPropertiesFactory.java b/serializer/src/main/java/org/apache/xml/serializer/OutputPropertiesFactory.java similarity index 100% rename from src/org/apache/xml/serializer/OutputPropertiesFactory.java rename to serializer/src/main/java/org/apache/xml/serializer/OutputPropertiesFactory.java diff --git a/src/org/apache/xml/serializer/OutputPropertyUtils.java b/serializer/src/main/java/org/apache/xml/serializer/OutputPropertyUtils.java similarity index 100% rename from src/org/apache/xml/serializer/OutputPropertyUtils.java rename to serializer/src/main/java/org/apache/xml/serializer/OutputPropertyUtils.java diff --git a/src/org/apache/xml/serializer/SecuritySupport.java b/serializer/src/main/java/org/apache/xml/serializer/SecuritySupport.java similarity index 100% rename from src/org/apache/xml/serializer/SecuritySupport.java rename to serializer/src/main/java/org/apache/xml/serializer/SecuritySupport.java diff --git a/src/org/apache/xml/serializer/SerializationHandler.java b/serializer/src/main/java/org/apache/xml/serializer/SerializationHandler.java similarity index 87% rename from src/org/apache/xml/serializer/SerializationHandler.java rename to serializer/src/main/java/org/apache/xml/serializer/SerializationHandler.java index fca975f3c..6e0c8fd09 100644 --- a/src/org/apache/xml/serializer/SerializationHandler.java +++ b/serializer/src/main/java/org/apache/xml/serializer/SerializationHandler.java @@ -54,7 +54,7 @@ public interface SerializationHandler /** * Set the SAX Content handler that the serializer sends its output to. This * method only applies to a ToSAXHandler, not to a ToStream serializer. - * + * @param ch the ContentHandler to recieve serializer's output * @see Serializer#asContentHandler() * @see ToSAXHandler */ @@ -67,7 +67,7 @@ public interface SerializationHandler * serialized. * * @param node the DOM node to be serialized. - * @throws IOException + * @throws IOException if the serializer encounters IO problems. */ public void serialize(Node node) throws IOException; /** @@ -75,9 +75,14 @@ public interface SerializationHandler * * Note that characters will * never, even if this option is set to 'true', be escaped within - * CDATA sections in output XML documents. + * CDATA sections in output XML documents. The only kind of escaping + * which takes place in that mode is when we are forced to end a + * CDATA section and begin a new one in order to split content that + * would otherwise include the CDATA end sequence. * * @param escape true if escaping is to be set on. + * @return prior state of this flag, to permit restoring it later. + * @throws SAXException if the request cannot be handled correctly */ public boolean setEscaping(boolean escape) throws SAXException; @@ -131,6 +136,8 @@ public interface SerializationHandler * <p> * For performance reasons this method should not be called * very often. + * @throws SAXException if one was produced in the course of + * flushing the buffers (eg disk full or connection lost). */ public void flushPending() throws SAXException; diff --git a/src/org/apache/xml/serializer/Serializer.java b/serializer/src/main/java/org/apache/xml/serializer/Serializer.java similarity index 98% rename from src/org/apache/xml/serializer/Serializer.java rename to serializer/src/main/java/org/apache/xml/serializer/Serializer.java index 933d1c6ef..19b249158 100644 --- a/src/org/apache/xml/serializer/Serializer.java +++ b/serializer/src/main/java/org/apache/xml/serializer/Serializer.java @@ -146,7 +146,7 @@ public interface Serializer { * "omit-xml-declaration", "standalone", doctype-public", * "doctype-system", "cdata-section-elements", "indent", "media-type". * These property keys and their values are described in the XSLT recommendation, - * see {@link <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 recommendation</a>} + * <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 recommendation</a> * <p> * The non-standard property keys supported are defined in {@link OutputPropertiesFactory}. * diff --git a/src/org/apache/xml/serializer/SerializerBase.java b/serializer/src/main/java/org/apache/xml/serializer/SerializerBase.java similarity index 96% rename from src/org/apache/xml/serializer/SerializerBase.java rename to serializer/src/main/java/org/apache/xml/serializer/SerializerBase.java index 1df30014e..c0c3585c0 100644 --- a/src/org/apache/xml/serializer/SerializerBase.java +++ b/serializer/src/main/java/org/apache/xml/serializer/SerializerBase.java @@ -91,6 +91,7 @@ public abstract class SerializerBase /** * To fire off the end element trace event * @param name Name of element + * @throws SAXException if the trace handler produces one */ protected void fireEndElem(String name) throws org.xml.sax.SAXException @@ -107,6 +108,7 @@ protected void fireEndElem(String name) * @param chars content of characters * @param start starting index of characters to output * @param length number of characters to output + * @throws SAXException if the trace handler produces one */ protected void fireCharEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException @@ -123,7 +125,7 @@ protected void fireCharEvent(char[] chars, int start, int length) */ protected boolean m_needToCallStartDocument = true; - /** True if a trailing "]]>" still needs to be written to be + /** True if a trailing "]]>" still needs to be written to be * written out. Used to merge adjacent CDATA sections */ protected boolean m_cdataTagOpen = false; @@ -273,6 +275,8 @@ public void comment(String data) throws SAXException * TODO: This method is a HACK! We do not have access to the * XML file, it sometimes generates a NS prefix of the form "ns?" for * an attribute. + * @param qname Qualified name to be patched. + * @return Replacement qname */ protected String patchName(String qname) { @@ -563,7 +567,7 @@ public String getEncoding() /** * Sets the character encoding coming from the xsl:output encoding stylesheet attribute. - * @param m_encoding the character encoding + * @param encoding the character encoding */ public void setEncoding(String encoding) { @@ -895,8 +899,7 @@ public String getNamespaceURIFromPrefix(String prefix) * Entity reference event. * * @param name Name of entity - * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. */ public void entityReference(String name) throws org.xml.sax.SAXException { @@ -943,7 +946,7 @@ public Transformer getTransformer() * This method gets the nodes value as a String and uses that String as if * it were an input character notification. * @param node the Node to serialize - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. */ public void characters(org.w3c.dom.Node node) throws org.xml.sax.SAXException @@ -988,6 +991,7 @@ public void warning(SAXParseException exc) throws SAXException /** * To fire off start entity trace event * @param name Name of entity + * @throws org.xml.sax.SAXException if the tracer encounters an error. */ protected void fireStartEntity(String name) throws org.xml.sax.SAXException @@ -1041,6 +1045,7 @@ private void flushMyWriter() * @param chars content of CDATA * @param start starting index of characters to output * @param length number of characters to output + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. */ protected void fireCDATAEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException @@ -1057,6 +1062,7 @@ protected void fireCDATAEvent(char[] chars, int start, int length) * @param chars content of comment * @param start starting index of comment to output * @param length number of characters to output + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. */ protected void fireCommentEvent(char[] chars, int start, int length) throws org.xml.sax.SAXException @@ -1072,6 +1078,7 @@ protected void fireCommentEvent(char[] chars, int start, int length) /** * To fire off end entity trace event * @param name Name of entity + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. */ public void fireEndEntity(String name) throws org.xml.sax.SAXException @@ -1083,6 +1090,7 @@ public void fireEndEntity(String name) /** * To fire off start document trace event + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. */ protected void fireStartDoc() throws org.xml.sax.SAXException @@ -1097,6 +1105,7 @@ protected void fireStartDoc() /** * To fire off end document trace event + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. */ protected void fireEndDoc() throws org.xml.sax.SAXException @@ -1113,6 +1122,7 @@ protected void fireEndDoc() * called just before the attributes are cleared. * * @param elemName the qualified name of the element + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. * */ protected void fireStartElem(String elemName) @@ -1127,21 +1137,11 @@ protected void fireStartElem(String elemName) } - /** - * To fire off the end element event - * @param name Name of element - */ -// protected void fireEndElem(String name) -// throws org.xml.sax.SAXException -// { -// if (m_tracer != null) -// m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDELEMENT,name, (Attributes)null); -// } - - /** * To fire off the PI trace event * @param name Name of PI + * @param data PI parameters (typically pseudoattributes) + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. */ protected void fireEscapingEvent(String name, String data) throws org.xml.sax.SAXException @@ -1158,6 +1158,7 @@ protected void fireEscapingEvent(String name, String data) /** * To fire off the entity reference trace event * @param name Name of entity reference + * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. */ protected void fireEntityReference(String name) throws org.xml.sax.SAXException @@ -1180,8 +1181,6 @@ protected void fireEntityReference(String name) * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ public void startDocument() throws org.xml.sax.SAXException { @@ -1206,7 +1205,8 @@ public void startDocument() throws org.xml.sax.SAXException * called from an external caller, which in principle is just a matter of * style. * - * @throws SAXException + * @throws org.xml.sax.SAXException Any SAX exception, possibly + * wrapping another exception. */ protected void startDocumentInternal() throws org.xml.sax.SAXException { @@ -1443,10 +1443,9 @@ private void addCDATAElement(String uri, String localName) /** - * Return true if nothing has been sent to this result tree yet. + * @return true if nothing has been sent to this result tree yet. * <p> * This is not a public API. - * * @xsl.usage internal */ public boolean documentIsEmpty() { @@ -1455,9 +1454,9 @@ public boolean documentIsEmpty() { } /** - * Return true if the current element in m_elemContext + * @return true if the current element in m_elemContext * is a CDATA section. - * CDATA sections are specified in the <xsl:output> attribute + * CDATA sections are specified in the <xsl:output> attribute * cdata-section-names or in the JAXP equivalent property. * In any case the format of the value of such a property is: * <pre> @@ -1561,8 +1560,8 @@ public String getOutputProperty(String name) { * not the default value. If there is a default * value, but no non-default value this method * will return null. - * <p> - * + * @param name Property name to be queried + * @return default value, or null if no default is defined */ public String getOutputPropertyNonDefault(String name ) { diff --git a/src/org/apache/xml/serializer/SerializerConstants.java b/serializer/src/main/java/org/apache/xml/serializer/SerializerConstants.java similarity index 91% rename from src/org/apache/xml/serializer/SerializerConstants.java rename to serializer/src/main/java/org/apache/xml/serializer/SerializerConstants.java index 41cb45605..49a06dbd5 100644 --- a/src/org/apache/xml/serializer/SerializerConstants.java +++ b/serializer/src/main/java/org/apache/xml/serializer/SerializerConstants.java @@ -27,13 +27,11 @@ interface SerializerConstants { - /** To insert ]]> in a CDATA section by ending the last CDATA section with - * ]] and starting the next CDATA section with > + /** Use to insert ]]< in a CDATA section context by ending the + * last CDATA section with ]] and starting the next CDATA section + * with < */ static final String CDATA_CONTINUE = "]]]]><![CDATA[>"; - /** - * The constant "]]>" - */ static final String CDATA_DELIMITER_CLOSE = "]]>"; static final String CDATA_DELIMITER_OPEN = "<![CDATA["; diff --git a/src/org/apache/xml/serializer/SerializerFactory.java b/serializer/src/main/java/org/apache/xml/serializer/SerializerFactory.java similarity index 90% rename from src/org/apache/xml/serializer/SerializerFactory.java rename to serializer/src/main/java/org/apache/xml/serializer/SerializerFactory.java index e45296145..aca99f771 100644 --- a/src/org/apache/xml/serializer/SerializerFactory.java +++ b/serializer/src/main/java/org/apache/xml/serializer/SerializerFactory.java @@ -27,6 +27,7 @@ import org.apache.xml.serializer.utils.MsgKey; import org.apache.xml.serializer.utils.Utils; +import org.apache.xml.serializer.utils.WrappedRuntimeException; import org.xml.sax.ContentHandler; /** @@ -39,12 +40,13 @@ * using this factory ensures that the default key/value properties * are set for the given output "method". * - * <p> - * The standard property keys supported are: "method", "version", "encoding", - * "omit-xml-declaration", "standalone", doctype-public", - * "doctype-system", "cdata-section-elements", "indent", "media-type". - * These property keys and their values are described in the XSLT recommendation, - * see {@link <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 recommendation</a>} + * <p> The standard property keys supported are: "method", + * "version", "encoding", "omit-xml-declaration", "standalone", + * doctype-public", "doctype-system", "cdata-section-elements", + * "indent", "media-type". These property keys and their values are + * described in the <a + * href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 + * recommendation</a> * * <p> * The value of the "cdata-section-elements" property key is a whitespace @@ -79,13 +81,13 @@ private SerializerFactory() { * an exception of some type will be thrown. * For a list of the output "method" key values see {@link Method}. * + * May thrown an Exception if the class for the serializer is not + * found, or is found but does not implement ContentHandler. + * * @param format The output format, minimally the "method" property must be set. * @return A suitable serializer. * @throws IllegalArgumentException if method is * null or an appropriate serializer can't be found - * @throws Exception if the class for the serializer is found but does not - * implement ContentHandler. - * @throws WrappedRuntimeException if an exception is thrown while trying to find serializer */ public static Serializer getSerializer(Properties format) { diff --git a/src/org/apache/xml/serializer/SerializerTrace.java b/serializer/src/main/java/org/apache/xml/serializer/SerializerTrace.java similarity index 100% rename from src/org/apache/xml/serializer/SerializerTrace.java rename to serializer/src/main/java/org/apache/xml/serializer/SerializerTrace.java diff --git a/src/org/apache/xml/serializer/SerializerTraceWriter.java b/serializer/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java similarity index 100% rename from src/org/apache/xml/serializer/SerializerTraceWriter.java rename to serializer/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java diff --git a/src/org/apache/xml/serializer/ToHTMLSAXHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ToHTMLSAXHandler.java similarity index 97% rename from src/org/apache/xml/serializer/ToHTMLSAXHandler.java rename to serializer/src/main/java/org/apache/xml/serializer/ToHTMLSAXHandler.java index 12f8b6384..46017c97c 100644 --- a/src/org/apache/xml/serializer/ToHTMLSAXHandler.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ToHTMLSAXHandler.java @@ -79,7 +79,6 @@ public OutputStream getOutputStream() } /** - * Returns null * @return null * @see Serializer#getWriter() */ @@ -90,14 +89,19 @@ public Writer getWriter() /** * Does nothing. - * + * @throws SAXException never + * @param n would normally be the number of columns to indent by */ public void indent(int n) throws SAXException { } /** - * Does nothing. + * Does nothing. NOTE: we *COULD* have functionality here that + * Did Something Appropriate, if we could agree on what that is. + * Convert to text? + * @throws IOException never + * @param node DOM node to be ignored * @see DOMSerializer#serialize(Node) */ public void serialize(Node node) throws IOException @@ -108,10 +112,9 @@ public void serialize(Node node) throws IOException /** * Turns special character escaping on/off. * - * * @param escape true if escaping is to be set on. - * * @see SerializationHandler#setEscaping(boolean) + * @throws SAXException never (I think), but signature requires it. */ public boolean setEscaping(boolean escape) throws SAXException { @@ -283,8 +286,6 @@ public void ignorableWhitespace(char[] ch, int start, int length) * none was supplied. * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException * @see org.xml.sax.ContentHandler#processingInstruction(String, String) */ public void processingInstruction(String target, String data) @@ -335,9 +336,6 @@ public void skippedEntity(String arg0) throws SAXException * @see org.xml.sax.ContentHandler#startElement * @see org.xml.sax.ContentHandler#endElement * @see org.xml.sax.AttributeList - * - * @throws org.xml.sax.SAXException - * * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes) */ public void startElement( @@ -419,10 +417,6 @@ public void startEntity(String arg0) throws SAXException * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException - * - * */ public void endDocument() throws SAXException { @@ -467,9 +461,7 @@ public void close() * Receive notification of character data. * * @param chars The string of characters to process. - * - * @throws org.xml.sax.SAXException - * + * @throws org.xml.sax.SAXException if buffering fails * @see ExtendedContentHandler#characters(String) */ public void characters(final String chars) throws SAXException @@ -599,7 +591,7 @@ public void endElement(String elementName) throws SAXException * @see #ignorableWhitespace * @see org.xml.sax.Locator * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if the underlying saxHandler objects * * @see org.xml.sax.ContentHandler#characters(char[], int, int) */ diff --git a/src/org/apache/xml/serializer/ToHTMLStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToHTMLStream.java similarity index 98% rename from src/org/apache/xml/serializer/ToHTMLStream.java rename to serializer/src/main/java/org/apache/xml/serializer/ToHTMLStream.java index 453fac601..38e4632fd 100644 --- a/src/org/apache/xml/serializer/ToHTMLStream.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ToHTMLStream.java @@ -676,10 +676,7 @@ public ToHTMLStream() /** * Receive notification of the beginning of a document. * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * - * @throws org.xml.sax.SAXException + * @throws SAXException if underlying handler reports an error */ protected void startDocumentInternal() throws org.xml.sax.SAXException { @@ -744,10 +741,7 @@ private void outputDocTypeDecl(String name) throws SAXException { /** * Receive notification of the end of a document. * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * - * @throws org.xml.sax.SAXException + * @throws SAXException if underlying handler reports an error */ public final void endDocument() throws org.xml.sax.SAXException { @@ -773,9 +767,8 @@ public final void endDocument() throws org.xml.sax.SAXException /** * Receive notification of the beginning of an element. * - * - * @param namespaceURI - * @param localName + * @param namespaceURI Element namespace binding from qname + * @param localName Element's local name from qname * @param name The element type name. * @param atts The attributes attached to the element, if any. * @throws org.xml.sax.SAXException Any SAX exception, possibly @@ -917,10 +910,8 @@ else if ( /** * Receive notification of the end of an element. - * - * - * @param namespaceURI - * @param localName + * @param namespaceURI Element namespace binding from qname + * @param localName Element's local name from qname * @param name The element type name * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. @@ -1054,7 +1045,7 @@ else if (m_doIndent && (!m_inBlockElem || isBlockElement)) * @param elemDesc The description of the HTML element * that has this attribute. * - * @throws org.xml.sax.SAXException + * @throws IOException if output fails */ protected void processAttribute( java.io.Writer writer, @@ -1139,11 +1130,12 @@ private boolean isHHSign(String str) * Write the specified <var>string</var> after substituting non ASCII characters, * with <CODE>%HH</CODE>, where HH is the hex of the byte value. * + * @param writer The writer to write the processed output to. * @param string String to convert to XML format. * @param doURLEscaping True if we should try to encode as * per http://www.ietf.org/rfc/rfc2396.txt. * - * @throws org.xml.sax.SAXException if a bad surrogate pair is detected. + * @throws IOException (SAXException) if a bad surrogate pair is detected. */ public void writeAttrURI( final java.io.Writer writer, String string, boolean doURLEscaping) @@ -1381,7 +1373,7 @@ else if (cleanLength == 1) * @param string String to convert to XML format. * @param encoding CURRENTLY NOT IMPLEMENTED. * - * @throws org.xml.sax.SAXException + * @throws IOException (org.xml.sax.SAXException) */ public void writeAttrString( final java.io.Writer writer, String string, String encoding) @@ -1523,8 +1515,6 @@ else if (cleanLength == 1) * wrapping another exception. * @see #ignorableWhitespace * @see org.xml.sax.Locator - * - * @throws org.xml.sax.SAXException */ public final void characters(char chars[], int start, int length) throws org.xml.sax.SAXException @@ -1587,8 +1577,6 @@ public final void characters(char chars[], int start, int length) * wrapping another exception. * @see #ignorableWhitespace * @see org.xml.sax.Locator - * - * @throws org.xml.sax.SAXException */ public final void cdata(char ch[], int start, int length) throws org.xml.sax.SAXException @@ -1638,8 +1626,6 @@ public final void cdata(char ch[], int start, int length) * none was supplied. * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ public void processingInstruction(String target, String data) throws org.xml.sax.SAXException @@ -1727,7 +1713,7 @@ else if (m_needToCallStartDocument) * * @param name non-null reference to entity name string. * - * @throws org.xml.sax.SAXException + * @throws SAXException if underlying handler reports an error */ public final void entityReference(String name) throws org.xml.sax.SAXException @@ -1762,7 +1748,7 @@ public final void endElement(String elemName) throws SAXException * @param nAttrs the number of attributes in m_attributes * to be processed * - * @throws org.xml.sax.SAXException + * @throws SAXException if underlying handler reports an error */ public void processAttributes(java.io.Writer writer, int nAttrs) throws IOException,SAXException @@ -1781,11 +1767,11 @@ public void processAttributes(java.io.Writer writer, int nAttrs) } /** - * For the enclosing elements starting tag write out out any attributes - * followed by ">". At this point we also mark if this element is - * a cdata-section-element. + * For the enclosing elements starting tag write out out any + * attributes followed by the > character. At this point we + * also mark if this element is a cdata-section-element. * - *@throws org.xml.sax.SAXException + *@throws SAXException if underlying handler reports an error */ protected void closeStartTag() throws SAXException { @@ -1866,7 +1852,7 @@ public void startDTD(String name, String publicId, String systemId) /** * Report the end of DTD declarations. - * @throws org.xml.sax.SAXException The application may raise an exception. + * @throws SAXException if underlying handler reports an error * @see #startDTD */ public void endDTD() throws org.xml.sax.SAXException diff --git a/src/org/apache/xml/serializer/ToSAXHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ToSAXHandler.java similarity index 98% rename from src/org/apache/xml/serializer/ToSAXHandler.java rename to serializer/src/main/java/org/apache/xml/serializer/ToSAXHandler.java index 0373f1dd4..75d423de7 100644 --- a/src/org/apache/xml/serializer/ToSAXHandler.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ToSAXHandler.java @@ -113,7 +113,7 @@ public void startDTD(String arg0, String arg1, String arg2) * * @param characters The string of characters to process. * - * @throws org.xml.sax.SAXException + * @throws SAXException if underlying handler reports an error * * @see ExtendedContentHandler#characters(String) */ @@ -179,13 +179,11 @@ protected void closeCDATA() throws SAXException * SAX method additional namespace or attribute information can occur before * or after this call, that is associated with this element. * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. * @see org.xml.sax.ContentHandler#startElement * @see org.xml.sax.ContentHandler#endElement * @see org.xml.sax.AttributeList * - * @throws org.xml.sax.SAXException + * @throws SAXException if underlying handler reports an error * * @see org.xml.sax.ContentHandler#startElement(String,String,String,Attributes) */ @@ -342,7 +340,7 @@ public void startElement(String qName) throws SAXException { * This method gets the node's value as a String and uses that String as if * it were an input character notification. * @param node the Node to serialize - * @throws org.xml.sax.SAXException + * @throws SAXException if underlying handler reports an error */ public void characters(org.w3c.dom.Node node) throws org.xml.sax.SAXException diff --git a/src/org/apache/xml/serializer/ToStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToStream.java similarity index 98% rename from src/org/apache/xml/serializer/ToStream.java rename to serializer/src/main/java/org/apache/xml/serializer/ToStream.java index 1134eb7ee..6340f2416 100644 --- a/src/org/apache/xml/serializer/ToStream.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ToStream.java @@ -141,7 +141,7 @@ abstract public class ToStream extends SerializerBase boolean m_shouldFlush = true; /** - * Add space before '/>' for XHTML. + * Add space before self-closing '/>' syntax for XHTML. */ protected boolean m_spaceBeforeClose = false; @@ -184,9 +184,9 @@ public ToStream() } /** - * This helper method to writes out "]]>" when closing a CDATA section. + * This helper method writes the syntax for closing a CDATA section. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if write fails */ protected void closeCDATA() throws org.xml.sax.SAXException { @@ -233,7 +233,7 @@ public void serialize(Node node) throws IOException /** * Flush the formatter's result stream. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if write fails */ protected final void flushWriter() throws org.xml.sax.SAXException { @@ -357,7 +357,7 @@ public void internalEntityDecl(String name, String value) * @param name non-null reference to document type name. * NEEDSDOC @param value * - * @throws org.xml.sax.SAXException + * @throws IOException if an error occurs during writing. */ void outputEntityDecl(String name, String value) throws IOException { @@ -373,11 +373,11 @@ void outputEntityDecl(String name, String value) throws IOException /** * Output a system-dependent line break. * - * @throws org.xml.sax.SAXException + * @throws IOException if an error occurs during writing. + */ protected final void outputLineSep() throws IOException { - m_writer.write(m_lineSep, 0, m_lineSepLen); } @@ -780,7 +780,7 @@ public boolean setEscaping(boolean escape) * * @param depth the indentation depth (element nesting depth) * - * @throws org.xml.sax.SAXException if an error occurs during writing. + * @throws IOException if an error occurs during writing. */ protected void indent(int depth) throws IOException { @@ -798,7 +798,7 @@ protected void indent(int depth) throws IOException /** * Indent at the current element nesting depth. - * @throws IOException + * @throws IOException if an error occurs while writing */ protected void indent() throws IOException { @@ -808,7 +808,7 @@ protected void indent() throws IOException * Prints <var>n</var> spaces. * @param n Number of spaces to print. * - * @throws org.xml.sax.SAXException if an error occurs when writing. + * @throws IOException if an error occurs while writing */ private void printSpace(int n) throws IOException { @@ -934,7 +934,8 @@ public void externalEntityDecl( } /** - * Tell if this character can be written without escaping. + * @return true iff this character can be written without escaping. + * @param ch character to be tested */ protected boolean escapingNotNeeded(char ch) { @@ -976,8 +977,7 @@ protected boolean escapingNotNeeded(char ch) * the surrogate pair if an entity reference with that value * was written out. * - * @throws IOException - * @throws org.xml.sax.SAXException if invalid UTF-16 surrogate detected. + * @throws IOException if invalid UTF-16 surrogate detected. */ protected int writeUTF16Surrogate(char c, char ch[], int i, int end) throws IOException @@ -1051,7 +1051,7 @@ protected int writeUTF16Surrogate(char c, char ch[], int i, int end) * * @return i+1 if the character was written, else i. * - * @throws java.io.IOException + * @throws java.io.IOException if error arose while writing */ int accumDefaultEntity( java.io.Writer writer, @@ -1100,8 +1100,8 @@ int accumDefaultEntity( * @param useSystemLineSeparator true if the operating systems * end-of-line separator should be output rather than a new-line character. * - * @throws IOException - * @throws org.xml.sax.SAXException + * @throws IOException if unable to write + * @throws org.xml.sax.SAXException never (I think), but signature expects it */ void writeNormalizedChars( char ch[], @@ -1203,7 +1203,7 @@ else if (Encodings.isHighUTF16Surrogate(c)) * * @see #startNonEscaping * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException never, but signature expects it */ public void endNonEscaping() throws org.xml.sax.SAXException { @@ -1218,7 +1218,7 @@ public void endNonEscaping() throws org.xml.sax.SAXException * <p> The contents of the un-escaping section will be delivered through the * regular <tt>characters</tt> event. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException never, but signature expects it */ public void startNonEscaping() throws org.xml.sax.SAXException { @@ -1249,8 +1249,6 @@ public void startNonEscaping() throws org.xml.sax.SAXException * wrapping another exception. * @see #ignorableWhitespace * @see org.xml.sax.Locator - * - * @throws org.xml.sax.SAXException */ protected void cdata(char ch[], int start, final int length) throws org.xml.sax.SAXException @@ -1338,7 +1336,7 @@ private boolean isEscapingDisabled() * @param start The start position in the array. * @param length The number of characters to read from the array. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException containing IOException, if one arises */ protected void charactersRaw(char ch[], int start, int length) throws org.xml.sax.SAXException @@ -1389,8 +1387,6 @@ protected void charactersRaw(char ch[], int start, int length) * wrapping another exception. * @see #ignorableWhitespace * @see org.xml.sax.Locator - * - * @throws org.xml.sax.SAXException */ public void characters(final char chars[], final int start, final int length) throws org.xml.sax.SAXException @@ -1701,6 +1697,7 @@ private static boolean isNELorLSEPCharacter(char ch) * @param fromTextNode true if the characters being processed are * from a text node, false if they are from an attribute value. * @return the index of the last character processed + * @throws IOException if an error occurs while writing */ private int processDirty( char[] chars, @@ -1747,7 +1744,7 @@ private int processDirty( * * @param s The string of characters to process. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if characters could not be handled */ public void characters(String s) throws org.xml.sax.SAXException { @@ -1777,7 +1774,7 @@ public void characters(String s) throws org.xml.sax.SAXException * @return i+1 if a character was written, i+2 if two characters * were written out, else return i. * - * @throws org.xml.sax.SAXException + * @throws IOException if an error occurs while writing */ private int accumDefaultEscape( Writer writer, @@ -1888,8 +1885,6 @@ else if ((!escapingNotNeeded(ch) || * @see org.xml.sax.ContentHandler#startElement * @see org.xml.sax.ContentHandler#endElement * @see org.xml.sax.AttributeList - * - * @throws org.xml.sax.SAXException */ public void startElement( String namespaceURI, @@ -1978,7 +1973,7 @@ else if (m_cdataTagOpen) * @see org.xml.sax.ContentHandler#endElement * @see org.xml.sax.AttributeList * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if characters could not be handled */ public void startElement( String elementNamespaceURI, @@ -2055,8 +2050,8 @@ void outputDocTypeDecl(String name, boolean closeDecl) throws SAXException * @param nAttrs the number of attributes in m_attributes * to be processed * - * @throws java.io.IOException - * @throws org.xml.sax.SAXException + * @throws IOException if an error occurs while writing + * @throws org.xml.sax.SAXException never (I think) */ public void processAttributes(java.io.Writer writer, int nAttrs) throws IOException, SAXException { @@ -2081,13 +2076,14 @@ public void processAttributes(java.io.Writer writer, int nAttrs) throws IOExcept } /** - * Returns the specified <var>string</var> after substituting <VAR>specials</VAR>, + * Writes the specified <var>string</var> after substituting <VAR>specials</VAR>, * and UTF-16 surrogates for chracter references <CODE>&#xnn</CODE>. * + * @param writer to recieve processed string * @param string String to convert to XML format. * @param encoding CURRENTLY NOT IMPLEMENTED. * - * @throws java.io.IOException + * @throws IOException if an error occurs while writing */ public void writeAttrString( Writer writer, @@ -2197,8 +2193,6 @@ else if (m_encodingInfo.isInEncoding(ch)) { * @param name The element type name * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ public void endElement(String namespaceURI, String localName, String name) throws org.xml.sax.SAXException @@ -2529,8 +2523,6 @@ public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see #characters - * - * @throws org.xml.sax.SAXException */ public void ignorableWhitespace(char ch[], int start, int length) throws org.xml.sax.SAXException @@ -2602,9 +2594,9 @@ public void startEntity(String name) throws org.xml.sax.SAXException /** * For the enclosing elements starting tag write out - * out any attributes followed by ">" + * out any attributes followed by the > character. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if underlying writer encounters error */ protected void closeStartTag() throws SAXException { @@ -2841,10 +2833,11 @@ public void setCdataSectionElements(Vector URI_and_localNames) * Makes sure that the namespace URI for the given qualified attribute name * is declared. * @param ns the namespace URI + * @param localName the local name * @param rawName the qualified name * @return returns null if no action is taken, otherwise it returns the * prefix used in declaring the namespace. - * @throws SAXException + * @throws SAXException if attempt to write declaration failed */ protected String ensureAttributesNamespaceIsDeclared( String ns, @@ -3542,9 +3535,9 @@ public void unparsedEntityDecl(String name, String pubID, String sysID, String n } /** - * A private helper method to output the - * @throws SAXException - * @throws IOException + * A private helper method to output the DTD + * @throws SAXException never (I think) + * @throws IOException if an error occurs while writing */ private void DTDprolog() throws SAXException, IOException { final java.io.Writer writer = m_writer; diff --git a/src/org/apache/xml/serializer/ToTextSAXHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ToTextSAXHandler.java similarity index 97% rename from src/org/apache/xml/serializer/ToTextSAXHandler.java rename to serializer/src/main/java/org/apache/xml/serializer/ToTextSAXHandler.java index 78c6ab08b..c203eb8ad 100644 --- a/src/org/apache/xml/serializer/ToTextSAXHandler.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ToTextSAXHandler.java @@ -69,9 +69,7 @@ public ToTextSAXHandler(ContentHandler hdlr, LexicalHandler lex, String encoding super(hdlr, lex, encoding); } - /** - * From XSLTC - */ + // This constructor supports XSLTC public ToTextSAXHandler(ContentHandler handler, String encoding) { super(handler,encoding); @@ -120,9 +118,9 @@ public Writer getWriter() } /** - * Does nothing because - * the indent attribute is ignored for text output. - * + * Does nothing + * @param n the indent attribute, ignored for text output. + * @throws SAXException never, but the method signature requires it. */ public void indent(int n) throws SAXException { diff --git a/src/org/apache/xml/serializer/ToTextStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToTextStream.java similarity index 98% rename from src/org/apache/xml/serializer/ToTextStream.java rename to serializer/src/main/java/org/apache/xml/serializer/ToTextStream.java index 312bc8b87..cf22d68a1 100644 --- a/src/org/apache/xml/serializer/ToTextStream.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ToTextStream.java @@ -57,8 +57,6 @@ public ToTextStream() * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ protected void startDocumentInternal() throws org.xml.sax.SAXException { @@ -80,8 +78,6 @@ protected void startDocumentInternal() throws org.xml.sax.SAXException * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ public void endDocument() throws org.xml.sax.SAXException { @@ -120,8 +116,6 @@ public void endDocument() throws org.xml.sax.SAXException * wrapping another exception. * @see #endElement * @see org.xml.sax.AttributeList - * - * @throws org.xml.sax.SAXException */ public void startElement( String namespaceURI, String localName, String name, Attributes atts) @@ -157,8 +151,6 @@ public void startElement( * empty string if qualified names are not available. * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ public void endElement(String namespaceURI, String localName, String name) throws org.xml.sax.SAXException @@ -264,8 +256,8 @@ public void charactersRaw(char ch[], int start, int length) * @param useLineSep true if the operating systems * end-of-line separator should be output rather than a new-line character. * - * @throws IOException - * @throws org.xml.sax.SAXException + * @throws IOException if the write fails + * @throws org.xml.sax.SAXException if processing fails in the handler layer */ void writeNormalizedChars( final char ch[], @@ -412,8 +404,6 @@ public void cdata(char ch[], int start, int length) * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. * @see #characters - * - * @throws org.xml.sax.SAXException */ public void ignorableWhitespace(char ch[], int start, int length) throws org.xml.sax.SAXException @@ -445,8 +435,6 @@ public void ignorableWhitespace(char ch[], int start, int length) * none was supplied. * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ public void processingInstruction(String target, String data) throws org.xml.sax.SAXException @@ -504,7 +492,7 @@ public void comment(char ch[], int start, int length) * * @param name non-null reference to the name of the entity. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if processing fails in the handler layer */ public void entityReference(String name) throws org.xml.sax.SAXException { diff --git a/src/org/apache/xml/serializer/ToUnknownStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToUnknownStream.java similarity index 99% rename from src/org/apache/xml/serializer/ToUnknownStream.java rename to serializer/src/main/java/org/apache/xml/serializer/ToUnknownStream.java index e7ed0e010..b4777772a 100644 --- a/src/org/apache/xml/serializer/ToUnknownStream.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ToUnknownStream.java @@ -37,9 +37,9 @@ /** - *This class wraps another SerializationHandler. The wrapped object will either + * This class wraps another SerializationHandler. The wrapped object will either * handler XML or HTML, which is not known until a little later when the first XML - * tag is seen. If the first tag is <html> then the wrapped object is an HTML + * tag is seen. If the first tag is <html> then the wrapped object is an HTML * handler, otherwise it is an XML handler. * * This class effectively caches the first few calls to it then passes them diff --git a/src/org/apache/xml/serializer/ToXMLSAXHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java similarity index 97% rename from src/org/apache/xml/serializer/ToXMLSAXHandler.java rename to serializer/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java index eb18c8a2f..a9b9cc4f5 100644 --- a/src/org/apache/xml/serializer/ToXMLSAXHandler.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java @@ -83,14 +83,17 @@ public Writer getWriter() /** * Do nothing for SAX. + * @param n Indentation in character-columns, ignored here + * @throws SAXException never, but inheritance requires it. */ public void indent(int n) throws SAXException { } - /** + /** @param node A DOM node (which this implementation will ignore) * @see DOMSerializer#serialize(Node) + * @throws IOException never, but inheritance requires it. */ public void serialize(Node node) throws IOException { @@ -217,12 +220,11 @@ protected void closeStartTag() throws SAXException * unlike the this.endCDATA() method (from the LexicalHandler) interface, * this "internal" method will send the endCDATA() call to the wrapped * handler. - * */ public void closeCDATA() throws SAXException { - // Output closing bracket - "]]>" + // Output CDATA closing bracket - "]]>" if (m_lexHandler != null && m_cdataTagOpen) { m_lexHandler.endCDATA(); } @@ -491,7 +493,7 @@ public ToXMLSAXHandler( /** * Start an element in the output document. This might be an XML element - * (<elem>data</elem> type) or a CDATA section. + * (<elem>data</elem> type) or a CDATA section. */ public void startElement( String elementNamespaceURI, @@ -570,9 +572,11 @@ public void namespaceAfterStartElement( } /** - * - * @see org.xml.sax.ContentHandler#processingInstruction(String, String) * Send a processing instruction to the output document + * @param target "name" of processing instruction + * @param data "value" of processing instruction + * @throws SAXException if underlying handler throws one + * @see org.xml.sax.ContentHandler#processingInstruction(String, String) */ public void processingInstruction(String target, String data) throws SAXException @@ -591,6 +595,8 @@ public void processingInstruction(String target, String data) /** * Undeclare the namespace that is currently pointed to by a given * prefix. Inform SAX handler if prefix was previously mapped. + * @param prefix Namespace prefix mapping to be removed + * @return true iff a mapping was present to be removed */ protected boolean popNamespace(String prefix) { diff --git a/src/org/apache/xml/serializer/ToXMLStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToXMLStream.java similarity index 97% rename from src/org/apache/xml/serializer/ToXMLStream.java rename to serializer/src/main/java/org/apache/xml/serializer/ToXMLStream.java index e1ca8447b..da444c348 100644 --- a/src/org/apache/xml/serializer/ToXMLStream.java +++ b/serializer/src/main/java/org/apache/xml/serializer/ToXMLStream.java @@ -102,8 +102,6 @@ public void CopyFrom(ToXMLStream xmlListener) * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ public void startDocumentInternal() throws org.xml.sax.SAXException { @@ -178,8 +176,6 @@ public void startDocumentInternal() throws org.xml.sax.SAXException * * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ public void endDocument() throws org.xml.sax.SAXException { @@ -212,7 +208,7 @@ public void endDocument() throws org.xml.sax.SAXException * The contents of the whitespace preserving section will be delivered * through the regular <tt>characters</tt> event. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException never (I think) but required by signature */ public void startPreserving() throws org.xml.sax.SAXException { @@ -228,7 +224,7 @@ public void startPreserving() throws org.xml.sax.SAXException * * @see #startPreserving * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException never (I think), but required by signature. */ public void endPreserving() throws org.xml.sax.SAXException { @@ -245,8 +241,6 @@ public void endPreserving() throws org.xml.sax.SAXException * none was supplied. * @throws org.xml.sax.SAXException Any SAX exception, possibly * wrapping another exception. - * - * @throws org.xml.sax.SAXException */ public void processingInstruction(String target, String data) throws org.xml.sax.SAXException @@ -339,7 +333,7 @@ else if (m_needToCallStartDocument) * * @param name The name of the entity. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException never (I think), but required by signature. */ public void entityReference(String name) throws org.xml.sax.SAXException { @@ -418,14 +412,14 @@ public void addUniqueAttribute(String name, String value, int flags) /** * Add an attribute to the current element. - * @param uri the URI associated with the element name + * @param uri the URI associated with the attribute's namespace prefix * @param localName local part of the attribute name * @param rawName prefix:localName - * @param type + * @param type the attribute type typically character data (CDATA) * @param value the value of the attribute * @param xslAttribute true if this attribute is from an xsl:attribute, * false if declared within the elements opening tag. - * @throws SAXException + * @throws org.xml.sax.SAXException never (I think), but required by signature. */ public void addAttribute( String uri, @@ -553,6 +547,9 @@ public void namespaceAfterStartElement( * From XSLTC * Declare a prefix to point to a namespace URI. Inform SAX handler * if this is a new prefix mapping. + * @param prefix to be bound to namespace URI + * @param uri namespace identifier string + * @return true if prefix successfully bound, false otherwise. */ protected boolean pushNamespace(String prefix, String uri) { diff --git a/src/org/apache/xml/serializer/TransformStateSetter.java b/serializer/src/main/java/org/apache/xml/serializer/TransformStateSetter.java similarity index 91% rename from src/org/apache/xml/serializer/TransformStateSetter.java rename to serializer/src/main/java/org/apache/xml/serializer/TransformStateSetter.java index 0375773be..2f8dc9491 100644 --- a/src/org/apache/xml/serializer/TransformStateSetter.java +++ b/serializer/src/main/java/org/apache/xml/serializer/TransformStateSetter.java @@ -25,7 +25,7 @@ import org.w3c.dom.Node; /** * This interface is meant to be used by a base interface to - * TransformState, but which as only the setters which have non Xalan + * TransformState, but which has only the setters which have non Xalan * specific types in their signature, so that there are no dependancies * of the serializer on Xalan. * @@ -49,7 +49,7 @@ public interface TransformStateSetter /** * Reset the state on the given transformer object. * - * @param transformer + * @param transformer The transformer to have its state reset */ void resetState(Transformer transformer); diff --git a/src/org/apache/xml/serializer/TreeWalker.java b/serializer/src/main/java/org/apache/xml/serializer/TreeWalker.java similarity index 96% rename from src/org/apache/xml/serializer/TreeWalker.java rename to serializer/src/main/java/org/apache/xml/serializer/TreeWalker.java index 756a5da4f..fd3e225f1 100644 --- a/src/org/apache/xml/serializer/TreeWalker.java +++ b/serializer/src/main/java/org/apache/xml/serializer/TreeWalker.java @@ -24,6 +24,7 @@ import org.apache.xml.serializer.utils.AttList; import org.apache.xml.serializer.utils.DOM2Helper; +import org.apache.xml.serializer.utils.WrappedRuntimeException; import org.w3c.dom.Comment; import org.w3c.dom.Element; import org.w3c.dom.EntityReference; @@ -33,6 +34,7 @@ import org.w3c.dom.Text; import org.xml.sax.ContentHandler; import org.xml.sax.Locator; +import org.xml.sax.SAXException; import org.xml.sax.ext.LexicalHandler; import org.xml.sax.helpers.LocatorImpl; @@ -84,6 +86,8 @@ public TreeWalker(ContentHandler ch) { * Constructor. * @param contentHandler The implemention of the * contentHandler operation (toXMLString, digest, ...) + * @param systemId to be set into the output document. If null we + * use a default (currently dummy.xsl) */ public TreeWalker(ContentHandler contentHandler, String systemId) { @@ -131,7 +135,7 @@ public TreeWalker(ContentHandler contentHandler, String systemId) * * @param pos Node in the tree where to start traversal * - * @throws TransformerException + * @throws SAXException if the ContentHandler objects to the request. */ public void traverse(Node pos) throws org.xml.sax.SAXException { @@ -187,7 +191,7 @@ public void traverse(Node pos) throws org.xml.sax.SAXException * @param pos Node in the tree where to start traversal * @param top Node in the tree where to end traversal * - * @throws TransformerException + * @throws SAXException if the ContentHandler objects to the request. */ public void traverse(Node pos, Node top) throws org.xml.sax.SAXException { @@ -232,6 +236,7 @@ public void traverse(Node pos, Node top) throws org.xml.sax.SAXException /** * Optimized dispatch of characters. + * @throws SAXException if the ContentHandler objects to the request. */ private final void dispatachChars(Node node) throws org.xml.sax.SAXException @@ -252,8 +257,7 @@ private final void dispatachChars(Node node) * * * @param node Node to process - * - * @throws org.xml.sax.SAXException + * @throws SAXException if the ContentHandler objects to the request. */ protected void startNode(Node node) throws org.xml.sax.SAXException { @@ -428,7 +432,6 @@ else if (colon > 0) { } else { - // warning("Can not output entity to a pure SAX ContentHandler"); } } @@ -443,7 +446,7 @@ else if (colon > 0) { * * @param node Node we just finished processing * - * @throws org.xml.sax.SAXException + * @throws SAXException if the ContentHandler objects to the request. */ protected void endNode(Node node) throws org.xml.sax.SAXException { diff --git a/serializer/src/main/java/org/apache/xml/serializer/Version.java b/serializer/src/main/java/org/apache/xml/serializer/Version.java new file mode 100644 index 000000000..a57bbd8d7 --- /dev/null +++ b/serializer/src/main/java/org/apache/xml/serializer/Version.java @@ -0,0 +1,217 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * $Id$ + */ +package org.apache.xml.serializer; + +import java.io.InputStream; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Administrative class to keep track of the version number of + * the Serializer release. + * <P>This class implements the upcoming standard of having + * org.apache.project-name.Version.getVersion() be a standard way + * to get version information.</P> + * @xsl.usage general + */ +public class Version { + private static final String VERSION_NUMBER_PATTERN = "^(\\d+)[.](\\d+)[.](D)?(\\d+)(-SNAPSHOT)?$"; + private static final String NO_VERSION = "0.0.0"; + + private static int majorVersionNum; + private static int releaseVersionNum; + private static int maintenanceVersionNum; + private static int developmentVersionNum; + + private static boolean snapshot; + + static { + parseVersionNumber(readVersionNumber()); + } + + static String readVersionNumber() { + try (InputStream fromResource = getPropertiesStream()) { + Properties properties = new Properties(); + if (fromResource != null) { + properties.load(fromResource); + return properties.getProperty("version", NO_VERSION); + } + } catch (Exception e) { + new RuntimeException("Cannot read properties file to extract Xalan version number information: ", e) + .printStackTrace(); + } + return NO_VERSION; + } + + static InputStream getPropertiesStream() { + // IMPLEMENTATION NOTE: Class.getResourceAsStream uses a *relative* path by + // default, in contrast to Classloader.getResourceAsStream, which uses an + // *absolute* one. This is not clearly documented in the JDK, only + // noticeable by the absence of the word "absolute" in + // Class.getResourceAsStream javadocs. For more details, see + // https://www.baeldung.com/java-class-vs-classloader-getresource. + // + // Because we expect the properties file to be in the same directory/package + // as this class, the relative path comes in handy and as a bonus is also + // relocation-friendly (think Maven Shade). + return Version.class.getResourceAsStream("version.properties"); + } + + static void parseVersionNumber(String version) { + resetVersionNumber(); + if (version == null) + version = NO_VERSION; + Matcher matcher = Pattern.compile(VERSION_NUMBER_PATTERN).matcher(version); + if (matcher.find()) { + majorVersionNum = Integer.parseInt(matcher.group(1)); + releaseVersionNum = Integer.parseInt(matcher.group(2)); + if (matcher.group(3) == null) { + maintenanceVersionNum = Integer.parseInt(matcher.group(4)); + } else { + developmentVersionNum = Integer.parseInt(matcher.group(4)); + } + snapshot = matcher.group(5) != null && !matcher.group(5).isEmpty(); + } else { + System.err.println( + "Cannot match Xalan version \"" + version + "\" " + + "against expected pattern \"" + VERSION_NUMBER_PATTERN + "\", " + + "resetting version number to "+ NO_VERSION + ); + resetVersionNumber(); + } + } + + private static void resetVersionNumber() { + majorVersionNum = releaseVersionNum = maintenanceVersionNum = developmentVersionNum = 0; + snapshot = false; + } + + /** + * Get the basic version string for the current Serializer release. + * Version String formatted like + * <CODE>"<B>Xalan Serializer</B> <B>Java</B> v.r[.dd| <B>D</B>nn]"</CODE>. + * + * @return String denoting our current version + */ + public static String getVersion() { + return getProduct()+" "+getImplementationLanguage()+" " + +getMajorVersionNum()+"."+getReleaseVersionNum()+"." + +( (getDevelopmentVersionNum() > 0) ? + ("D"+getDevelopmentVersionNum()) : (""+getMaintenanceVersionNum())) + +(isSnapshot() ? "-SNAPSHOT" :""); + } + + /** + * Print the processor version to the command line. + * + * @param argv command line arguments, unused. + */ + public static void main(String argv[]) { + System.out.println(getVersion()); + } + + /** + * Name of product: Xalan Serializer. + */ + public static String getProduct() { + return "Xalan Serializer"; + } + + /** + * Implementation Language: Java. + */ + public static String getImplementationLanguage() { + return "Java"; + } + + + /** + * Major version number. + * Version number. This changes only when there is a + * significant, externally apparent enhancement from + * the previous release. 'n' represents the n'th + * version. + * <p> + * Clients should carefully consider the implications + * of new versions as external interfaces and behaviour + * may have changed. + */ + public static int getMajorVersionNum() { + return majorVersionNum; + } + + /** + * Release Number. + * Release number. This changes when: + * - a new set of functionality is to be added, eg, + * implementation of a new W3C specification. + * - API or behaviour change. + * - its designated as a reference release. + */ + public static int getReleaseVersionNum() { + return releaseVersionNum; + } + + /** + * Maintenance Drop Number. + * Optional identifier used to designate maintenance + * drop applied to a specific release and contains + * fixes for defects reported. It maintains compatibility + * with the release and contains no API changes. + * When missing, it designates the final and complete + * development drop for a release. + */ + public static int getMaintenanceVersionNum() { + return maintenanceVersionNum; + } + + /** + * Development Drop Number. + * Optional identifier designates development drop of + * a specific release. D01 is the first development drop + * of a new release. + * <p> + * Development drops are works in progress towards a + * compeleted, final release. A specific development drop + * may not completely implement all aspects of a new + * feature, which may take several development drops to + * complete. At the point of the final drop for the + * release, the D suffix will be omitted. + * <p> + * Each 'D' drops can contain functional enhancements as + * well as defect fixes. 'D' drops may not be as stable as + * the final releases. + */ + public static int getDevelopmentVersionNum() { + return developmentVersionNum; + } + + /** + * Snapshot flag. + * Specifies whether the version number has a "-SNAPSHOT" suffix, + * which by Maven/Gradle conventions designates a + * development version. + */ + public static boolean isSnapshot() { + return snapshot; + } +} diff --git a/src/org/apache/xml/serializer/WriterChain.java b/serializer/src/main/java/org/apache/xml/serializer/WriterChain.java similarity index 100% rename from src/org/apache/xml/serializer/WriterChain.java rename to serializer/src/main/java/org/apache/xml/serializer/WriterChain.java diff --git a/src/org/apache/xml/serializer/WriterToASCI.java b/serializer/src/main/java/org/apache/xml/serializer/WriterToASCI.java similarity index 100% rename from src/org/apache/xml/serializer/WriterToASCI.java rename to serializer/src/main/java/org/apache/xml/serializer/WriterToASCI.java diff --git a/src/org/apache/xml/serializer/WriterToUTF8Buffered.java b/serializer/src/main/java/org/apache/xml/serializer/WriterToUTF8Buffered.java similarity index 100% rename from src/org/apache/xml/serializer/WriterToUTF8Buffered.java rename to serializer/src/main/java/org/apache/xml/serializer/WriterToUTF8Buffered.java diff --git a/src/org/apache/xml/serializer/XSLOutputAttributes.java b/serializer/src/main/java/org/apache/xml/serializer/XSLOutputAttributes.java similarity index 97% rename from src/org/apache/xml/serializer/XSLOutputAttributes.java rename to serializer/src/main/java/org/apache/xml/serializer/XSLOutputAttributes.java index f5676f783..a285b154e 100644 --- a/src/org/apache/xml/serializer/XSLOutputAttributes.java +++ b/serializer/src/main/java/org/apache/xml/serializer/XSLOutputAttributes.java @@ -28,7 +28,7 @@ * * In an XSLT stylesheet these attributes appear for example as: * <pre> - * <xsl:output method="xml" omit-xml-declaration="no" indent="yes"/> + * <xsl:output method="xml" omit-xml-declaration="no" indent="yes"/> * </pre> * The xsl:output attributes covered in this interface are: * <pre> @@ -215,7 +215,7 @@ interface XSLOutputAttributes * <li> "{http://xml.apache.org/xalan}indent-amount" * <li> "{http://xml.apache.org/xalan}line-separator" * </ul> - * @val The non-default value of the parameter + * @param val The non-default value of the parameter */ public void setOutputProperty(String name, String val); @@ -230,7 +230,7 @@ interface XSLOutputAttributes * <li> "{http://xml.apache.org/xalan}indent-amount" * <li> "{http://xml.apache.org/xalan}line-separator" * </ul> - * @val The default value of the parameter + * @param val The default value of the parameter */ public void setOutputPropertyDefault(String name, String val); } diff --git a/src/org/apache/xml/serializer/dom3/DOM3SerializerImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3SerializerImpl.java similarity index 97% rename from src/org/apache/xml/serializer/dom3/DOM3SerializerImpl.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3SerializerImpl.java index 3f765d9e6..e382ba5d7 100644 --- a/src/org/apache/xml/serializer/dom3/DOM3SerializerImpl.java +++ b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3SerializerImpl.java @@ -87,7 +87,7 @@ public LSSerializerFilter getNodeFilter() { } /** - * Gets the end-of-line sequence of characters to be used during serialization. + * @return char[] containing the end-of-line sequence of characters to be used during serialization. */ public char[] getNewLine() { return (fNewLine != null) ? fNewLine.toCharArray() : null; diff --git a/src/org/apache/xml/serializer/dom3/DOM3TreeWalker.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java similarity index 100% rename from src/org/apache/xml/serializer/dom3/DOM3TreeWalker.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java diff --git a/src/org/apache/xml/serializer/dom3/DOMConstants.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMConstants.java similarity index 100% rename from src/org/apache/xml/serializer/dom3/DOMConstants.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/DOMConstants.java diff --git a/src/org/apache/xml/serializer/dom3/DOMErrorHandlerImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorHandlerImpl.java similarity index 100% rename from src/org/apache/xml/serializer/dom3/DOMErrorHandlerImpl.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorHandlerImpl.java diff --git a/src/org/apache/xml/serializer/dom3/DOMErrorImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorImpl.java similarity index 100% rename from src/org/apache/xml/serializer/dom3/DOMErrorImpl.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorImpl.java diff --git a/src/org/apache/xml/serializer/dom3/DOMLocatorImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMLocatorImpl.java similarity index 100% rename from src/org/apache/xml/serializer/dom3/DOMLocatorImpl.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/DOMLocatorImpl.java diff --git a/src/org/apache/xml/serializer/dom3/DOMOutputImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMOutputImpl.java similarity index 100% rename from src/org/apache/xml/serializer/dom3/DOMOutputImpl.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/DOMOutputImpl.java diff --git a/src/org/apache/xml/serializer/dom3/DOMStringListImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMStringListImpl.java similarity index 100% rename from src/org/apache/xml/serializer/dom3/DOMStringListImpl.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/DOMStringListImpl.java diff --git a/src/org/apache/xml/serializer/dom3/LSSerializerImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java similarity index 99% rename from src/org/apache/xml/serializer/dom3/LSSerializerImpl.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java index c2ce783e6..7ce20c3b6 100644 --- a/src/org/apache/xml/serializer/dom3/LSSerializerImpl.java +++ b/serializer/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java @@ -1363,9 +1363,7 @@ public boolean writeToURI(Node nodeArg, String uri) throws LSException { * * @param nodeArg The Node to serialize * @return A String containing the version pseudo-attribute of the XMLDecl. - * @throws Throwable if the DOM implementation does not implement Document.getXmlVersion() */ - //protected String getXMLVersion(Node nodeArg) throws Throwable { protected String getXMLVersion(Node nodeArg) { Document doc = null; @@ -1393,10 +1391,10 @@ protected String getXMLVersion(Node nodeArg) { /** * Determines the XML Encoding of the Document Node to serialize. If the Document Node * is not a DOM Level 3 Node, then the default encoding "UTF-8" is returned. + * NOTE: May throw an unspecified Throwable if the DOM implementation does not implement Document.getXmlEncoding() * * @param nodeArg The Node to serialize * @return A String containing the encoding pseudo-attribute of the XMLDecl. - * @throws Throwable if the DOM implementation does not implement Document.getXmlEncoding() */ protected String getXMLEncoding(Node nodeArg) { Document doc = null; diff --git a/src/org/apache/xml/serializer/dom3/NamespaceSupport.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/NamespaceSupport.java similarity index 79% rename from src/org/apache/xml/serializer/dom3/NamespaceSupport.java rename to serializer/src/main/java/org/apache/xml/serializer/dom3/NamespaceSupport.java index 445f3eb9d..a7eb6bffa 100644 --- a/src/org/apache/xml/serializer/dom3/NamespaceSupport.java +++ b/serializer/src/main/java/org/apache/xml/serializer/dom3/NamespaceSupport.java @@ -150,6 +150,9 @@ public void popContext() { } // popContext() /** + * @param prefix String containing the QName prefix to be bound + * @param uri String containing the namespace URI to bind to prefix + * @return false if binding the prefix is forbidden(xml: and xmlns:), otherwise true * @see org.apache.xerces.xni.NamespaceContext#declarePrefix(String, String) */ public boolean declarePrefix(String prefix, String uri) { @@ -189,6 +192,9 @@ public boolean declarePrefix(String prefix, String uri) { } // declarePrefix(String,String):boolean /** + * @param prefix String prefix to be looked up in this context + * @return String containing the Namespace URI bound to that prefix, + * or null if unbound * @see org.apache.xerces.xni.NamespaceContext#getURI(String) */ public String getURI(String prefix) { @@ -207,9 +213,13 @@ public String getURI(String prefix) { } // getURI(String):String - /** - * @see org.apache.xerces.xni.NamespaceContext#getPrefix(String) - */ + /** + * @param uri String containing the Namespace URI to be looked up + * @return String containing a prefix bound to that namespace + * or null if unbound. CAVEAT: There may be multiple prefixes bound + * to the same namespace; this returns the first found. + * @see org.apache.xerces.xni.NamespaceContext#getPrefix(String) + */ public String getPrefix(String uri) { // find uri in current context @@ -228,24 +238,28 @@ public String getPrefix(String uri) { } // getPrefix(String):String - /** - * @see org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixCount() - */ + /** @return number of prefixes currently bound + * @see org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixCount() + */ public int getDeclaredPrefixCount() { return (fNamespaceSize - fContext[fCurrentContext]) / 2; } // getDeclaredPrefixCount():int - /** - * @see org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixAt(int) - */ + /** + * @param index Select prefix from all currently bound + * @return The prefix in that slot of our table. Equivalent to + * indexing into enumerator returned by #getAllPrefixes() + * @see org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixAt(int) + */ public String getDeclaredPrefixAt(int index) { return fNamespace[fContext[fCurrentContext] + index * 2]; } // getDeclaredPrefixAt(int):String - - /** - * @see org.apache.xerces.xni.NamespaceContext#getAllPrefixes() - */ - public Enumeration getAllPrefixes() { + + /** + * @return an Enumeration of the namespace prefixes currently bound + * @see org.apache.xerces.xni.NamespaceContext#getAllPrefixes() + */ + public Enumeration getAllPrefixes() { int count = 0; if (fPrefixes.length < (fNamespace.length/2)) { // resize prefix array @@ -269,36 +283,43 @@ public Enumeration getAllPrefixes() { } return new Prefixes(fPrefixes, count); } - + + // I'm a bit confused by Prefixes.prefixes vs. NamespaceSupper.fPrefixes. + // Need to review the logic and document that. -- jkesselm GONK protected final class Prefixes implements Enumeration { private String[] prefixes; private int counter = 0; private int size = 0; - /** - * Constructor for Prefixes. - */ - public Prefixes(String [] prefixes, int size) { - this.prefixes = prefixes; + /** + * Constructor for Prefixes enumerator + * @param prefixes String[] Set of prefixes. + * @param size integer Number of preloaded prefixes + */ + public Prefixes(String [] prefixes, int size) { + this.prefixes = prefixes; this.size = size; - } - + } + /** - * @see java.util.Enumeration#hasMoreElements() - */ - public boolean hasMoreElements() { - return (counter< size); - } - - /** - * @see java.util.Enumeration#nextElement() - */ - public Object nextElement() { + * @return true if this object, as an Enumeration, can return + * more bindings + * @see java.util.Enumeration#hasMoreElements() + */ + public boolean hasMoreElements() { + return (counter< size); + } + + /** + * @return the next binding's prefix, as an Enumeration result + * @see java.util.Enumeration#nextElement() + */ + public Object nextElement() { if (counter< size){ return fPrefixes[counter++]; } - throw new NoSuchElementException("Illegal access to Namespace prefixes enumeration."); - } + throw new NoSuchElementException("Illegal access to Namespace prefixes enumeration."); + } public String toString(){ StringBuffer buf = new StringBuffer(); @@ -310,6 +331,6 @@ public String toString(){ return buf.toString(); } -} - + } + } // class NamespaceSupport diff --git a/src/org/apache/xml/serializer/package.html b/serializer/src/main/java/org/apache/xml/serializer/package.html similarity index 100% rename from src/org/apache/xml/serializer/package.html rename to serializer/src/main/java/org/apache/xml/serializer/package.html diff --git a/src/org/apache/xml/serializer/utils/AttList.java b/serializer/src/main/java/org/apache/xml/serializer/utils/AttList.java similarity index 100% rename from src/org/apache/xml/serializer/utils/AttList.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/AttList.java diff --git a/src/org/apache/xml/serializer/utils/BoolStack.java b/serializer/src/main/java/org/apache/xml/serializer/utils/BoolStack.java similarity index 99% rename from src/org/apache/xml/serializer/utils/BoolStack.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/BoolStack.java index 68cea4229..e1f49d6bc 100644 --- a/src/org/apache/xml/serializer/utils/BoolStack.java +++ b/serializer/src/main/java/org/apache/xml/serializer/utils/BoolStack.java @@ -19,7 +19,7 @@ * $Id$ */ package org.apache.xml.serializer.utils; - +import java.util.EmptyStackException; /** * Simple stack for boolean values. diff --git a/src/org/apache/xml/serializer/utils/DOM2Helper.java b/serializer/src/main/java/org/apache/xml/serializer/utils/DOM2Helper.java similarity index 100% rename from src/org/apache/xml/serializer/utils/DOM2Helper.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/DOM2Helper.java diff --git a/src/org/apache/xml/serializer/utils/Messages.java b/serializer/src/main/java/org/apache/xml/serializer/utils/Messages.java similarity index 100% rename from src/org/apache/xml/serializer/utils/Messages.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/Messages.java diff --git a/src/org/apache/xml/serializer/utils/MsgKey.java b/serializer/src/main/java/org/apache/xml/serializer/utils/MsgKey.java similarity index 100% rename from src/org/apache/xml/serializer/utils/MsgKey.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/MsgKey.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_ca.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ca.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_ca.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ca.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_cs.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_cs.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_cs.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_cs.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_de.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_de.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_de.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_de.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_en.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_en.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_en.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_en.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_es.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_es.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_es.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_es.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_fr.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_fr.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_fr.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_fr.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_hu.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_hu.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_hu.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_hu.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_it.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_it.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_it.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_it.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_ja.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ja.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_ja.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ja.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_ko.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ko.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_ko.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ko.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_pl.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pl.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_pl.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pl.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_pt_BR.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pt_BR.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_pt_BR.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pt_BR.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_ru.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ru.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_ru.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ru.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_sk.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sk.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_sk.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sk.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_sl.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sl.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_sl.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sl.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_sv.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sv.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_sv.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sv.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_tr.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_tr.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_tr.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_tr.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_zh.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_zh.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_zh_CN.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_CN.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_zh_CN.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_CN.java diff --git a/src/org/apache/xml/serializer/utils/SerializerMessages_zh_TW.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_TW.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SerializerMessages_zh_TW.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_TW.java diff --git a/src/org/apache/xml/serializer/utils/StringToIntTable.java b/serializer/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java similarity index 100% rename from src/org/apache/xml/serializer/utils/StringToIntTable.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java diff --git a/src/org/apache/xml/serializer/utils/SystemIDResolver.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SystemIDResolver.java similarity index 100% rename from src/org/apache/xml/serializer/utils/SystemIDResolver.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/SystemIDResolver.java diff --git a/src/org/apache/xml/serializer/utils/URI.java b/serializer/src/main/java/org/apache/xml/serializer/utils/URI.java similarity index 100% rename from src/org/apache/xml/serializer/utils/URI.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/URI.java diff --git a/src/org/apache/xml/serializer/utils/Utils.java b/serializer/src/main/java/org/apache/xml/serializer/utils/Utils.java similarity index 100% rename from src/org/apache/xml/serializer/utils/Utils.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/Utils.java diff --git a/src/org/apache/xml/serializer/utils/WrappedRuntimeException.java b/serializer/src/main/java/org/apache/xml/serializer/utils/WrappedRuntimeException.java similarity index 100% rename from src/org/apache/xml/serializer/utils/WrappedRuntimeException.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/WrappedRuntimeException.java diff --git a/src/org/apache/xml/serializer/utils/XML11Char.java b/serializer/src/main/java/org/apache/xml/serializer/utils/XML11Char.java similarity index 95% rename from src/org/apache/xml/serializer/utils/XML11Char.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/XML11Char.java index b32249ed5..f6756cc15 100644 --- a/src/org/apache/xml/serializer/utils/XML11Char.java +++ b/serializer/src/main/java/org/apache/xml/serializer/utils/XML11Char.java @@ -152,7 +152,7 @@ public class XML11Char { // /** - * Returns true if the specified character is a space character + * @return true if the specified character is a space character * as amdended in the XML 1.1 specification. * * @param c The character to check. @@ -162,7 +162,7 @@ public static boolean isXML11Space(int c) { } // isXML11Space(int):boolean /** - * Returns true if the specified character is valid. This method + * @return true if the specified character is valid. This method * also checks the surrogate character range from 0x10000 to 0x10FFFF. * <p> * If the program chooses to apply the mask directly to the @@ -177,7 +177,7 @@ public static boolean isXML11Valid(int c) { } // isXML11Valid(int):boolean /** - * Returns true if the specified character is invalid. + * @return true if the specified character is invalid. * * @param c The character to check. */ @@ -186,7 +186,7 @@ public static boolean isXML11Invalid(int c) { } // isXML11Invalid(int):boolean /** - * Returns true if the specified character is valid and permitted outside + * @return true if the specified character is valid and permitted outside * of a character reference. * That is, this method will return false for the same set as * isXML11Valid, except it also reports false for "control characters". @@ -199,7 +199,7 @@ public static boolean isXML11ValidLiteral(int c) { } // isXML11ValidLiteral(int):boolean /** - * Returns true if the specified character can be considered + * @return true if the specified character can be considered * content in an external parsed entity. * * @param c The character to check. @@ -210,7 +210,7 @@ public static boolean isXML11Content(int c) { } // isXML11Content(int):boolean /** - * Returns true if the specified character can be considered + * @return true if the specified character can be considered * content in an internal parsed entity. * * @param c The character to check. @@ -221,7 +221,7 @@ public static boolean isXML11InternalEntityContent(int c) { } // isXML11InternalEntityContent(int):boolean /** - * Returns true if the specified character is a valid name start + * @return true if the specified character is a valid name start * character as defined by production [4] in the XML 1.1 * specification. * @@ -233,7 +233,7 @@ public static boolean isXML11NameStart(int c) { } // isXML11NameStart(int):boolean /** - * Returns true if the specified character is a valid name + * @return true if the specified character is a valid name * character as defined by production [4a] in the XML 1.1 * specification. * @@ -245,7 +245,7 @@ public static boolean isXML11Name(int c) { } // isXML11Name(int):boolean /** - * Returns true if the specified character is a valid NCName start + * @return true if the specified character is a valid NCName start * character as defined by production [4] in Namespaces in XML * 1.1 recommendation. * @@ -257,7 +257,7 @@ public static boolean isXML11NCNameStart(int c) { } // isXML11NCNameStart(int):boolean /** - * Returns true if the specified character is a valid NCName + * @return true if the specified character is a valid NCName * character as defined by production [5] in Namespaces in XML * 1.1 recommendation. * @@ -269,7 +269,7 @@ public static boolean isXML11NCName(int c) { } // isXML11NCName(int):boolean /** - * Returns whether the given character is a valid + * @return true if the given character is a valid * high surrogate for a name character. This includes * all high surrogates for characters [0x10000-0xEFFFF]. * In other words everything excluding planes 15 and 16. diff --git a/src/org/apache/xml/serializer/utils/XMLChar.java b/serializer/src/main/java/org/apache/xml/serializer/utils/XMLChar.java similarity index 97% rename from src/org/apache/xml/serializer/utils/XMLChar.java rename to serializer/src/main/java/org/apache/xml/serializer/utils/XMLChar.java index a0d8c8523..f38e8f096 100644 --- a/src/org/apache/xml/serializer/utils/XMLChar.java +++ b/serializer/src/main/java/org/apache/xml/serializer/utils/XMLChar.java @@ -722,7 +722,7 @@ public class XMLChar { // /** - * Returns true if the specified character is a supplemental character. + * @return true if the specified character is a supplemental character. * * @param c The character to check. */ @@ -731,7 +731,7 @@ public static boolean isSupplemental(int c) { } /** - * Returns true the supplemental character corresponding to the given + * @return true the supplemental character corresponding to the given * surrogates. * * @param h The high surrogate. @@ -742,7 +742,7 @@ public static int supplemental(char h, char l) { } /** - * Returns the high surrogate of a supplemental character + * @return the high surrogate of a supplemental character * * @param c The supplemental character to "split". */ @@ -751,7 +751,7 @@ public static char highSurrogate(int c) { } /** - * Returns the low surrogate of a supplemental character + * @return the low surrogate of a supplemental character * * @param c The supplemental character to "split". */ @@ -760,7 +760,7 @@ public static char lowSurrogate(int c) { } /** - * Returns whether the given character is a high surrogate + * @return whether the given character is a high surrogate * * @param c The character to check. */ @@ -769,7 +769,7 @@ public static boolean isHighSurrogate(int c) { } /** - * Returns whether the given character is a low surrogate + * @return whether the given character is a low surrogate * * @param c The character to check. */ @@ -779,7 +779,7 @@ public static boolean isLowSurrogate(int c) { /** - * Returns true if the specified character is valid. This method + * @return true if the specified character is valid. This method * also checks the surrogate character range from 0x10000 to 0x10FFFF. * <p> * If the program chooses to apply the mask directly to the @@ -794,7 +794,7 @@ public static boolean isValid(int c) { } // isValid(int):boolean /** - * Returns true if the specified character is invalid. + * @return true if the specified character is invalid. * * @param c The character to check. */ @@ -803,7 +803,7 @@ public static boolean isInvalid(int c) { } // isInvalid(int):boolean /** - * Returns true if the specified character can be considered content. + * @return true if the specified character can be considered content. * * @param c The character to check. */ @@ -813,7 +813,7 @@ public static boolean isContent(int c) { } // isContent(int):boolean /** - * Returns true if the specified character can be considered markup. + * @return true if the specified character can be considered markup. * Markup characters include '<', '&', and '%'. * * @param c The character to check. @@ -823,7 +823,7 @@ public static boolean isMarkup(int c) { } // isMarkup(int):boolean /** - * Returns true if the specified character is a space character + * @return true if the specified character is a space character * as defined by production [3] in the XML 1.0 specification. * * @param c The character to check. @@ -833,7 +833,7 @@ public static boolean isSpace(int c) { } // isSpace(int):boolean /** - * Returns true if the specified character is a valid name start + * @return true if the specified character is a valid name start * character as defined by production [5] in the XML 1.0 * specification. * @@ -844,7 +844,7 @@ public static boolean isNameStart(int c) { } // isNameStart(int):boolean /** - * Returns true if the specified character is a valid name + * @return true if the specified character is a valid name * character as defined by production [4] in the XML 1.0 * specification. * @@ -855,7 +855,7 @@ public static boolean isName(int c) { } // isName(int):boolean /** - * Returns true if the specified character is a valid NCName start + * @return true if the specified character is a valid NCName start * character as defined by production [4] in Namespaces in XML * recommendation. * @@ -866,7 +866,7 @@ public static boolean isNCNameStart(int c) { } // isNCNameStart(int):boolean /** - * Returns true if the specified character is a valid NCName + * @return true if the specified character is a valid NCName * character as defined by production [5] in Namespaces in XML * recommendation. * @@ -877,7 +877,7 @@ public static boolean isNCName(int c) { } // isNCName(int):boolean /** - * Returns true if the specified character is a valid Pubid + * @return true if the specified character is a valid Pubid * character as defined by production [13] in the XML 1.0 * specification. * @@ -968,7 +968,7 @@ public static boolean isValidNmtoken(String nmtoken) { // encodings /** - * Returns true if the encoding name is a valid IANA encoding. + * @return true if the encoding name is a valid IANA encoding. * This method does not verify that there is a decoder available * for this encoding, only that the characters are valid for an * IANA encoding name. @@ -997,7 +997,7 @@ public static boolean isValidIANAEncoding(String ianaEncoding) { } // isValidIANAEncoding(String):boolean /** - * Returns true if the encoding name is a valid Java encoding. + * @return true if the encoding name is a valid Java encoding. * This method does not verify that there is a decoder available * for this encoding, only that the characters are valid for an * Java encoding name. diff --git a/src/org/apache/xml/serializer/Encodings.properties b/serializer/src/main/resources/org/apache/xml/serializer/Encodings.properties similarity index 100% rename from src/org/apache/xml/serializer/Encodings.properties rename to serializer/src/main/resources/org/apache/xml/serializer/Encodings.properties diff --git a/src/org/apache/xml/serializer/HTMLEntities.properties b/serializer/src/main/resources/org/apache/xml/serializer/HTMLEntities.properties similarity index 100% rename from src/org/apache/xml/serializer/HTMLEntities.properties rename to serializer/src/main/resources/org/apache/xml/serializer/HTMLEntities.properties diff --git a/src/org/apache/xml/serializer/XMLEntities.properties b/serializer/src/main/resources/org/apache/xml/serializer/XMLEntities.properties similarity index 100% rename from src/org/apache/xml/serializer/XMLEntities.properties rename to serializer/src/main/resources/org/apache/xml/serializer/XMLEntities.properties diff --git a/src/org/apache/xml/serializer/output_html.properties b/serializer/src/main/resources/org/apache/xml/serializer/output_html.properties similarity index 100% rename from src/org/apache/xml/serializer/output_html.properties rename to serializer/src/main/resources/org/apache/xml/serializer/output_html.properties diff --git a/src/org/apache/xml/serializer/output_text.properties b/serializer/src/main/resources/org/apache/xml/serializer/output_text.properties similarity index 100% rename from src/org/apache/xml/serializer/output_text.properties rename to serializer/src/main/resources/org/apache/xml/serializer/output_text.properties diff --git a/src/org/apache/xml/serializer/output_unknown.properties b/serializer/src/main/resources/org/apache/xml/serializer/output_unknown.properties similarity index 100% rename from src/org/apache/xml/serializer/output_unknown.properties rename to serializer/src/main/resources/org/apache/xml/serializer/output_unknown.properties diff --git a/src/org/apache/xml/serializer/output_xml.properties b/serializer/src/main/resources/org/apache/xml/serializer/output_xml.properties similarity index 100% rename from src/org/apache/xml/serializer/output_xml.properties rename to serializer/src/main/resources/org/apache/xml/serializer/output_xml.properties diff --git a/serializer/src/main/resources/org/apache/xml/serializer/package.html b/serializer/src/main/resources/org/apache/xml/serializer/package.html new file mode 100644 index 000000000..d4dffd139 --- /dev/null +++ b/serializer/src/main/resources/org/apache/xml/serializer/package.html @@ -0,0 +1,43 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan Serializer Package.</title> + <body> + <p>Processes SAX events into streams.</p> + + <p>The {@link org.apache.xml.serializer.SerializerFactory} is used to + create a {@link org.apache.xml.serializer.Serializer} from a set of + output properties (see {@link javax.xml.transform.OutputKeys}).</p> + <p>{@link org.apache.xml.serializer.ToStream} acts as the main + baseclass for the Xalan serializer implementations. + {@link org.apache.xml.serializer.ToHTMLStream} derives from this + to implement HTML serialization. + {@link org.apache.xml.serializer.ToTextStream} + implements plain text serialization. + {@link org.apache.xml.serializer.ToXMLStream} + implements XML serialization. + </p> + <p>XML mapping from characters to entity references is defined in + XMLEntities.res. HTML entity reference mapping is defined in HTMLEntities.res. + </p> + <p>Encoding information is defined in {@link org.apache.xml.serializer.Encodings}.</p> + </body> +</html> + + diff --git a/serializer/src/main/resources/org/apache/xml/serializer/version.properties b/serializer/src/main/resources/org/apache/xml/serializer/version.properties new file mode 100644 index 000000000..defbd4820 --- /dev/null +++ b/serializer/src/main/resources/org/apache/xml/serializer/version.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/serializer/src/test/java/org/apache/xml/serializer/VersionTest.java b/serializer/src/test/java/org/apache/xml/serializer/VersionTest.java new file mode 100644 index 000000000..486af2b60 --- /dev/null +++ b/serializer/src/test/java/org/apache/xml/serializer/VersionTest.java @@ -0,0 +1,132 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.xml.serializer; + +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.parallel.Isolated; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.MockedStatic; +import org.mockito.Mockito; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +@Isolated("redirecting System.err is not thread-safe") +public class VersionTest { + private static final PrintStream originalPrintStream = System.err; + private static final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + private static final PrintStream mockPrintStream = new PrintStream(buffer, true); + + @BeforeAll + public static void beforeAll() { + System.setErr(mockPrintStream); + } + + @AfterAll + public static void afterAll() { + System.setErr(originalPrintStream); + } + + @BeforeEach + public void beforeEach() { + buffer.reset(); + } + + @ParameterizedTest(name = "{0} -> {2}") + @MethodSource("testReadPropertiesArgs") + public void testReadProperties(String ignoredName, String properties, String version) { + try (MockedStatic<Version> versionMock = Mockito.mockStatic(Version.class, Mockito.CALLS_REAL_METHODS)) { + versionMock + .when(Version::getPropertiesStream) + .thenReturn(new ByteArrayInputStream(properties.getBytes())); + assertEquals(version, Version.readVersionNumber()); + } + } + + private static Stream<Arguments> testReadPropertiesArgs() { + return Stream.of( + Arguments.of("single line without line feed", "version=1.2.3", "1.2.3"), + Arguments.of("single line with line feed", "version=4.5.D6-SNAPSHOT\n", "4.5.D6-SNAPSHOT"), + Arguments.of("multiple lines with version number", "foo=bar\nversion=7.8.9\nbaz=zot\n", "7.8.9"), + Arguments.of("single line without version number", "verXion=7.8.9\n", "0.0.0"), + Arguments.of("multiple lines without version number", "foo=bar\nverXion=7.8.9\nbaz=zot\n", "0.0.0") + ); + } + + @Test + public void testCannotReadProperties() { + try (MockedStatic<Version> versionMock = Mockito.mockStatic(Version.class, Mockito.CALLS_REAL_METHODS)) { + versionMock + .when(Version::getPropertiesStream) + .thenThrow(NullPointerException.class); + assertEquals("0.0.0", Version.readVersionNumber()); + assertTrue(buffer.toString().contains("RuntimeException: Cannot read properties file")); + } + } + + @ParameterizedTest(name = "{0} -> {1}") + @MethodSource("testParseVersionNumberArgs") + public void testParseVersionNumber( + String inputVersion, boolean matchSuccessful, String parsedVersion, + int major, int release, int maintenance, int development, boolean snapshot + ) { + Version.parseVersionNumber(inputVersion); + assertEquals(parsedVersion, Version.getVersion()); + assertEquals(major, Version.getMajorVersionNum()); + assertEquals(release, Version.getReleaseVersionNum()); + assertEquals(maintenance, Version.getMaintenanceVersionNum()); + assertEquals(development, Version.getDevelopmentVersionNum()); + assertEquals(snapshot, Version.isSnapshot()); + boolean cannotMatchWarningFound = buffer.toString().contains("Cannot match Xalan version"); + assertEquals(matchSuccessful, !cannotMatchWarningFound); + } + + private static Stream<Arguments> testParseVersionNumberArgs() { + return Stream.of( + // Pattern match + Arguments.of("1.2.3", true, "Xalan Serializer Java 1.2.3", 1, 2, 3, 0, false), + Arguments.of("1.2.D3", true, "Xalan Serializer Java 1.2.D3", 1, 2, 0, 3, false), + Arguments.of("1.2.3-SNAPSHOT", true, "Xalan Serializer Java 1.2.3-SNAPSHOT", 1, 2, 3, 0, true), + Arguments.of("1.2.D03-SNAPSHOT", true, "Xalan Serializer Java 1.2.D3-SNAPSHOT", 1, 2, 0, 3, true), + Arguments.of("0.0.0", true, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false), + // No pattern match + Arguments.of("", false, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("-1.2.3", false, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("-1.2.3", false, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1. 2.3", false, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.D3x", false, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.3-XSNAPSHOT", false, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.D3-snapshot", false, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.D3-SNAPSHOT-1", false, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false), + // Input version null -> cannot happen in class under test, but we know + // what would happen if it did + Arguments.of(null, true, "Xalan Serializer Java 0.0.0", 0, 0, 0, 0, false) + ); + } + +} diff --git a/src/org/apache/xalan/Version.src b/src/org/apache/xalan/Version.src deleted file mode 100644 index ae942c784..000000000 --- a/src/org/apache/xalan/Version.src +++ /dev/null @@ -1,153 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * $Id$ - */ -package org.apache.xalan; - -/** - * Administrative class to keep track of the version number of - * the Xalan release. - * <P>This class implements the upcoming standard of having - * org.apache.project-name.Version.getVersion() be a standard way - * to get version information. This class will replace the older - * org.apache.xalan.processor.Version class.</P> - * <P>See also: org/apache/xalan/res/XSLTInfo.properties for - * information about the version of the XSLT spec we support.</P> - * @xsl.usage general - */ -public class Version -{ - - /** - * Get the basic version string for the current Xalan release. - * Version String formatted like - * <CODE>"<B>Xalan</B> <B>Java</B> v.r[.dd| <B>D</B>nn]"</CODE>. - * - * Futurework: have this read version info from jar manifest. - * - * @return String denoting our current version - */ - public static String getVersion() - { - return getProduct()+" "+getImplementationLanguage()+" " - +getMajorVersionNum()+"."+getReleaseVersionNum()+"." - +( (getDevelopmentVersionNum() > 0) ? - ("D"+getDevelopmentVersionNum()) : (""+getMaintenanceVersionNum())); - } - - /** - * Print the processor version to the command line. - * - * @param argv command line arguments, unused. - */ - public static void main(String argv[]) - { - System.out.println(getVersion()); - } - - /** - * Name of product: Xalan. - */ - public static String getProduct() - { - return "Xalan"; - } - - /** - * Implementation Language: Java. - */ - public static String getImplementationLanguage() - { - return "Java"; - } - - - /** - * Major version number. - * Version number. This changes only when there is a - * significant, externally apparent enhancement from - * the previous release. 'n' represents the n'th - * version. - * - * Clients should carefully consider the implications - * of new versions as external interfaces and behaviour - * may have changed. - */ - public static int getMajorVersionNum() - { - return @version.VERSION@; - - } - - /** - * Release Number. - * Release number. This changes when: - * - a new set of functionality is to be added, eg, - * implementation of a new W3C specification. - * - API or behaviour change. - * - its designated as a reference release. - */ - public static int getReleaseVersionNum() - { - return @version.RELEASE@; - } - - /** - * Maintenance Drop Number. - * Optional identifier used to designate maintenance - * drop applied to a specific release and contains - * fixes for defects reported. It maintains compatibility - * with the release and contains no API changes. - * When missing, it designates the final and complete - * development drop for a release. - */ - public static int getMaintenanceVersionNum() - { - return @version.MINOR@; - } - - /** - * Development Drop Number. - * Optional identifier designates development drop of - * a specific release. D01 is the first development drop - * of a new release. - * - * Development drops are works in progress towards a - * compeleted, final release. A specific development drop - * may not completely implement all aspects of a new - * feature, which may take several development drops to - * complete. At the point of the final drop for the - * release, the D suffix will be omitted. - * - * Each 'D' drops can contain functional enhancements as - * well as defect fixes. 'D' drops may not be as stable as - * the final releases. - */ - public static int getDevelopmentVersionNum() - { - try { - if ((new String("@version.DEVELOPER@")).length() == 0) - return 0; - else - return Integer.parseInt("@version.DEVELOPER@"); - } catch (NumberFormatException nfe) { - return 0; - } - } -} diff --git a/src/org/apache/xalan/processor/XSLProcessorVersion.src b/src/org/apache/xalan/processor/XSLProcessorVersion.src deleted file mode 100644 index 7c44d46cb..000000000 --- a/src/org/apache/xalan/processor/XSLProcessorVersion.src +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * $Id$ - */ -package org.apache.xalan.processor; - -/** - * Administrative class to keep track of the version number of - * the Xalan release. - * <P>See also: org/apache/xalan/res/XSLTInfo.properties</P> - * @deprecated To be replaced by org.apache.xalan.Version.getVersion() - * @xsl.usage general - */ -public class XSLProcessorVersion -{ - - /** - * Print the processor version to the command line. - * - * @param argv command line arguments, unused. - */ - public static void main(String argv[]) - { - System.out.println(S_VERSION); - } - - /** - * Constant name of product. - */ - public static final String PRODUCT = "Xalan"; - - /** - * Implementation Language. - */ - public static final String LANGUAGE = "Java"; - - /** - * Major version number. - * Version number. This changes only when there is a - * significant, externally apparent enhancement from - * the previous release. 'n' represents the n'th - * version. - * - * Clients should carefully consider the implications - * of new versions as external interfaces and behaviour - * may have changed. - */ - public static final int VERSION = @version.VERSION@; - - /** - * Release Number. - * Release number. This changes when: - * - a new set of functionality is to be added, eg, - * implementation of a new W3C specification. - * - API or behaviour change. - * - its designated as a reference release. - */ - public static final int RELEASE = @version.RELEASE@; - - /** - * Maintenance Drop Number. - * Optional identifier used to designate maintenance - * drop applied to a specific release and contains - * fixes for defects reported. It maintains compatibility - * with the release and contains no API changes. - * When missing, it designates the final and complete - * development drop for a release. - */ - public static final int MAINTENANCE = @version.MINOR@; - - /** - * Development Drop Number. - * Optional identifier designates development drop of - * a specific release. D01 is the first development drop - * of a new release. - * - * Development drops are works in progress towards a - * compeleted, final release. A specific development drop - * may not completely implement all aspects of a new - * feature, which may take several development drops to - * complete. At the point of the final drop for the - * release, the D suffix will be omitted. - * - * Each 'D' drops can contain functional enhancements as - * well as defect fixes. 'D' drops may not be as stable as - * the final releases. - */ - public static final int DEVELOPMENT = 0; - - /** - * Version String like <CODE>"<B>Xalan</B> <B>Language</B> - * v.r[.dd| <B>D</B>nn]"</CODE>. - * <P>Semantics of the version string are identical to the Xerces project.</P> - */ - public static final String S_VERSION = PRODUCT+" "+LANGUAGE+" " - +VERSION+"."+RELEASE+"." - +(DEVELOPMENT > 0 ? ("D"+DEVELOPMENT) - : (""+MAINTENANCE)); - -} diff --git a/src/org/apache/xalan/xsltc/util/JavaCupRedirect.java b/src/org/apache/xalan/xsltc/util/JavaCupRedirect.java deleted file mode 100644 index 6ca533d35..000000000 --- a/src/org/apache/xalan/xsltc/util/JavaCupRedirect.java +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * $Id$ - */ - -package org.apache.xalan.xsltc.util; - -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; - -/** - * Utility class to redirect input to JavaCup program. - * - * Usage-command line: - * <code>java org.apache.xalan.xsltc.utils.JavaCupRedirect [args] -stdin filename.ext</code> - * - * @author Morten Jorgensen - * @version $Id$ - */ -public class JavaCupRedirect { - - private final static String ERRMSG = - "You must supply a filename with the -stdin option."; - - public static void main (String args[]) { - - // If we should call System.exit or not - //@todo make this settable for use inside other java progs - boolean systemExitOK = true; - - // This is the stream we'll set as our System.in - InputStream input = null; - - // The number of arguments - final int argc = args.length; - - // The arguments we'll pass to the real 'main()' - String[] new_args = new String[argc - 2]; - int new_argc = 0; - - // Parse all parameters passed to this class - for (int i = 0; i < argc; i++) { - // Parse option '-stdin <filename>' - if (args[i].equals("-stdin")) { - // This option must have an argument - if ((++i >= argc) || (args[i].startsWith("-"))) { - System.err.println(ERRMSG); - throw new RuntimeException(ERRMSG); - } - try { - input = new FileInputStream(args[i]); - } - catch (FileNotFoundException e) { - System.err.println("Could not open file "+args[i]); - throw new RuntimeException(e.getMessage()); - } - catch (SecurityException e) { - System.err.println("No permission to file "+args[i]); - throw new RuntimeException(e.getMessage()); - } - } - else { - if (new_argc == new_args.length) { - System.err.println("Missing -stdin option!"); - throw new RuntimeException(); - } - new_args[new_argc++] = args[i]; - } - } - - System.setIn(input); - try { - java_cup.Main.main(new_args); - } - catch (Exception e) { - System.err.println("Error running JavaCUP:"); - e.printStackTrace(); - } - } -} diff --git a/src/org/apache/xml/serializer/Version.src b/src/org/apache/xml/serializer/Version.src deleted file mode 100644 index deb26637f..000000000 --- a/src/org/apache/xml/serializer/Version.src +++ /dev/null @@ -1,150 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -/* - * $Id$ - */ -package org.apache.xml.serializer; - -/** - * Administrative class to keep track of the version number of - * the Serializer release. - * <P>This class implements the upcoming standard of having - * org.apache.project-name.Version.getVersion() be a standard way - * to get version information.</P> - * @xsl.usage general - */ -public final class Version -{ - - /** - * Get the basic version string for the current Serializer. - * Version String formatted like - * <CODE>"<B>Serializer</B> <B>Java</B> v.r[.dd| <B>D</B>nn]"</CODE>. - * - * Futurework: have this read version info from jar manifest. - * - * @return String denoting our current version - */ - public static String getVersion() - { - return getProduct()+" "+getImplementationLanguage()+" " - +getMajorVersionNum()+"."+getReleaseVersionNum()+"." - +( (getDevelopmentVersionNum() > 0) ? - ("D"+getDevelopmentVersionNum()) : (""+getMaintenanceVersionNum())); - } - - /** - * Print the processor version to the command line. - * - * @param argv command line arguments, unused. - */ - public static void main(String argv[]) - { - System.out.println(getVersion()); - } - - /** - * Name of product: Serializer. - */ - public static String getProduct() - { - return "Serializer"; - } - - /** - * Implementation Language: Java. - */ - public static String getImplementationLanguage() - { - return "Java"; - } - - - /** - * Major version number. - * Version number. This changes only when there is a - * significant, externally apparent enhancement from - * the previous release. 'n' represents the n'th - * version. - * - * Clients should carefully consider the implications - * of new versions as external interfaces and behaviour - * may have changed. - */ - public static int getMajorVersionNum() - { - return @version.VERSION@; - - } - - /** - * Release Number. - * Release number. This changes when: - * - a new set of functionality is to be added, eg, - * implementation of a new W3C specification. - * - API or behaviour change. - * - its designated as a reference release. - */ - public static int getReleaseVersionNum() - { - return @version.RELEASE@; - } - - /** - * Maintenance Drop Number. - * Optional identifier used to designate maintenance - * drop applied to a specific release and contains - * fixes for defects reported. It maintains compatibility - * with the release and contains no API changes. - * When missing, it designates the final and complete - * development drop for a release. - */ - public static int getMaintenanceVersionNum() - { - return @version.MINOR@; - } - - /** - * Development Drop Number. - * Optional identifier designates development drop of - * a specific release. D01 is the first development drop - * of a new release. - * - * Development drops are works in progress towards a - * compeleted, final release. A specific development drop - * may not completely implement all aspects of a new - * feature, which may take several development drops to - * complete. At the point of the final drop for the - * release, the D suffix will be omitted. - * - * Each 'D' drops can contain functional enhancements as - * well as defect fixes. 'D' drops may not be as stable as - * the final releases. - */ - public static int getDevelopmentVersionNum() - { - try { - if ((new String("@version.DEVELOPER@")).length() == 0) - return 0; - else - return Integer.parseInt("@version.DEVELOPER@"); - } catch (NumberFormatException nfe) { - return 0; - } - } -} diff --git a/src/xml-commons-external-1.3.02-src.tar.gz b/src/xml-commons-external-1.3.02-src.tar.gz deleted file mode 100644 index 469b3bd7c..000000000 Binary files a/src/xml-commons-external-1.3.02-src.tar.gz and /dev/null differ diff --git a/stylebook/dtd/blocks.ent b/stylebook/dtd/blocks.ent new file mode 100644 index 000000000..5f352d1bf --- /dev/null +++ b/stylebook/dtd/blocks.ent @@ -0,0 +1,40 @@ +<?xml encoding='US-ASCII'?> + +<!-- BLOCKS ENTITY --> +<!ENTITY % blocks "p|note|ul|ol|gloss|table|source|anchor"> + +<!-- import the external markup.ent dtd --> +<!ENTITY % markupEntity SYSTEM "markup.ent"> +%markupEntity; + +<!ENTITY % content "(#PCDATA|%markup;|%links;)*"> + +<!ELEMENT p %content;> +<!ELEMENT note %content;> + +<!ELEMENT ul (li|ol|ul)+> +<!ELEMENT ol (li|ol|ul)+> +<!ELEMENT li %content;> + +<!ELEMENT gloss (label|item)+> +<!ELEMENT label %content;> +<!ELEMENT item %content;> + +<!ELEMENT source (#PCDATA)> + +<!ELEMENT table (tr)+> + +<!ELEMENT tr (tn|th|td)+> + +<!ELEMENT tn EMPTY> +<!ATTLIST tn colspan CDATA "1" + rowspan CDATA "1"> + +<!ELEMENT th %content;> +<!ATTLIST th colspan CDATA "1" + rowspan CDATA "1"> + +<!ELEMENT td %content;> +<!ATTLIST td colspan CDATA "1" + rowspan CDATA "1"> + \ No newline at end of file diff --git a/stylebook/dtd/book.dtd b/stylebook/dtd/book.dtd new file mode 100644 index 000000000..2f49ce990 --- /dev/null +++ b/stylebook/dtd/book.dtd @@ -0,0 +1,49 @@ +<?xml encoding='US-ASCII'?> + +<!-- STYLEBOOK BOOK DTD --> + +<!-- import the external source-specific dtd --> +<!ENTITY % externalEntity SYSTEM "sbk:/sources/entities.ent"> +%externalEntity; + +<!ELEMENT book (resources?|document|hidden|faqs|changes|group|external|separator)+> +<!ATTLIST book title CDATA #REQUIRED + copyright CDATA #IMPLIED> + +<!ELEMENT resources EMPTY> +<!ATTLIST resources source CDATA #REQUIRED> + +<!ELEMENT document EMPTY> +<!ATTLIST document id ID #REQUIRED + source CDATA #REQUIRED + label CDATA #REQUIRED> + +<!ELEMENT hidden EMPTY> +<!ATTLIST hidden id ID #REQUIRED + source CDATA #REQUIRED> + +<!ELEMENT faqs EMPTY> +<!ATTLIST faqs id ID #REQUIRED + source CDATA #REQUIRED + label CDATA #REQUIRED> + +<!ELEMENT changes EMPTY> +<!ATTLIST changes id ID #REQUIRED + source CDATA #REQUIRED + label CDATA #REQUIRED> + +<!ELEMENT group (entry)+> +<!ATTLIST group id ID #IMPLIED + label CDATA #REQUIRED> + +<!ELEMENT entry EMPTY> +<!ATTLIST entry id ID #REQUIRED + source CDATA #REQUIRED> + +<!ELEMENT external EMPTY> +<!ATTLIST external label CDATA #REQUIRED + href CDATA #REQUIRED> + +<!ELEMENT separator EMPTY> + +<!-- CVS $Revision: 1.3 $ $Date: 1999/12/01 23:03:37 $ --> \ No newline at end of file diff --git a/stylebook/dtd/changes.dtd b/stylebook/dtd/changes.dtd new file mode 100644 index 000000000..661affa86 --- /dev/null +++ b/stylebook/dtd/changes.dtd @@ -0,0 +1,24 @@ +<?xml encoding='US-ASCII'?> + +<!-- STYLEBOOK CHANGES DTD --> + +<!-- import the external markup.ent dtd --> +<!ENTITY % markupEntity SYSTEM "markup.ent"> +%markupEntity; + +<!ENTITY % content "(#PCDATA|%markup;|%links;)*"> + +<!ELEMENT changes (release)+> +<!ATTLIST changes title CDATA #REQUIRED> + +<!ELEMENT release ((features,fixes)|(features)|(fixes))> +<!ATTLIST release version CDATA #REQUIRED + date CDATA #IMPLIED> + +<!ELEMENT features (feat)+> +<!ELEMENT fixes (fix)+> + +<!ELEMENT feat %content;> +<!ELEMENT fix %content;> + +<!-- CVS $Revision: 1.3 $ $Date: 1999/12/01 23:03:37 $ --> \ No newline at end of file diff --git a/stylebook/dtd/characters.ent b/stylebook/dtd/characters.ent new file mode 100644 index 000000000..036c06d5e --- /dev/null +++ b/stylebook/dtd/characters.ent @@ -0,0 +1,297 @@ +<?xml encoding='US-ASCII'?> + +<!-- CHARACTERS ENTITY --> + +<!-- Latin A --> +<!ENTITY nbsp " "> <!-- U+00A0 ISOnum - no-break space = non-breaking space --> +<!ENTITY iexcl "¡"> <!-- U+00A1 ISOnum - inverted exclamation mark --> +<!ENTITY cent "¢"> <!-- U+00A2 ISOnum - cent sign --> +<!ENTITY pound "£"> <!-- U+00A3 ISOnum - pound sign --> +<!ENTITY curren "¤"> <!-- U+00A4 ISOnum - currency sign --> +<!ENTITY yen "¥"> <!-- U+00A5 ISOnum - yen sign = yuan sign --> +<!ENTITY brvbar "¦"> <!-- U+00A6 ISOnum - broken bar = broken vertical bar --> +<!ENTITY sect "§"> <!-- U+00A7 ISOnum - section sign --> +<!ENTITY uml "¨"> <!-- U+00A8 ISOdia - diaeresis = spacing diaeresis --> +<!ENTITY copy "©"> <!-- U+00A9 ISOnum - copyright sign --> +<!ENTITY ordf "ª"> <!-- U+00AA ISOnum - feminine ordinal indicator --> +<!ENTITY laquo "«"> <!-- U+00AB ISOnum - left-pointing double angle quotation mark = left pointing guillemet --> +<!ENTITY not "¬"> <!-- U+00AC ISOnum - not sign --> +<!ENTITY shy "­"> <!-- U+00AD ISOnum - soft hyphen = discretionary hyphen --> +<!ENTITY reg "®"> <!-- U+00AE ISOnum - registered sign = registered trade mark sign --> +<!ENTITY macr "¯"> <!-- U+00AF ISOdia - macron = spacing macron = overline = APL overbar --> +<!ENTITY deg "°"> <!-- U+00B0 ISOnum - degree sign --> +<!ENTITY plusmn "±"> <!-- U+00B1 ISOnum - plus-minus sign = plus-or-minus sign --> +<!ENTITY sup2 "²"> <!-- U+00B2 ISOnum - superscript two = superscript digit two = squared --> +<!ENTITY sup3 "³"> <!-- U+00B3 ISOnum - superscript three = superscript digit three = cubed --> +<!ENTITY acute "´"> <!-- U+00B4 ISOdia - acute accent = spacing acute --> +<!ENTITY micro "µ"> <!-- U+00B5 ISOnum - micro sign --> +<!ENTITY para "¶"> <!-- U+00B6 ISOnum - pilcrow sign = paragraph sign --> +<!ENTITY middot "·"> <!-- U+00B7 ISOnum - middle dot = Georgian comma = Greek middle dot --> +<!ENTITY cedil "¸"> <!-- U+00B8 ISOdia - cedilla = spacing cedilla --> +<!ENTITY sup1 "¹"> <!-- U+00B9 ISOnum - superscript one = superscript digit one --> +<!ENTITY ordm "º"> <!-- U+00BA ISOnum - masculine ordinal indicator --> +<!ENTITY raquo "»"> <!-- U+00BB ISOnum - right-pointing double angle quotation mark = right pointing guillemet --> +<!ENTITY frac14 "¼"> <!-- U+00BC ISOnum - vulgar fraction one quarter = fraction one quarter --> +<!ENTITY frac12 "½"> <!-- U+00BD ISOnum - vulgar fraction one half = fraction one half --> +<!ENTITY frac34 "¾"> <!-- U+00BE ISOnum - vulgar fraction three quarters = fraction three quarters --> +<!ENTITY iquest "¿"> <!-- U+00BF ISOnum - inverted question mark = turned question mark --> +<!ENTITY Agrave "À"> <!-- U+00C0 ISOlat1 - latin capital letter A with grave = latin capital letter A grave --> +<!ENTITY Aacute "Á"> <!-- U+00C1 ISOlat1 - latin capital letter A with acute --> +<!ENTITY Acirc "Â"> <!-- U+00C2 ISOlat1 - latin capital letter A with circumflex --> +<!ENTITY Atilde "Ã"> <!-- U+00C3 ISOlat1 - latin capital letter A with tilde --> +<!ENTITY Auml "Ä"> <!-- U+00C4 ISOlat1 - latin capital letter A with diaeresis --> +<!ENTITY Aring "Å"> <!-- U+00C5 ISOlat1 - latin capital letter A with ring above = latin capital letter A ring --> +<!ENTITY AElig "Æ"> <!-- U+00C6 ISOlat1 - latin capital letter AE = latin capital ligature AE --> +<!ENTITY Ccedil "Ç"> <!-- U+00C7 ISOlat1 - latin capital letter C with cedilla --> +<!ENTITY Egrave "È"> <!-- U+00C8 ISOlat1 - latin capital letter E with grave --> +<!ENTITY Eacute "É"> <!-- U+00C9 ISOlat1 - latin capital letter E with acute --> +<!ENTITY Ecirc "Ê"> <!-- U+00CA ISOlat1 - latin capital letter E with circumflex --> +<!ENTITY Euml "Ë"> <!-- U+00CB ISOlat1 - latin capital letter E with diaeresis --> +<!ENTITY Igrave "Ì"> <!-- U+00CC ISOlat1 - latin capital letter I with grave --> +<!ENTITY Iacute "Í"> <!-- U+00CD ISOlat1 - latin capital letter I with acute --> +<!ENTITY Icirc "Î"> <!-- U+00CE ISOlat1 - latin capital letter I with circumflex --> +<!ENTITY Iuml "Ï"> <!-- U+00CF ISOlat1 - latin capital letter I with diaeresis --> +<!ENTITY ETH "Ð"> <!-- U+00D0 ISOlat1 - latin capital letter ETH --> +<!ENTITY Ntilde "Ñ"> <!-- U+00D1 ISOlat1 - latin capital letter N with tilde --> +<!ENTITY Ograve "Ò"> <!-- U+00D2 ISOlat1 - latin capital letter O with grave --> +<!ENTITY Oacute "Ó"> <!-- U+00D3 ISOlat1 - latin capital letter O with acute --> +<!ENTITY Ocirc "Ô"> <!-- U+00D4 ISOlat1 - latin capital letter O with circumflex --> +<!ENTITY Otilde "Õ"> <!-- U+00D5 ISOlat1 - latin capital letter O with tilde --> +<!ENTITY Ouml "Ö"> <!-- U+00D6 ISOlat1 - latin capital letter O with diaeresis --> +<!ENTITY times "×"> <!-- U+00D7 ISOnum - multiplication sign --> +<!ENTITY Oslash "Ø"> <!-- U+00D8 ISOlat1 - latin capital letter O with stroke = latin capital letter O slash --> +<!ENTITY Ugrave "Ù"> <!-- U+00D9 ISOlat1 - latin capital letter U with grave --> +<!ENTITY Uacute "Ú"> <!-- U+00DA ISOlat1 - latin capital letter U with acute --> +<!ENTITY Ucirc "Û"> <!-- U+00DB ISOlat1 - latin capital letter U with circumflex --> +<!ENTITY Uuml "Ü"> <!-- U+00DC ISOlat1 - latin capital letter U with diaeresis --> +<!ENTITY Yacute "Ý"> <!-- U+00DD ISOlat1 - latin capital letter Y with acute --> +<!ENTITY THORN "Þ"> <!-- U+00DE ISOlat1 - latin capital letter THORN --> +<!ENTITY szlig "ß"> <!-- U+00DF ISOlat1 - latin small letter sharp s = ess-zed --> +<!ENTITY agrave "à"> <!-- U+00E0 ISOlat1 - latin small letter a with grave = latin small letter a grave --> +<!ENTITY aacute "á"> <!-- U+00E1 ISOlat1 - latin small letter a with acute --> +<!ENTITY acirc "â"> <!-- U+00E2 ISOlat1 - latin small letter a with circumflex --> +<!ENTITY atilde "ã"> <!-- U+00E3 ISOlat1 - latin small letter a with tilde --> +<!ENTITY auml "ä"> <!-- U+00E4 ISOlat1 - latin small letter a with diaeresis --> +<!ENTITY aring "å"> <!-- U+00E5 ISOlat1 - latin small letter a with ring above = latin small letter a ring --> +<!ENTITY aelig "æ"> <!-- U+00E6 ISOlat1 - latin small letter ae = latin small ligature ae --> +<!ENTITY ccedil "ç"> <!-- U+00E7 ISOlat1 - latin small letter c with cedilla --> +<!ENTITY egrave "è"> <!-- U+00E8 ISOlat1 - latin small letter e with grave --> +<!ENTITY eacute "é"> <!-- U+00E9 ISOlat1 - latin small letter e with acute --> +<!ENTITY ecirc "ê"> <!-- U+00EA ISOlat1 - latin small letter e with circumflex --> +<!ENTITY euml "ë"> <!-- U+00EB ISOlat1 - latin small letter e with diaeresis --> +<!ENTITY igrave "ì"> <!-- U+00EC ISOlat1 - latin small letter i with grave --> +<!ENTITY iacute "í"> <!-- U+00ED ISOlat1 - latin small letter i with acute --> +<!ENTITY icirc "î"> <!-- U+00EE ISOlat1 - latin small letter i with circumflex --> +<!ENTITY iuml "ï"> <!-- U+00EF ISOlat1 - latin small letter i with diaeresis --> +<!ENTITY eth "ð"> <!-- U+00F0 ISOlat1 - latin small letter eth --> +<!ENTITY ntilde "ñ"> <!-- U+00F1 ISOlat1 - latin small letter n with tilde --> +<!ENTITY ograve "ò"> <!-- U+00F2 ISOlat1 - latin small letter o with grave --> +<!ENTITY oacute "ó"> <!-- U+00F3 ISOlat1 - latin small letter o with acute --> +<!ENTITY ocirc "ô"> <!-- U+00F4 ISOlat1 - latin small letter o with circumflex --> +<!ENTITY otilde "õ"> <!-- U+00F5 ISOlat1 - latin small letter o with tilde --> +<!ENTITY ouml "ö"> <!-- U+00F6 ISOlat1 - latin small letter o with diaeresis --> +<!ENTITY divide "÷"> <!-- U+00F7 ISOnum - division sign --> +<!ENTITY oslash "ø"> <!-- U+00F8 ISOlat1 - latin small letter o with stroke = latin small letter o slash --> +<!ENTITY ugrave "ù"> <!-- U+00F9 ISOlat1 - latin small letter u with grave --> +<!ENTITY uacute "ú"> <!-- U+00FA ISOlat1 - latin small letter u with acute --> +<!ENTITY ucirc "û"> <!-- U+00FB ISOlat1 - latin small letter u with circumflex --> +<!ENTITY uuml "ü"> <!-- U+00FC ISOlat1 - latin small letter u with diaeresis --> +<!ENTITY yacute "ý"> <!-- U+00FD ISOlat1 - latin small letter y with acute --> +<!ENTITY thorn "þ"> <!-- U+00FE ISOlat1 - latin small letter thorn --> +<!ENTITY yuml "ÿ"> <!-- U+00FF ISOlat1 - latin small letter y with diaeresis --> + + +<!-- C0 Controls and Basic Latin --> +<!ENTITY quot """> <!-- U+0022 ISOnum - quotation mark = APL quote --> +<!ENTITY amp "&"> <!-- U+0026 ISOnum - ampersand --> +<!ENTITY lt "<"> <!-- U+003C ISOnum - less-than sign --> +<!ENTITY gt ">"> <!-- U+003E ISOnum - greater-than sign --> + +<!-- Latin Extended-A --> +<!ENTITY OElig "Œ"> <!-- U+0152 ISOlat2 - latin capital ligature OE --> +<!ENTITY oelig "œ"> <!-- U+0153 ISOlat2 - latin small ligature oe --> + +<!-- ligature is a misnomer, this is a separate character in some languages --> +<!ENTITY Scaron "Š"> <!-- U+0160 ISOlat2 - latin capital letter S with caron --> +<!ENTITY scaron "š"> <!-- U+0161 ISOlat2 - latin small letter s with caron --> +<!ENTITY Yuml "Ÿ"> <!-- U+0178 ISOlat2 - latin capital letter Y with diaeresis --> + +<!-- Spacing Modifier Letters --> +<!ENTITY circ "ˆ" > <!-- U+02C6 ISOpub - modifier letter circumflex accent --> +<!ENTITY tilde "˜" > <!-- U+02DC ISOdia - small tilde --> + +<!-- General Punctuation --> +<!ENTITY ensp " "> <!-- U+2002 ISOpub - en space --> +<!ENTITY emsp " "> <!-- U+2003 ISOpub - em space --> +<!ENTITY thinsp " "> <!-- U+2009 ISOpub - thin space --> +<!ENTITY zwnj "‌"> <!-- U+200C RFC 2070 - zero width non-joiner --> +<!ENTITY zwj "‍"> <!-- U+200D RFC 2070 - zero width joiner --> +<!ENTITY lrm "‎"> <!-- U+200E RFC 2070 - left-to-right mark --> +<!ENTITY rlm "‏"> <!-- U+200F RFC 2070 - right-to-left mark --> +<!ENTITY ndash "–"> <!-- U+2013 ISOpub - en dash --> +<!ENTITY mdash "—"> <!-- U+2014 ISOpub - em dash --> +<!ENTITY lsquo "‘"> <!-- U+2018 ISOnum - left single quotation mark --> +<!ENTITY rsquo "’"> <!-- U+2019 ISOnum - right single quotation mark --> +<!ENTITY sbquo "‚"> <!-- U+201A NEW - single low-9 quotation mark --> +<!ENTITY ldquo "“"> <!-- U+201C ISOnum - left double quotation mark --> +<!ENTITY rdquo "”"> <!-- U+201D ISOnum - right double quotation mark, --> +<!ENTITY bdquo "„"> <!-- U+201E NEW - double low-9 quotation mark --> +<!ENTITY dagger "†"> <!-- U+2020 ISOpub - dagger --> +<!ENTITY Dagger "‡"> <!-- U+2021 ISOpub - double dagger --> +<!ENTITY permil "‰"> <!-- U+2030 ISOtech - per mille sign --> +<!ENTITY lsaquo "‹"> <!-- U+2039 ISO prop. - single left-pointing angle quotation mark --> + +<!-- lsaquo is proposed but not yet ISO standardized --> +<!ENTITY rsaquo "›"> <!-- U+203A ISO prop. - single right-pointing angle quotation mark --> + +<!-- rsaquo is proposed but not yet ISO standardized --> +<!ENTITY euro "€"> <!-- U+20AC NEW - euro sign --> + +<!-- Latin Extended-B --> +<!ENTITY fnof "ƒ"> <!-- U+0192 ISOtech - latin small f with hook = function = florin --> + +<!-- Greek --> +<!ENTITY Alpha "Α"> <!-- U+0391 - greek capital letter alpha --> +<!ENTITY Beta "Β"> <!-- U+0392 - greek capital letter beta --> +<!ENTITY Gamma "Γ"> <!-- U+0393 ISOgrk3 - greek capital letter gamma --> +<!ENTITY Delta "Δ"> <!-- U+0394 ISOgrk3 - greek capital letter delta --> +<!ENTITY Epsilon "Ε"> <!-- U+0395 - greek capital letter epsilon --> +<!ENTITY Zeta "Ζ"> <!-- U+0396 - greek capital letter zeta --> +<!ENTITY Eta "Η"> <!-- U+0397 - greek capital letter eta --> +<!ENTITY Theta "Θ"> <!-- U+0398 ISOgrk3 - greek capital letter theta --> +<!ENTITY Iota "Ι"> <!-- U+0399 - greek capital letter iota --> +<!ENTITY Kappa "Κ"> <!-- U+039A - greek capital letter kappa --> +<!ENTITY Lambda "Λ"> <!-- U+039B ISOgrk3 - greek capital letter lambda --> +<!ENTITY Mu "Μ"> <!-- U+039C - greek capital letter mu --> +<!ENTITY Nu "Ν"> <!-- U+039D - greek capital letter nu --> +<!ENTITY Xi "Ξ"> <!-- U+039E ISOgrk3 - greek capital letter xi --> +<!ENTITY Omicron "Ο"> <!-- U+039F - greek capital letter omicron --> +<!ENTITY Pi "Π"> <!-- U+03A0 ISOgrk3 - greek capital letter pi --> +<!ENTITY Rho "Ρ"> <!-- U+03A1 - greek capital letter rho --> +<!ENTITY Sigma "Σ"> <!-- U+03A3 ISOgrk3 - greek capital letter sigma --> +<!ENTITY Tau "Τ"> <!-- U+03A4 - greek capital letter tau --> +<!ENTITY Upsilon "Υ"> <!-- U+03A5 ISOgrk3 - greek capital letter upsilon --> +<!ENTITY Phi "Φ"> <!-- U+03A6 ISOgrk3 - greek capital letter phi --> +<!ENTITY Chi "Χ"> <!-- U+03A7 - greek capital letter chi --> +<!ENTITY Psi "Ψ"> <!-- U+03A8 ISOgrk3 - greek capital letter psi --> +<!ENTITY Omega "Ω"> <!-- U+03A9 ISOgrk3 - greek capital letter omega --> +<!ENTITY alpha "α"> <!-- U+03B1 ISOgrk3 - greek small letter alpha --> +<!ENTITY beta "β"> <!-- U+03B2 ISOgrk3 - greek small letter beta --> +<!ENTITY gamma "γ"> <!-- U+03B3 ISOgrk3 - greek small letter gamma --> +<!ENTITY delta "δ"> <!-- U+03B4 ISOgrk3 - greek small letter delta --> +<!ENTITY epsilon "ε"> <!-- U+03B5 ISOgrk3 - greek small letter epsilon --> +<!ENTITY zeta "ζ"> <!-- U+03B6 ISOgrk3 - greek small letter zeta --> +<!ENTITY eta "η"> <!-- U+03B7 ISOgrk3 - greek small letter eta --> +<!ENTITY theta "θ"> <!-- U+03B8 ISOgrk3 - greek small letter theta --> +<!ENTITY iota "ι"> <!-- U+03B9 ISOgrk3 - greek small letter iota --> +<!ENTITY kappa "κ"> <!-- U+03BA ISOgrk3 - greek small letter kappa --> +<!ENTITY lambda "λ"> <!-- U+03BB ISOgrk3 - greek small letter lambda --> +<!ENTITY mu "μ"> <!-- U+03BC ISOgrk3 - greek small letter mu --> +<!ENTITY nu "ν"> <!-- U+03BD ISOgrk3 - greek small letter nu --> +<!ENTITY xi "ξ"> <!-- U+03BE ISOgrk3 - greek small letter xi --> +<!ENTITY omicron "ο"> <!-- U+03BF NEW - greek small letter omicron --> +<!ENTITY pi "π"> <!-- U+03C0 ISOgrk3 - greek small letter pi --> +<!ENTITY rho "ρ"> <!-- U+03C1 ISOgrk3 - greek small letter rho --> +<!ENTITY sigmaf "ς"> <!-- U+03C2 ISOgrk3 - greek small letter final sigma --> +<!ENTITY sigma "σ"> <!-- U+03C3 ISOgrk3 - greek small letter sigma --> +<!ENTITY tau "τ"> <!-- U+03C4 ISOgrk3 - greek small letter tau --> +<!ENTITY upsilon "υ"> <!-- U+03C5 ISOgrk3 - greek small letter upsilon --> +<!ENTITY phi "φ"> <!-- U+03C6 ISOgrk3 - greek small letter phi --> +<!ENTITY chi "χ"> <!-- U+03C7 ISOgrk3 - greek small letter chi --> +<!ENTITY psi "ψ"> <!-- U+03C8 ISOgrk3 - greek small letter psi --> +<!ENTITY omega "ω"> <!-- U+03C9 ISOgrk3 - greek small letter omega --> +<!ENTITY thetasym "ϑ"> <!-- U+03D1 NEW - greek small letter theta symbol --> +<!ENTITY upsih "ϒ"> <!-- U+03D2 NEW - greek upsilon with hook symbol --> +<!ENTITY piv "ϖ"> <!-- U+03D6 ISOgrk3 - greek pi symbol --> + +<!-- General Punctuation --> +<!ENTITY bull "•"> <!-- U+2022 ISOpub - bullet = black small circle --> +<!ENTITY hellip "…"> <!-- U+2026 ISOpub - horizontal ellipsis = three dot leader --> +<!ENTITY prime "′"> <!-- U+2032 ISOtech - prime = minutes = feet --> +<!ENTITY Prime "″"> <!-- U+2033 ISOtech - double prime = seconds = inches --> +<!ENTITY oline "‾"> <!-- U+203E NEW - overline = spacing overscore --> +<!ENTITY frasl "⁄"> <!-- U+2044 NEW - fraction slash --> + +<!-- Letterlike Symbols --> +<!ENTITY weierp "℘"> <!-- U+2118 ISOamso - script capital P = power set = Weierstrass p --> +<!ENTITY image "ℑ"> <!-- U+2111 ISOamso - blackletter capital I = imaginary part --> +<!ENTITY real "ℜ"> <!-- U+211C ISOamso - blackletter capital R = real part symbol --> +<!ENTITY trade "™"> <!-- U+2122 ISOnum - trade mark sign --> +<!ENTITY alefsym "ℵ"> <!-- U+2135 NEW - alef symbol = first transfinite cardinal --> + +<!-- Arrows --> +<!ENTITY larr "←"> <!-- U+2190 ISOnum - leftwards arrow --> +<!ENTITY uarr "↑"> <!-- U+2191 ISOnum - upwards arrow --> +<!ENTITY rarr "→"> <!-- U+2192 ISOnum - rightwards arrow --> +<!ENTITY darr "↓"> <!-- U+2193 ISOnum - downwards arrow --> +<!ENTITY harr "↔"> <!-- U+2194 ISOamsa - left right arrow --> +<!ENTITY crarr "↵"> <!-- U+21B5 NEW - downwards arrow with corner leftwards = carriage return --> +<!ENTITY lArr "⇐"> <!-- U+21D0 ISOtech - leftwards double arrow --> +<!ENTITY uArr "⇑"> <!-- U+21D1 ISOamsa - upwards double arrow --> +<!ENTITY rArr "⇒"> <!-- U+21D2 ISOtech - rightwards double arrow --> +<!ENTITY dArr "⇓"> <!-- U+21D3 ISOamsa - downwards double arrow --> +<!ENTITY hArr "⇔"> <!-- U+21D4 ISOamsa - left right double arrow --> + +<!-- Mathematical Operators --> +<!ENTITY forall "∀"> <!-- U+2200 ISOtech - for all --> +<!ENTITY part "∂"> <!-- U+2202 ISOtech - partial differential --> +<!ENTITY exist "∃"> <!-- U+2203 ISOtech - there exists --> +<!ENTITY empty "∅"> <!-- U+2205 ISOamso - empty set = null set = diameter --> +<!ENTITY nabla "∇"> <!-- U+2207 ISOtech - nabla = backward difference --> +<!ENTITY isin "∈"> <!-- U+2208 ISOtech - element of --> +<!ENTITY notin "∉"> <!-- U+2209 ISOtech - not an element of --> +<!ENTITY ni "∋"> <!-- U+220B ISOtech - contains as member --> +<!ENTITY prod "∏"> <!-- U+220F ISOamsb - n-ary product = product sign --> +<!ENTITY sum "∑"> <!-- U+2211 ISOamsb - n-ary sumation --> +<!ENTITY minus "−"> <!-- U+2212 ISOtech - minus sign --> +<!ENTITY lowast "∗"> <!-- U+2217 ISOtech - asterisk operator --> +<!ENTITY radic "√"> <!-- U+221A ISOtech - square root = radical sign --> +<!ENTITY prop "∝"> <!-- U+221D ISOtech - proportional to --> +<!ENTITY infin "∞"> <!-- U+221E ISOtech - infinity --> +<!ENTITY ang "∠"> <!-- U+2220 ISOamso - angle --> +<!ENTITY and "∧"> <!-- U+2227 ISOtech - logical and = wedge --> +<!ENTITY or "∨"> <!-- U+2228 ISOtech - logical or = vee --> +<!ENTITY cap "∩"> <!-- U+2229 ISOtech - intersection = cap --> +<!ENTITY cup "∪"> <!-- U+222A ISOtech - union = cup --> +<!ENTITY int "∫"> <!-- U+222B ISOtech - integral --> +<!ENTITY there4 "∴"> <!-- U+2234 ISOtech - therefore --> +<!ENTITY sim "∼"> <!-- U+223C ISOtech - tilde operator = varies with = similar to --> +<!ENTITY cong "≅"> <!-- U+2245 ISOtech - approximately equal to --> +<!ENTITY asymp "≈"> <!-- U+2248 ISOamsr - almost equal to = asymptotic to --> +<!ENTITY ne "≠"> <!-- U+2260 ISOtech - not equal to --> +<!ENTITY equiv "≡"> <!-- U+2261 ISOtech - identical to --> +<!ENTITY le "≤"> <!-- U+2264 ISOtech - less-than or equal to --> +<!ENTITY ge "≥"> <!-- U+2265 ISOtech - greater-than or equal to --> +<!ENTITY sub "⊂"> <!-- U+2282 ISOtech - subset of --> +<!ENTITY sup "⊃"> <!-- U+2283 ISOtech - superset of --> +<!ENTITY nsub "⊄"> <!-- U+2284 ISOamsn - not a subset of --> +<!ENTITY sube "⊆"> <!-- U+2286 ISOtech - subset of or equal to --> +<!ENTITY supe "⊇"> <!-- U+2287 ISOtech - superset of or equal to --> +<!ENTITY oplus "⊕"> <!-- U+2295 ISOamsb - circled plus = direct sum --> +<!ENTITY otimes "⊗"> <!-- U+2297 ISOamsb - circled times = vector product --> +<!ENTITY perp "⊥"> <!-- U+22A5 ISOtech - up tack = orthogonal to = perpendicular --> +<!ENTITY sdot "⋅"> <!-- U+22C5 ISOamsb - dot operator --> + +<!-- Miscellaneous Technical --> +<!ENTITY lceil "⌈"> <!-- U+2308 ISOamsc - left ceiling = apl upstile --> +<!ENTITY rceil "⌉"> <!-- U+2309 ISOamsc - right ceiling --> +<!ENTITY lfloor "⌊"> <!-- U+230A ISOamsc - left floor = apl downstile --> +<!ENTITY rfloor "⌋"> <!-- U+230B ISOamsc - right floor --> +<!ENTITY lang "〈"> <!-- U+2329 ISOtech - left-pointing angle bracket = bra --> +<!ENTITY rang "〉"> <!-- U+232A ISOtech - right-pointing angle bracket = ket --> + +<!-- Geometric Shapes --> +<!ENTITY loz "◊"> <!-- U+25CA ISOpub - lozenge --> + +<!-- Miscellaneous Symbols --> +<!ENTITY spades "♠"> <!-- U+2660 ISOpub - black spade suit --> +<!ENTITY clubs "♣"> <!-- U+2663 ISOpub - black club suit = shamrock --> +<!ENTITY hearts "♥"> <!-- U+2665 ISOpub - black heart suit = valentine --> +<!ENTITY diams "♦"> <!-- U+2666 ISOpub - black diamond suit --> + +<!-- CVS $Revision: 1.1 $ $Date: 1999/12/01 14:19:18 $ --> + +<!-- Portions (C) International Organization for Standardization 1986 + Permission to copy in any form is granted for use with + conforming SGML systems and applications as defined in + ISO 8879, provided this notice is included in all copies. --> diff --git a/stylebook/dtd/document.dtd b/stylebook/dtd/document.dtd new file mode 100644 index 000000000..f7cf5b121 --- /dev/null +++ b/stylebook/dtd/document.dtd @@ -0,0 +1,19 @@ +<?xml encoding='US-ASCII'?> + +<!-- STYLEBOOK DOCUMENT DTD --> + +<!-- import the external blocks.ent dtd --> +<!ENTITY % blocksEntity SYSTEM "blocks.ent"> +%blocksEntity; + +<!ELEMENT s1 (s2|%blocks;)*> +<!ELEMENT s2 (s3|%blocks;)*> +<!ELEMENT s3 (s4|%blocks;)*> +<!ELEMENT s4 (%blocks;)*> + +<!ATTLIST s1 title CDATA #REQUIRED> +<!ATTLIST s2 title CDATA #REQUIRED> +<!ATTLIST s3 title CDATA #REQUIRED> +<!ATTLIST s4 title CDATA #REQUIRED> + +<!-- CVS $Revision: 1.1 $ $Date: 1999/12/01 14:19:18 $ --> \ No newline at end of file diff --git a/stylebook/dtd/faqs.dtd b/stylebook/dtd/faqs.dtd new file mode 100644 index 000000000..565d99f4b --- /dev/null +++ b/stylebook/dtd/faqs.dtd @@ -0,0 +1,19 @@ +<?xml encoding='US-ASCII'?> + +<!-- STYLEBOOK FAQS DTD --> + +<!-- import the external blocks.ent dtd --> +<!ENTITY % blocksEntity SYSTEM "blocks.ent"> +%blocksEntity; + +<!ELEMENT faqs (faq)+> +<!ATTLIST faqs title CDATA #REQUIRED> + +<!ELEMENT faq (q,a)> +<!ATTLIST faq title CDATA #IMPLIED> + + +<!ELEMENT q (#PCDATA)> +<!ELEMENT a (%blocks;)+> + +<!-- CVS $Revision: 1.1 $ $Date: 1999/12/01 14:19:18 $ --> \ No newline at end of file diff --git a/stylebook/dtd/links.ent b/stylebook/dtd/links.ent new file mode 100644 index 000000000..63b002fff --- /dev/null +++ b/stylebook/dtd/links.ent @@ -0,0 +1,24 @@ +<?xml encoding='US-ASCII'?> + +<!-- LINKS ENTITY --> +<!ENTITY % links "link|anchor|jump|img|resource-ref|human-resource-ref"> + +<!ELEMENT anchor EMPTY> +<!ATTLIST anchor name NMTOKEN #REQUIRED> + +<!ELEMENT img EMPTY> +<!ATTLIST img src CDATA #REQUIRED + alt CDATA #REQUIRED> + +<!ELEMENT link (#PCDATA|img)*> +<!ATTLIST link idref NMTOKEN #IMPLIED + anchor CDATA #IMPLIED> + +<!ELEMENT jump (#PCDATA|img)*> +<!ATTLIST jump href CDATA #REQUIRED> + +<!-- cross-reference resource elements --> +<!ELEMENT resource-ref EMPTY> +<!ATTLIST resource-ref idref CDATA #REQUIRED> +<!ELEMENT human-resource-ref EMPTY> +<!ATTLIST human-resource-ref idref CDATA #REQUIRED> \ No newline at end of file diff --git a/stylebook/dtd/markup.ent b/stylebook/dtd/markup.ent new file mode 100644 index 000000000..66319e5f7 --- /dev/null +++ b/stylebook/dtd/markup.ent @@ -0,0 +1,21 @@ +<?xml encoding='US-ASCII'?> + +<!-- MARKUP ENTITY --> +<!ENTITY % markup "em|ref|code|br"> + +<!-- import the external source-specific dtd --> +<!ENTITY % externalEntity SYSTEM "../../sources/entities.ent"> +%externalEntity; +<!-- import the external charecters.ent dtd --> +<!ENTITY % charEntity SYSTEM "characters.ent"> +%charEntity; +<!-- import the external links.ent dtd --> +<!ENTITY % linksEntity SYSTEM "links.ent"> +%linksEntity; + +<!ELEMENT em (#PCDATA|%links;)*> +<!ELEMENT ref (#PCDATA|%links;)*> +<!ELEMENT code (#PCDATA|%links;|ref)*> +<!ELEMENT br EMPTY> + +<!-- CVS $Revision: 1.2 $ $Date: 1999/12/01 23:03:37 $ --> \ No newline at end of file diff --git a/xdocs/style/dtd/spec.dtd b/stylebook/dtd/spec.dtd similarity index 100% rename from xdocs/style/dtd/spec.dtd rename to stylebook/dtd/spec.dtd diff --git a/xdocs/style/dtd/xsl-html40s.dtd b/stylebook/dtd/xsl-html40s.dtd similarity index 100% rename from xdocs/style/dtd/xsl-html40s.dtd rename to stylebook/dtd/xsl-html40s.dtd diff --git a/stylebook/graphics/button-a.gif b/stylebook/graphics/button-a.gif new file mode 100644 index 000000000..5d0b8c242 Binary files /dev/null and b/stylebook/graphics/button-a.gif differ diff --git a/stylebook/graphics/button-b.gif b/stylebook/graphics/button-b.gif new file mode 100644 index 000000000..06e03811a Binary files /dev/null and b/stylebook/graphics/button-b.gif differ diff --git a/stylebook/loader.xml b/stylebook/loader.xml new file mode 100644 index 000000000..a416d8426 --- /dev/null +++ b/stylebook/loader.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> + +<!-- CVS $Revision: 1.1 $ $Date: 1999/12/01 14:26:14 $ --> + +<loader> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/book2project.xsl"/> + </processor> +</loader> diff --git a/xdocs/style/loaderdesign.xml b/stylebook/loaderdesign.xml similarity index 100% rename from xdocs/style/loaderdesign.xml rename to stylebook/loaderdesign.xml diff --git a/stylebook/resources/bottom.gif b/stylebook/resources/bottom.gif new file mode 100644 index 000000000..f39031efa Binary files /dev/null and b/stylebook/resources/bottom.gif differ diff --git a/stylebook/resources/button-asf-hi.gif b/stylebook/resources/button-asf-hi.gif new file mode 100644 index 000000000..08b880a74 Binary files /dev/null and b/stylebook/resources/button-asf-hi.gif differ diff --git a/stylebook/resources/button-asf-lo.gif b/stylebook/resources/button-asf-lo.gif new file mode 100644 index 000000000..134580f37 Binary files /dev/null and b/stylebook/resources/button-asf-lo.gif differ diff --git a/stylebook/resources/button-w3c-hi.gif b/stylebook/resources/button-w3c-hi.gif new file mode 100644 index 000000000..3bf0be395 Binary files /dev/null and b/stylebook/resources/button-w3c-hi.gif differ diff --git a/stylebook/resources/button-w3c-lo.gif b/stylebook/resources/button-w3c-lo.gif new file mode 100644 index 000000000..d383d3dd9 Binary files /dev/null and b/stylebook/resources/button-w3c-lo.gif differ diff --git a/stylebook/resources/button-xml-hi.gif b/stylebook/resources/button-xml-hi.gif new file mode 100644 index 000000000..01d095ce4 Binary files /dev/null and b/stylebook/resources/button-xml-hi.gif differ diff --git a/stylebook/resources/button-xml-lo.gif b/stylebook/resources/button-xml-lo.gif new file mode 100644 index 000000000..5719c7ef0 Binary files /dev/null and b/stylebook/resources/button-xml-lo.gif differ diff --git a/stylebook/resources/close.gif b/stylebook/resources/close.gif new file mode 100644 index 000000000..48a9782ce Binary files /dev/null and b/stylebook/resources/close.gif differ diff --git a/stylebook/resources/dot.gif b/stylebook/resources/dot.gif new file mode 100644 index 000000000..6227d1d86 Binary files /dev/null and b/stylebook/resources/dot.gif differ diff --git a/stylebook/resources/join.gif b/stylebook/resources/join.gif new file mode 100644 index 000000000..02e7611bb Binary files /dev/null and b/stylebook/resources/join.gif differ diff --git a/stylebook/resources/line.gif b/stylebook/resources/line.gif new file mode 100644 index 000000000..fd25c3943 Binary files /dev/null and b/stylebook/resources/line.gif differ diff --git a/stylebook/resources/logo.gif b/stylebook/resources/logo.gif new file mode 100644 index 000000000..53538c3f6 Binary files /dev/null and b/stylebook/resources/logo.gif differ diff --git a/stylebook/resources/note.gif b/stylebook/resources/note.gif new file mode 100644 index 000000000..339422266 Binary files /dev/null and b/stylebook/resources/note.gif differ diff --git a/stylebook/resources/right.gif b/stylebook/resources/right.gif new file mode 100644 index 000000000..bcb50e386 Binary files /dev/null and b/stylebook/resources/right.gif differ diff --git a/stylebook/resources/script.js b/stylebook/resources/script.js new file mode 100644 index 000000000..ebadeb2b8 --- /dev/null +++ b/stylebook/resources/script.js @@ -0,0 +1,21 @@ +rolloverImagesOn=new Array(); +rolloverImagesOff=new Array(); + +function rolloverOn(name) { + if(rolloverImagesOn[name]){ + document.images[name].src=rolloverImagesOn[name].src; + } +} + +function rolloverOff(name) { + if(rolloverImagesOff[name]){ + document.images[name].src=rolloverImagesOff[name].src; + } +} + +function rolloverLoad(name,on,off) { + rolloverImagesOn[name]=new Image(); + rolloverImagesOn[name].src=on; + rolloverImagesOff[name]=new Image(); + rolloverImagesOff[name].src=off; +} diff --git a/stylebook/resources/separator.gif b/stylebook/resources/separator.gif new file mode 100644 index 000000000..e7749432f Binary files /dev/null and b/stylebook/resources/separator.gif differ diff --git a/stylebook/resources/void.gif b/stylebook/resources/void.gif new file mode 100644 index 000000000..75b945d25 Binary files /dev/null and b/stylebook/resources/void.gif differ diff --git a/xdocs/sources/design/compilation.gif b/stylebook/sources/design/compilation.gif similarity index 100% rename from xdocs/sources/design/compilation.gif rename to stylebook/sources/design/compilation.gif diff --git a/xdocs/sources/design/conceptual.gif b/stylebook/sources/design/conceptual.gif similarity index 100% rename from xdocs/sources/design/conceptual.gif rename to stylebook/sources/design/conceptual.gif diff --git a/xdocs/sources/design/data.gif b/stylebook/sources/design/data.gif similarity index 100% rename from xdocs/sources/design/data.gif rename to stylebook/sources/design/data.gif diff --git a/xdocs/sources/design/design2_0_0.xml b/stylebook/sources/design/design2_0_0.xml similarity index 100% rename from xdocs/sources/design/design2_0_0.xml rename to stylebook/sources/design/design2_0_0.xml diff --git a/xdocs/sources/design/org_apache.gif b/stylebook/sources/design/org_apache.gif similarity index 100% rename from xdocs/sources/design/org_apache.gif rename to stylebook/sources/design/org_apache.gif diff --git a/xdocs/sources/design/process.gif b/stylebook/sources/design/process.gif similarity index 100% rename from xdocs/sources/design/process.gif rename to stylebook/sources/design/process.gif diff --git a/xdocs/sources/design/trax.gif b/stylebook/sources/design/trax.gif similarity index 100% rename from xdocs/sources/design/trax.gif rename to stylebook/sources/design/trax.gif diff --git a/xdocs/sources/design/xalan.gif b/stylebook/sources/design/xalan.gif similarity index 100% rename from xdocs/sources/design/xalan.gif rename to stylebook/sources/design/xalan.gif diff --git a/xdocs/sources/design/xalan1_1x1.gif b/stylebook/sources/design/xalan1_1x1.gif similarity index 100% rename from xdocs/sources/design/xalan1_1x1.gif rename to stylebook/sources/design/xalan1_1x1.gif diff --git a/xdocs/sources/design/xmllogo.gif b/stylebook/sources/design/xmllogo.gif similarity index 100% rename from xdocs/sources/design/xmllogo.gif rename to stylebook/sources/design/xmllogo.gif diff --git a/xdocs/sources/design/xpath.gif b/stylebook/sources/design/xpath.gif similarity index 100% rename from xdocs/sources/design/xpath.gif rename to stylebook/sources/design/xpath.gif diff --git a/xdocs/sources/design/xslt_abstract.gif b/stylebook/sources/design/xslt_abstract.gif similarity index 100% rename from xdocs/sources/design/xslt_abstract.gif rename to stylebook/sources/design/xslt_abstract.gif diff --git a/xdocs/sources/entities.src b/stylebook/sources/entities.ent similarity index 100% rename from xdocs/sources/entities.src rename to stylebook/sources/entities.ent diff --git a/stylebook/sources/entities.src b/stylebook/sources/entities.src new file mode 100644 index 000000000..b58c39218 --- /dev/null +++ b/stylebook/sources/entities.src @@ -0,0 +1,117 @@ +<?xml encoding="US-ASCII"?> +<!-- + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> + +<!ENTITY xslt "Xalan"> +<!ENTITY xslt4j "Xalan-Java"> +<!ENTITY xslt4j2 "Xalan-Java 2"> +<!ENTITY xslt4ji "&xslt4j; Interpretive"> +<!ENTITY xslt4jc-short "XSLTC"> +<!ENTITY xslt4jc-long "&xslt4j; Compiled"> +<!ENTITY xslt4j-dist-bin "&xslt4j-dist;-bin"> +<!ENTITY xslt4j-dist-src "&xslt4j-dist;-src"> +<!ENTITY xslt4j-dist "xalan-j_@version.VERSION@_@version.RELEASE@_@version.MINOR@"> +<!ENTITY xslt4j-current "&xslt4j; Version @version.VERSION@.@version.RELEASE@.@version.MINOR@"> +<!ENTITY xslt4j-distdir "http://www.apache.org/dyn/closer.cgi/xml/xalan-j/"> +<!ENTITY xslt4j_longname "Apache Xalan Java"> +<!ENTITY xml4j "Xerces-Java"> +<!ENTITY xml4j1 "Xerces-Java 1"> +<!ENTITY xml4j2 "Xerces-Java 2"> +<!ENTITY xml4j-used "&xml4j; @parser.version.VERSION@.@parser.version.RELEASE@.@parser.version.MINOR@"> +<!ENTITY xml4j-jar "xercesImpl.jar"> +<!ENTITY xslt4c "Xalan-C++"> +<!ENTITY xml4c "Xerces-C++"> +<!ENTITY jaxp13-short "JAXP 1.3"> +<!ENTITY jaxp13-long "Java API for XML Processing (JAXP) 1.3"> +<!ENTITY download "The &xslt4j-current; download includes &xml4j-jar; from &xml4j-used; and xml-apis.jar. +For version information about the contents of xml-apis.jar, see the JAR manifest."> + +<!ENTITY xsltcwhatsnewhead '<li><link anchor="xsltc">&xslt4jc-short;</link></li>'> + +<!ENTITY xsltcwhatsnew '<anchor name="xsltc"/><s2 title="&xslt4jc-long; (&xslt4jc-short;)"> + <p>In April 2001, Sun donated &xslt4jc-short; to the Xalan project. &xslt4jc-short; compiles stylesheets into translets and + provides a runtime environment for using translets to transform XML documents. Initially, &xslt4jc-short; is + available in a separate JAR. Over time, we plan to integrate the two codebases. For more information, + see <link idref="xsltc_usage">Getting Started with &xslt4jc-short;</link>, + <link idref="readme" anchor="xsltcreleasenotes">&xslt4jc-short; + Release Notes</link>, and <jump href="xsltc/index.html">&xslt4jc-short; Design</link>.</p> + </s2>'> + +<!ENTITY history2xsltc '<note>For &xslt4jc-short; changes since &xslt4jc-short; was incorporated into &xslt4j;, see + <link idref="xsltc_history">&xslt4jc-short; software changes</link>.</note>'> + +<!ENTITY xsltcclasspath '<p>If you are using <link idref="xsltc_usage">&xslt4jc-short;</link>, see + <link idref="xsltc_usage" anchor="classpath">Setting the system classpath for &xslt4jc-short;</link>.</p>'> + +<!ENTITY xsltcsampleshead '<li><link anchor="translets">translets</link></li>'> + +<!ENTITY xsltcsamples '<anchor name="translets"/><s2 title="Translets"> + <ul> + <li><link anchor="xsltc1">JAXPTransletOneTransformation</link></li> + <li><link anchor="xsltc2">JAXPTransletMultipleTransformations</link></li> + <li><link anchor="xsltcother">Other &xslt4jc-short; samples</link></li> + </ul> + <p>You can use the JAXP interfaces to compile and run translets. + For an overview of the usage patterns these samples illustrate, see + <link idref="xsltc_usage" anchor="api">Calling &xslt4jc-short; with the JAXP API</link>.</p> + <anchor name="xsltc1"/> + <s3 title="JAXPTransletOneTransformation"> + <p>What it does: Uses the &xslt4jc-short; TransformerFactory to compile a translet and use + the translet to transform the &xslt4jc-short; to-do list from XML into HTML.</p> + <p>Run this sample from the translets subdirectory with</p> + <p><code>java JAXPTransletOneTransformation</code></p> + <p>View the result in todo.html.</p> + </s3><anchor name="xsltc2"/> + <s3 title="JAXPTransletMultipleTransformations"> + <p>What it does: Uses the &xslt4jc-short; TransformerFactory to compile a translet and use + the Templates object associated with the translet to transform the &xslt4jc-short; and Xalan to-do lists from XML + into HTML.</p> + <p>Run this sample from the translets subdirectory with</p> + <p><code>java JAXPTransletMultipleTransformations</code></p> + <p>View the results in todo.html and todotoo.html.</p> + </s3><anchor name="xsltcother"/> + <s3 title="Other &xslt4jc-short; samples"> + <p>Other &xslt4jc-short; samples are located in the following samples subdirectories:</p> + <ul> + <li>CompiledServlet</li> + <li>CompiledBrazil</li> + <li>CompiledJAXP</li> + <li>CompiledApplet</li> + <li>CompiledEJB</li> + </ul> + <p>For information about each of these samples, consult the README file in the subdirectory.</p> + <p>&xslt4jc-short; provides demos for using &xslt4jc-short; as a servlet and as a handler for + Brazil (a new and powerful Web techology from Sun labs).</p> + <p>To run the Brazil-handler demo, download Brazil from sunlabs:</p> + <p><code> <jump href="http://research.sun.com/research/download/index.html">http://research.sun.com/research/download/index.html</jump></code></p> + <p>The translet must be specified as a pure class name, + accessible through the Brazil-handler's classpath. For + example:</p> + <p><code> translet=mk054</code></p> + <p>The document must be specified as a valid URL. For example:</p> + <p><code> document=http://server/path/to/filename.xml</code></p> + <p>If the file is local to the Brazil handler, it has to be + specified using the "file:filename.xml" format.</p> + <note>In order to run the Brazil-handler demo, you also need to + make the Brazil and javax classes available from your + classpath</note> + <p>To run the servlet demo, download the java extensions for servlets from Sun:</p> + <p><code> + <jump href="http://java.sun.com/products/servlet/download.html"> + http://java.sun.com/products/servlet/download.html</jump></code></p> + </s3> + </s2>'> diff --git a/xdocs/sources/xalan-apache-org-site.xml b/stylebook/sources/xalan-apache-org-site.xml similarity index 100% rename from xdocs/sources/xalan-apache-org-site.xml rename to stylebook/sources/xalan-apache-org-site.xml diff --git a/xdocs/sources/xalan-apache-org/index.xml b/stylebook/sources/xalan-apache-org/index.xml similarity index 100% rename from xdocs/sources/xalan-apache-org/index.xml rename to stylebook/sources/xalan-apache-org/index.xml diff --git a/xdocs/sources/xalan-collate.xsl b/stylebook/sources/xalan-collate.xsl similarity index 100% rename from xdocs/sources/xalan-collate.xsl rename to stylebook/sources/xalan-collate.xsl diff --git a/xdocs/sources/xalan-jlocal.xml b/stylebook/sources/xalan-jlocal.xml similarity index 100% rename from xdocs/sources/xalan-jlocal.xml rename to stylebook/sources/xalan-jlocal.xml diff --git a/xdocs/sources/xalan-jsite.xml b/stylebook/sources/xalan-jsite.xml similarity index 100% rename from xdocs/sources/xalan-jsite.xml rename to stylebook/sources/xalan-jsite.xml diff --git a/stylebook/sources/xalan/DONE b/stylebook/sources/xalan/DONE new file mode 100644 index 000000000..e69de29bb diff --git a/xdocs/sources/xalan/bugreporting.xml b/stylebook/sources/xalan/bugreporting.xml similarity index 100% rename from xdocs/sources/xalan/bugreporting.xml rename to stylebook/sources/xalan/bugreporting.xml diff --git a/xdocs/sources/xalan/builds.xml b/stylebook/sources/xalan/builds.xml similarity index 100% rename from xdocs/sources/xalan/builds.xml rename to stylebook/sources/xalan/builds.xml diff --git a/xdocs/sources/xalan/charter.xml b/stylebook/sources/xalan/charter.xml similarity index 100% rename from xdocs/sources/xalan/charter.xml rename to stylebook/sources/xalan/charter.xml diff --git a/xdocs/sources/xalan/commandline.xml b/stylebook/sources/xalan/commandline.xml similarity index 100% rename from xdocs/sources/xalan/commandline.xml rename to stylebook/sources/xalan/commandline.xml diff --git a/xdocs/sources/xalan/commandline_xsltc.xml b/stylebook/sources/xalan/commandline_xsltc.xml similarity index 100% rename from xdocs/sources/xalan/commandline_xsltc.xml rename to stylebook/sources/xalan/commandline_xsltc.xml diff --git a/xdocs/sources/xalan/contact_us.xml b/stylebook/sources/xalan/contact_us.xml similarity index 89% rename from xdocs/sources/xalan/contact_us.xml rename to stylebook/sources/xalan/contact_us.xml index 92e948bef..43a93046c 100644 --- a/xdocs/sources/xalan/contact_us.xml +++ b/stylebook/sources/xalan/contact_us.xml @@ -89,14 +89,21 @@ </p> <p> To subscribe an email account to the Xalan user mailing list send a note to - xalan-j-users-subscribe@xml.apache.org from that account. To unsubscribe - do the same, except replace <em>subscribe</em> with <em>unsubscribe</em>. + j-users-subscribe@xalan.apache.org from that account. </p> <p> To subscribe to the Xalan developer mailing list send a note to - xalan-dev-subscribe@xml.apache.org. To unsubscribe - do the same, except replace <em>subscribe</em> with <em>unsubscribe</em>. - </p> + dev-subscribe@xalan.apache.org. + </p> + <p> + For either of these mailing lists, doing the same but replacing + <em>subscribe</em> with <em>help</em> will return a message + telling you more about configuring your subscription's behavior. + </p> + <p> + To stop receiving mail from one of these lists, do the same but replace + <em>subscribe</em> with <em>unsubscribe</em>. + </p> <p> For more information on XML related Apache mailing lists go to <jump href="http://xml.apache.org/mail.html">Apache mailing lists</jump>. diff --git a/xdocs/sources/xalan/downloads.xml b/stylebook/sources/xalan/downloads.xml similarity index 94% rename from xdocs/sources/xalan/downloads.xml rename to stylebook/sources/xalan/downloads.xml index 8d4d9ac8d..d02af5418 100644 --- a/xdocs/sources/xalan/downloads.xml +++ b/stylebook/sources/xalan/downloads.xml @@ -84,13 +84,12 @@ If you have downloaded a binary distribution, you already have a build (you have the jars). This is also true for a source distribution, however if you downloaded a source distribution, - you have the option to use Ant to build &xslt4j;, - including <code>xalan.jar</code>, <code>xsltc.jar</code>, <code>serializer.jar</code> + you have the option to use Maven to build &xslt4j;, + including <code>xalan.jar</code>, <code>serializer.jar</code> and other things, see <link anchor="using-ant">Using Ant</link> for more details. </p> - </s2> <anchor name="download"/> <s2 title="Downloading what else you might need"> @@ -207,27 +206,35 @@ the test harness provided with Xalan then it is easiest if you keep the local directory names as suggested. With your paths set up to compile Java code, go into the local <em>java</em> - directory and issue these two commands: + directory and issue the command: + <source> + mvnbuild.sh + </source> + or, on windows, + <source> + mvnbuild.bat + </source> + This is equivalent to <source> - build clean - build - </source> + mvn clean package site + </source> </p> <p> - The <em>build.bat</em> batch file, or <em>build.sh</em> shell script (depending on - your operating system use <em>ant</em> and the buildfile <em>build.xml</em>. See + The <em>mvnbuild.bat</em> batch file, or <em>mvnbuild.sh</em> shell script (depending on + your operating system) use <em>maven</em> and the buildfiles <em>pom.xml</em>. See the section <link anchor="jar">Using ant</link> for more information. </p> <p> - Other useful targets may be <code>xsltc.jar</code> or <code>serializer.jar</code>. If you want to test the jars you just built in the directory <em>java/build</em>, change to - directory <em>test</em> and issue this command: + directory <em>xalan-test</em> and issue this command: <source> - build jar - build smoketest + build jar extensions.classes + build smoketest </source> The first target, <em>jar</em> builds the test harness and only needs to be done - once after the <em>test</em> repository is checked out. The second target, <em>smoketest</em>, + once after the <em>test</em> repository is checked out. + The second target builds plug-in extensions used to test that capability. + The third target, <em>smoketest</em>, runs the Xalan-J intepretive smoketest. Running the <em>build smoketest</em> or other targets in the <em>test</em> directory automatically looks for the jars in the directory <em>../java/build</em> @@ -267,6 +274,10 @@ build completed! <anchor name="using-ant"/> <s2 title="Using Ant To Build"> + <p> + WARNING: THIS SECTION REFERS TO THE OLD ANT-BASED BUILD OF XALAN. + IT NEEDS TO BE REWRITTEN FOR MAVEN-BASED BUILD + </p> <p> If you have downloaded a source distribution, or obtained source code using subversion, this section may be of interest to you. diff --git a/xdocs/sources/xalan/dtm.xml b/stylebook/sources/xalan/dtm.xml similarity index 100% rename from xdocs/sources/xalan/dtm.xml rename to stylebook/sources/xalan/dtm.xml diff --git a/xdocs/sources/xalan/extensions.xml b/stylebook/sources/xalan/extensions.xml similarity index 100% rename from xdocs/sources/xalan/extensions.xml rename to stylebook/sources/xalan/extensions.xml diff --git a/xdocs/sources/xalan/extensions_xsltc.xml b/stylebook/sources/xalan/extensions_xsltc.xml similarity index 100% rename from xdocs/sources/xalan/extensions_xsltc.xml rename to stylebook/sources/xalan/extensions_xsltc.xml diff --git a/xdocs/sources/xalan/extensionslib.xml b/stylebook/sources/xalan/extensionslib.xml similarity index 100% rename from xdocs/sources/xalan/extensionslib.xml rename to stylebook/sources/xalan/extensionslib.xml diff --git a/xdocs/sources/xalan/faq.xml b/stylebook/sources/xalan/faq.xml similarity index 100% rename from xdocs/sources/xalan/faq.xml rename to stylebook/sources/xalan/faq.xml diff --git a/xdocs/sources/xalan/features.xml b/stylebook/sources/xalan/features.xml similarity index 100% rename from xdocs/sources/xalan/features.xml rename to stylebook/sources/xalan/features.xml diff --git a/xdocs/sources/xalan/getstarted.xml b/stylebook/sources/xalan/getstarted.xml similarity index 100% rename from xdocs/sources/xalan/getstarted.xml rename to stylebook/sources/xalan/getstarted.xml diff --git a/xdocs/sources/xalan/history.xml b/stylebook/sources/xalan/history.xml similarity index 99% rename from xdocs/sources/xalan/history.xml rename to stylebook/sources/xalan/history.xml index d39e0cbdc..cdcfa2beb 100644 --- a/xdocs/sources/xalan/history.xml +++ b/stylebook/sources/xalan/history.xml @@ -4798,7 +4798,7 @@ alternatives.<br/><br/></li><li><ref>Committed by </ref>jkesselm@apache.org<ref> transforms so that when the transformer is reused, we were using nodesets from the previous transform which were using a different DTM. Note that we want keep any variables that have been set externally by the user (using -Transformer.setParameter()).<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xpath/res XPATHErrorResources.java<br/><ref>Committer's log entry: </ref>bug 4762: Fixed the duplicate error message in XPATH.<br/><br/></li><li><ref>Committed by </ref>jkesselm@apache.org<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Bugzilla 4054: Retain previously set output properties when adding new ones.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Bug 5872. We were using a constructor of TransformerException without the +Transformer.setParameter()).<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xpath/res XPATHErrorResources.java<br/><ref>Committer's log entry: </ref>bug 4762: Fixed the duplicate error message in XPATH.<br/><br/></li><li><ref>Committed by </ref>jkesselm@apache.org<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Bugzilla 4054: Retain previously set output properties when adding new ones.<br/><br/></li><li><ref>Committed by </ref>mmidy@apache.org<ref> on </ref>01/28/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/transformer TransformerImpl.java<br/><ref>Committer's log entry: </ref>Bug 5872. We were using a constructor of TransformerException without the locator information. Changed to code to use a locator if info is available.<br/><br/></li><li><ref>Committed by </ref>dleslie@apache.org<ref> on </ref>01/30/2002<br/><ref>Modified: </ref>java/src/org/apache/xalan/lib NodeInfo.java<br/><ref>Committer's log entry: </ref>Changed "system id" to "public identifier" in javadoc comments for publicId() methods.<br/><br/></li><li><ref>Committed by </ref>jkesselm@apache.org<ref> on </ref>01/30/2002<br/><ref>Modified: </ref>java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java<br/><ref>Committer's log entry: </ref>Bugzilla 2617, part 1: Construct the data structures and access them correctly. diff --git a/xdocs/sources/xalan/index.xml b/stylebook/sources/xalan/index.xml similarity index 100% rename from xdocs/sources/xalan/index.xml rename to stylebook/sources/xalan/index.xml diff --git a/xdocs/sources/xalan/overview.xml b/stylebook/sources/xalan/overview.xml similarity index 100% rename from xdocs/sources/xalan/overview.xml rename to stylebook/sources/xalan/overview.xml diff --git a/xdocs/sources/xalan/public_apis.xml b/stylebook/sources/xalan/public_apis.xml similarity index 100% rename from xdocs/sources/xalan/public_apis.xml rename to stylebook/sources/xalan/public_apis.xml diff --git a/xdocs/sources/xalan/readme.xml b/stylebook/sources/xalan/readme.xml similarity index 100% rename from xdocs/sources/xalan/readme.xml rename to stylebook/sources/xalan/readme.xml diff --git a/xdocs/sources/xalan/resources.xml b/stylebook/sources/xalan/resources.xml similarity index 100% rename from xdocs/sources/xalan/resources.xml rename to stylebook/sources/xalan/resources.xml diff --git a/xdocs/sources/xalan/samples.xml b/stylebook/sources/xalan/samples.xml similarity index 100% rename from xdocs/sources/xalan/samples.xml rename to stylebook/sources/xalan/samples.xml diff --git a/xdocs/sources/xalan/trax.xml b/stylebook/sources/xalan/trax.xml similarity index 100% rename from xdocs/sources/xalan/trax.xml rename to stylebook/sources/xalan/trax.xml diff --git a/xdocs/sources/xalan/usagepatterns.xml b/stylebook/sources/xalan/usagepatterns.xml similarity index 100% rename from xdocs/sources/xalan/usagepatterns.xml rename to stylebook/sources/xalan/usagepatterns.xml diff --git a/xdocs/sources/xalan/whatsnew.xml b/stylebook/sources/xalan/whatsnew.xml similarity index 100% rename from xdocs/sources/xalan/whatsnew.xml rename to stylebook/sources/xalan/whatsnew.xml diff --git a/stylebook/sources/xalan/xalan-collate.xml b/stylebook/sources/xalan/xalan-collate.xml new file mode 100644 index 000000000..947ac93d7 --- /dev/null +++ b/stylebook/sources/xalan/xalan-collate.xml @@ -0,0 +1,107 @@ +<?xml version="1.0" encoding="UTF-8"?><documentation><chapter id="index"><!-- + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--><!-- $Id$ --><s1 title="Xalan-Java DTM"> +<ul> + <li><link anchor="intro">Introduction</link></li> + <li><link anchor="settings">Performance settings</link></li> +</ul><anchor name="intro"/> +<s2 title="Introduction"> + <p>The Document Table Model (DTM) is an interface to a Document Model designed specifically for + the needs of our XPath and XSLT implementations. The motivation behind this model is to optimize + performance and minimize storage.</p> + <p>Specifically, DTM avoids the overhead of instantiating the objects the standard DOM requires to + represent a tree of nodes. DTM uses unique integer "handles" to identify nodes, integer ID values + to represent URLs, local names, and expanded names, and integer index and length references to a + string buffer to represent the text value of each node.</p> + <p>In general, the "read" APIs to DTM resemble those of the W3C Document Object Model + (<resource-ref idref="dom"/>) interface. However, in place of the DOM object tree of nodes, DTM + uses integer arrays and string pools to represent the structure and content of the XML document to + be transformed. DTM also structures the document's contents slightly differently, to better match + the XPath data model; some details and constraints present in a standard DOM are suppressed, and a + few XPath-specific features are added.</p> + <p>DTM is intended to be a read-only model, and so does not attempt to replicate the DOM's write or + create-node operations.</p> + <p>The details of constructing a DTM vary depending on which implementation of this API you are + using. Two reference implementations are currently available:</p> + <ul> + <li>SAX2DTM (built via a SAX stream)</li> + <li>DOM2DTM (which provides DTM access to an existing DOM)</li> + </ul> + <p>Both DTMs can be built incrementally (see <link anchor="incremental">incremental transforms</link>). + When operating incrementally, the DTM allows the Xalan-Java processor to begin reading the DTM and + performing the transformation while the DTM is still being assembled (for example, while the parser + is still parsing the XML source), and attempts to do only as much work as is needed to support the + read requests actually made by the XPath or XSLT processor.</p> + <p>For the convenience of user-written extensions, a proxy mechanism presents the contents of the + DTM as a read-only subset of the DOM.</p> +</s2> + +<anchor name="settings"/> +<s2 title="DTM performance settings"> + <p>Xalan-Java implements two DTM performance features that you can control with the TransformerFactory + <jump href="apidocs/javax/xml/transform/TransformerFactory.html#setAttribute(java.lang.String, java.lang.Object)">setAttribute(String name, Object value)</jump> method.</p> + <table> + <tr> + <th colspan="1" rowspan="1">Attribute name (URL)</th> + <th colspan="1" rowspan="1">Default setting</th> + <th colspan="1" rowspan="1">Description</th> + </tr> + <tr> + <td colspan="1" rowspan="1">"http://xml.apache.org/xalan/features/incremental"</td> + <td colspan="1" rowspan="1">false</td> + <td colspan="1" rowspan="1"><link anchor="incremental">incremental transforms</link></td> + </tr> + <tr> + <td colspan="1" rowspan="1">"http://xml.apache.org/xalan/features/optimize"</td> + <td colspan="1" rowspan="1">true</td> + <td colspan="1" rowspan="1"><link anchor="optimized">optimized transforms</link></td> + </tr> + </table> + <p>Both of these DTM settings are described below.</p> + + <p> </p> + <anchor name="incremental"/> + <s3 title="'http://xml.apache.org/xalan/features/incremental'"> + <p>Set this feature to true to enable incremental transformations. If set to false (the default), + the transform and the parse are performed on the same thread.</p> + <note> When set to true: If the parser is Xerces, we perform an incremental transform on a single + thread using the Xerces "parse on demand" feature. If the parser is not Xerces, we run the + transform in one thread and the parse in another. Exception: if the parser is not Xerces + and the XML source is a DOMSource, setting this feature to true has no effect.</note> + <note> The incremental feature is not currently supported by the XSLT Compiling processor, XSLTC.</note> + <p>Example: setting incremental transforms to true (for the XSLT Interpretive processor):</p> + <source>javax.xml.transform.TransformerFactory tFactory = + javax.xml.transform.TransformerFactory.newInstance(); + // setAttribute() takes a String and an Object. + tFactory.setAttribute + ("http://xml.apache.org/xalan/features/incremental", + java.lang.Boolean.TRUE); + ...</source> + </s3> + + <anchor name="optimized"/> + <s3 title="'http://xml.apache.org/xalan/features/optimize'"> + <p>When set to true (the default), this feature enables optimizations that may involve structural + rewrites of the stylesheet. Any tool that requires direct access to the stylesheet structure + should set this feature to false.</p> + </s3> +</s2> + +<s2 title="DTM node location tracking setting"> + <p>The DTM also provides a setting that you can use to track location information for each node in + the source document. See <link idref="features" anchor="source_location">"http://apache.org/xalan/features/source_location"</link></p> +</s2> +</s1></chapter></documentation> \ No newline at end of file diff --git a/xdocs/sources/xalan/xmlfilters.gif b/stylebook/sources/xalan/xmlfilters.gif similarity index 100% rename from xdocs/sources/xalan/xmlfilters.gif rename to stylebook/sources/xalan/xmlfilters.gif diff --git a/xdocs/sources/xalan/xpath_apis.xml b/stylebook/sources/xalan/xpath_apis.xml similarity index 100% rename from xdocs/sources/xalan/xpath_apis.xml rename to stylebook/sources/xalan/xpath_apis.xml diff --git a/xdocs/sources/xalan/xsltc_history.xml b/stylebook/sources/xalan/xsltc_history.xml similarity index 100% rename from xdocs/sources/xalan/xsltc_history.xml rename to stylebook/sources/xalan/xsltc_history.xml diff --git a/xdocs/sources/xalan/xsltc_usage.xml b/stylebook/sources/xalan/xsltc_usage.xml similarity index 100% rename from xdocs/sources/xalan/xsltc_usage.xml rename to stylebook/sources/xalan/xsltc_usage.xml diff --git a/xdocs/sources/xalandesign.xml b/stylebook/sources/xalandesign.xml similarity index 100% rename from xdocs/sources/xalandesign.xml rename to stylebook/sources/xalandesign.xml diff --git a/xdocs/sources/xsltc.xml b/stylebook/sources/xsltc.xml similarity index 100% rename from xdocs/sources/xsltc.xml rename to stylebook/sources/xsltc.xml diff --git a/xdocs/sources/xsltc/DOMInterface.gif b/stylebook/sources/xsltc/DOMInterface.gif similarity index 100% rename from xdocs/sources/xsltc/DOMInterface.gif rename to stylebook/sources/xsltc/DOMInterface.gif diff --git a/xdocs/sources/xsltc/DOMLocking.gif b/stylebook/sources/xsltc/DOMLocking.gif similarity index 100% rename from xdocs/sources/xsltc/DOMLocking.gif rename to stylebook/sources/xsltc/DOMLocking.gif diff --git a/xdocs/sources/xsltc/README b/stylebook/sources/xsltc/README similarity index 100% rename from xdocs/sources/xsltc/README rename to stylebook/sources/xsltc/README diff --git a/xdocs/sources/xsltc/README.APACHE b/stylebook/sources/xsltc/README.APACHE similarity index 100% rename from xdocs/sources/xsltc/README.APACHE rename to stylebook/sources/xsltc/README.APACHE diff --git a/xdocs/sources/xsltc/README.api b/stylebook/sources/xsltc/README.api similarity index 100% rename from xdocs/sources/xsltc/README.api rename to stylebook/sources/xsltc/README.api diff --git a/xdocs/sources/xsltc/README.xslt b/stylebook/sources/xsltc/README.xslt similarity index 100% rename from xdocs/sources/xsltc/README.xslt rename to stylebook/sources/xsltc/README.xslt diff --git a/xdocs/sources/xsltc/README.xsltc b/stylebook/sources/xsltc/README.xsltc similarity index 100% rename from xdocs/sources/xsltc/README.xsltc rename to stylebook/sources/xsltc/README.xsltc diff --git a/xdocs/sources/xsltc/README2 b/stylebook/sources/xsltc/README2 similarity index 100% rename from xdocs/sources/xsltc/README2 rename to stylebook/sources/xsltc/README2 diff --git a/xdocs/sources/xsltc/all_namespaces.gif b/stylebook/sources/xsltc/all_namespaces.gif similarity index 100% rename from xdocs/sources/xsltc/all_namespaces.gif rename to stylebook/sources/xsltc/all_namespaces.gif diff --git a/xdocs/sources/xsltc/ast_stage1.gif b/stylebook/sources/xsltc/ast_stage1.gif similarity index 100% rename from xdocs/sources/xsltc/ast_stage1.gif rename to stylebook/sources/xsltc/ast_stage1.gif diff --git a/xdocs/sources/xsltc/ast_stage2.gif b/stylebook/sources/xsltc/ast_stage2.gif similarity index 100% rename from xdocs/sources/xsltc/ast_stage2.gif rename to stylebook/sources/xsltc/ast_stage2.gif diff --git a/xdocs/sources/xsltc/ast_stage3.gif b/stylebook/sources/xsltc/ast_stage3.gif similarity index 100% rename from xdocs/sources/xsltc/ast_stage3.gif rename to stylebook/sources/xsltc/ast_stage3.gif diff --git a/xdocs/sources/xsltc/cast_expression.gif b/stylebook/sources/xsltc/cast_expression.gif similarity index 100% rename from xdocs/sources/xsltc/cast_expression.gif rename to stylebook/sources/xsltc/cast_expression.gif diff --git a/xdocs/sources/xsltc/class_loader.gif b/stylebook/sources/xsltc/class_loader.gif similarity index 100% rename from xdocs/sources/xsltc/class_loader.gif rename to stylebook/sources/xsltc/class_loader.gif diff --git a/xdocs/sources/xsltc/compiler_AST.gif b/stylebook/sources/xsltc/compiler_AST.gif similarity index 100% rename from xdocs/sources/xsltc/compiler_AST.gif rename to stylebook/sources/xsltc/compiler_AST.gif diff --git a/xdocs/sources/xsltc/compiler_DOM.gif b/stylebook/sources/xsltc/compiler_DOM.gif similarity index 100% rename from xdocs/sources/xsltc/compiler_DOM.gif rename to stylebook/sources/xsltc/compiler_DOM.gif diff --git a/xdocs/sources/xsltc/compiler_architecture.gif b/stylebook/sources/xsltc/compiler_architecture.gif similarity index 100% rename from xdocs/sources/xsltc/compiler_architecture.gif rename to stylebook/sources/xsltc/compiler_architecture.gif diff --git a/xdocs/sources/xsltc/compiler_design.gif b/stylebook/sources/xsltc/compiler_design.gif similarity index 100% rename from xdocs/sources/xsltc/compiler_design.gif rename to stylebook/sources/xsltc/compiler_design.gif diff --git a/xdocs/sources/xsltc/dom_namespace1.gif b/stylebook/sources/xsltc/dom_namespace1.gif similarity index 100% rename from xdocs/sources/xsltc/dom_namespace1.gif rename to stylebook/sources/xsltc/dom_namespace1.gif diff --git a/xdocs/sources/xsltc/dom_namespace2.gif b/stylebook/sources/xsltc/dom_namespace2.gif similarity index 100% rename from xdocs/sources/xsltc/dom_namespace2.gif rename to stylebook/sources/xsltc/dom_namespace2.gif diff --git a/xdocs/sources/xsltc/dom_namespace3.gif b/stylebook/sources/xsltc/dom_namespace3.gif similarity index 100% rename from xdocs/sources/xsltc/dom_namespace3.gif rename to stylebook/sources/xsltc/dom_namespace3.gif diff --git a/xdocs/sources/xsltc/index.xml b/stylebook/sources/xsltc/index.xml similarity index 100% rename from xdocs/sources/xsltc/index.xml rename to stylebook/sources/xsltc/index.xml diff --git a/xdocs/sources/xsltc/iterator_stack.gif b/stylebook/sources/xsltc/iterator_stack.gif similarity index 100% rename from xdocs/sources/xsltc/iterator_stack.gif rename to stylebook/sources/xsltc/iterator_stack.gif diff --git a/xdocs/sources/xsltc/key_relations.gif b/stylebook/sources/xsltc/key_relations.gif similarity index 100% rename from xdocs/sources/xsltc/key_relations.gif rename to stylebook/sources/xsltc/key_relations.gif diff --git a/xdocs/sources/xsltc/match_namespace1.gif b/stylebook/sources/xsltc/match_namespace1.gif similarity index 100% rename from xdocs/sources/xsltc/match_namespace1.gif rename to stylebook/sources/xsltc/match_namespace1.gif diff --git a/xdocs/sources/xsltc/match_namespace2.gif b/stylebook/sources/xsltc/match_namespace2.gif similarity index 100% rename from xdocs/sources/xsltc/match_namespace2.gif rename to stylebook/sources/xsltc/match_namespace2.gif diff --git a/xdocs/sources/xsltc/namespace_stack.gif b/stylebook/sources/xsltc/namespace_stack.gif similarity index 100% rename from xdocs/sources/xsltc/namespace_stack.gif rename to stylebook/sources/xsltc/namespace_stack.gif diff --git a/xdocs/sources/xsltc/output_namespaces1.gif b/stylebook/sources/xsltc/output_namespaces1.gif similarity index 100% rename from xdocs/sources/xsltc/output_namespaces1.gif rename to stylebook/sources/xsltc/output_namespaces1.gif diff --git a/xdocs/sources/xsltc/output_namespaces2.gif b/stylebook/sources/xsltc/output_namespaces2.gif similarity index 100% rename from xdocs/sources/xsltc/output_namespaces2.gif rename to stylebook/sources/xsltc/output_namespaces2.gif diff --git a/xdocs/sources/xsltc/output_settings.gif b/stylebook/sources/xsltc/output_settings.gif similarity index 100% rename from xdocs/sources/xsltc/output_settings.gif rename to stylebook/sources/xsltc/output_settings.gif diff --git a/xdocs/sources/xsltc/overall_design.gif b/stylebook/sources/xsltc/overall_design.gif similarity index 100% rename from xdocs/sources/xsltc/overall_design.gif rename to stylebook/sources/xsltc/overall_design.gif diff --git a/xdocs/sources/xsltc/pattern_objects.gif b/stylebook/sources/xsltc/pattern_objects.gif similarity index 100% rename from xdocs/sources/xsltc/pattern_objects.gif rename to stylebook/sources/xsltc/pattern_objects.gif diff --git a/xdocs/sources/xsltc/runtime_architecture.gif b/stylebook/sources/xsltc/runtime_architecture.gif similarity index 100% rename from xdocs/sources/xsltc/runtime_architecture.gif rename to stylebook/sources/xsltc/runtime_architecture.gif diff --git a/xdocs/sources/xsltc/runtime_design.gif b/stylebook/sources/xsltc/runtime_design.gif similarity index 100% rename from xdocs/sources/xsltc/runtime_design.gif rename to stylebook/sources/xsltc/runtime_design.gif diff --git a/xdocs/sources/xsltc/runtime_type_mapping.gif b/stylebook/sources/xsltc/runtime_type_mapping.gif similarity index 100% rename from xdocs/sources/xsltc/runtime_type_mapping.gif rename to stylebook/sources/xsltc/runtime_type_mapping.gif diff --git a/xdocs/sources/xsltc/sort_objects.gif b/stylebook/sources/xsltc/sort_objects.gif similarity index 100% rename from xdocs/sources/xsltc/sort_objects.gif rename to stylebook/sources/xsltc/sort_objects.gif diff --git a/xdocs/sources/xsltc/translet_wrapping.gif b/stylebook/sources/xsltc/translet_wrapping.gif similarity index 100% rename from xdocs/sources/xsltc/translet_wrapping.gif rename to stylebook/sources/xsltc/translet_wrapping.gif diff --git a/xdocs/sources/xsltc/trax_output_settings.gif b/stylebook/sources/xsltc/trax_output_settings.gif similarity index 100% rename from xdocs/sources/xsltc/trax_output_settings.gif rename to stylebook/sources/xsltc/trax_output_settings.gif diff --git a/xdocs/sources/xsltc/trax_translet_wrapping.gif b/stylebook/sources/xsltc/trax_translet_wrapping.gif similarity index 100% rename from xdocs/sources/xsltc/trax_translet_wrapping.gif rename to stylebook/sources/xsltc/trax_translet_wrapping.gif diff --git a/xdocs/sources/xsltc/type_mapping.gif b/stylebook/sources/xsltc/type_mapping.gif similarity index 100% rename from xdocs/sources/xsltc/type_mapping.gif rename to stylebook/sources/xsltc/type_mapping.gif diff --git a/xdocs/sources/xsltc/type_mappings.gif b/stylebook/sources/xsltc/type_mappings.gif similarity index 100% rename from xdocs/sources/xsltc/type_mappings.gif rename to stylebook/sources/xsltc/type_mappings.gif diff --git a/xdocs/sources/xsltc/typecast.gif b/stylebook/sources/xsltc/typecast.gif similarity index 100% rename from xdocs/sources/xsltc/typecast.gif rename to stylebook/sources/xsltc/typecast.gif diff --git a/xdocs/sources/xsltc/uri_resolver.gif b/stylebook/sources/xsltc/uri_resolver.gif similarity index 100% rename from xdocs/sources/xsltc/uri_resolver.gif rename to stylebook/sources/xsltc/uri_resolver.gif diff --git a/xdocs/sources/xsltc/xsl_choose_design.xml b/stylebook/sources/xsltc/xsl_choose_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_choose_design.xml rename to stylebook/sources/xsltc/xsl_choose_design.xml diff --git a/xdocs/sources/xsltc/xsl_comment_design.xml b/stylebook/sources/xsltc/xsl_comment_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_comment_design.xml rename to stylebook/sources/xsltc/xsl_comment_design.xml diff --git a/xdocs/sources/xsltc/xsl_if_design.xml b/stylebook/sources/xsltc/xsl_if_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_if_design.xml rename to stylebook/sources/xsltc/xsl_if_design.xml diff --git a/xdocs/sources/xsltc/xsl_include_design.xml b/stylebook/sources/xsltc/xsl_include_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_include_design.xml rename to stylebook/sources/xsltc/xsl_include_design.xml diff --git a/xdocs/sources/xsltc/xsl_key_design.xml b/stylebook/sources/xsltc/xsl_key_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_key_design.xml rename to stylebook/sources/xsltc/xsl_key_design.xml diff --git a/xdocs/sources/xsltc/xsl_lang_design.xml b/stylebook/sources/xsltc/xsl_lang_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_lang_design.xml rename to stylebook/sources/xsltc/xsl_lang_design.xml diff --git a/xdocs/sources/xsltc/xsl_sort_design.xml b/stylebook/sources/xsltc/xsl_sort_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_sort_design.xml rename to stylebook/sources/xsltc/xsl_sort_design.xml diff --git a/xdocs/sources/xsltc/xsl_unparsed_design.xml b/stylebook/sources/xsltc/xsl_unparsed_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_unparsed_design.xml rename to stylebook/sources/xsltc/xsl_unparsed_design.xml diff --git a/xdocs/sources/xsltc/xsl_variable_design.xml b/stylebook/sources/xsltc/xsl_variable_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_variable_design.xml rename to stylebook/sources/xsltc/xsl_variable_design.xml diff --git a/xdocs/sources/xsltc/xsl_whitespace_design.xml b/stylebook/sources/xsltc/xsl_whitespace_design.xml similarity index 100% rename from xdocs/sources/xsltc/xsl_whitespace_design.xml rename to stylebook/sources/xsltc/xsl_whitespace_design.xml diff --git a/xdocs/sources/xsltc/xsltc_compiler.xml b/stylebook/sources/xsltc/xsltc_compiler.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_compiler.xml rename to stylebook/sources/xsltc/xsltc_compiler.xml diff --git a/xdocs/sources/xsltc/xsltc_dom.xml b/stylebook/sources/xsltc/xsltc_dom.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_dom.xml rename to stylebook/sources/xsltc/xsltc_dom.xml diff --git a/xdocs/sources/xsltc/xsltc_iterators.xml b/stylebook/sources/xsltc/xsltc_iterators.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_iterators.xml rename to stylebook/sources/xsltc/xsltc_iterators.xml diff --git a/xdocs/sources/xsltc/xsltc_namespace.xml b/stylebook/sources/xsltc/xsltc_namespace.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_namespace.xml rename to stylebook/sources/xsltc/xsltc_namespace.xml diff --git a/xdocs/sources/xsltc/xsltc_native_api.xml b/stylebook/sources/xsltc/xsltc_native_api.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_native_api.xml rename to stylebook/sources/xsltc/xsltc_native_api.xml diff --git a/xdocs/sources/xsltc/xsltc_overview.xml b/stylebook/sources/xsltc/xsltc_overview.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_overview.xml rename to stylebook/sources/xsltc/xsltc_overview.xml diff --git a/xdocs/sources/xsltc/xsltc_performance.xml b/stylebook/sources/xsltc/xsltc_performance.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_performance.xml rename to stylebook/sources/xsltc/xsltc_performance.xml diff --git a/xdocs/sources/xsltc/xsltc_predicates.xml b/stylebook/sources/xsltc/xsltc_predicates.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_predicates.xml rename to stylebook/sources/xsltc/xsltc_predicates.xml diff --git a/xdocs/sources/xsltc/xsltc_runtime.xml b/stylebook/sources/xsltc/xsltc_runtime.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_runtime.xml rename to stylebook/sources/xsltc/xsltc_runtime.xml diff --git a/xdocs/sources/xsltc/xsltc_trax.xml b/stylebook/sources/xsltc/xsltc_trax.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_trax.xml rename to stylebook/sources/xsltc/xsltc_trax.xml diff --git a/xdocs/sources/xsltc/xsltc_trax_api.xml b/stylebook/sources/xsltc/xsltc_trax_api.xml similarity index 100% rename from xdocs/sources/xsltc/xsltc_trax_api.xml rename to stylebook/sources/xsltc/xsltc_trax_api.xml diff --git a/stylebook/style/dtd/blocks.ent b/stylebook/style/dtd/blocks.ent new file mode 100644 index 000000000..5f352d1bf --- /dev/null +++ b/stylebook/style/dtd/blocks.ent @@ -0,0 +1,40 @@ +<?xml encoding='US-ASCII'?> + +<!-- BLOCKS ENTITY --> +<!ENTITY % blocks "p|note|ul|ol|gloss|table|source|anchor"> + +<!-- import the external markup.ent dtd --> +<!ENTITY % markupEntity SYSTEM "markup.ent"> +%markupEntity; + +<!ENTITY % content "(#PCDATA|%markup;|%links;)*"> + +<!ELEMENT p %content;> +<!ELEMENT note %content;> + +<!ELEMENT ul (li|ol|ul)+> +<!ELEMENT ol (li|ol|ul)+> +<!ELEMENT li %content;> + +<!ELEMENT gloss (label|item)+> +<!ELEMENT label %content;> +<!ELEMENT item %content;> + +<!ELEMENT source (#PCDATA)> + +<!ELEMENT table (tr)+> + +<!ELEMENT tr (tn|th|td)+> + +<!ELEMENT tn EMPTY> +<!ATTLIST tn colspan CDATA "1" + rowspan CDATA "1"> + +<!ELEMENT th %content;> +<!ATTLIST th colspan CDATA "1" + rowspan CDATA "1"> + +<!ELEMENT td %content;> +<!ATTLIST td colspan CDATA "1" + rowspan CDATA "1"> + \ No newline at end of file diff --git a/stylebook/style/dtd/book.dtd b/stylebook/style/dtd/book.dtd new file mode 100644 index 000000000..2f49ce990 --- /dev/null +++ b/stylebook/style/dtd/book.dtd @@ -0,0 +1,49 @@ +<?xml encoding='US-ASCII'?> + +<!-- STYLEBOOK BOOK DTD --> + +<!-- import the external source-specific dtd --> +<!ENTITY % externalEntity SYSTEM "sbk:/sources/entities.ent"> +%externalEntity; + +<!ELEMENT book (resources?|document|hidden|faqs|changes|group|external|separator)+> +<!ATTLIST book title CDATA #REQUIRED + copyright CDATA #IMPLIED> + +<!ELEMENT resources EMPTY> +<!ATTLIST resources source CDATA #REQUIRED> + +<!ELEMENT document EMPTY> +<!ATTLIST document id ID #REQUIRED + source CDATA #REQUIRED + label CDATA #REQUIRED> + +<!ELEMENT hidden EMPTY> +<!ATTLIST hidden id ID #REQUIRED + source CDATA #REQUIRED> + +<!ELEMENT faqs EMPTY> +<!ATTLIST faqs id ID #REQUIRED + source CDATA #REQUIRED + label CDATA #REQUIRED> + +<!ELEMENT changes EMPTY> +<!ATTLIST changes id ID #REQUIRED + source CDATA #REQUIRED + label CDATA #REQUIRED> + +<!ELEMENT group (entry)+> +<!ATTLIST group id ID #IMPLIED + label CDATA #REQUIRED> + +<!ELEMENT entry EMPTY> +<!ATTLIST entry id ID #REQUIRED + source CDATA #REQUIRED> + +<!ELEMENT external EMPTY> +<!ATTLIST external label CDATA #REQUIRED + href CDATA #REQUIRED> + +<!ELEMENT separator EMPTY> + +<!-- CVS $Revision: 1.3 $ $Date: 1999/12/01 23:03:37 $ --> \ No newline at end of file diff --git a/stylebook/style/dtd/changes.dtd b/stylebook/style/dtd/changes.dtd new file mode 100644 index 000000000..661affa86 --- /dev/null +++ b/stylebook/style/dtd/changes.dtd @@ -0,0 +1,24 @@ +<?xml encoding='US-ASCII'?> + +<!-- STYLEBOOK CHANGES DTD --> + +<!-- import the external markup.ent dtd --> +<!ENTITY % markupEntity SYSTEM "markup.ent"> +%markupEntity; + +<!ENTITY % content "(#PCDATA|%markup;|%links;)*"> + +<!ELEMENT changes (release)+> +<!ATTLIST changes title CDATA #REQUIRED> + +<!ELEMENT release ((features,fixes)|(features)|(fixes))> +<!ATTLIST release version CDATA #REQUIRED + date CDATA #IMPLIED> + +<!ELEMENT features (feat)+> +<!ELEMENT fixes (fix)+> + +<!ELEMENT feat %content;> +<!ELEMENT fix %content;> + +<!-- CVS $Revision: 1.3 $ $Date: 1999/12/01 23:03:37 $ --> \ No newline at end of file diff --git a/stylebook/style/dtd/characters.ent b/stylebook/style/dtd/characters.ent new file mode 100644 index 000000000..036c06d5e --- /dev/null +++ b/stylebook/style/dtd/characters.ent @@ -0,0 +1,297 @@ +<?xml encoding='US-ASCII'?> + +<!-- CHARACTERS ENTITY --> + +<!-- Latin A --> +<!ENTITY nbsp " "> <!-- U+00A0 ISOnum - no-break space = non-breaking space --> +<!ENTITY iexcl "¡"> <!-- U+00A1 ISOnum - inverted exclamation mark --> +<!ENTITY cent "¢"> <!-- U+00A2 ISOnum - cent sign --> +<!ENTITY pound "£"> <!-- U+00A3 ISOnum - pound sign --> +<!ENTITY curren "¤"> <!-- U+00A4 ISOnum - currency sign --> +<!ENTITY yen "¥"> <!-- U+00A5 ISOnum - yen sign = yuan sign --> +<!ENTITY brvbar "¦"> <!-- U+00A6 ISOnum - broken bar = broken vertical bar --> +<!ENTITY sect "§"> <!-- U+00A7 ISOnum - section sign --> +<!ENTITY uml "¨"> <!-- U+00A8 ISOdia - diaeresis = spacing diaeresis --> +<!ENTITY copy "©"> <!-- U+00A9 ISOnum - copyright sign --> +<!ENTITY ordf "ª"> <!-- U+00AA ISOnum - feminine ordinal indicator --> +<!ENTITY laquo "«"> <!-- U+00AB ISOnum - left-pointing double angle quotation mark = left pointing guillemet --> +<!ENTITY not "¬"> <!-- U+00AC ISOnum - not sign --> +<!ENTITY shy "­"> <!-- U+00AD ISOnum - soft hyphen = discretionary hyphen --> +<!ENTITY reg "®"> <!-- U+00AE ISOnum - registered sign = registered trade mark sign --> +<!ENTITY macr "¯"> <!-- U+00AF ISOdia - macron = spacing macron = overline = APL overbar --> +<!ENTITY deg "°"> <!-- U+00B0 ISOnum - degree sign --> +<!ENTITY plusmn "±"> <!-- U+00B1 ISOnum - plus-minus sign = plus-or-minus sign --> +<!ENTITY sup2 "²"> <!-- U+00B2 ISOnum - superscript two = superscript digit two = squared --> +<!ENTITY sup3 "³"> <!-- U+00B3 ISOnum - superscript three = superscript digit three = cubed --> +<!ENTITY acute "´"> <!-- U+00B4 ISOdia - acute accent = spacing acute --> +<!ENTITY micro "µ"> <!-- U+00B5 ISOnum - micro sign --> +<!ENTITY para "¶"> <!-- U+00B6 ISOnum - pilcrow sign = paragraph sign --> +<!ENTITY middot "·"> <!-- U+00B7 ISOnum - middle dot = Georgian comma = Greek middle dot --> +<!ENTITY cedil "¸"> <!-- U+00B8 ISOdia - cedilla = spacing cedilla --> +<!ENTITY sup1 "¹"> <!-- U+00B9 ISOnum - superscript one = superscript digit one --> +<!ENTITY ordm "º"> <!-- U+00BA ISOnum - masculine ordinal indicator --> +<!ENTITY raquo "»"> <!-- U+00BB ISOnum - right-pointing double angle quotation mark = right pointing guillemet --> +<!ENTITY frac14 "¼"> <!-- U+00BC ISOnum - vulgar fraction one quarter = fraction one quarter --> +<!ENTITY frac12 "½"> <!-- U+00BD ISOnum - vulgar fraction one half = fraction one half --> +<!ENTITY frac34 "¾"> <!-- U+00BE ISOnum - vulgar fraction three quarters = fraction three quarters --> +<!ENTITY iquest "¿"> <!-- U+00BF ISOnum - inverted question mark = turned question mark --> +<!ENTITY Agrave "À"> <!-- U+00C0 ISOlat1 - latin capital letter A with grave = latin capital letter A grave --> +<!ENTITY Aacute "Á"> <!-- U+00C1 ISOlat1 - latin capital letter A with acute --> +<!ENTITY Acirc "Â"> <!-- U+00C2 ISOlat1 - latin capital letter A with circumflex --> +<!ENTITY Atilde "Ã"> <!-- U+00C3 ISOlat1 - latin capital letter A with tilde --> +<!ENTITY Auml "Ä"> <!-- U+00C4 ISOlat1 - latin capital letter A with diaeresis --> +<!ENTITY Aring "Å"> <!-- U+00C5 ISOlat1 - latin capital letter A with ring above = latin capital letter A ring --> +<!ENTITY AElig "Æ"> <!-- U+00C6 ISOlat1 - latin capital letter AE = latin capital ligature AE --> +<!ENTITY Ccedil "Ç"> <!-- U+00C7 ISOlat1 - latin capital letter C with cedilla --> +<!ENTITY Egrave "È"> <!-- U+00C8 ISOlat1 - latin capital letter E with grave --> +<!ENTITY Eacute "É"> <!-- U+00C9 ISOlat1 - latin capital letter E with acute --> +<!ENTITY Ecirc "Ê"> <!-- U+00CA ISOlat1 - latin capital letter E with circumflex --> +<!ENTITY Euml "Ë"> <!-- U+00CB ISOlat1 - latin capital letter E with diaeresis --> +<!ENTITY Igrave "Ì"> <!-- U+00CC ISOlat1 - latin capital letter I with grave --> +<!ENTITY Iacute "Í"> <!-- U+00CD ISOlat1 - latin capital letter I with acute --> +<!ENTITY Icirc "Î"> <!-- U+00CE ISOlat1 - latin capital letter I with circumflex --> +<!ENTITY Iuml "Ï"> <!-- U+00CF ISOlat1 - latin capital letter I with diaeresis --> +<!ENTITY ETH "Ð"> <!-- U+00D0 ISOlat1 - latin capital letter ETH --> +<!ENTITY Ntilde "Ñ"> <!-- U+00D1 ISOlat1 - latin capital letter N with tilde --> +<!ENTITY Ograve "Ò"> <!-- U+00D2 ISOlat1 - latin capital letter O with grave --> +<!ENTITY Oacute "Ó"> <!-- U+00D3 ISOlat1 - latin capital letter O with acute --> +<!ENTITY Ocirc "Ô"> <!-- U+00D4 ISOlat1 - latin capital letter O with circumflex --> +<!ENTITY Otilde "Õ"> <!-- U+00D5 ISOlat1 - latin capital letter O with tilde --> +<!ENTITY Ouml "Ö"> <!-- U+00D6 ISOlat1 - latin capital letter O with diaeresis --> +<!ENTITY times "×"> <!-- U+00D7 ISOnum - multiplication sign --> +<!ENTITY Oslash "Ø"> <!-- U+00D8 ISOlat1 - latin capital letter O with stroke = latin capital letter O slash --> +<!ENTITY Ugrave "Ù"> <!-- U+00D9 ISOlat1 - latin capital letter U with grave --> +<!ENTITY Uacute "Ú"> <!-- U+00DA ISOlat1 - latin capital letter U with acute --> +<!ENTITY Ucirc "Û"> <!-- U+00DB ISOlat1 - latin capital letter U with circumflex --> +<!ENTITY Uuml "Ü"> <!-- U+00DC ISOlat1 - latin capital letter U with diaeresis --> +<!ENTITY Yacute "Ý"> <!-- U+00DD ISOlat1 - latin capital letter Y with acute --> +<!ENTITY THORN "Þ"> <!-- U+00DE ISOlat1 - latin capital letter THORN --> +<!ENTITY szlig "ß"> <!-- U+00DF ISOlat1 - latin small letter sharp s = ess-zed --> +<!ENTITY agrave "à"> <!-- U+00E0 ISOlat1 - latin small letter a with grave = latin small letter a grave --> +<!ENTITY aacute "á"> <!-- U+00E1 ISOlat1 - latin small letter a with acute --> +<!ENTITY acirc "â"> <!-- U+00E2 ISOlat1 - latin small letter a with circumflex --> +<!ENTITY atilde "ã"> <!-- U+00E3 ISOlat1 - latin small letter a with tilde --> +<!ENTITY auml "ä"> <!-- U+00E4 ISOlat1 - latin small letter a with diaeresis --> +<!ENTITY aring "å"> <!-- U+00E5 ISOlat1 - latin small letter a with ring above = latin small letter a ring --> +<!ENTITY aelig "æ"> <!-- U+00E6 ISOlat1 - latin small letter ae = latin small ligature ae --> +<!ENTITY ccedil "ç"> <!-- U+00E7 ISOlat1 - latin small letter c with cedilla --> +<!ENTITY egrave "è"> <!-- U+00E8 ISOlat1 - latin small letter e with grave --> +<!ENTITY eacute "é"> <!-- U+00E9 ISOlat1 - latin small letter e with acute --> +<!ENTITY ecirc "ê"> <!-- U+00EA ISOlat1 - latin small letter e with circumflex --> +<!ENTITY euml "ë"> <!-- U+00EB ISOlat1 - latin small letter e with diaeresis --> +<!ENTITY igrave "ì"> <!-- U+00EC ISOlat1 - latin small letter i with grave --> +<!ENTITY iacute "í"> <!-- U+00ED ISOlat1 - latin small letter i with acute --> +<!ENTITY icirc "î"> <!-- U+00EE ISOlat1 - latin small letter i with circumflex --> +<!ENTITY iuml "ï"> <!-- U+00EF ISOlat1 - latin small letter i with diaeresis --> +<!ENTITY eth "ð"> <!-- U+00F0 ISOlat1 - latin small letter eth --> +<!ENTITY ntilde "ñ"> <!-- U+00F1 ISOlat1 - latin small letter n with tilde --> +<!ENTITY ograve "ò"> <!-- U+00F2 ISOlat1 - latin small letter o with grave --> +<!ENTITY oacute "ó"> <!-- U+00F3 ISOlat1 - latin small letter o with acute --> +<!ENTITY ocirc "ô"> <!-- U+00F4 ISOlat1 - latin small letter o with circumflex --> +<!ENTITY otilde "õ"> <!-- U+00F5 ISOlat1 - latin small letter o with tilde --> +<!ENTITY ouml "ö"> <!-- U+00F6 ISOlat1 - latin small letter o with diaeresis --> +<!ENTITY divide "÷"> <!-- U+00F7 ISOnum - division sign --> +<!ENTITY oslash "ø"> <!-- U+00F8 ISOlat1 - latin small letter o with stroke = latin small letter o slash --> +<!ENTITY ugrave "ù"> <!-- U+00F9 ISOlat1 - latin small letter u with grave --> +<!ENTITY uacute "ú"> <!-- U+00FA ISOlat1 - latin small letter u with acute --> +<!ENTITY ucirc "û"> <!-- U+00FB ISOlat1 - latin small letter u with circumflex --> +<!ENTITY uuml "ü"> <!-- U+00FC ISOlat1 - latin small letter u with diaeresis --> +<!ENTITY yacute "ý"> <!-- U+00FD ISOlat1 - latin small letter y with acute --> +<!ENTITY thorn "þ"> <!-- U+00FE ISOlat1 - latin small letter thorn --> +<!ENTITY yuml "ÿ"> <!-- U+00FF ISOlat1 - latin small letter y with diaeresis --> + + +<!-- C0 Controls and Basic Latin --> +<!ENTITY quot """> <!-- U+0022 ISOnum - quotation mark = APL quote --> +<!ENTITY amp "&"> <!-- U+0026 ISOnum - ampersand --> +<!ENTITY lt "<"> <!-- U+003C ISOnum - less-than sign --> +<!ENTITY gt ">"> <!-- U+003E ISOnum - greater-than sign --> + +<!-- Latin Extended-A --> +<!ENTITY OElig "Œ"> <!-- U+0152 ISOlat2 - latin capital ligature OE --> +<!ENTITY oelig "œ"> <!-- U+0153 ISOlat2 - latin small ligature oe --> + +<!-- ligature is a misnomer, this is a separate character in some languages --> +<!ENTITY Scaron "Š"> <!-- U+0160 ISOlat2 - latin capital letter S with caron --> +<!ENTITY scaron "š"> <!-- U+0161 ISOlat2 - latin small letter s with caron --> +<!ENTITY Yuml "Ÿ"> <!-- U+0178 ISOlat2 - latin capital letter Y with diaeresis --> + +<!-- Spacing Modifier Letters --> +<!ENTITY circ "ˆ" > <!-- U+02C6 ISOpub - modifier letter circumflex accent --> +<!ENTITY tilde "˜" > <!-- U+02DC ISOdia - small tilde --> + +<!-- General Punctuation --> +<!ENTITY ensp " "> <!-- U+2002 ISOpub - en space --> +<!ENTITY emsp " "> <!-- U+2003 ISOpub - em space --> +<!ENTITY thinsp " "> <!-- U+2009 ISOpub - thin space --> +<!ENTITY zwnj "‌"> <!-- U+200C RFC 2070 - zero width non-joiner --> +<!ENTITY zwj "‍"> <!-- U+200D RFC 2070 - zero width joiner --> +<!ENTITY lrm "‎"> <!-- U+200E RFC 2070 - left-to-right mark --> +<!ENTITY rlm "‏"> <!-- U+200F RFC 2070 - right-to-left mark --> +<!ENTITY ndash "–"> <!-- U+2013 ISOpub - en dash --> +<!ENTITY mdash "—"> <!-- U+2014 ISOpub - em dash --> +<!ENTITY lsquo "‘"> <!-- U+2018 ISOnum - left single quotation mark --> +<!ENTITY rsquo "’"> <!-- U+2019 ISOnum - right single quotation mark --> +<!ENTITY sbquo "‚"> <!-- U+201A NEW - single low-9 quotation mark --> +<!ENTITY ldquo "“"> <!-- U+201C ISOnum - left double quotation mark --> +<!ENTITY rdquo "”"> <!-- U+201D ISOnum - right double quotation mark, --> +<!ENTITY bdquo "„"> <!-- U+201E NEW - double low-9 quotation mark --> +<!ENTITY dagger "†"> <!-- U+2020 ISOpub - dagger --> +<!ENTITY Dagger "‡"> <!-- U+2021 ISOpub - double dagger --> +<!ENTITY permil "‰"> <!-- U+2030 ISOtech - per mille sign --> +<!ENTITY lsaquo "‹"> <!-- U+2039 ISO prop. - single left-pointing angle quotation mark --> + +<!-- lsaquo is proposed but not yet ISO standardized --> +<!ENTITY rsaquo "›"> <!-- U+203A ISO prop. - single right-pointing angle quotation mark --> + +<!-- rsaquo is proposed but not yet ISO standardized --> +<!ENTITY euro "€"> <!-- U+20AC NEW - euro sign --> + +<!-- Latin Extended-B --> +<!ENTITY fnof "ƒ"> <!-- U+0192 ISOtech - latin small f with hook = function = florin --> + +<!-- Greek --> +<!ENTITY Alpha "Α"> <!-- U+0391 - greek capital letter alpha --> +<!ENTITY Beta "Β"> <!-- U+0392 - greek capital letter beta --> +<!ENTITY Gamma "Γ"> <!-- U+0393 ISOgrk3 - greek capital letter gamma --> +<!ENTITY Delta "Δ"> <!-- U+0394 ISOgrk3 - greek capital letter delta --> +<!ENTITY Epsilon "Ε"> <!-- U+0395 - greek capital letter epsilon --> +<!ENTITY Zeta "Ζ"> <!-- U+0396 - greek capital letter zeta --> +<!ENTITY Eta "Η"> <!-- U+0397 - greek capital letter eta --> +<!ENTITY Theta "Θ"> <!-- U+0398 ISOgrk3 - greek capital letter theta --> +<!ENTITY Iota "Ι"> <!-- U+0399 - greek capital letter iota --> +<!ENTITY Kappa "Κ"> <!-- U+039A - greek capital letter kappa --> +<!ENTITY Lambda "Λ"> <!-- U+039B ISOgrk3 - greek capital letter lambda --> +<!ENTITY Mu "Μ"> <!-- U+039C - greek capital letter mu --> +<!ENTITY Nu "Ν"> <!-- U+039D - greek capital letter nu --> +<!ENTITY Xi "Ξ"> <!-- U+039E ISOgrk3 - greek capital letter xi --> +<!ENTITY Omicron "Ο"> <!-- U+039F - greek capital letter omicron --> +<!ENTITY Pi "Π"> <!-- U+03A0 ISOgrk3 - greek capital letter pi --> +<!ENTITY Rho "Ρ"> <!-- U+03A1 - greek capital letter rho --> +<!ENTITY Sigma "Σ"> <!-- U+03A3 ISOgrk3 - greek capital letter sigma --> +<!ENTITY Tau "Τ"> <!-- U+03A4 - greek capital letter tau --> +<!ENTITY Upsilon "Υ"> <!-- U+03A5 ISOgrk3 - greek capital letter upsilon --> +<!ENTITY Phi "Φ"> <!-- U+03A6 ISOgrk3 - greek capital letter phi --> +<!ENTITY Chi "Χ"> <!-- U+03A7 - greek capital letter chi --> +<!ENTITY Psi "Ψ"> <!-- U+03A8 ISOgrk3 - greek capital letter psi --> +<!ENTITY Omega "Ω"> <!-- U+03A9 ISOgrk3 - greek capital letter omega --> +<!ENTITY alpha "α"> <!-- U+03B1 ISOgrk3 - greek small letter alpha --> +<!ENTITY beta "β"> <!-- U+03B2 ISOgrk3 - greek small letter beta --> +<!ENTITY gamma "γ"> <!-- U+03B3 ISOgrk3 - greek small letter gamma --> +<!ENTITY delta "δ"> <!-- U+03B4 ISOgrk3 - greek small letter delta --> +<!ENTITY epsilon "ε"> <!-- U+03B5 ISOgrk3 - greek small letter epsilon --> +<!ENTITY zeta "ζ"> <!-- U+03B6 ISOgrk3 - greek small letter zeta --> +<!ENTITY eta "η"> <!-- U+03B7 ISOgrk3 - greek small letter eta --> +<!ENTITY theta "θ"> <!-- U+03B8 ISOgrk3 - greek small letter theta --> +<!ENTITY iota "ι"> <!-- U+03B9 ISOgrk3 - greek small letter iota --> +<!ENTITY kappa "κ"> <!-- U+03BA ISOgrk3 - greek small letter kappa --> +<!ENTITY lambda "λ"> <!-- U+03BB ISOgrk3 - greek small letter lambda --> +<!ENTITY mu "μ"> <!-- U+03BC ISOgrk3 - greek small letter mu --> +<!ENTITY nu "ν"> <!-- U+03BD ISOgrk3 - greek small letter nu --> +<!ENTITY xi "ξ"> <!-- U+03BE ISOgrk3 - greek small letter xi --> +<!ENTITY omicron "ο"> <!-- U+03BF NEW - greek small letter omicron --> +<!ENTITY pi "π"> <!-- U+03C0 ISOgrk3 - greek small letter pi --> +<!ENTITY rho "ρ"> <!-- U+03C1 ISOgrk3 - greek small letter rho --> +<!ENTITY sigmaf "ς"> <!-- U+03C2 ISOgrk3 - greek small letter final sigma --> +<!ENTITY sigma "σ"> <!-- U+03C3 ISOgrk3 - greek small letter sigma --> +<!ENTITY tau "τ"> <!-- U+03C4 ISOgrk3 - greek small letter tau --> +<!ENTITY upsilon "υ"> <!-- U+03C5 ISOgrk3 - greek small letter upsilon --> +<!ENTITY phi "φ"> <!-- U+03C6 ISOgrk3 - greek small letter phi --> +<!ENTITY chi "χ"> <!-- U+03C7 ISOgrk3 - greek small letter chi --> +<!ENTITY psi "ψ"> <!-- U+03C8 ISOgrk3 - greek small letter psi --> +<!ENTITY omega "ω"> <!-- U+03C9 ISOgrk3 - greek small letter omega --> +<!ENTITY thetasym "ϑ"> <!-- U+03D1 NEW - greek small letter theta symbol --> +<!ENTITY upsih "ϒ"> <!-- U+03D2 NEW - greek upsilon with hook symbol --> +<!ENTITY piv "ϖ"> <!-- U+03D6 ISOgrk3 - greek pi symbol --> + +<!-- General Punctuation --> +<!ENTITY bull "•"> <!-- U+2022 ISOpub - bullet = black small circle --> +<!ENTITY hellip "…"> <!-- U+2026 ISOpub - horizontal ellipsis = three dot leader --> +<!ENTITY prime "′"> <!-- U+2032 ISOtech - prime = minutes = feet --> +<!ENTITY Prime "″"> <!-- U+2033 ISOtech - double prime = seconds = inches --> +<!ENTITY oline "‾"> <!-- U+203E NEW - overline = spacing overscore --> +<!ENTITY frasl "⁄"> <!-- U+2044 NEW - fraction slash --> + +<!-- Letterlike Symbols --> +<!ENTITY weierp "℘"> <!-- U+2118 ISOamso - script capital P = power set = Weierstrass p --> +<!ENTITY image "ℑ"> <!-- U+2111 ISOamso - blackletter capital I = imaginary part --> +<!ENTITY real "ℜ"> <!-- U+211C ISOamso - blackletter capital R = real part symbol --> +<!ENTITY trade "™"> <!-- U+2122 ISOnum - trade mark sign --> +<!ENTITY alefsym "ℵ"> <!-- U+2135 NEW - alef symbol = first transfinite cardinal --> + +<!-- Arrows --> +<!ENTITY larr "←"> <!-- U+2190 ISOnum - leftwards arrow --> +<!ENTITY uarr "↑"> <!-- U+2191 ISOnum - upwards arrow --> +<!ENTITY rarr "→"> <!-- U+2192 ISOnum - rightwards arrow --> +<!ENTITY darr "↓"> <!-- U+2193 ISOnum - downwards arrow --> +<!ENTITY harr "↔"> <!-- U+2194 ISOamsa - left right arrow --> +<!ENTITY crarr "↵"> <!-- U+21B5 NEW - downwards arrow with corner leftwards = carriage return --> +<!ENTITY lArr "⇐"> <!-- U+21D0 ISOtech - leftwards double arrow --> +<!ENTITY uArr "⇑"> <!-- U+21D1 ISOamsa - upwards double arrow --> +<!ENTITY rArr "⇒"> <!-- U+21D2 ISOtech - rightwards double arrow --> +<!ENTITY dArr "⇓"> <!-- U+21D3 ISOamsa - downwards double arrow --> +<!ENTITY hArr "⇔"> <!-- U+21D4 ISOamsa - left right double arrow --> + +<!-- Mathematical Operators --> +<!ENTITY forall "∀"> <!-- U+2200 ISOtech - for all --> +<!ENTITY part "∂"> <!-- U+2202 ISOtech - partial differential --> +<!ENTITY exist "∃"> <!-- U+2203 ISOtech - there exists --> +<!ENTITY empty "∅"> <!-- U+2205 ISOamso - empty set = null set = diameter --> +<!ENTITY nabla "∇"> <!-- U+2207 ISOtech - nabla = backward difference --> +<!ENTITY isin "∈"> <!-- U+2208 ISOtech - element of --> +<!ENTITY notin "∉"> <!-- U+2209 ISOtech - not an element of --> +<!ENTITY ni "∋"> <!-- U+220B ISOtech - contains as member --> +<!ENTITY prod "∏"> <!-- U+220F ISOamsb - n-ary product = product sign --> +<!ENTITY sum "∑"> <!-- U+2211 ISOamsb - n-ary sumation --> +<!ENTITY minus "−"> <!-- U+2212 ISOtech - minus sign --> +<!ENTITY lowast "∗"> <!-- U+2217 ISOtech - asterisk operator --> +<!ENTITY radic "√"> <!-- U+221A ISOtech - square root = radical sign --> +<!ENTITY prop "∝"> <!-- U+221D ISOtech - proportional to --> +<!ENTITY infin "∞"> <!-- U+221E ISOtech - infinity --> +<!ENTITY ang "∠"> <!-- U+2220 ISOamso - angle --> +<!ENTITY and "∧"> <!-- U+2227 ISOtech - logical and = wedge --> +<!ENTITY or "∨"> <!-- U+2228 ISOtech - logical or = vee --> +<!ENTITY cap "∩"> <!-- U+2229 ISOtech - intersection = cap --> +<!ENTITY cup "∪"> <!-- U+222A ISOtech - union = cup --> +<!ENTITY int "∫"> <!-- U+222B ISOtech - integral --> +<!ENTITY there4 "∴"> <!-- U+2234 ISOtech - therefore --> +<!ENTITY sim "∼"> <!-- U+223C ISOtech - tilde operator = varies with = similar to --> +<!ENTITY cong "≅"> <!-- U+2245 ISOtech - approximately equal to --> +<!ENTITY asymp "≈"> <!-- U+2248 ISOamsr - almost equal to = asymptotic to --> +<!ENTITY ne "≠"> <!-- U+2260 ISOtech - not equal to --> +<!ENTITY equiv "≡"> <!-- U+2261 ISOtech - identical to --> +<!ENTITY le "≤"> <!-- U+2264 ISOtech - less-than or equal to --> +<!ENTITY ge "≥"> <!-- U+2265 ISOtech - greater-than or equal to --> +<!ENTITY sub "⊂"> <!-- U+2282 ISOtech - subset of --> +<!ENTITY sup "⊃"> <!-- U+2283 ISOtech - superset of --> +<!ENTITY nsub "⊄"> <!-- U+2284 ISOamsn - not a subset of --> +<!ENTITY sube "⊆"> <!-- U+2286 ISOtech - subset of or equal to --> +<!ENTITY supe "⊇"> <!-- U+2287 ISOtech - superset of or equal to --> +<!ENTITY oplus "⊕"> <!-- U+2295 ISOamsb - circled plus = direct sum --> +<!ENTITY otimes "⊗"> <!-- U+2297 ISOamsb - circled times = vector product --> +<!ENTITY perp "⊥"> <!-- U+22A5 ISOtech - up tack = orthogonal to = perpendicular --> +<!ENTITY sdot "⋅"> <!-- U+22C5 ISOamsb - dot operator --> + +<!-- Miscellaneous Technical --> +<!ENTITY lceil "⌈"> <!-- U+2308 ISOamsc - left ceiling = apl upstile --> +<!ENTITY rceil "⌉"> <!-- U+2309 ISOamsc - right ceiling --> +<!ENTITY lfloor "⌊"> <!-- U+230A ISOamsc - left floor = apl downstile --> +<!ENTITY rfloor "⌋"> <!-- U+230B ISOamsc - right floor --> +<!ENTITY lang "〈"> <!-- U+2329 ISOtech - left-pointing angle bracket = bra --> +<!ENTITY rang "〉"> <!-- U+232A ISOtech - right-pointing angle bracket = ket --> + +<!-- Geometric Shapes --> +<!ENTITY loz "◊"> <!-- U+25CA ISOpub - lozenge --> + +<!-- Miscellaneous Symbols --> +<!ENTITY spades "♠"> <!-- U+2660 ISOpub - black spade suit --> +<!ENTITY clubs "♣"> <!-- U+2663 ISOpub - black club suit = shamrock --> +<!ENTITY hearts "♥"> <!-- U+2665 ISOpub - black heart suit = valentine --> +<!ENTITY diams "♦"> <!-- U+2666 ISOpub - black diamond suit --> + +<!-- CVS $Revision: 1.1 $ $Date: 1999/12/01 14:19:18 $ --> + +<!-- Portions (C) International Organization for Standardization 1986 + Permission to copy in any form is granted for use with + conforming SGML systems and applications as defined in + ISO 8879, provided this notice is included in all copies. --> diff --git a/stylebook/style/dtd/document.dtd b/stylebook/style/dtd/document.dtd new file mode 100644 index 000000000..f7cf5b121 --- /dev/null +++ b/stylebook/style/dtd/document.dtd @@ -0,0 +1,19 @@ +<?xml encoding='US-ASCII'?> + +<!-- STYLEBOOK DOCUMENT DTD --> + +<!-- import the external blocks.ent dtd --> +<!ENTITY % blocksEntity SYSTEM "blocks.ent"> +%blocksEntity; + +<!ELEMENT s1 (s2|%blocks;)*> +<!ELEMENT s2 (s3|%blocks;)*> +<!ELEMENT s3 (s4|%blocks;)*> +<!ELEMENT s4 (%blocks;)*> + +<!ATTLIST s1 title CDATA #REQUIRED> +<!ATTLIST s2 title CDATA #REQUIRED> +<!ATTLIST s3 title CDATA #REQUIRED> +<!ATTLIST s4 title CDATA #REQUIRED> + +<!-- CVS $Revision: 1.1 $ $Date: 1999/12/01 14:19:18 $ --> \ No newline at end of file diff --git a/stylebook/style/dtd/faqs.dtd b/stylebook/style/dtd/faqs.dtd new file mode 100644 index 000000000..565d99f4b --- /dev/null +++ b/stylebook/style/dtd/faqs.dtd @@ -0,0 +1,19 @@ +<?xml encoding='US-ASCII'?> + +<!-- STYLEBOOK FAQS DTD --> + +<!-- import the external blocks.ent dtd --> +<!ENTITY % blocksEntity SYSTEM "blocks.ent"> +%blocksEntity; + +<!ELEMENT faqs (faq)+> +<!ATTLIST faqs title CDATA #REQUIRED> + +<!ELEMENT faq (q,a)> +<!ATTLIST faq title CDATA #IMPLIED> + + +<!ELEMENT q (#PCDATA)> +<!ELEMENT a (%blocks;)+> + +<!-- CVS $Revision: 1.1 $ $Date: 1999/12/01 14:19:18 $ --> \ No newline at end of file diff --git a/stylebook/style/dtd/links.ent b/stylebook/style/dtd/links.ent new file mode 100644 index 000000000..63b002fff --- /dev/null +++ b/stylebook/style/dtd/links.ent @@ -0,0 +1,24 @@ +<?xml encoding='US-ASCII'?> + +<!-- LINKS ENTITY --> +<!ENTITY % links "link|anchor|jump|img|resource-ref|human-resource-ref"> + +<!ELEMENT anchor EMPTY> +<!ATTLIST anchor name NMTOKEN #REQUIRED> + +<!ELEMENT img EMPTY> +<!ATTLIST img src CDATA #REQUIRED + alt CDATA #REQUIRED> + +<!ELEMENT link (#PCDATA|img)*> +<!ATTLIST link idref NMTOKEN #IMPLIED + anchor CDATA #IMPLIED> + +<!ELEMENT jump (#PCDATA|img)*> +<!ATTLIST jump href CDATA #REQUIRED> + +<!-- cross-reference resource elements --> +<!ELEMENT resource-ref EMPTY> +<!ATTLIST resource-ref idref CDATA #REQUIRED> +<!ELEMENT human-resource-ref EMPTY> +<!ATTLIST human-resource-ref idref CDATA #REQUIRED> \ No newline at end of file diff --git a/stylebook/style/dtd/markup.ent b/stylebook/style/dtd/markup.ent new file mode 100644 index 000000000..66319e5f7 --- /dev/null +++ b/stylebook/style/dtd/markup.ent @@ -0,0 +1,21 @@ +<?xml encoding='US-ASCII'?> + +<!-- MARKUP ENTITY --> +<!ENTITY % markup "em|ref|code|br"> + +<!-- import the external source-specific dtd --> +<!ENTITY % externalEntity SYSTEM "../../sources/entities.ent"> +%externalEntity; +<!-- import the external charecters.ent dtd --> +<!ENTITY % charEntity SYSTEM "characters.ent"> +%charEntity; +<!-- import the external links.ent dtd --> +<!ENTITY % linksEntity SYSTEM "links.ent"> +%linksEntity; + +<!ELEMENT em (#PCDATA|%links;)*> +<!ELEMENT ref (#PCDATA|%links;)*> +<!ELEMENT code (#PCDATA|%links;|ref)*> +<!ELEMENT br EMPTY> + +<!-- CVS $Revision: 1.2 $ $Date: 1999/12/01 23:03:37 $ --> \ No newline at end of file diff --git a/stylebook/style/dtd/spec.dtd b/stylebook/style/dtd/spec.dtd new file mode 100644 index 000000000..260c80fc5 --- /dev/null +++ b/stylebook/style/dtd/spec.dtd @@ -0,0 +1,593 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + * Copyright 2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- ============================================================= --> +<!-- MODULE: spec DTD --> +<!-- VERSION: 1.0 --> +<!-- DATE: October 18, 2000 --> + + +<!-- ============================================================= --> +<!-- ISO STANDARD SPECIAL CHARACTER SETS --> +<!-- ============================================================= --> +<!-- +<!ENTITY % isolat1 PUBLIC +"ISO 8879-1986//ENTITIES Added Latin 1//EN" +"entities/ISOlat1.pen" + > + +<!ENTITY % isonum PUBLIC +"ISO 8879-1986//ENTITIES Numeric and Special Graphic//EN" +"entities/ISOnum.pen" + > + +<!ENTITY % isopub PUBLIC +"ISO 8879-1986//ENTITIES Publishing//EN" +"entities/ISOpub.pen" + > + +<!ENTITY % isotech PUBLIC +"ISO 8879-1986//ENTITIES General Technical//EN" +"entities/ISOtech.pen" + > + +%isolat1; %isonum; %isopub; %isotech; +--> + +<!-- ============================================================= --> +<!-- parameter entities for content models --> +<!-- ============================================================= --> + + +<!-- list elements --> +<!ENTITY % lists "itemizedlist | orderedlist | variablelist" > + + +<!-- linespecific elements --> +<!-- elements where line endings and whitespace + are significant --> +<!ENTITY % linespecific + "literallayout | programlisting" > + + +<!-- phrase-level elements --> +<!-- elements allowed at the same level as text --> +<!ENTITY % phraselevel "citation | emphasis | inlinegraphic | link | plink | + subscript | superscript | ulink | termref" > + + +<!-- paragraph-level elements --> +<!-- elements (including paragraphs) allowed at + the level of paragraphs --> +<!ENTITY % paralevel "%linespecific; | %lists; | note | para | issue | + table | figure | graphic" > + + +<!-- ============================================================= --> +<!-- parameter entities for attributes --> +<!-- ============================================================= --> + + +<!-- common attributes --> +<!ENTITY % common.atts + "id ID #IMPLIED + link-url CDATA #IMPLIED" > + +<!-- graphic-related attributes --> +<!ENTITY % graphic.atts + "fileref CDATA #IMPLIED + alt CDATA #IMPLIED + srccredit CDATA #IMPLIED + width NMTOKEN #IMPLIED + depth NMTOKEN #IMPLIED + scale NMTOKEN #IMPLIED + scalefit NMTOKEN #IMPLIED" > + +<!-- ============================================================= --> +<!-- external modules --> +<!-- ============================================================= --> + +<!-- +<!ENTITY % table.ent SYSTEM "table.ent" > +%table.ent; +--> + +<!-- ============================================================= --> +<!-- element definitions --> +<!-- ============================================================= --> + + +<!-- specification --> +<!ELEMENT spec (title, frontmatter, introduction, requirements, model, sect1+, + appendix*, bibliography?) > + +<!ATTLIST spec + %common.atts; > + +<!ELEMENT frontmatter (pubdate, copyright, author*, abstract?) > + +<!-- title --> +<!ELEMENT title (#PCDATA | %phraselevel;)* > +<!ATTLIST title + %common.atts; > + + +<!-- issue --> +<!ELEMENT issue (#PCDATA | %phraselevel;)* > +<!ATTLIST issue + %common.atts; > + + +<!-- publication date --> +<!-- publication date and, possibly, time --> +<!ELEMENT pubdate (#PCDATA) > +<!ATTLIST pubdate + %common.atts; > + + +<!-- copyright statement --> +<!ELEMENT copyright (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST copyright + %common.atts; > + + +<!-- author --> +<!ELEMENT author (firstname, surname, jobtitle?, orgname?, + address?) > +<!-- id unique identifier --> +<!ATTLIST author + %common.atts; > + + +<!-- abstract --> +<!ELEMENT abstract (para+) > +<!-- id unique identifier --> +<!ATTLIST abstract + %common.atts; > + +<!ELEMENT introduction (title, (((%paralevel;)+, sect2*) | sect2+)) > +<!-- id unique identifier --> +<!ATTLIST introduction + %common.atts; > + +<!ELEMENT requirements (title, (((%paralevel;)+, sect2*) | sect2+)) > +<!-- id unique identifier --> +<!ATTLIST requirements + %common.atts; > + +<!ELEMENT model (title, (((%paralevel;)+, patterns) | sect2+)) > +<!-- id unique identifier --> +<!ATTLIST model + %common.atts; > + +<!ELEMENT patterns (pattern+) > +<!-- id unique identifier --> +<!ATTLIST patterns + %common.atts; + module CDATA #IMPLIED + > + +<!ELEMENT pattern (pattern-name, potential-alternate-name?, intent, responsibilities, thread-safety, notes?) > +<!-- id unique identifier --> +<!ATTLIST pattern + %common.atts; + > +<!ELEMENT pattern-name (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST pattern-name + %common.atts; > + +<!ELEMENT potential-alternate-name (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST potential-alternate-name + %common.atts; > + +<!ELEMENT intent (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST intent + %common.atts; > + +<!ELEMENT responsibilities (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST responsibilities + %common.atts; > + +<!ELEMENT thread-safety (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST thread-safety + %common.atts; > + +<!ELEMENT notes (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST notes + %common.atts; > + +<!-- id unique identifier --> +<!ATTLIST sect1 + %common.atts; > + +<!-- section 1 --> +<!ELEMENT sect1 (title, (((%paralevel;)+, sect2*) | sect2+)) > +<!-- section 2 --> +<!ELEMENT sect2 (title, (((%paralevel;)+, sect3*) | sect3+)) > +<!-- id unique identifier --> +<!ATTLIST sect2 + %common.atts; > + + +<!-- section 3 --> +<!ELEMENT sect3 (title, (((%paralevel;)+, sect4*) | sect4+)) > +<!-- id unique identifier --> +<!ATTLIST sect3 + %common.atts; > + + +<!-- section 4 --> +<!ELEMENT sect4 (title, (%paralevel;)+) > +<!-- id unique identifier --> +<!ATTLIST sect4 + %common.atts; > + + +<!-- appendix --> +<!ELEMENT appendix (title, (((%paralevel;)+, sect1*) | sect1+)) > +<!-- id unique identifier --> +<!ATTLIST appendix + %common.atts; > + + +<!-- bibliography --> +<!ELEMENT bibliography (title, biblioitem+) > +<!-- id unique identifier --> +<!ATTLIST bibliography + %common.atts; > + + +<!-- bibliography item --> +<!ELEMENT biblioitem (designator, biblioentry) > +<!-- id unique identifier --> +<!ATTLIST biblioitem + %common.atts; > + + +<!-- bibliography item designator --> +<!-- designator contains whatever designator the + author uses to identify publications listed in + the bibliography (e.g., [lab 87]). the + stylesheet generates the square "[]" brackets + fore & aft. --> +<!ELEMENT designator (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST designator + %common.atts; > + + +<!-- bibliography entry --> +<!ELEMENT biblioentry (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST biblioentry + %common.atts; > + + +<!-- ============================================================= --> +<!-- author-related elements --> +<!-- ============================================================= --> + + +<!-- first name --> +<!ELEMENT firstname (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST firstname + %common.atts; > + + +<!-- surname --> +<!ELEMENT surname (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST surname + %common.atts; > + + +<!-- job title --> +<!ELEMENT jobtitle (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST jobtitle + %common.atts; > + + +<!-- organization name --> +<!ELEMENT orgname (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST orgname + %common.atts; > + + +<!-- address --> +<!ELEMENT address (street?, pob?, city?, state?, postcode?, + country?, phone?, fax?, email?) > +<!-- id unique identifier --> +<!ATTLIST address + %common.atts; > + + +<!-- ============================================================= --> +<!-- address elements --> +<!-- ============================================================= --> + + +<!-- street address --> +<!ELEMENT street (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST street + %common.atts; > + + +<!-- post office box --> +<!ELEMENT pob (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST pob + %common.atts; > + + +<!-- postcode --> +<!ELEMENT postcode (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST postcode + %common.atts; > + + +<!-- city --> +<!ELEMENT city (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST city + %common.atts; > + + +<!-- state --> +<!ELEMENT state (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST state + %common.atts; > + + +<!-- country --> +<!ELEMENT country (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST country + %common.atts; > + + +<!-- phone number --> +<!ELEMENT phone (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST phone + %common.atts; > + + +<!-- fax number --> +<!ELEMENT fax (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST fax + %common.atts; > + + +<!-- email address --> +<!ELEMENT email (#PCDATA) > +<!-- id unique identifier --> +<!ATTLIST email + %common.atts; > + + +<!-- ============================================================= --> +<!-- paragraph-level elements --> +<!-- ============================================================= --> + + +<!-- paragraph --> +<!ELEMENT para (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST para + %common.atts; > + + +<!-- note --> +<!ELEMENT note (%paralevel;)+ > +<!-- id unique identifier --> +<!ATTLIST note + %common.atts; > + + +<!-- itemized list --> +<!ELEMENT itemizedlist (listitem+) > +<!-- id unique identifier --> +<!ATTLIST itemizedlist + %common.atts; > + + +<!-- ordered list --> +<!ELEMENT orderedlist (listitem+) > +<!-- id unique identifier --> +<!ATTLIST orderedlist + %common.atts; > + + +<!-- variable list --> +<!ELEMENT variablelist (varlistentry+) > +<!-- id unique identifier --> +<!ATTLIST variablelist + %common.atts; > + + +<!-- list item --> +<!ELEMENT listitem (#PCDATA | %phraselevel; | %paralevel;)* > +<!-- id unique identifier --> +<!ATTLIST listitem + %common.atts; > + + +<!-- variable list entry --> +<!ELEMENT varlistentry (term+, listitem) > +<!-- id unique identifier --> +<!ATTLIST varlistentry + %common.atts; > + + +<!-- term --> +<!ELEMENT term (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST term + %common.atts; > + +<!-- termref --> +<!ELEMENT termref (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST termref + %common.atts; > + +<!-- literal layout --> +<!ELEMENT literallayout + (#PCDATA | %phraselevel;)* > +<!-- xml:space whitespace handling + id unique identifier --> +<!ATTLIST literallayout + %common.atts; > + + +<!-- program listing --> +<!ELEMENT programlisting + (#PCDATA | %phraselevel;)* > +<!-- xml:space whitespace handling + id unique identifier --> +<!ATTLIST programlisting + %common.atts; > + + +<!-- figure --> +<!ELEMENT figure (title, graphic) > +<!-- id unique identifier --> +<!ATTLIST figure + %common.atts; > + + +<!-- graphic --> +<!ELEMENT graphic EMPTY > +<!-- align alignment of graphic image. values are: + left left aligned + right right aligned + center centered + fileref path to external file + alt alternate text + srccredit source of graphic + width width of area in which to fit graphic + depth depth of area in which to fit graphic + scale percentage scaling factor + scalefit scale to fit width and/or depth + id unique identifier --> +<!ATTLIST graphic + align (left |right |center) #IMPLIED + %graphic.atts; + %common.atts; > + +<!-- inline graphic --> +<!ELEMENT inlinegraphic + EMPTY > +<!-- fileref path to external file + alt alternate text + srccredit source of graphic + width width of area in which to fit graphic + depth depth of area in which to fit graphic + scale percentage scaling factor + scalefit scale to fit width and/or depth + id unique identifier --> +<!ATTLIST inlinegraphic + %graphic.atts; + %common.atts; > + +<!-- ============================================================= --> +<!-- text-level elements --> +<!-- ============================================================= --> + + +<!-- bibliographic citation --> +<!-- a <citation> appears in the body of the + article, and it refers through its + "linkend" attribute to the id of the + relevant bibliography item. + the <citation> receives the same + formatting as the <designator> element + within the <biblioitem> being referenced. + for example, when for the bibitem + <biblioitem id="bib1"><designator>lab + 87</designator>...</biblioitem> is + formatted as "[lab 87]", the bibliographic + citation <citation linkend="bib1">lab + 87</citation> also formats as "[lab 87]". --> +<!ELEMENT citation (#PCDATA | emphasis | inlinegraphic | + subscript | superscript)* > +<!-- linkend id of referenced bibliography entry + id unique identifier --> +<!ATTLIST citation + linkend IDREF #REQUIRED + %common.atts; > + + +<!-- emphasis --> +<!ELEMENT emphasis (#PCDATA | %phraselevel;)* > +<!-- id unique identifier --> +<!ATTLIST emphasis + %common.atts; > + + +<!-- subscript --> +<!ELEMENT subscript (#PCDATA | emphasis | subscript | + superscript)* > +<!-- id unique identifier --> +<!ATTLIST subscript + %common.atts; > + + +<!-- superscript --> +<!ELEMENT superscript (#PCDATA | emphasis | subscript | + superscript)* > +<!-- id unique identifier --> +<!ATTLIST superscript + %common.atts; > + + +<!-- link --> +<!ELEMENT link (#PCDATA) > +<!-- linkend id of referenced element + id unique identifier --> +<!ATTLIST link + linkend IDREF #REQUIRED + %common.atts; > + +<!-- package link (for {@link org.xml.trax.Processor} type links, for javadocs. --> +<!ELEMENT plink (#PCDATA) > +<!ATTLIST plink + %common.atts; > + +<!-- ulink (external link) --> +<!ELEMENT ulink (#PCDATA) > +<!-- url uniform resource locator; the target of the + ulink + id unique identifier --> +<!ATTLIST ulink + url CDATA #REQUIRED + %common.atts; > + + diff --git a/stylebook/style/dtd/xsl-html40s.dtd b/stylebook/style/dtd/xsl-html40s.dtd new file mode 100644 index 000000000..611f56e0f --- /dev/null +++ b/stylebook/style/dtd/xsl-html40s.dtd @@ -0,0 +1,1520 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<!-- + * Copyright 2004 The Apache Software Foundation. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- + XSLT (WD-19990813) DTD and HTML 4.0 Strict (REC-HTML40-19980424) DTD + This DTD defines a XSLT stylesheet with a result-ns of html + + Credits: + Original XSLT DTD from W3C XSLT WD-19990813 + Original XML DTD for HTML 4.0 Strict by + TAMURA, Kent <kent@trl.ibm.co.jp>, for IBM's XML4J package + Minor fixes to XSLT & HTML DTDs by + Scott Boag <scott_boag@lotus.com> + Henrique M. Holschuh <henriqmh@dca.fee.unicamp.br> + HTML/XSLT composite DTD by + Henrique M. Holschuh <henriqmh@dca.fee.unicamp.br> + + Caveats: It is possible to generate invalid XSLT and HTML documents + using this DTD, as the result-ns elements (HTML) must allow all + possible xsl elements as content, and all result-ns elements had + to be relaxed on their element content rules. + + TODO: + - A XSLT/XHTML1.0 Strict DTD to use instead of this one. Lowercase + element names allow for better compression ratios, at least in + English documents. + - Update to HTML 4.01 + + $Id$ +--> + +<!-- Predefined XML (REC-XML-19980210) entities --> +<!ENTITY lt "&#60;"> +<!ENTITY gt ">"> +<!ENTITY amp "&#38;"> +<!ENTITY apos "'"> +<!ENTITY quot """> + +<!-- + Result elements allowed (inside xsl elements). These are actually + all of the HTML40 Strict elements. +--> + +<!ENTITY % result-elements " + | TT + | I + | B + | BIG + | SMALL + | EM + | STRONG + | DFN + | CODE + | SAMP + | KBD + | VAR + | CITE + | ABBR + | ACRONYM + | SUP + | SUB + | SPAN + | BDO + | BR + | BODY + | ADDRESS + | DIV + | A + | MAP + | AREA + | LINK + | IMG + | OBJECT + | PARAM + | HR + | P + | H1 + | H2 + | H3 + | H4 + | H5 + | H6 + | PRE + | Q + | BLOCKQUOTE + | INS + | DEL + | DL + | DT + | DD + | OL + | UL + | LI + | FORM + | LABEL + | INPUT + | SELECT + | OPTGROUP + | OPTION + | TEXTAREA + | FIELDSET + | LEGEND + | BUTTON + | TABLE + | CAPTION + | THEAD + | TFOOT + | TBODY + | COLGROUP + | COL + | TR + | TH + | TD + | HEAD + | TITLE + | BASE + | META + | STYLE + | SCRIPT + | NOSCRIPT + | HTML +"> + +<!-- begin XSLT DTD, patched --> + +<!ENTITY % char-instructions " + | xsl:apply-templates + | xsl:call-template + | xsl:apply-imports + | xsl:for-each + | xsl:value-of + | xsl:copy-of + | xsl:number + | xsl:choose + | xsl:if + | xsl:text + | xsl:copy + | xsl:variable + | xsl:message +"> + +<!ENTITY % instructions " + %char-instructions; + | xsl:processing-instruction + | xsl:comment + | xsl:element + | xsl:attribute +"> + +<!ENTITY % char-template " +(#PCDATA + %char-instructions;)* +"> + +<!ENTITY % template " +(#PCDATA + %instructions; + %result-elements;)* +"> + +<!-- Used for the type of an attribute value that is a URI reference.--> +<!ENTITY % URI "CDATA"> + +<!-- Used for the type of an attribute value that is a pattern.--> +<!ENTITY % pattern "CDATA"> + +<!-- Used for the type of an attribute value that is an + attribute value template.--> +<!ENTITY % avt "CDATA"> + +<!-- Used for the type of an attribute value that is a QName; the prefix + gets expanded by the XSLT processor. --> +<!ENTITY % qname "NMTOKEN"> + +<!-- Like qname but a whitespace-separated list of QNames. --> +<!ENTITY % qnames "NMTOKENS"> + +<!-- Used for the type of an attribute value that is an expression.--> +<!ENTITY % expr "CDATA"> + +<!-- Used for the type of an attribute value that consists + of a single character.--> +<!ENTITY % char "CDATA"> + +<!-- Used for the type of an attribute value that is a priority. --> +<!ENTITY % priority "NMTOKEN"> + +<!ENTITY % space-att "xml:space (default|preserve) #IMPLIED"> + +<!-- This may be overridden to customize the set of elements allowed +at the top-level. --> + +<!ENTITY % non-xsl-top-level ""> + +<!ENTITY % top-level " +(xsl:import*, + (xsl:include + | xsl:strip-space + | xsl:preserve-space + | xsl:output + | xsl:key + | xsl:locale + | xsl:attribute-set + | xsl:variable + | xsl:param + | xsl:template + %non-xsl-top-level;)*) +"> + +<!-- added xmlns attribute suitable for this DTD --> +<!ENTITY % top-level-atts ' + extension-element-prefixes CDATA #IMPLIED + id ID #IMPLIED + xmlns:xsl CDATA #FIXED "http://www.w3.org/XSL/1999/Transform" + xmlns CDATA #FIXED "http://www.w3.org/TR/REC-html40" + %space-att; +'> + +<!-- This entity is defined for use in the ATTLIST declaration +for result elements. --> + +<!ENTITY % result-element-atts ' + xsl:extension-element-prefixes CDATA #IMPLIED + xsl:use-attribute-sets %qnames; #IMPLIED +'> + +<!ELEMENT xsl:stylesheet %top-level;> +<!ATTLIST xsl:stylesheet %top-level-atts;> + +<!ELEMENT xsl:transform %top-level;> +<!ATTLIST xsl:transform %top-level-atts;> + +<!ELEMENT xsl:import EMPTY> +<!ATTLIST xsl:import href %URI; #REQUIRED> + +<!ELEMENT xsl:include EMPTY> +<!ATTLIST xsl:include href %URI; #REQUIRED> + +<!ELEMENT xsl:strip-space EMPTY> +<!ATTLIST xsl:strip-space elements CDATA #REQUIRED> + +<!ELEMENT xsl:preserve-space EMPTY> +<!ATTLIST xsl:preserve-space elements CDATA #REQUIRED> + +<!ELEMENT xsl:output EMPTY> +<!ATTLIST xsl:output + method %qname; #IMPLIED + version NMTOKEN #IMPLIED + encoding NMTOKEN #IMPLIED + xml-declaration (yes|no) #IMPLIED + standalone (yes|no) #IMPLIED + doctype-public CDATA #IMPLIED + doctype-system CDATA #IMPLIED + cdata-section-elements %qnames; #IMPLIED + indent (yes|no) #IMPLIED + media-type CDATA #IMPLIED +> + +<!ELEMENT xsl:key EMPTY> +<!ATTLIST xsl:key + name %qname; #REQUIRED + match %pattern; #REQUIRED + use %expr; #REQUIRED +> + +<!ELEMENT xsl:locale EMPTY> +<!ATTLIST xsl:locale + name %qname; #IMPLIED + decimal-separator %char; "." + grouping-separator %char; "," + infinity CDATA "∞" + minus-sign %char; "-" + NaN CDATA "�" + percent %char; "%" + per-mille %char; "‰" + zero-digit %char; "0" + digit %char; "#" + pattern-separator %char; ";" +> + +<!ELEMENT xsl:template +(#PCDATA + %instructions; + %result-elements; + | xsl:param)* +> + +<!ATTLIST xsl:template + match %pattern; #IMPLIED + name %qname; #IMPLIED + priority %priority; #IMPLIED + mode %qname; #IMPLIED + %space-att; +> + +<!ELEMENT xsl:value-of EMPTY> +<!ATTLIST xsl:value-of + select %expr; #REQUIRED + disable-output-escaping (yes|no) "no" +> + +<!ELEMENT xsl:copy-of EMPTY> +<!ATTLIST xsl:copy-of select %expr; #REQUIRED> + +<!ELEMENT xsl:number EMPTY> +<!ATTLIST xsl:number + level (single|multiple|any) "single" + count %pattern; #IMPLIED + from %pattern; #IMPLIED + value %expr; #IMPLIED + format %avt; '1' + lang %avt; #IMPLIED + letter-value %avt; #IMPLIED + grouping-separator%avt; #IMPLIED + grouping-size %avt; #IMPLIED +> + +<!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*> +<!ATTLIST xsl:apply-templates + select %expr; "node()" + mode %qname; #IMPLIED +> + +<!ELEMENT xsl:apply-imports EMPTY> + +<!-- xsl:sort cannot occur after any other elements or +any non-whitespace character --> + +<!ELEMENT xsl:for-each +(#PCDATA + %instructions; + %result-elements; + | xsl:sort)* +> + +<!ATTLIST xsl:for-each + select %expr; #REQUIRED + %space-att; +> + +<!ELEMENT xsl:sort EMPTY> +<!ATTLIST xsl:sort + select %expr; "." + lang %avt; #IMPLIED + data-type %avt; "text" + order %avt; "ascending" + case-order %avt; #IMPLIED +> + +<!ELEMENT xsl:if %template;> +<!ATTLIST xsl:if + test %expr; #REQUIRED + %space-att; +> + +<!ELEMENT xsl:choose (xsl:when+, xsl:otherwise?)> +<!ATTLIST xsl:choose %space-att;> + +<!ELEMENT xsl:when %template;> +<!ATTLIST xsl:when + test %expr; #REQUIRED + %space-att; +> + +<!ELEMENT xsl:otherwise %template;> +<!ATTLIST xsl:otherwise %space-att;> + +<!ELEMENT xsl:attribute-set (xsl:attribute)*> +<!ATTLIST xsl:attribute-set + name %qname; #REQUIRED + use-attribute-sets %qnames; #IMPLIED +> + +<!ELEMENT xsl:call-template (xsl:with-param)*> +<!ATTLIST xsl:call-template + name %qname; #REQUIRED +> + +<!ELEMENT xsl:with-param %template;> +<!ATTLIST xsl:with-param + name %qname; #REQUIRED + select %expr; #IMPLIED +> + +<!ELEMENT xsl:variable %template;> +<!ATTLIST xsl:variable + name %qname; #REQUIRED + select %expr; #IMPLIED +> + +<!ELEMENT xsl:param %template;> +<!ATTLIST xsl:param + name %qname; #REQUIRED + select %expr; #IMPLIED +> + +<!ELEMENT xsl:text (#PCDATA)> +<!ATTLIST xsl:text + disable-output-escaping (yes|no) "no" +> + +<!ELEMENT xsl:processing-instruction %char-template;> +<!ATTLIST xsl:processing-instruction + name %avt; #REQUIRED + %space-att; +> + +<!ELEMENT xsl:element %template;> +<!ATTLIST xsl:element + name %avt; #REQUIRED + namespace %avt; #IMPLIED + use-attribute-sets %qnames; #IMPLIED + %space-att; +> + +<!ELEMENT xsl:attribute %char-template;> +<!ATTLIST xsl:attribute + name %avt; #REQUIRED + namespace %avt; #IMPLIED + %space-att; +> + +<!ELEMENT xsl:comment %char-template;> +<!ATTLIST xsl:comment %space-att;> + +<!ELEMENT xsl:copy %template;> +<!ATTLIST xsl:copy + %space-att; + use-attribute-sets %qnames; #IMPLIED +> + +<!ELEMENT xsl:message %template;> +<!ATTLIST xsl:message %space-att;> + +<!ELEMENT xsl:fallback %template;> +<!ATTLIST xsl:fallback %space-att;> + + + +<!-- ######################################################################## --> +<!-- HTML 4.0 Strict DTD (revised to allow for xsl content) --> +<!-- Original DTD from XML4J package --> +<!-- Original SGML to XML conversion by TAMURA, Kent for IBM's XML4J --> + +<!-- + Container for all xsl elements allowed inside result-elements elements, + i.e.: all xsl elements which are valid where a result-element is valid, + and therefore must be valid inside ALL non-empty HTML elements. + + You'll notice this does allow the user to create invalid XSL documents. + + xsl:sort, xsl:param, xsl:param-variable were not inluded because + IMHO it is bad practice (and an error?) not to include them before + other siblings, especially result-ns ones. +--> + +<!-- While the content should be simply %instructions; we cannot do that + due to the first '|' in %instructions --> +<!ENTITY % xsl-valid-in-resultns " + xsl:processing-instruction + | xsl:comment + | xsl:element + | xsl:attribute + %char-instructions; +"> + +<!-- Also, %result-element-atts; was added to the ATTLIST of all html + elments --> + +<!-- Revision: 23 1.3 docs/data/HTML40strict.xml.dtd, xml4jdocs, xml4j-jtcsv, xml4j_1_1_9 --> + +<!-- + This is HTML 4.0 Strict DTD, which excludes the presentation + attributes and elements that W3C expects to phase out as + support for style sheets matures. Authors should use the Strict + DTD when possible, but may use the Transitional DTD when support + for presentation attribute and elements is required. + + HTML 4.0 includes mechanisms for style sheets, scripting, + embedding objects, improved support for right to left and mixed + direction text, and enhancements to forms for improved + accessibility for people with disabilities. + + Draft: Date: 1998/07/06 17:50:32 + + Authors: + Dave Raggett <dsr@w3.org> + Arnaud Le Hors <lehors@w3.org> + Ian Jacobs <ij@w3.org> + + Further information about HTML 4.0 is available at: + + http://www.w3.org/TR/REC-html40 +--> + +<!-- + ================================================================ + Modified for XML 1.0 by: + "TAMURA, Kent" <kent@trl.ibm.co.jp> + + o HTMLspecial, HTMLsymbol, HTMLlat1 aren't included in this DTD. + o The `lang' attribute was renamed to `xml:lang'. + + + Typical usage: + + <?xml version="1.0" encoding="..."?> + <!DOCTYPE HTML SYSTEM ".../HTML40strict.xml.dtd"> + <HTML> + <HEAD> + ... + <TITLE>...</TITLE> + ... + </HEAD> + <BODY> + ... + </BODY> + </HTML> + + Note: XML is case-sensitive. So element names must be written + in uppercase and attribute names must be written in lowercase. + ================================================================ +--> + +<!-- + Typical usage: + + <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" + "http://www.w3.org/TR/REC-html40/strict.dtd"> + <html> + <head> + ... + </head> + <body> + ... + </body> + </html> + + The URI used as a system identifier with the public identifier allows + the user agent to download the DTD and entity sets as needed. + + The FPI for the Transitional HTML 4.0 DTD is: + + "-//W3C//DTD HTML 4.0 Transitional//EN" + + and its URI is: + + http://www.w3.org/TR/REC-html40/loose.dtd + + If you are writing a document that includes frames, use + the following FPI: + + "-//W3C//DTD HTML 4.0 Frameset//EN" + + with the URI: + + http://www.w3.org/TR/REC-html40/frameset.dtd + + The following URIs are supported in relation to HTML 4.0 + + "http://www.w3.org/TR/REC-html40/strict.dtd" (Strict DTD) + "http://www.w3.org/TR/REC-html40/loose.dtd" (Loose DTD) + "http://www.w3.org/TR/REC-html40/frameset.dtd" (Frameset DTD) + "http://www.w3.org/TR/REC-html40/HTMLlat1.ent" (Latin-1 entities) + "http://www.w3.org/TR/REC-html40/HTMLsymbol.ent" (Symbol entities) + "http://www.w3.org/TR/REC-html40/HTMLspecial.ent" (Special entities) + + These URIs point to the latest version of each file. To reference + this specific revision use the following URIs: + + "http://www.w3.org/TR/REC-html40-971218/strict.dtd" + "http://www.w3.org/TR/REC-html40-971218/loose.dtd" + "http://www.w3.org/TR/REC-html40-971218/frameset.dtd" + "http://www.w3.org/TR/REC-html40-971218/HTMLlat1.ent" + "http://www.w3.org/TR/REC-html40-971218/HTMLsymbol.ent" + "http://www.w3.org/TR/REC-html40-971218/HTMLspecial.ent" + +--> + +<!--=== for XML ===--> +<!ENTITY % Number "CDATA"> +<!ENTITY % Name "NMTOKEN"> + + +<!--================== Imported Names ====================================--> + +<!ENTITY % ContentType "CDATA" +> <!-- media type, as per [RFC2045] + --> + +<!ENTITY % ContentTypes "CDATA" +> <!-- comma-separated list of media types, as per [RFC2045] + --> + +<!ENTITY % Charset "CDATA" +> <!-- a character encoding, as per [RFC2045] + --> + +<!ENTITY % Charsets "CDATA" +> <!-- a space separated list of character encodings, as per [RFC2045] + --> + +<!ENTITY % LanguageCode "NMTOKEN" +> <!-- a language code, as per [RFC1766] + --> + +<!ENTITY % Character "CDATA" +> <!-- a single character from [ISO10646] + --> + +<!ENTITY % LinkTypes "CDATA" +> <!-- space-separated list of link types + --> + +<!ENTITY % MediaDesc "CDATA" +> <!-- single or comma-separated list of media descriptors + --> + +<!-- Defined elsewhere in this DTD +<!ENTITY % URI "CDATA" +> <! a Uniform Resource Identifier, + see [URI] + --> + +<!ENTITY % Datetime "CDATA"><!-- date and time information. ISO date format --> + + +<!ENTITY % Script "CDATA"><!-- script expression --> + +<!ENTITY % StyleSheet "CDATA"><!-- style sheet data --> + + + +<!ENTITY % Text "CDATA"> + + +<!-- Parameter Entities --> + +<!ENTITY % head.misc "SCRIPT|STYLE|META|LINK|OBJECT"><!-- repeatable head elements --> +<!ENTITY % heading "H1|H2|H3|H4|H5|H6"> +<!ENTITY % list "UL | OL"> +<!ENTITY % preformatted "PRE"> + + +<!--================ Character mnemonic entities =========================--> + +<!--ENTITY % HTMLlat1 PUBLIC + "-//W3C//ENTITIES Latin1//EN//HTML" + "HTMLlat1.ent"--> +<!-- "http://www.w3.org/TR/REC-html40-971218/HTMLlat1.ent"--> +<!--%HTMLlat1;--> + +<!--ENTITY % HTMLsymbol PUBLIC + "-//W3C//ENTITIES Symbols//EN//HTML" + "HTMLsymbol.ent"--> +<!-- "http://www.w3.org/TR/REC-html40-971218/HTMLsymbol.ent"--> +<!--%HTMLsymbol;--> + +<!--ENTITY % HTMLspecial PUBLIC + "-//W3C//ENTITIES Special//EN//HTML" + "HTMLspecial.ent"--> +<!-- "http://www.w3.org/TR/REC-html40-971218/HTMLspecial.ent"--> +<!--%HTMLspecial;--> + +<!-- We define these elsewhere in this mixed DTD +<!ENTITY quot """> +<!ENTITY amp "&"> +<!ENTITY lt "<"> +<!ENTITY gt ">"> +--> + +<!--=================== Generic Attributes ===============================--> + +<!ENTITY % coreattrs + "id ID #IMPLIED + class CDATA #IMPLIED + style %StyleSheet; #IMPLIED + title %Text; #IMPLIED + %result-element-atts;" +> + +<!ENTITY % i18n + "xml:lang %LanguageCode; #IMPLIED + dir (ltr|rtl) #IMPLIED" + > + +<!ENTITY % events + "onclick %Script; #IMPLIED + ondblclick %Script; #IMPLIED + onmousedown %Script; #IMPLIED + onmouseup %Script; #IMPLIED + onmouseover %Script; #IMPLIED + onmousemove %Script; #IMPLIED + onmouseout %Script; #IMPLIED + onkeypress %Script; #IMPLIED + onkeydown %Script; #IMPLIED + onkeyup %Script; #IMPLIED" + > + +<!-- Reserved Feature Switch --> +<!ENTITY % HTML.Reserved "IGNORE"> + +<!-- The following attributes are reserved for possible future use --> +<![ %HTML.Reserved; [ +<!ENTITY % reserved + "datasrc %URI; #IMPLIED + datafld CDATA #IMPLIED + dataformatas (plaintext|html) plaintext" + > +]]> + +<!ENTITY % reserved ""> + +<!ENTITY % attrs "%coreattrs; %i18n; %events;"> + + +<!--=================== Text Markup ======================================--> + +<!ENTITY % fontstyle + "TT | I | B | BIG | SMALL"> + +<!ENTITY % phrase "EM | STRONG | DFN | CODE | + SAMP | KBD | VAR | CITE | ABBR | ACRONYM" > + +<!ENTITY % special + "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO"> +<!ENTITY % special-A + "IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO"> + +<!ENTITY % formctrl "INPUT | SELECT | TEXTAREA | LABEL | BUTTON"> + +<!-- %inline; covers inline or "text-level" elements --> +<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; | %formctrl;"> +<!ENTITY % inline-A "#PCDATA | %fontstyle; | %phrase; | %special-A; | %formctrl;"> +<!ENTITY % inline-LABEL "#PCDATA | %fontstyle; | %phrase; | %special; | INPUT | SELECT | TEXTAREA | BUTTON"> + +<!-- +<!ELEMENT (%fontstyle;|%phrase;) (%inline;)*> +<!ATTLIST (%fontstyle;|%phrase;) + %attrs; + >--> +<!ELEMENT TT (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST TT %attrs;> +<!ELEMENT I (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST I %attrs;> +<!ELEMENT B (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST B %attrs;> +<!ELEMENT BIG (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST BIG %attrs;> +<!ELEMENT SMALL (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST SMALL %attrs;> +<!ELEMENT EM (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST EM %attrs;> +<!ELEMENT STRONG (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST STRONG %attrs;> +<!ELEMENT DFN (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST DFN %attrs;> +<!ELEMENT CODE (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST CODE %attrs;> +<!ELEMENT SAMP (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST SAMP %attrs;> +<!ELEMENT KBD (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST KBD %attrs;> +<!ELEMENT VAR (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST VAR %attrs;> +<!ELEMENT CITE (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST CITE %attrs;> +<!ELEMENT ABBR (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST ABBR %attrs;> +<!ELEMENT ACRONYM (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST ACRONYM %attrs;> + + +<!ELEMENT SUP (%inline; | %xsl-valid-in-resultns;)*><!-- subscript, superscript --> +<!ATTLIST SUP + %attrs; + > +<!ELEMENT SUB (%inline; | %xsl-valid-in-resultns;)*><!-- subscript, superscript --> +<!ATTLIST SUB + %attrs; + > + +<!ELEMENT SPAN (%inline; | %xsl-valid-in-resultns;)*><!-- generic language/style container --> +<!ATTLIST SPAN + %attrs; + %reserved; + > + +<!ELEMENT BDO (%inline; | %xsl-valid-in-resultns;)*><!-- I18N BiDi over-ride --> +<!ATTLIST BDO + %coreattrs; + lang %LanguageCode; #IMPLIED + dir (ltr|rtl) #REQUIRED + > + + +<!ELEMENT BR EMPTY><!-- forced line break --> +<!ATTLIST BR + %coreattrs; + > + +<!--================== HTML content models ===============================--> + +<!-- + HTML has two basic content models: + + %inline; character level elements and text strings + %block; block-like elements e.g. paragraphs and lists +--> + +<!ENTITY % block + "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT | + BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS"> +<!ENTITY % block-FORM + "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT | + BLOCKQUOTE | HR | TABLE | FIELDSET | ADDRESS"> +<!ENTITY % block-FORM-FIELDSET + "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT | + BLOCKQUOTE | HR | TABLE | ADDRESS"> + +<!--<!ENTITY % flow "%block; | %inline;">--> +<!ENTITY % flow "%inline; | %block;"> + +<!--=================== Document Body ====================================--> + +<!--ELEMENT BODY (%block;|SCRIPT)+ +(INS|DEL) document body --> +<!ELEMENT BODY ((INS|DEL)*, (%xsl-valid-in-resultns;|%block;|SCRIPT), (INS|DEL)*)+ ><!-- document body --> +<!ATTLIST BODY + %attrs; + onload %Script; #IMPLIED + onunload %Script; #IMPLIED + > + +<!ELEMENT ADDRESS (%inline; | %xsl-valid-in-resultns;)*><!-- information on author --> +<!ATTLIST ADDRESS + %attrs; + > + +<!ELEMENT DIV (%flow; | %xsl-valid-in-resultns;)*><!-- generic language/style container --> +<!ATTLIST DIV + %attrs; + %reserved; + > + + +<!--================== The Anchor Element ================================--> + +<!ENTITY % Shape "(rect|circle|poly|default)"> +<!ENTITY % Coords "CDATA"><!-- comma separated list of lengths --> + +<!ELEMENT A (%inline-A; | %xsl-valid-in-resultns;)*><!-- anchor --> +<!ATTLIST A + %attrs; + charset %Charset; #IMPLIED + type %ContentType; #IMPLIED + name CDATA #IMPLIED + href %URI; #IMPLIED + hreflang %LanguageCode; #IMPLIED + rel %LinkTypes; #IMPLIED + rev %LinkTypes; #IMPLIED + accesskey %Character; #IMPLIED + shape %Shape; "rect" + coords %Coords; #IMPLIED + tabindex %Number; #IMPLIED + onfocus %Script; #IMPLIED + onblur %Script; #IMPLIED + > + +<!--================== Client-side image maps ============================--> + +<!-- These can be placed in the same document or grouped in a + separate document although this isn't yet widely supported --> + +<!ELEMENT MAP ((%xsl-valid-in-resultns;|%block;)+ | (%xsl-valid-in-resultns;|AREA+))><!-- client-side image map --> +<!ATTLIST MAP + %attrs; + name CDATA #REQUIRED + > + +<!ELEMENT AREA EMPTY><!-- client-side image map area --> +<!ATTLIST AREA + %attrs; + shape %Shape; "rect" + coords %Coords; #IMPLIED + href %URI; #IMPLIED + nohref (nohref) #IMPLIED + alt %Text; #REQUIRED + tabindex %Number; #IMPLIED + accesskey %Character; #IMPLIED + onfocus %Script; #IMPLIED + onblur %Script; #IMPLIED + > + +<!--================== The LINK Element ==================================--> + +<!-- + Relationship values can be used in principle: + + a) for document specific toolbars/menus when used + with the LINK element in document head e.g. + start, contents, previous, next, index, end, help + b) to link to a separate style sheet (rel=stylesheet) + c) to make a link to a script (rel=script) + d) by stylesheets to control how collections of + html nodes are rendered into printed documents + e) to make a link to a printable version of this document + e.g. a postscript or pdf version (rel=alternate media=print) +--> + +<!ELEMENT LINK EMPTY><!-- a media-independent link --> +<!ATTLIST LINK + %attrs; + charset %Charset; #IMPLIED + href %URI; #IMPLIED + hreflang %LanguageCode; #IMPLIED + type %ContentType; #IMPLIED + rel %LinkTypes; #IMPLIED + rev %LinkTypes; #IMPLIED + media %MediaDesc; #IMPLIED + > + +<!--=================== Images ===========================================--> + +<!-- Length defined in strict DTD for cellpadding/cellspacing --> +<!ENTITY % Length "CDATA"><!-- nn for pixels or nn% for percentage length --> +<!ENTITY % MultiLength "CDATA"><!-- pixel, percentage, or relative --> + +<!ENTITY % MultiLengths "CDATA"><!-- comma-separated list of MultiLength --> + +<!ENTITY % Pixels "CDATA"><!-- integer representing length in pixels --> + + +<!-- To avoid problems with text-only UAs as well as + to make image content understandable and navigable + to users of non-visual UAs, you need to provide + a description with ALT, and avoid server-side image maps --> +<!ELEMENT IMG EMPTY><!-- Embedded image --> +<!ATTLIST IMG + %attrs; + src %URI; #REQUIRED + alt %Text; #REQUIRED + longdesc %URI; #IMPLIED + height %Length; #IMPLIED + width %Length; #IMPLIED + usemap %URI; #IMPLIED + ismap (ismap) #IMPLIED + > + +<!-- USEMAP points to a MAP element which may be in this document + or an external document, although the latter is not widely supported --> + +<!--==================== OBJECT ======================================--> +<!-- + OBJECT is used to embed objects as part of HTML pages + PARAM elements should precede other content. SGML mixed content + model technicality precludes specifying this formally ... +--> + +<!ELEMENT OBJECT (%flow; | %xsl-valid-in-resultns; | PARAM)* +><!-- generic embedded object --> +<!ATTLIST OBJECT + %attrs; + declare (declare) #IMPLIED + classid %URI; #IMPLIED + codebase %URI; #IMPLIED + data %URI; #IMPLIED + type %ContentType; #IMPLIED + codetype %ContentType; #IMPLIED + archive %URI; #IMPLIED + standby %Text; #IMPLIED + height %Length; #IMPLIED + width %Length; #IMPLIED + usemap %URI; #IMPLIED + name CDATA #IMPLIED + tabindex %Number; #IMPLIED + %reserved; + > + +<!ELEMENT PARAM EMPTY><!-- named property value --> +<!ATTLIST PARAM + id ID #IMPLIED + name CDATA #REQUIRED + value CDATA #IMPLIED + valuetype (DATA|REF|OBJECT) "DATA" + type %ContentType; #IMPLIED + > + + +<!--=================== Horizontal Rule ==================================--> + +<!ELEMENT HR EMPTY><!-- horizontal rule --> +<!ATTLIST HR + %coreattrs; + %events; + > + +<!--=================== Paragraphs =======================================--> + +<!ELEMENT P (%inline; | %xsl-valid-in-resultns;)*><!-- paragraph --> +<!ATTLIST P + %attrs; + > + +<!--=================== Headings =========================================--> + +<!-- + There are six levels of headings from H1 (the most important) + to H6 (the least important). +--> + +<!-- +<!ELEMENT (%heading;) (%inline;)*> +<!ATTLIST (%heading;) + %attrs; + >--> +<!ELEMENT H1 (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST H1 %attrs;> +<!ELEMENT H2 (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST H2 %attrs;> +<!ELEMENT H3 (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST H3 %attrs;> +<!ELEMENT H4 (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST H4 %attrs;> +<!ELEMENT H5 (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST H5 %attrs;> +<!ELEMENT H6 (%inline; | %xsl-valid-in-resultns;)*> +<!ATTLIST H6 %attrs;> + + +<!--=================== Preformatted Text ================================--> + +<!-- excludes markup for images and changes in font size --> +<!-- +<!ENTITY % pre.exclusion "IMG|OBJECT|BIG|SMALL|SUB|SUP"> + +<!ELEMENT PRE (%inline;)* -(%pre.exclusion;)><! preformatted text --> + +<!ELEMENT PRE (#PCDATA |%xsl-valid-in-resultns;| TT|I|B|%phrase;|A|BR|SCRIPT|MAP|Q|SPAN|BDO|%formctrl;)*> + <!-- preformatted text --> +<!ATTLIST PRE + %attrs;> +<!-- Should the attribute below be incuded in PRE? + xml:space (default|preserve) #FIXED "preserve" +--> + +<!--===================== Inline Quotes ==================================--> + +<!ELEMENT Q (%inline; | %xsl-valid-in-resultns;)*><!-- short inline quotation --> +<!ATTLIST Q + %attrs; + cite %URI; #IMPLIED + > + +<!--=================== Block-like Quotes ================================--> + +<!ELEMENT BLOCKQUOTE (%block;|%xsl-valid-in-resultns;|SCRIPT)+><!-- long quotation --> +<!ATTLIST BLOCKQUOTE + %attrs; + cite %URI; #IMPLIED + > + +<!--=================== Inserted/Deleted Text ============================--> + + +<!-- INS/DEL are handled by inclusion on BODY --> +<!ELEMENT INS (%flow;|%xsl-valid-in-resultns;)*><!-- inserted text, deleted text --> +<!ATTLIST INS + %attrs; + cite %URI; #IMPLIED + datetime %Datetime; #IMPLIED + > +<!ELEMENT DEL (%flow;|%xsl-valid-in-resultns;)*><!-- inserted text, deleted text --> +<!ATTLIST DEL + %attrs; + cite %URI; #IMPLIED + datetime %Datetime; #IMPLIED + > + +<!--=================== Lists ============================================--> + +<!-- definition lists - DT for term, DD for its definition --> + +<!ELEMENT DL (%xsl-valid-in-resultns;| DT|DD)+><!-- definition list --> +<!ATTLIST DL + %attrs; + > + +<!ELEMENT DT (%inline; | %xsl-valid-in-resultns;)*><!-- definition term --> +<!ELEMENT DD (%flow; | %xsl-valid-in-resultns;)*><!-- definition description --> +<!ATTLIST DT + %attrs; + > +<!ATTLIST DD + %attrs; + > + + +<!ELEMENT OL (%xsl-valid-in-resultns; | LI)+><!-- ordered list --> +<!ATTLIST OL + %attrs; + > + +<!-- Unordered Lists (UL) bullet styles --> +<!ELEMENT UL (%xsl-valid-in-resultns; | LI)+><!-- unordered list --> +<!ATTLIST UL + %attrs; + > + + + +<!ELEMENT LI (%flow; | %xsl-valid-in-resultns;)*><!-- list item --> +<!ATTLIST LI + %attrs; + > + +<!--================ Forms ===============================================--> +<!ELEMENT FORM (%xsl-valid-in-resultns;|%block-FORM;|SCRIPT)+> + +<!-- interactive form --> +<!ATTLIST FORM + %attrs; + action %URI; #REQUIRED + method (GET|POST) "GET" + enctype %ContentType; "application/x-www-form-urlencoded" + onsubmit %Script; #IMPLIED + onreset %Script; #IMPLIED + accept-charset %Charsets; #IMPLIED + > + +<!-- Each label must not contain more than ONE field --> +<!ELEMENT LABEL (%inline-LABEL; | %xsl-valid-in-resultns;)*><!-- form field label text --> +<!ATTLIST LABEL + %attrs; + for IDREF #IMPLIED + accesskey %Character; #IMPLIED + onfocus %Script; #IMPLIED + onblur %Script; #IMPLIED + > + +<!ENTITY % InputType + "(TEXT | PASSWORD | CHECKBOX | + RADIO | SUBMIT | RESET | + FILE | HIDDEN | IMAGE | BUTTON)" + > + +<!-- attribute name required for all but submit & reset --> +<!ELEMENT INPUT EMPTY><!-- form control --> +<!ATTLIST INPUT + %attrs; + type %InputType; "TEXT" + name CDATA #IMPLIED + value CDATA #IMPLIED + checked (checked) #IMPLIED + disabled (disabled) #IMPLIED + readonly (readonly) #IMPLIED + size CDATA #IMPLIED + maxlength %Number; #IMPLIED + src %URI; #IMPLIED + alt CDATA #IMPLIED + usemap %URI; #IMPLIED + tabindex %Number; #IMPLIED + accesskey %Character; #IMPLIED + onfocus %Script; #IMPLIED + onblur %Script; #IMPLIED + onselect %Script; #IMPLIED + onchange %Script; #IMPLIED + accept %ContentTypes; #IMPLIED + %reserved; + > + +<!ELEMENT SELECT ((%xsl-valid-in-resultns;|OPTGROUP)|(%xsl-valid-in-resultns;|OPTION))+ ><!-- option selector --> +<!ATTLIST SELECT + %attrs; + name CDATA #IMPLIED + size %Number; #IMPLIED + multiple (multiple) #IMPLIED + disabled (disabled) #IMPLIED + tabindex %Number; #IMPLIED + onfocus %Script; #IMPLIED + onblur %Script; #IMPLIED + onchange %Script; #IMPLIED + %reserved; + > + +<!ELEMENT OPTGROUP (%xsl-valid-in-resultns;|OPTION)+> <!-- option group --> +<!ATTLIST OPTGROUP + %attrs; + disabled (disabled) #IMPLIED + label %Text; #REQUIRED + > + +<!ELEMENT OPTION (#PCDATA | %xsl-valid-in-resultns;)*><!-- selectable choice --> +<!ATTLIST OPTION + %attrs; + selected (selected) #IMPLIED + disabled (disabled) #IMPLIED + label %Text; #IMPLIED + value CDATA #IMPLIED + > + +<!ELEMENT TEXTAREA (#PCDATA | %xsl-valid-in-resultns;)*><!-- multi-line text field --> +<!ATTLIST TEXTAREA + %attrs; + name CDATA #IMPLIED + rows %Number; #REQUIRED + cols %Number; #REQUIRED + disabled (disabled) #IMPLIED + readonly (readonly) #IMPLIED + tabindex %Number; #IMPLIED + accesskey %Character; #IMPLIED + onfocus %Script; #IMPLIED + onblur %Script; #IMPLIED + onselect %Script; #IMPLIED + onchange %Script; #IMPLIED + %reserved; + > + +<!-- + #PCDATA is to solve the mixed content problem, + per specification only whitespace is allowed there! + + We do allow XSL inside as well + --> +<!--ELEMENT FIELDSET (#PCDATA,LEGEND,(%flow;)*) form control group --> +<!ELEMENT FIELDSET (%flow;|%xsl-valid-in-resultns;|LEGEND)*><!-- form control group --> +<!ATTLIST FIELDSET + %attrs; + > + +<!ELEMENT LEGEND (%inline;|%xsl-valid-in-resultns;)*><!-- fieldset legend --> +<!ENTITY % LAlign "(top|bottom|left|right)"> + +<!ATTLIST LEGEND + %attrs; + accesskey %Character; #IMPLIED + > + +<!ELEMENT BUTTON + (#PCDATA | %xsl-valid-in-resultns; | %fontstyle; | %phrase; | %special-A; | %block;)* +><!-- push button --> +<!ATTLIST BUTTON + %attrs; + name CDATA #IMPLIED + value CDATA #IMPLIED + type (button|submit|reset) "submit" + disabled (disabled) #IMPLIED + tabindex %Number; #IMPLIED + accesskey %Character; #IMPLIED + onfocus %Script; #IMPLIED + onblur %Script; #IMPLIED + %reserved; + > + +<!--======================= Tables =======================================--> + +<!-- IETF HTML table standard, see [RFC1942] --> + +<!-- + The BORDER attribute sets the thickness of the frame around the + table. The default units are screen pixels. + + The FRAME attribute specifies which parts of the frame around + the table should be rendered. The values are not the same as + CALS to avoid a name clash with the VALIGN attribute. + + The value "border" is included for backwards compatibility with + <TABLE BORDER> which yields frame=border and border=implied + For <TABLE BORDER=1> you get border=1 and frame=implied. In this + case, it is appropriate to treat this as frame=border for backwards + compatibility with deployed browsers. +--> +<!ENTITY % TFrame "(void|above|below|hsides|lhs|rhs|vsides|box|border)"> + +<!-- + The RULES attribute defines which rules to draw between cells: + + If RULES is absent then assume: + "none" if BORDER is absent or BORDER=0 otherwise "all" +--> + +<!ENTITY % TRules "(none | groups | rows | cols | all)"> + +<!-- horizontal placement of table relative to document --> +<!ENTITY % TAlign "(left|center|right)"> + +<!-- horizontal alignment attributes for cell contents --> +<!ENTITY % cellhalign + "align (left|center|right|justify|char) #IMPLIED + char %Character; #IMPLIED + charoff %Length; #IMPLIED" + > + +<!-- vertical alignment attributes for cell contents --> +<!ENTITY % cellvalign + "valign (top|middle|bottom|baseline) #IMPLIED" + > + +<!ELEMENT TABLE + ((%xsl-valid-in-resultns;)*, CAPTION?, (%xsl-valid-in-resultns;)*, + ((COL | %xsl-valid-in-resultns;)*|(COLGROUP | %xsl-valid-in-resultns;)*), + ((THEAD?,(%xsl-valid-in-resultns;)*,TFOOT?,(%xsl-valid-in-resultns;|TBODY)+) + | (%xsl-valid-in-resultns;|TR)+) )> + +<!ELEMENT CAPTION (%inline; | %xsl-valid-in-resultns;)*><!-- table caption --> +<!ELEMENT THEAD (TR|%xsl-valid-in-resultns;)+><!-- table header --> +<!ELEMENT TFOOT (TR|%xsl-valid-in-resultns;)+><!-- table footer --> +<!ELEMENT TBODY (TR|%xsl-valid-in-resultns;)+><!-- table body --> +<!ELEMENT COLGROUP (%xsl-valid-in-resultns; | COL)*><!-- table column group --> +<!ELEMENT COL EMPTY><!-- table column --> +<!ELEMENT TR (TH|TD| %xsl-valid-in-resultns;)+><!-- table row --> +<!ELEMENT TH (%flow; | %xsl-valid-in-resultns;)*><!-- table header cell, table data cell--> +<!ELEMENT TD (%flow; | %xsl-valid-in-resultns;)*><!-- table header cell, table data cell--> + +<!ATTLIST TABLE + %attrs; + summary %Text; #IMPLIED + width %Length; #IMPLIED + border %Pixels; #IMPLIED + frame %TFrame; #IMPLIED + rules %TRules; #IMPLIED + cellspacing %Length; #IMPLIED + cellpadding %Length; #IMPLIED + %reserved; + datapagesize CDATA #IMPLIED + > + +<!ENTITY % CAlign "(top|bottom|left|right)"> + +<!ATTLIST CAPTION + %attrs; + > + +<!-- +COLGROUP groups a set of COL elements. It allows you to group +several semantically related columns together. +--> +<!ATTLIST COLGROUP + %attrs; + span %Number; "1" + width %MultiLength; #IMPLIED + %cellhalign; + %cellvalign; + > + +<!-- + COL elements define the alignment properties for cells in + one or more columns. + + The WIDTH attribute specifies the width of the columns, e.g. + + width=64 width in screen pixels + width=0.5* relative width of 0.5 + + The SPAN attribute causes the attributes of one + COL element to apply to more than one column. +--> +<!ATTLIST COL + %attrs; + span %Number; "1" + width %MultiLength; #IMPLIED + %cellhalign; + %cellvalign; + > + +<!-- + Use THEAD to duplicate headers when breaking table + across page boundaries, or for static headers when + TBODY sections are rendered in scrolling panel. + + Use TFOOT to duplicate footers when breaking table + across page boundaries, or for static footers when + TBODY sections are rendered in scrolling panel. + + Use multiple TBODY sections when rules are needed + between groups of table rows. +--> +<!ATTLIST THEAD + %attrs; + %cellhalign; + %cellvalign; + > +<!ATTLIST TBODY + %attrs; + %cellhalign; + %cellvalign; + > +<!ATTLIST TFOOT + %attrs; + %cellhalign; + %cellvalign; + > + +<!ATTLIST TR + %attrs; + %cellhalign; + %cellvalign; + > + + +<!-- Scope is simpler than axes attribute for common tables --> +<!ENTITY % Scope "(ROW|COL|ROWGROUP|COLGROUP)"> + +<!-- TH is for headers, TD for data, but for cells acting as both use TD --> +<!ATTLIST TH + %attrs; + abbr %Text; #IMPLIED + axis CDATA #IMPLIED + headers IDREFS #IMPLIED + scope %Scope; #IMPLIED + rowspan %Number; "1" + colspan %Number; "1" + %cellhalign; + %cellvalign; + > +<!ATTLIST TD + %attrs; + abbr %Text; #IMPLIED + axis CDATA #IMPLIED + headers IDREFS #IMPLIED + scope %Scope; #IMPLIED + rowspan %Number; "1" + colspan %Number; "1" + %cellhalign; + %cellvalign; + > + + +<!--================ Document Head =======================================--> +<!-- %head.misc; defined earlier on as "SCRIPT|STYLE|META|LINK|OBJECT", + extended now to allow xsl --> +<!ENTITY % head.misc-HEAD "%head.misc;|%xsl-valid-in-resultns;"> + +<!ENTITY % head.content "TITLE & BASE?"> + +<!--ELEMENT HEAD (%head.content;) +(%head.misc;) document head --> +<!ELEMENT HEAD + ((%head.misc-HEAD;)*, ((BASE?,(%head.misc-HEAD;)*,TITLE?) | (TITLE?,(%head.misc-HEAD;)*,BASE?)|(%head.misc-HEAD;)*)+, (%head.misc-HEAD;)*)> +<!ATTLIST HEAD + %i18n; + profile %URI; #IMPLIED + %result-element-atts; + > + +<!-- The TITLE element is not considered part of the flow of text. + It should be displayed, for example as the page header or + window title. Exactly one title is required per document. + --> +<!--ELEMENT TITLE (#PCDATA) -(%head.misc;) document title --> +<!ELEMENT TITLE (#PCDATA | %xsl-valid-in-resultns;)*><!-- document title --> +<!ATTLIST TITLE %i18n; %result-element-atts;> + + +<!ELEMENT BASE EMPTY><!-- document base URI --> +<!ATTLIST BASE + href %URI; #REQUIRED + > + +<!ELEMENT META EMPTY><!-- generic metainformation --> +<!ATTLIST META + %i18n; + http-equiv %Name; #IMPLIED + name %Name; #IMPLIED + content CDATA #REQUIRED + scheme CDATA #IMPLIED + %result-element-atts; + > + +<!--ELEMENT STYLE %StyleSheet; style info --> +<!ELEMENT STYLE (#PCDATA | %xsl-valid-in-resultns;)*><!-- style info --> +<!ATTLIST STYLE + %i18n; + type %ContentType; #REQUIRED + media %MediaDesc; #IMPLIED + title %Text; #IMPLIED + %result-element-atts; + > + +<!--ELEMENT SCRIPT %Script; script statements --> +<!ELEMENT SCRIPT (#PCDATA | %xsl-valid-in-resultns;)*><!-- script statements --> +<!ATTLIST SCRIPT + charset %Charset; #IMPLIED + type %ContentType; #REQUIRED + language CDATA #IMPLIED + src %URI; #IMPLIED + defer (defer) #IMPLIED + event CDATA #IMPLIED + for %URI; #IMPLIED + %result-element-atts; + > + +<!ELEMENT NOSCRIPT (%xsl-valid-in-resultns;|%block;)+ +><!-- alternate content container for non script-based rendering --> +<!ATTLIST NOSCRIPT + %attrs; + > + +<!--================ Document Structure ==================================--> +<!ENTITY % html.content "HEAD, BODY"> + +<!--<!ELEMENT HTML (%html.content;)> --><!-- document root element --> +<!ELEMENT HTML (((%xsl-valid-in-resultns;)*,HEAD?,(%xsl-valid-in-resultns;)*,BODY?, + (%xsl-valid-in-resultns;)*) | (%xsl-valid-in-resultns;)*)> +<!-- document root element --> +<!ATTLIST HTML + %i18n; + %result-element-atts; + > diff --git a/stylebook/style/graphics/button-a.gif b/stylebook/style/graphics/button-a.gif new file mode 100644 index 000000000..5d0b8c242 Binary files /dev/null and b/stylebook/style/graphics/button-a.gif differ diff --git a/stylebook/style/graphics/button-b.gif b/stylebook/style/graphics/button-b.gif new file mode 100644 index 000000000..06e03811a Binary files /dev/null and b/stylebook/style/graphics/button-b.gif differ diff --git a/stylebook/style/loader.xml b/stylebook/style/loader.xml new file mode 100644 index 000000000..8607e5d7c --- /dev/null +++ b/stylebook/style/loader.xml @@ -0,0 +1,9 @@ +<?xml version="1.0"?> + +<!-- CVS $Revision: 1.1 $ $Date: 1999/12/01 14:26:14 $ --> + +<loader> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/book2project.xsl"/> + </processor> +</loader> diff --git a/stylebook/style/loaderdesign.xml b/stylebook/style/loaderdesign.xml new file mode 100644 index 000000000..975055b39 --- /dev/null +++ b/stylebook/style/loaderdesign.xml @@ -0,0 +1,7 @@ +<?xml version="1.0"?> + +<loader> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/design2project.xsl"/> + </processor> +</loader> diff --git a/stylebook/style/resources/bottom.gif b/stylebook/style/resources/bottom.gif new file mode 100644 index 000000000..f39031efa Binary files /dev/null and b/stylebook/style/resources/bottom.gif differ diff --git a/stylebook/style/resources/button-asf-hi.gif b/stylebook/style/resources/button-asf-hi.gif new file mode 100644 index 000000000..08b880a74 Binary files /dev/null and b/stylebook/style/resources/button-asf-hi.gif differ diff --git a/stylebook/style/resources/button-asf-lo.gif b/stylebook/style/resources/button-asf-lo.gif new file mode 100644 index 000000000..134580f37 Binary files /dev/null and b/stylebook/style/resources/button-asf-lo.gif differ diff --git a/stylebook/style/resources/button-w3c-hi.gif b/stylebook/style/resources/button-w3c-hi.gif new file mode 100644 index 000000000..3bf0be395 Binary files /dev/null and b/stylebook/style/resources/button-w3c-hi.gif differ diff --git a/stylebook/style/resources/button-w3c-lo.gif b/stylebook/style/resources/button-w3c-lo.gif new file mode 100644 index 000000000..d383d3dd9 Binary files /dev/null and b/stylebook/style/resources/button-w3c-lo.gif differ diff --git a/stylebook/style/resources/button-xml-hi.gif b/stylebook/style/resources/button-xml-hi.gif new file mode 100644 index 000000000..01d095ce4 Binary files /dev/null and b/stylebook/style/resources/button-xml-hi.gif differ diff --git a/stylebook/style/resources/button-xml-lo.gif b/stylebook/style/resources/button-xml-lo.gif new file mode 100644 index 000000000..5719c7ef0 Binary files /dev/null and b/stylebook/style/resources/button-xml-lo.gif differ diff --git a/stylebook/style/resources/close.gif b/stylebook/style/resources/close.gif new file mode 100644 index 000000000..48a9782ce Binary files /dev/null and b/stylebook/style/resources/close.gif differ diff --git a/stylebook/style/resources/dot.gif b/stylebook/style/resources/dot.gif new file mode 100644 index 000000000..6227d1d86 Binary files /dev/null and b/stylebook/style/resources/dot.gif differ diff --git a/stylebook/style/resources/join.gif b/stylebook/style/resources/join.gif new file mode 100644 index 000000000..02e7611bb Binary files /dev/null and b/stylebook/style/resources/join.gif differ diff --git a/stylebook/style/resources/line.gif b/stylebook/style/resources/line.gif new file mode 100644 index 000000000..fd25c3943 Binary files /dev/null and b/stylebook/style/resources/line.gif differ diff --git a/stylebook/style/resources/logo.gif b/stylebook/style/resources/logo.gif new file mode 100644 index 000000000..53538c3f6 Binary files /dev/null and b/stylebook/style/resources/logo.gif differ diff --git a/stylebook/style/resources/note.gif b/stylebook/style/resources/note.gif new file mode 100644 index 000000000..339422266 Binary files /dev/null and b/stylebook/style/resources/note.gif differ diff --git a/stylebook/style/resources/right.gif b/stylebook/style/resources/right.gif new file mode 100644 index 000000000..bcb50e386 Binary files /dev/null and b/stylebook/style/resources/right.gif differ diff --git a/stylebook/style/resources/script.js b/stylebook/style/resources/script.js new file mode 100644 index 000000000..2f89588ff --- /dev/null +++ b/stylebook/style/resources/script.js @@ -0,0 +1,21 @@ +rolloverImagesOn=new Array(); +rolloverImagesOff=new Array(); + +function rolloverOn(name) { + if(rolloverImagesOn[name]){ + document.images[name].src=rolloverImagesOn[name].src; + } +} + +function rolloverOff(name) { + if(rolloverImagesOff[name]){ + document.images[name].src=rolloverImagesOff[name].src; + } +} + +function rolloverLoad(name,on,off) { + rolloverImagesOn[name]=new Image(); + rolloverImagesOn[name].src=on; + rolloverImagesOff[name]=new Image(); + rolloverImagesOff[name].src=off; +} diff --git a/stylebook/style/resources/separator.gif b/stylebook/style/resources/separator.gif new file mode 100644 index 000000000..e7749432f Binary files /dev/null and b/stylebook/style/resources/separator.gif differ diff --git a/stylebook/style/resources/void.gif b/stylebook/style/resources/void.gif new file mode 100644 index 000000000..75b945d25 Binary files /dev/null and b/stylebook/style/resources/void.gif differ diff --git a/stylebook/style/stylesheets/any2header.xsl b/stylebook/style/stylesheets/any2header.xsl new file mode 100644 index 000000000..51a8e5a04 --- /dev/null +++ b/stylebook/style/stylesheets/any2header.xsl @@ -0,0 +1,29 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="label"/> + + <xsl:template match="/"> + <image width="456" height="35" bgcolor="0086b2"> + <xsl:apply-templates/> + </image> + </xsl:template> + + <xsl:template match="s1|faqs|changes"> + <xsl:variable name="title"> + <xsl:if test="string-length(@title)=0"> + <xsl:value-of select="$label"/> + </xsl:if> + <xsl:if test="string-length(@title)>0"> + <xsl:value-of select="@title"/> + </xsl:if> + </xsl:variable> + + <text font="Arial" size="29" x="454" y="8" halign="right" valign="top" color="004080" + text="{$title}"/> + <text font="Arial" size="29" x="452" y="6" halign="right" valign="top" color="ffffff" + text="{$title}"/> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/style/stylesheets/any2project.xsl b/stylebook/style/stylesheets/any2project.xsl new file mode 100644 index 000000000..2a29c06f5 --- /dev/null +++ b/stylebook/style/stylesheets/any2project.xsl @@ -0,0 +1,21 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="label"/> + + <xsl:template match="/"> + <project> + <xsl:apply-templates/> + </project> + </xsl:template> + + <xsl:template match="img"> + <resource source="{@src}" target="images/{@src}"/> + </xsl:template> + + <xsl:template match="node()"> + <xsl:apply-templates/> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/style/stylesheets/book2group.xsl b/stylebook/style/stylesheets/book2group.xsl new file mode 100644 index 000000000..34ac963e8 --- /dev/null +++ b/stylebook/style/stylesheets/book2group.xsl @@ -0,0 +1,34 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="id"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="book"> + <group title="{group[attribute::id=$id]/@label}"> + <xsl:apply-templates select="group[attribute::id=$id]/entry"/> + </group> + </xsl:template> + + <xsl:template match="entry"> + <entry id="{@id}" title="{document(concat('sbk:/sources/',@source))/faqs/@title}"> + <xsl:apply-templates select="document(concat('sbk:/sources/',@source))/faqs/faq"/> + </entry> + </xsl:template> + + <xsl:template match="faq"> + <voice> + <xsl:if test="string-length(@title)=0"> + <xsl:value-of select="q"/> + </xsl:if> + <xsl:if test="string-length(@title)>0"> + <xsl:value-of select="@title"/> + </xsl:if> + </voice> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/style/stylesheets/book2project.xsl b/stylebook/style/stylesheets/book2project.xsl new file mode 100644 index 000000000..41d34e2a9 --- /dev/null +++ b/stylebook/style/stylesheets/book2project.xsl @@ -0,0 +1,257 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <!-- match the root book element --> + <xsl:template match="book"> + <project> + + <parameter name="copyright" value="{@copyright}"/> + + <!-- copy all resources to the targets --> + <process source="sbk:/style/resources/" producer="directory"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/directory2project.xsl"/> + <parameter name="base" value="resources/"/> + </processor> + </process> + + <xsl:apply-templates/> + + </project> + </xsl:template> + +<!-- ********************************************************************** --> +<!-- CREATE THE TARGET HTML --> +<!-- ********************************************************************** --> + + <xsl:template match="document"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + </xsl:template> + + <xsl:template match="hidden"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + </xsl:template> + + <xsl:template match="faqs"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/faqs2document.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + + </xsl:template> + + <xsl:template match="changes"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/changes2document.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + + </xsl:template> + + <xsl:template match="group"> + <xsl:apply-templates/> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="" target="{@id}.html" producer="project" printer="html"> + <parameter name="id" value="{@id}"/> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/book2group.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/group2document.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + + </xsl:template> + + <xsl:template match="entry"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/faqs2document.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + + </xsl:template> + + <xsl:template match="external"> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="concat('ext-',position())"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + </xsl:template> +<!-- ********************************************************************** --> +<!-- NAMED TEMPLATES --> +<!-- ********************************************************************** --> + +<!-- Generate the doument header image --> + <xsl:template name="header"> + <xsl:param name="id"/> + <xsl:param name="source"/> + <xsl:param name="label"/> + + <create source="{$source}" target="graphics/{$id}-header.jpg" producer="parser" printer="image"> + <processor name="xslt"> + <parameter name="label" value="{$label}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2header.xsl"/> + </processor> + </create> + </xsl:template> + +<!-- Generate the three rollover label images --> + <xsl:template name="labels"> + <xsl:param name="id"/> + <xsl:param name="label"/> + + <create source="" target="graphics/{$id}-label-1.jpg" producer="context" printer="image"> + <parameter name="label" value="{$label}"/> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/context2label.xsl"/> + <parameter name="image" value="sbk:/style/graphics/button-a.gif"/> + <parameter name="color" value="ffffff"/> + </processor> + </create> + + <create source="" target="graphics/{$id}-label-2.jpg" producer="context" printer="image"> + <parameter name="label" value="{$label}"/> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/context2label.xsl"/> + <parameter name="image" value="sbk:/style/graphics/button-b.gif"/> + <parameter name="color" value="ffff00"/> + </processor> + </create> + + <create source="" target="graphics/{$id}-label-3.jpg" producer="context" printer="image"> + <parameter name="label" value="{$label}"/> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/context2label.xsl"/> + <parameter name="image" value="sbk:/style/graphics/button-b.gif"/> + <parameter name="color" value="ffffff"/> + </processor> + </create> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/style/stylesheets/changes2document.xsl b/stylebook/style/stylesheets/changes2document.xsl new file mode 100644 index 000000000..dccbcfce7 --- /dev/null +++ b/stylebook/style/stylesheets/changes2document.xsl @@ -0,0 +1,43 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="changes"> + <s1 title="{@title}"> + <xsl:apply-templates/> + </s1> + </xsl:template> + + <xsl:template match="release"> + <s2 title="Release {@version} {@date}"> + <br/><xsl:apply-templates/> + </s2> + </xsl:template> + + <xsl:template match="features"> + <s3 title="Features"> + <ul><xsl:apply-templates/></ul> + </s3> + </xsl:template> + + <xsl:template match="fixes"> + <s3 title="Bugs fixed"> + <ul><xsl:apply-templates/></ul> + </s3> + </xsl:template> + + <xsl:template match="feat|fix"> + <li><xsl:apply-templates/></li> + </xsl:template> + + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/style/stylesheets/context2footer.xsl b/stylebook/style/stylesheets/context2footer.xsl new file mode 100644 index 000000000..f50cdf2f9 --- /dev/null +++ b/stylebook/style/stylesheets/context2footer.xsl @@ -0,0 +1,29 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="context"> + <image source="sbk:/style/graphics/footer.gif"> + <xsl:apply-templates/> + </image> + </xsl:template> + + <xsl:template match="parameter"> + <xsl:if test="@name='copyright'"> + <text font="Arial Bold" size="11" x="124" y="6" style="plain" + halign="left" valign="top" color="666699" + text="Copyright © {@value}. All Rights Reserved."/> + <text font="Arial Bold" size="11" x="123" y="5" style="plain" + halign="left" valign="top" color="333366" + text="Copyright © {@value}. All Rights Reserved."/> + <text font="Arial Bold" size="11" x="122" y="4" style="plain" + halign="left" valign="top" color="ffffff" + text="Copyright © {@value}. All Rights Reserved."/> + </xsl:if> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/style/stylesheets/context2label.xsl b/stylebook/style/stylesheets/context2label.xsl new file mode 100644 index 000000000..3c25e5217 --- /dev/null +++ b/stylebook/style/stylesheets/context2label.xsl @@ -0,0 +1,25 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="image"/> + <xsl:param name="color"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="context"> + <image source="{$image}"> + <xsl:apply-templates/> + </image> + </xsl:template> + + <xsl:template match="parameter"> + <xsl:if test="@name='label'"> + <text font="Arial" size="12" x="14" y="1" halign="left" + valign="top" color="{$color}" style="italic" text="{@value}"/> + </xsl:if> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/xdocs/style/stylesheets/design2project.xsl b/stylebook/style/stylesheets/design2project.xsl similarity index 100% rename from xdocs/style/stylesheets/design2project.xsl rename to stylebook/style/stylesheets/design2project.xsl diff --git a/xdocs/style/stylesheets/designdoc2html.xsl b/stylebook/style/stylesheets/designdoc2html.xsl similarity index 100% rename from xdocs/style/stylesheets/designdoc2html.xsl rename to stylebook/style/stylesheets/designdoc2html.xsl diff --git a/stylebook/style/stylesheets/directory2project.xsl b/stylebook/style/stylesheets/directory2project.xsl new file mode 100644 index 000000000..48a4581c8 --- /dev/null +++ b/stylebook/style/stylesheets/directory2project.xsl @@ -0,0 +1,34 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="base"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="directory"> + <project> + <xsl:apply-templates/> + </project> + </xsl:template> + + <xsl:template match="entry"> + + <!--xsl:if test="@directory!='true'"--> + <resource source="{@href}" target="{$base}{@href}"/> + <!--/xsl:if--> +<!-- don't copy subdir to avoid copying proprietary CVS files + <xsl:if test="@directory='true'"> + <process source="{@href}" producer="directory"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/directory2project.xsl"/> + <parameter name="base" value="{$base}{@href}"/> + </processor> + </process> + </xsl:if> +--> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/style/stylesheets/document2html.xsl b/stylebook/style/stylesheets/document2html.xsl new file mode 100644 index 000000000..1c2de8f20 --- /dev/null +++ b/stylebook/style/stylesheets/document2html.xsl @@ -0,0 +1,445 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="stylebook.project"/> + <xsl:param name="copyright"/> + <xsl:param name="id"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="s1"> + <html> + <head> + <script language="JavaScript" type="text/javascript" src="resources/script.js"/> + <title><xsl:value-of select="@title"/></title> + </head> + <body text="#000000" link="#0000ff" vlink="#0000aa" alink="#ff0000" + topmargin="4" leftmargin="4" marginwidth="4" marginheight="4" + bgcolor="#ffffff"> + <!-- THE TOP BAR (HEADER) --> + <table width="620" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td width="135" height="60" rowspan="3" valign="top" align="left"> + <img width="135" height="60" src="resources/logo.gif" alt="logo" hspace="0" vspace="0" border="0"/></td> + <td width="456" height="5" valign="top" align="left" colspan="4"> + <img width="456" height="5" src="resources/line.gif" alt="line" hspace="0" vspace="0" border="0"/></td> + <td width="29" height="60" rowspan="3" valign="top" align="left"> + <img width="29" height="60" src="resources/right.gif" alt="right" hspace="0" vspace="0" border="0"/></td> + </tr> + <tr> + <td width="456" height="35" valign="top" align="left" colspan="4" bgcolor="#0086b2"> + <img src="graphics/{$id}-header.jpg" width="456" height="35" hspace="0" vspace="0" border="0" alt="{s1/@title}"/></td> + </tr> + <tr> + <td width="168" height="20" valign="top" align="left"> + <img width="168" height="20" src="resources/bottom.gif" alt="bottom" hspace="0" vspace="0" border="0"/></td> + <td width="96" height="20" valign="top" align="left"> + <a href="http://xml.apache.org/" onMouseOver="rolloverOn('xml');" onMouseOut="rolloverOff('xml');" target="new"> + <img alt="http://xml.apache.org/" width="96" height="20" src="resources/button-xml-lo.gif" + name="xml" hspace="0" vspace="0" border="0" + onLoad="rolloverLoad('xml','resources/button-xml-hi.gif','resources/button-xml-lo.gif');"/> + </a> + </td> + <td width="96" height="20" valign="top" align="left"> + <a href="http://www.apache.org/" onMouseOver="rolloverOn('asf');" onMouseOut="rolloverOff('asf');" target="new"> + <img alt="http://www.apache.org/" width="96" height="20" src="resources/button-asf-lo.gif" + name="asf" hspace="0" vspace="0" border="0" + onLoad="rolloverLoad('asf','resources/button-asf-hi.gif','resources/button-asf-lo.gif');"/> + </a> + </td> + <td width="96" height="20" valign="top" align="left"> + <a href="http://www.w3.org/" onMouseOver="rolloverOn('w3c');" onMouseOut="rolloverOff('w3c');" target="new"> + <img alt="http://www.w3.org/" width="96" height="20" src="resources/button-w3c-lo.gif" + name="w3c" hspace="0" vspace="0" border="0" + onLoad="rolloverLoad('w3c','resources/button-w3c-hi.gif','resources/button-w3c-lo.gif');"/> + </a> + </td> + </tr> + </table> + <!-- THE MAIN PANEL (SIDEBAR AND CONTENT) --> + <table width="620" cellspacing="0" cellpadding="0" border="0"> + <tr> + <!-- THE SIDE BAR --> + <td width="120" valign="top" align="left"> + <img width="120" height="14" src="resources/join.gif" alt="join" hspace="0" vspace="0" border="0"/><br/> + <xsl:apply-templates select="document($stylebook.project)"/> + <img width="120" height="14" src="resources/close.gif" alt="close" hspace="0" vspace="0" border="0"/><br/> + </td> + <!-- THE CONTENT PANEL --> + <td width="500" valign="top" align="left"> + <table border="0" cellspacing="0" cellpadding="3"> + <tr><td><xsl:apply-templates/></td></tr> + </table> + </td> + </tr> + </table><br/> + <table width="620" border="0" cellspacing="0" cellpadding="0"> + <tr><td bgcolor="#0086b2"><img src="resources/dot.gif" alt="dot" width="1" height="1"/></td></tr> + <tr> + <td align="center"><font size="-1" color="#0086b2"><i> + Copyright © <xsl:value-of select="$copyright"/>. + All Rights Reserved. + </i></font></td> + </tr> + </table> + </body> + </html> + </xsl:template> + +<!-- ###################################################################### --> +<!-- book --> + + <xsl:template match="book"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="document|faqs|changes|group"> + <xsl:if test="@id=$id"> + <img src="graphics/{@id}-label-1.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/> + </xsl:if> + <xsl:if test="@id!=$id"> + <a href="{@id}.html" onMouseOver="rolloverOn('side-{@id}');" onMouseOut="rolloverOff('side-{@id}');"> + <img onLoad="rolloverLoad('side-{@id}','graphics/{@id}-label-2.jpg','graphics/{@id}-label-3.jpg');" + name="side-{@id}" src="graphics/{@id}-label-3.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/> + </a> + </xsl:if> + <br/> + </xsl:template> + + <xsl:template match="external"> + <xsl:variable name="extid" select="concat('ext-',position())"/> + <a href="{@href}" onMouseOver="rolloverOn('side-{$extid}');" onMouseOut="rolloverOff('side-{$extid}');"> + <img onLoad="rolloverLoad('side-{$extid}','graphics/{$extid}-label-2.jpg','graphics/{$extid}-label-3.jpg');" + name="side-{$extid}" src="graphics/{$extid}-label-3.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/> + </a> + <br/> + </xsl:template> + + <xsl:template match="separator"> + <img src="resources/separator.gif" alt="separator" width="120" height="6" hspace="0" vspace="0" border="0"/><br/> + </xsl:template> + + +<!-- ###################################################################### --> +<!-- document --> + + <xsl:template match="s2"> + <table width="494" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="666699" colspan="2" width="494"> + <table width="494" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="#039acc" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#039acc" width="492" height="1"><img src="resources/void.gif" alt="" width="492" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#039acc" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="492"> + <font size="+1" face="arial,helvetica,sanserif" color="#ffffff"> + <img src="resources/void.gif" alt="" width="2" height="2" vspace="0" hspace="0" border="0"/> + <b><xsl:value-of select="@title"/></b> + </font> + </td> + <td bgcolor="#017299" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="492" height="1"><img src="resources/void.gif" alt="" width="492" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + </table> + </td> + </tr> + <tr> + <td width="10"> </td> + <td width="484"> + <font face="arial,helvetica,sanserif" color="#000000"> + <xsl:apply-templates/> + </font> + </td> + </tr> + </table> + <br/> + </xsl:template> + + <xsl:template match="s3"> + <table width="484" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="666699" colspan="2" width="484"> + <table width="484" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="#039acc" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#039acc" width="482" height="1"><img src="resources/void.gif" alt="" width="482" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#039acc" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="482"> + <font face="arial,helvetica,sanserif" color="#ffffff"> + <img src="resources/void.gif" alt="" width="2" height="2" vspace="0" hspace="0" border="0"/> + <b><xsl:value-of select="@title"/></b> + </font> + </td> + <td bgcolor="#017299" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="482" height="1"><img src="resources/void.gif" alt="" width="482" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + </table> + </td> + </tr> + <tr> + <td width="10"> </td> + <td width="474"> + <font size="-1" face="arial,helvetica,sanserif" color="#000000"> + <xsl:apply-templates/> + </font> + </td> + </tr> + </table> + <br/> + </xsl:template> + + <xsl:template match="s4"> + <table width="474" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="666699" colspan="2" width="484"> + <table width="474" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="#039acc" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#039acc" width="472" height="1"><img src="resources/void.gif" alt="" width="472" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#039acc" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="472"> + <font size="-1" face="arial,helvetica,sanserif" color="#ffffff"> + <img src="resources/void.gif" alt="" width="2" height="2" vspace="0" hspace="0" border="0"/> + <b><xsl:value-of select="@title"/></b> + </font> + </td> + <td bgcolor="#017299" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="472" height="1"><img src="resources/void.gif" alt="" width="472" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + </table> + </td> + </tr> + <tr> + <td width="10"> </td> + <td width="464"> + <font size="-1" face="arial,helvetica,sanserif" color="#000000"> + <xsl:apply-templates/> + </font> + </td> + </tr> + </table> + <br/> + </xsl:template> + +<!-- ###################################################################### --> +<!-- blocks --> + + <xsl:template match="p"> + <p><xsl:apply-templates/></p> + </xsl:template> + + <xsl:template match="note"> + <table width="100%" cellspacing="3" cellpadding="0" border="0"> + <tr> + <td width="20" valign="top"> + <img src="resources/note.gif" width="20" height="24" vspace="0" hspace="0" border="0" alt="Note"/> + </td> + <td valign="top"> + <font size="-1" face="arial,helvetica,sanserif" color="#000000"> + <i> + <xsl:apply-templates/> + </i> + </font> + </td> + </tr> + </table> + </xsl:template> + + <xsl:template match="ul"> + <ul><xsl:apply-templates/></ul> + </xsl:template> + + <xsl:template match="ol"> + <ol><xsl:apply-templates/></ol> + </xsl:template> + + <xsl:template match="li"> + <li><xsl:apply-templates/></li> + </xsl:template> + + <!--Definition lists: gloss, term, label, item --> + <xsl:template match="gloss"> + <dl><xsl:apply-templates/></dl> + </xsl:template> + <!-- <term> contains a single-word, multi-word or symbolic + designation which is regarded as a technical term. --> + <xsl:template match="term"> + <dfn><xsl:apply-templates/></dfn> + </xsl:template> + <xsl:template match="label" priority="1"> + <dt><xsl:apply-templates/></dt> + </xsl:template> + <xsl:template match="item" priority="2"> + <dd> + <xsl:apply-templates/> + </dd> + </xsl:template> + + <xsl:template match="source"> + <div align="right"> + <table width="464" cellspacing="4" cellpadding="0" border="0"> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="462" height="1"><img src="resources/void.gif" alt="" width="462" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#ffffff" width="462"> + <font size="-1"><pre><xsl:apply-templates/></pre></font> + </td> + <td bgcolor="#0086b2" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="462" height="1"><img src="resources/void.gif" alt="" width="462" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + </table> + </div> + </xsl:template> + + <xsl:template match="table"> + <table width="100%" border="0" cellspacing="2" cellpadding="2"> + <xsl:apply-templates/> + </table> + </xsl:template> + + <xsl:template match="tr"> + <tr><xsl:apply-templates/></tr> + </xsl:template> + + <xsl:template match="th"> + <td bgcolor="#039acc" colspan="{@colspan}" rowspan="{@rowspan}" valign="center" align="center"> + <font color="#ffffff" size="-1" face="arial,helvetica,sanserif"> + <b><xsl:apply-templates/></b>  + </font> + </td> + </xsl:template> + + <xsl:template match="td"> + <td bgcolor="#a0ddf0" colspan="{@colspan}" rowspan="{@rowspan}" valign="top" align="left"> + <font color="#000000" size="-1" face="arial,helvetica,sanserif"> + <xsl:apply-templates/>  + </font> + </td> + </xsl:template> + + <xsl:template match="tn"> + <td bgcolor="#ffffff" colspan="{@colspan}" rowspan="{@rowspan}"> +   + </td> + </xsl:template> + +<!-- ###################################################################### --> +<!-- markup --> + + <xsl:template match="em"> + <b><xsl:apply-templates/></b> + </xsl:template> + + <xsl:template match="ref"> + <i><xsl:apply-templates/></i> + </xsl:template> + + <xsl:template match="code"> + <code><font face="courier, monospaced"><xsl:apply-templates/></font></code> + </xsl:template> + + <xsl:template match="br"> + <br/> + </xsl:template> + +<!-- ###################################################################### --> +<!-- links --> + + <xsl:template match="link"> + <xsl:if test="string-length(@anchor)=0"> + <xsl:if test="string-length(@idref)=0"> + <xsl:apply-templates/> + </xsl:if> + <xsl:if test="string-length(@idref)>0"> + <a href="{@idref}.html"><xsl:apply-templates/></a> + </xsl:if> + </xsl:if> + + <xsl:if test="string-length(@anchor)>0"> + <xsl:if test="string-length(@idref)=0"> + <a href="#{@anchor}"><xsl:apply-templates/></a> + </xsl:if> + <xsl:if test="string-length(@idref)>0"> + <a href="{@idref}.html#{@anchor}"><xsl:apply-templates/></a> + </xsl:if> + </xsl:if> + </xsl:template> + + <xsl:template match="anchor"> + <a name="{@name}"><xsl:comment>anchor</xsl:comment></a> + </xsl:template> + + <xsl:template match="jump"> + <a href="{@href}"><xsl:apply-templates/></a> + </xsl:template> + + <xsl:template match="img"> + <img src="images/{@src}" alt="{@alt}" border="0" vspace="4" hspace="4" align="right"/> + <br clear="all"/> + </xsl:template> + + <xsl:template match="resource-ref"> + <xsl:variable name="resourceFile" + select="document($stylebook.project)/book/resources/@source"/> + <xsl:variable name="xref" select="@idref"/> + <xsl:variable name="href" + select="document($resourceFile)/resources/resource[@id=$xref]/@location"/> + <xsl:variable name="label" + select="document($resourceFile)/resources/resource[@id=$xref]/@title"/> + <A href="{$href}" target="_top"><xsl:value-of select="$label"/></A> + </xsl:template> + + <xsl:template match="human-resource-ref"> + <xsl:variable name="resourceFile" + select="document($stylebook.project)/book/resources/@source"/> + <xsl:variable name="ref" select="@idref"/> + <xsl:variable name="mailto" + select="document($resourceFile)/resources/human-resource[@id=$ref]/@mailto"/> + <xsl:variable name="name" + select="document($resourceFile)/resources/human-resource[@id=$ref]/@name"/> + <A href="mailto:{$mailto}"><xsl:value-of select="$name"/></A> + </xsl:template> + +<!-- ###################################################################### --> +<!-- copy + + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> +--> +</xsl:stylesheet> diff --git a/stylebook/style/stylesheets/done.xsl b/stylebook/style/stylesheets/done.xsl new file mode 100644 index 000000000..cc1bb745e --- /dev/null +++ b/stylebook/style/stylesheets/done.xsl @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> + +<!-- DOCTYPE xsl:stylesheet --> + +<!-- XSL Style sheet, DTD omitted --> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:lxslt="http://xml.apache.org/xslt" + xmlns:redirect="org.apache.xalan.lib.Redirect" + extension-element-prefixes="redirect"> + + <xsl:output method="xml"/> + + <xsl:param name="xsltcdone" select="'.\XSLTCDONE'"/> + + <xsl:template match="Commits"> + <xsl:comment>This XML fragment contains a list of source code updates to place in an <s3> section of readme.xml</xsl:comment> + <xsl:if test="count(Commit[@category='core'])>0"> + <p> Core (Non-XSLTC) source code updates:</p> + <ul> + <xsl:for-each select="Commit[@category='core']"> + <li><xsl:apply-templates select="Who|DateCommitted|Modified|Added|Removed|Log"/></li> + </xsl:for-each> + </ul> + </xsl:if> + <xsl:if test="count(Commit[@category='core'])=0"> + <note>This release includes no updates of the non-XSLTC core source code.</note> + </xsl:if> + + <xsl:if test="count(Commit[@category='xsltc'])>0"> + <redirect:write file="{$xsltcdone}"> + <p>XSLTC source code updates:</p> + <ul> + <xsl:for-each select="Commit[@category='xsltc']"> + <li><xsl:apply-templates select="Who|DateCommitted|Modified|Added|Removed|Log"/></li> + </xsl:for-each> + </ul> + </redirect:write> + </xsl:if> + <xsl:if test="count(Commit[@category='xsltc'])=0"> + <redirect:write file="{$xsltcdone}"> + <note>This release includes no updates of the XSLTC source code.</note> + </redirect:write> + </xsl:if> + + </xsl:template> + + <xsl:template match="Who"> + <ref>Committed by </ref><xsl:value-of select="."/> + </xsl:template> + <xsl:template match="DateCommitted"> + <ref> on </ref><xsl:value-of select="."/><br/> + </xsl:template> + <xsl:template match="Modified"> + <ref>Modified: </ref><xsl:value-of select="."/><br/> + </xsl:template> + <xsl:template match="Added"> + <ref>Added: </ref><xsl:value-of select="."/><br/> + </xsl:template> + <xsl:template match="Removed"> + <ref>Removed: </ref><xsl:value-of select="."/><br/> + </xsl:template> + <xsl:template match="Log"> + <ref>Committer's log entry: </ref><xsl:value-of select="."/><br/><br/> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/style/stylesheets/faqs2document.xsl b/stylebook/style/stylesheets/faqs2document.xsl new file mode 100644 index 000000000..3c657fe0a --- /dev/null +++ b/stylebook/style/stylesheets/faqs2document.xsl @@ -0,0 +1,65 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="faqs"> + <s1 title="{@title}"> + <s2 title="Questions"> + <br/> + <xsl:apply-templates select="group" mode="index"/> + <ul> + <xsl:apply-templates select="faq" mode="index"/> + </ul> + </s2> + <s2 title="Answers"> + <br/> + <xsl:apply-templates select="group/faq"/> + <br/> + <xsl:apply-templates select="faq"/> + </s2> + </s1> + </xsl:template> + + <xsl:template match="group" mode="index"> + <xsl:value-of select="@title"/> + <ul> + <xsl:apply-templates select="faq" mode="index"/> + </ul> + </xsl:template> + + <xsl:template match="faq" mode="index"> + <li> + <link anchor="faq-{generate-id(.)}"> + <xsl:if test="string-length(@title)=0"> + <xsl:value-of select="q"/> + </xsl:if> + <xsl:if test="string-length(@title)>0"> + <xsl:value-of select="@title"/> + </xsl:if> + </link> + </li> + </xsl:template> + + <xsl:template match="faq"> + <anchor name="faq-{generate-id(.)}"/> + <s3 title="{q}"> + <br/> + <xsl:apply-templates select="a"/> + </s3> + </xsl:template> + + <xsl:template match="a"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + +</xsl:stylesheet> diff --git a/stylebook/style/stylesheets/group2document.xsl b/stylebook/style/stylesheets/group2document.xsl new file mode 100644 index 000000000..19e1515bc --- /dev/null +++ b/stylebook/style/stylesheets/group2document.xsl @@ -0,0 +1,31 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="group"> + <s1 title="{@title}"> + <xsl:apply-templates/> + </s1> + </xsl:template> + + <xsl:template match="entry"> + <s2 title="{@title}"> + <p> + Read the <link idref="{@id}"><xsl:value-of select="@title"/></link> + document or jump directly to: + </p> + <ul> + <xsl:apply-templates/> + </ul> + </s2> + </xsl:template> + + <xsl:template match="voice"> + <li><link idref="{ancestor::*/@id}" anchor="faq-{position()}"><xsl:apply-templates/></link></li> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/xdocs/style/stylesheets/spec.xsl b/stylebook/style/stylesheets/spec.xsl similarity index 100% rename from xdocs/style/stylesheets/spec.xsl rename to stylebook/style/stylesheets/spec.xsl diff --git a/xdocs/style/stylesheets/xml2fo.xsl b/stylebook/style/stylesheets/xml2fo.xsl similarity index 100% rename from xdocs/style/stylesheets/xml2fo.xsl rename to stylebook/style/stylesheets/xml2fo.xsl diff --git a/tools/stylebook-1.0-b3_xalan-2.jar b/stylebook/stylebook-1.0-b3_xalan-2.jar similarity index 100% rename from tools/stylebook-1.0-b3_xalan-2.jar rename to stylebook/stylebook-1.0-b3_xalan-2.jar diff --git a/stylebook/stylesheets/any2header.xsl b/stylebook/stylesheets/any2header.xsl new file mode 100644 index 000000000..0c6210050 --- /dev/null +++ b/stylebook/stylesheets/any2header.xsl @@ -0,0 +1,29 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="label"/> + + <xsl:template match="/"> + <image width="456" height="35" bgcolor="0086b2"> + <xsl:apply-templates/> + </image> + </xsl:template> + + <xsl:template match="s1|faqs|changes"> + <xsl:variable name="title"> + <xsl:if test="string-length(@title)=0"> + <xsl:value-of select="$label"/> + </xsl:if> + <xsl:if test="string-length(@title)>0"> + <xsl:value-of select="@title"/> + </xsl:if> + </xsl:variable> + + <text font="Arial" size="29" x="454" y="8" halign="right" valign="top" color="004080" + text="{$title}"/> + <text font="Arial" size="29" x="452" y="6" halign="right" valign="top" color="ffffff" + text="{$title}"/> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/any2project.xsl b/stylebook/stylesheets/any2project.xsl new file mode 100644 index 000000000..191961fd5 --- /dev/null +++ b/stylebook/stylesheets/any2project.xsl @@ -0,0 +1,21 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="label"/> + + <xsl:template match="/"> + <project> + <xsl:apply-templates/> + </project> + </xsl:template> + + <xsl:template match="img"> + <resource source="{@src}" target="images/{@src}"/> + </xsl:template> + + <xsl:template match="node()"> + <xsl:apply-templates/> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/book2group.xsl b/stylebook/stylesheets/book2group.xsl new file mode 100644 index 000000000..3c3cc125f --- /dev/null +++ b/stylebook/stylesheets/book2group.xsl @@ -0,0 +1,34 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="id"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="book"> + <group title="{group[attribute::id=$id]/@label}"> + <xsl:apply-templates select="group[attribute::id=$id]/entry"/> + </group> + </xsl:template> + + <xsl:template match="entry"> + <entry id="{@id}" title="{document(concat('sbk:/sources/',@source))/faqs/@title}"> + <xsl:apply-templates select="document(concat('sbk:/sources/',@source))/faqs/faq"/> + </entry> + </xsl:template> + + <xsl:template match="faq"> + <voice> + <xsl:if test="string-length(@title)=0"> + <xsl:value-of select="q"/> + </xsl:if> + <xsl:if test="string-length(@title)>0"> + <xsl:value-of select="@title"/> + </xsl:if> + </voice> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/book2project.xsl b/stylebook/stylesheets/book2project.xsl new file mode 100644 index 000000000..f9b306383 --- /dev/null +++ b/stylebook/stylesheets/book2project.xsl @@ -0,0 +1,257 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <!-- match the root book element --> + <xsl:template match="book"> + <project> + + <parameter name="copyright" value="{@copyright}"/> + + <!-- copy all resources to the targets --> + <process source="sbk:/style/resources/" producer="directory"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/directory2project.xsl"/> + <parameter name="base" value="resources/"/> + </processor> + </process> + + <xsl:apply-templates/> + + </project> + </xsl:template> + +<!-- ********************************************************************** --> +<!-- CREATE THE TARGET HTML --> +<!-- ********************************************************************** --> + + <xsl:template match="document"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + </xsl:template> + + <xsl:template match="hidden"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + </xsl:template> + + <xsl:template match="faqs"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/faqs2document.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + + </xsl:template> + + <xsl:template match="changes"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/changes2document.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + + </xsl:template> + + <xsl:template match="group"> + <xsl:apply-templates/> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="" target="{@id}.html" producer="project" printer="html"> + <parameter name="id" value="{@id}"/> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/book2group.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/group2document.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + + </xsl:template> + + <xsl:template match="entry"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <xsl:call-template name="header"> + <xsl:with-param name="id" select="@id"/> + <xsl:with-param name="source" select="@source"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/faqs2document.xsl"/> + </processor> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/document2html.xsl"/> + </processor> + </create> + + </xsl:template> + + <xsl:template match="external"> + + <xsl:call-template name="labels"> + <xsl:with-param name="id" select="concat('ext-',position())"/> + <xsl:with-param name="label" select="@label"/> + </xsl:call-template> + + </xsl:template> +<!-- ********************************************************************** --> +<!-- NAMED TEMPLATES --> +<!-- ********************************************************************** --> + +<!-- Generate the doument header image --> + <xsl:template name="header"> + <xsl:param name="id"/> + <xsl:param name="source"/> + <xsl:param name="label"/> + + <create source="{$source}" target="graphics/{$id}-header.jpg" producer="parser" printer="image"> + <processor name="xslt"> + <parameter name="label" value="{$label}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2header.xsl"/> + </processor> + </create> + </xsl:template> + +<!-- Generate the three rollover label images --> + <xsl:template name="labels"> + <xsl:param name="id"/> + <xsl:param name="label"/> + + <create source="" target="graphics/{$id}-label-1.jpg" producer="context" printer="image"> + <parameter name="label" value="{$label}"/> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/context2label.xsl"/> + <parameter name="image" value="sbk:/style/graphics/button-a.gif"/> + <parameter name="color" value="ffffff"/> + </processor> + </create> + + <create source="" target="graphics/{$id}-label-2.jpg" producer="context" printer="image"> + <parameter name="label" value="{$label}"/> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/context2label.xsl"/> + <parameter name="image" value="sbk:/style/graphics/button-b.gif"/> + <parameter name="color" value="ffff00"/> + </processor> + </create> + + <create source="" target="graphics/{$id}-label-3.jpg" producer="context" printer="image"> + <parameter name="label" value="{$label}"/> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/context2label.xsl"/> + <parameter name="image" value="sbk:/style/graphics/button-b.gif"/> + <parameter name="color" value="ffffff"/> + </processor> + </create> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/changes2document.xsl b/stylebook/stylesheets/changes2document.xsl new file mode 100644 index 000000000..c0fd6ba09 --- /dev/null +++ b/stylebook/stylesheets/changes2document.xsl @@ -0,0 +1,43 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="changes"> + <s1 title="{@title}"> + <xsl:apply-templates/> + </s1> + </xsl:template> + + <xsl:template match="release"> + <s2 title="Release {@version} {@date}"> + <br/><xsl:apply-templates/> + </s2> + </xsl:template> + + <xsl:template match="features"> + <s3 title="Features"> + <ul><xsl:apply-templates/></ul> + </s3> + </xsl:template> + + <xsl:template match="fixes"> + <s3 title="Bugs fixed"> + <ul><xsl:apply-templates/></ul> + </s3> + </xsl:template> + + <xsl:template match="feat|fix"> + <li><xsl:apply-templates/></li> + </xsl:template> + + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/context2footer.xsl b/stylebook/stylesheets/context2footer.xsl new file mode 100644 index 000000000..16887a72f --- /dev/null +++ b/stylebook/stylesheets/context2footer.xsl @@ -0,0 +1,29 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="context"> + <image source="sbk:/style/graphics/footer.gif"> + <xsl:apply-templates/> + </image> + </xsl:template> + + <xsl:template match="parameter"> + <xsl:if test="@name='copyright'"> + <text font="Arial Bold" size="11" x="124" y="6" style="plain" + halign="left" valign="top" color="666699" + text="Copyright © {@value}. All Rights Reserved."/> + <text font="Arial Bold" size="11" x="123" y="5" style="plain" + halign="left" valign="top" color="333366" + text="Copyright © {@value}. All Rights Reserved."/> + <text font="Arial Bold" size="11" x="122" y="4" style="plain" + halign="left" valign="top" color="ffffff" + text="Copyright © {@value}. All Rights Reserved."/> + </xsl:if> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/context2label.xsl b/stylebook/stylesheets/context2label.xsl new file mode 100644 index 000000000..4970f3a35 --- /dev/null +++ b/stylebook/stylesheets/context2label.xsl @@ -0,0 +1,25 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="image"/> + <xsl:param name="color"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="context"> + <image source="{$image}"> + <xsl:apply-templates/> + </image> + </xsl:template> + + <xsl:template match="parameter"> + <xsl:if test="@name='label'"> + <text font="Arial" size="12" x="14" y="1" halign="left" + valign="top" color="{$color}" style="italic" text="{@value}"/> + </xsl:if> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/design2project.xsl b/stylebook/stylesheets/design2project.xsl new file mode 100644 index 000000000..63a486892 --- /dev/null +++ b/stylebook/stylesheets/design2project.xsl @@ -0,0 +1,51 @@ +<?xml version="1.0"?> + + <!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <!-- match the root book element --> + <xsl:template match="book"> + <project> + <parameter name="copyright" value="{@copyright}"/> + <xsl:apply-templates/> + </project> + </xsl:template> + + <xsl:template match="document"> + + <process source="{@source}" producer="parser"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/any2project.xsl"/> + </processor> + </process> + + <create source="{@source}" target="{@id}.html" producer="parser" printer="html"> + <processor name="xslt"> + <parameter name="id" value="{@id}"/> + <parameter name="stylesheet" value="sbk:/style/stylesheets/designdoc2html.xsl"/> + </processor> + </create> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/designdoc2html.xsl b/stylebook/stylesheets/designdoc2html.xsl new file mode 100644 index 000000000..b27d6f4c6 --- /dev/null +++ b/stylebook/stylesheets/designdoc2html.xsl @@ -0,0 +1,274 @@ +<?xml version="1.0"?> + + <!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="stylebook.project"/> + <xsl:param name="copyright"/> + <xsl:param name="id"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="s1"> + <html> + <head> + <title><xsl:value-of select="@title"/></title> + </head> + <body text="#000000" link="#0000ff" vlink="#0000aa" alink="#ff0000" + topmargin="4" leftmargin="4" marginwidth="4" marginheight="4" + bgcolor="#ffffff"> + <xsl:variable name="topimage" select="./p/img/@src"/> + <h1><a href="http://xml.apache.org"><img src="images/{$topimage}" alt="{@alt}"/></a>   + <xsl:value-of select="@title"/></h1><hr/> + <xsl:apply-templates/> + <hr/> + <font size="-1" color="#0086b2"><i> + Copyright © <xsl:value-of select="$copyright"/> + </i></font> + </body> + </html> + </xsl:template> + + <xsl:template match="s2"> + + <h2><xsl:value-of select="@title"/></h2> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="s3"> + <h3><xsl:value-of select="@title"/></h3> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="s4"> + <h4><xsl:value-of select="@title"/></h4> + <xsl:apply-templates/> + </xsl:template> + +<!-- ###################################################################### --> +<!-- blocks --> + + <xsl:template match="p"> + <p><xsl:apply-templates/></p> + </xsl:template> + + <xsl:template match="note"> + <table width="100%" cellspacing="3" cellpadding="0" border="0"> + <tr> + <td width="20" valign="top"> + <img src="resources/note.gif" width="20" height="24" vspace="0" hspace="0" border="0" alt="Note"/> + </td> + <td valign="top"> + <font size="-1" face="arial,helvetica,sanserif" color="#000000"> + <i> + <xsl:apply-templates/> + </i> + </font> + </td> + </tr> + </table> + </xsl:template> + + <xsl:template match="u"> + <u><xsl:apply-templates/></u> + </xsl:template> + + <xsl:template match="i"> + <i><xsl:apply-templates/></i> + </xsl:template> + + <xsl:template match="b"> + <b><xsl:apply-templates/></b> + </xsl:template> + + <xsl:template match="ul"> + <ul><xsl:apply-templates/></ul> + </xsl:template> + + <xsl:template match="ol"> + <ol><xsl:apply-templates/></ol> + </xsl:template> + + <xsl:template match="li"> + <li><xsl:apply-templates/></li> + </xsl:template> + + <!--Definition lists: gloss, term, label, item --> + <xsl:template match="gloss"> + <dl><xsl:apply-templates/></dl> + </xsl:template> + <!-- <term> contains a single-word, multi-word or symbolic + designation which is regarded as a technical term. --> + <xsl:template match="term"> + <dfn><xsl:apply-templates/></dfn> + </xsl:template> + <xsl:template match="label" priority="1"> + <dt><xsl:apply-templates/></dt> + </xsl:template> + <xsl:template match="item" priority="2"> + <dd> + <xsl:apply-templates/> + </dd> + </xsl:template> + + <xsl:template match="source"> + <p><font size="-1"><pre><xsl:apply-templates/></pre></font></p> + </xsl:template> + + <xsl:template match="small-table"> + <center> + <xsl:choose> + <xsl:when test="@leave-me-alone = 'yes'"> + <table> + <xsl:copy-of select="@*"/> + <xsl:copy-of select="*"/> + </table> + </xsl:when> + <xsl:otherwise> + <table width="90%" border="0" cellspacing="2"> + <xsl:apply-templates mode="small-table"/> + </table> + </xsl:otherwise> + </xsl:choose> + </center> + </xsl:template> + + <xsl:template match="tr" mode="small-table"> + <tr><xsl:apply-templates mode="small-table"/></tr> + </xsl:template> + + <xsl:template match="td" mode="small-table"> + <td valign="top"><font size="-1"><xsl:apply-templates/></font></td> + </xsl:template> + + + <xsl:template match="table"> + <table width="100%" border="0" cellspacing="2" cellpadding="2"> + <xsl:apply-templates/> + </table> + </xsl:template> + + <xsl:template match="tr"> + <tr><xsl:apply-templates/></tr> + </xsl:template> + + <xsl:template match="th"> + <td bgcolor="#039acc" colspan="{@colspan}" rowspan="{@rowspan}" valign="center" align="center"> + <font color="#ffffff" size="-1" face="arial,helvetica,sanserif"> + <b><xsl:apply-templates/></b>  + </font> + </td> + </xsl:template> + + <xsl:template match="td"> + <td bgcolor="#a0ddf0" colspan="{@colspan}" rowspan="{@rowspan}" valign="top" align="left"> + <font color="#000000" size="-1" face="arial,helvetica,sanserif"> + <xsl:apply-templates/>  + </font> + </td> + </xsl:template> + + <xsl:template match="tn"> + <td bgcolor="#ffffff" colspan="{@colspan}" rowspan="{@rowspan}"> +   + </td> + </xsl:template> + +<!-- ###################################################################### --> +<!-- markup --> + + <xsl:template match="em"> + <b><xsl:apply-templates/></b> + </xsl:template> + + <xsl:template match="ref"> + <center><i><xsl:apply-templates/></i></center> + </xsl:template> + + <xsl:template match="code"> + <code><font face="courier, monospaced"><xsl:apply-templates/></font></code> + </xsl:template> + + <xsl:template match="br"> + <br/> + </xsl:template> + +<!-- ###################################################################### --> +<!-- links --> + + <xsl:template match="link"> + <xsl:if test="string-length(@anchor)=0"> + <xsl:if test="string-length(@idref)=0"> + <!--xsl:apply-templates/--> + </xsl:if> + <xsl:if test="string-length(@idref)>0"> + <a href="{@idref}.html"><xsl:apply-templates/></a> + </xsl:if> + </xsl:if> + + <xsl:if test="string-length(@anchor)>0"> + <xsl:if test="string-length(@idref)=0"> + <a href="#{@anchor}"><xsl:apply-templates/></a> + </xsl:if> + <xsl:if test="string-length(@idref)>0"> + <a href="{@idref}.html#{@anchor}"><xsl:apply-templates/></a> + </xsl:if> + </xsl:if> + </xsl:template> + + <xsl:template match="anchor"> + <a name="{@name}"><xsl:comment>anchor</xsl:comment></a> + </xsl:template> + + <xsl:template match="jump"> + <a href="{@href}"><xsl:apply-templates/></a> + </xsl:template> + + <xsl:template match="/s1/s2//img"> + <center><img src="images/{@src}" alt="{@alt}"/></center> + </xsl:template> + + <xsl:template match="resource-ref"> + <xsl:variable name="resourceFile" + select="document($stylebook.project)/book/resources/@source"/> + <xsl:variable name="xref" select="@idref"/> + <xsl:variable name="href" + select="document($resourceFile)/resources/resource[@id=$xref]/@location"/> + <xsl:variable name="label" + select="document($resourceFile)/resources/resource[@id=$xref]/@title"/> + <A href="{$href}" target="_top"><xsl:value-of select="$label"/></A> + </xsl:template> + + <xsl:template match="human-resource-ref"> + <xsl:variable name="resourceFile" + select="document($stylebook.project)/book/resources/@source"/> + <xsl:variable name="ref" select="@idref"/> + <xsl:variable name="mailto" + select="document($resourceFile)/resources/human-resource[@id=$ref]/@mailto"/> + <xsl:variable name="name" + select="document($resourceFile)/resources/human-resource[@id=$ref]/@name"/> + <A href="mailto:{$mailto}"><xsl:value-of select="$name"/></A> + </xsl:template> + +<!-- ###################################################################### --> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/directory2project.xsl b/stylebook/stylesheets/directory2project.xsl new file mode 100644 index 000000000..99427886e --- /dev/null +++ b/stylebook/stylesheets/directory2project.xsl @@ -0,0 +1,34 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="base"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="directory"> + <project> + <xsl:apply-templates/> + </project> + </xsl:template> + + <xsl:template match="entry"> + + <!--xsl:if test="@directory!='true'"--> + <resource source="{@href}" target="{$base}{@href}"/> + <!--/xsl:if--> +<!-- don't copy subdir to avoid copying proprietary CVS files + <xsl:if test="@directory='true'"> + <process source="{@href}" producer="directory"> + <processor name="xslt"> + <parameter name="stylesheet" value="sbk:/style/stylesheets/directory2project.xsl"/> + <parameter name="base" value="{$base}{@href}"/> + </processor> + </process> + </xsl:if> +--> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/document2html.xsl b/stylebook/stylesheets/document2html.xsl new file mode 100644 index 000000000..15b2f5ad9 --- /dev/null +++ b/stylebook/stylesheets/document2html.xsl @@ -0,0 +1,445 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:param name="stylebook.project"/> + <xsl:param name="copyright"/> + <xsl:param name="id"/> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="s1"> + <html> + <head> + <script language="JavaScript" type="text/javascript" src="resources/script.js"/> + <title><xsl:value-of select="@title"/></title> + </head> + <body text="#000000" link="#0000ff" vlink="#0000aa" alink="#ff0000" + topmargin="4" leftmargin="4" marginwidth="4" marginheight="4" + bgcolor="#ffffff"> + <!-- THE TOP BAR (HEADER) --> + <table width="620" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td width="135" height="60" rowspan="3" valign="top" align="left"> + <img width="135" height="60" src="resources/logo.gif" alt="logo" hspace="0" vspace="0" border="0"/></td> + <td width="456" height="5" valign="top" align="left" colspan="4"> + <img width="456" height="5" src="resources/line.gif" alt="line" hspace="0" vspace="0" border="0"/></td> + <td width="29" height="60" rowspan="3" valign="top" align="left"> + <img width="29" height="60" src="resources/right.gif" alt="right" hspace="0" vspace="0" border="0"/></td> + </tr> + <tr> + <td width="456" height="35" valign="top" align="left" colspan="4" bgcolor="#0086b2"> + <img src="graphics/{$id}-header.jpg" width="456" height="35" hspace="0" vspace="0" border="0" alt="{s1/@title}"/></td> + </tr> + <tr> + <td width="168" height="20" valign="top" align="left"> + <img width="168" height="20" src="resources/bottom.gif" alt="bottom" hspace="0" vspace="0" border="0"/></td> + <td width="96" height="20" valign="top" align="left"> + <a href="http://xml.apache.org/" onMouseOver="rolloverOn('xml');" onMouseOut="rolloverOff('xml');" target="new"> + <img alt="http://xml.apache.org/" width="96" height="20" src="resources/button-xml-lo.gif" + name="xml" hspace="0" vspace="0" border="0" + onLoad="rolloverLoad('xml','resources/button-xml-hi.gif','resources/button-xml-lo.gif');"/> + </a> + </td> + <td width="96" height="20" valign="top" align="left"> + <a href="http://www.apache.org/" onMouseOver="rolloverOn('asf');" onMouseOut="rolloverOff('asf');" target="new"> + <img alt="http://www.apache.org/" width="96" height="20" src="resources/button-asf-lo.gif" + name="asf" hspace="0" vspace="0" border="0" + onLoad="rolloverLoad('asf','resources/button-asf-hi.gif','resources/button-asf-lo.gif');"/> + </a> + </td> + <td width="96" height="20" valign="top" align="left"> + <a href="http://www.w3.org/" onMouseOver="rolloverOn('w3c');" onMouseOut="rolloverOff('w3c');" target="new"> + <img alt="http://www.w3.org/" width="96" height="20" src="resources/button-w3c-lo.gif" + name="w3c" hspace="0" vspace="0" border="0" + onLoad="rolloverLoad('w3c','resources/button-w3c-hi.gif','resources/button-w3c-lo.gif');"/> + </a> + </td> + </tr> + </table> + <!-- THE MAIN PANEL (SIDEBAR AND CONTENT) --> + <table width="620" cellspacing="0" cellpadding="0" border="0"> + <tr> + <!-- THE SIDE BAR --> + <td width="120" valign="top" align="left"> + <img width="120" height="14" src="resources/join.gif" alt="join" hspace="0" vspace="0" border="0"/><br/> + <xsl:apply-templates select="document($stylebook.project)"/> + <img width="120" height="14" src="resources/close.gif" alt="close" hspace="0" vspace="0" border="0"/><br/> + </td> + <!-- THE CONTENT PANEL --> + <td width="500" valign="top" align="left"> + <table border="0" cellspacing="0" cellpadding="3"> + <tr><td><xsl:apply-templates/></td></tr> + </table> + </td> + </tr> + </table><br/> + <table width="620" border="0" cellspacing="0" cellpadding="0"> + <tr><td bgcolor="#0086b2"><img src="resources/dot.gif" alt="dot" width="1" height="1"/></td></tr> + <tr> + <td align="center"><font size="-1" color="#0086b2"><i> + Copyright © <xsl:value-of select="$copyright"/>. + All Rights Reserved. + </i></font></td> + </tr> + </table> + </body> + </html> + </xsl:template> + +<!-- ###################################################################### --> +<!-- book --> + + <xsl:template match="book"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="document|faqs|changes|group"> + <xsl:if test="@id=$id"> + <img src="graphics/{@id}-label-1.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/> + </xsl:if> + <xsl:if test="@id!=$id"> + <a href="{@id}.html" onMouseOver="rolloverOn('side-{@id}');" onMouseOut="rolloverOff('side-{@id}');"> + <img onLoad="rolloverLoad('side-{@id}','graphics/{@id}-label-2.jpg','graphics/{@id}-label-3.jpg');" + name="side-{@id}" src="graphics/{@id}-label-3.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/> + </a> + </xsl:if> + <br/> + </xsl:template> + + <xsl:template match="external"> + <xsl:variable name="extid" select="concat('ext-',position())"/> + <a href="{@href}" onMouseOver="rolloverOn('side-{$extid}');" onMouseOut="rolloverOff('side-{$extid}');"> + <img onLoad="rolloverLoad('side-{$extid}','graphics/{$extid}-label-2.jpg','graphics/{$extid}-label-3.jpg');" + name="side-{$extid}" src="graphics/{$extid}-label-3.jpg" width="120" height="12" hspace="0" vspace="0" border="0" alt="{@label}"/> + </a> + <br/> + </xsl:template> + + <xsl:template match="separator"> + <img src="resources/separator.gif" alt="separator" width="120" height="6" hspace="0" vspace="0" border="0"/><br/> + </xsl:template> + + +<!-- ###################################################################### --> +<!-- document --> + + <xsl:template match="s2"> + <table width="494" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="666699" colspan="2" width="494"> + <table width="494" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="#039acc" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#039acc" width="492" height="1"><img src="resources/void.gif" alt="" width="492" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#039acc" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="492"> + <font size="+1" face="arial,helvetica,sanserif" color="#ffffff"> + <img src="resources/void.gif" alt="" width="2" height="2" vspace="0" hspace="0" border="0"/> + <b><xsl:value-of select="@title"/></b> + </font> + </td> + <td bgcolor="#017299" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="492" height="1"><img src="resources/void.gif" alt="" width="492" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + </table> + </td> + </tr> + <tr> + <td width="10"> </td> + <td width="484"> + <font face="arial,helvetica,sanserif" color="#000000"> + <xsl:apply-templates/> + </font> + </td> + </tr> + </table> + <br/> + </xsl:template> + + <xsl:template match="s3"> + <table width="484" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="666699" colspan="2" width="484"> + <table width="484" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="#039acc" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#039acc" width="482" height="1"><img src="resources/void.gif" alt="" width="482" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#039acc" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="482"> + <font face="arial,helvetica,sanserif" color="#ffffff"> + <img src="resources/void.gif" alt="" width="2" height="2" vspace="0" hspace="0" border="0"/> + <b><xsl:value-of select="@title"/></b> + </font> + </td> + <td bgcolor="#017299" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="482" height="1"><img src="resources/void.gif" alt="" width="482" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + </table> + </td> + </tr> + <tr> + <td width="10"> </td> + <td width="474"> + <font size="-1" face="arial,helvetica,sanserif" color="#000000"> + <xsl:apply-templates/> + </font> + </td> + </tr> + </table> + <br/> + </xsl:template> + + <xsl:template match="s4"> + <table width="474" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="666699" colspan="2" width="484"> + <table width="474" cellspacing="0" cellpadding="0" border="0"> + <tr> + <td bgcolor="#039acc" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#039acc" width="472" height="1"><img src="resources/void.gif" alt="" width="472" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#039acc" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="472"> + <font size="-1" face="arial,helvetica,sanserif" color="#ffffff"> + <img src="resources/void.gif" alt="" width="2" height="2" vspace="0" hspace="0" border="0"/> + <b><xsl:value-of select="@title"/></b> + </font> + </td> + <td bgcolor="#017299" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="472" height="1"><img src="resources/void.gif" alt="" width="472" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#017299" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + </table> + </td> + </tr> + <tr> + <td width="10"> </td> + <td width="464"> + <font size="-1" face="arial,helvetica,sanserif" color="#000000"> + <xsl:apply-templates/> + </font> + </td> + </tr> + </table> + <br/> + </xsl:template> + +<!-- ###################################################################### --> +<!-- blocks --> + + <xsl:template match="p"> + <p><xsl:apply-templates/></p> + </xsl:template> + + <xsl:template match="note"> + <table width="100%" cellspacing="3" cellpadding="0" border="0"> + <tr> + <td width="20" valign="top"> + <img src="resources/note.gif" width="20" height="24" vspace="0" hspace="0" border="0" alt="Note"/> + </td> + <td valign="top"> + <font size="-1" face="arial,helvetica,sanserif" color="#000000"> + <i> + <xsl:apply-templates/> + </i> + </font> + </td> + </tr> + </table> + </xsl:template> + + <xsl:template match="ul"> + <ul><xsl:apply-templates/></ul> + </xsl:template> + + <xsl:template match="ol"> + <ol><xsl:apply-templates/></ol> + </xsl:template> + + <xsl:template match="li"> + <li><xsl:apply-templates/></li> + </xsl:template> + + <!--Definition lists: gloss, term, label, item --> + <xsl:template match="gloss"> + <dl><xsl:apply-templates/></dl> + </xsl:template> + <!-- <term> contains a single-word, multi-word or symbolic + designation which is regarded as a technical term. --> + <xsl:template match="term"> + <dfn><xsl:apply-templates/></dfn> + </xsl:template> + <xsl:template match="label" priority="1"> + <dt><xsl:apply-templates/></dt> + </xsl:template> + <xsl:template match="item" priority="2"> + <dd> + <xsl:apply-templates/> + </dd> + </xsl:template> + + <xsl:template match="source"> + <div align="right"> + <table width="464" cellspacing="4" cellpadding="0" border="0"> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="462" height="1"><img src="resources/void.gif" alt="" width="462" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#ffffff" width="462"> + <font size="-1"><pre><xsl:apply-templates/></pre></font> + </td> + <td bgcolor="#0086b2" width="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + <tr> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="462" height="1"><img src="resources/void.gif" alt="" width="462" height="1" vspace="0" hspace="0" border="0"/></td> + <td bgcolor="#0086b2" width="1" height="1"><img src="resources/void.gif" alt="" width="1" height="1" vspace="0" hspace="0" border="0"/></td> + </tr> + </table> + </div> + </xsl:template> + + <xsl:template match="table"> + <table width="100%" border="0" cellspacing="2" cellpadding="2"> + <xsl:apply-templates/> + </table> + </xsl:template> + + <xsl:template match="tr"> + <tr><xsl:apply-templates/></tr> + </xsl:template> + + <xsl:template match="th"> + <td bgcolor="#039acc" colspan="{@colspan}" rowspan="{@rowspan}" valign="center" align="center"> + <font color="#ffffff" size="-1" face="arial,helvetica,sanserif"> + <b><xsl:apply-templates/></b>  + </font> + </td> + </xsl:template> + + <xsl:template match="td"> + <td bgcolor="#a0ddf0" colspan="{@colspan}" rowspan="{@rowspan}" valign="top" align="left"> + <font color="#000000" size="-1" face="arial,helvetica,sanserif"> + <xsl:apply-templates/>  + </font> + </td> + </xsl:template> + + <xsl:template match="tn"> + <td bgcolor="#ffffff" colspan="{@colspan}" rowspan="{@rowspan}"> +   + </td> + </xsl:template> + +<!-- ###################################################################### --> +<!-- markup --> + + <xsl:template match="em"> + <b><xsl:apply-templates/></b> + </xsl:template> + + <xsl:template match="ref"> + <i><xsl:apply-templates/></i> + </xsl:template> + + <xsl:template match="code"> + <code><font face="courier, monospaced"><xsl:apply-templates/></font></code> + </xsl:template> + + <xsl:template match="br"> + <br/> + </xsl:template> + +<!-- ###################################################################### --> +<!-- links --> + + <xsl:template match="link"> + <xsl:if test="string-length(@anchor)=0"> + <xsl:if test="string-length(@idref)=0"> + <xsl:apply-templates/> + </xsl:if> + <xsl:if test="string-length(@idref)>0"> + <a href="{@idref}.html"><xsl:apply-templates/></a> + </xsl:if> + </xsl:if> + + <xsl:if test="string-length(@anchor)>0"> + <xsl:if test="string-length(@idref)=0"> + <a href="#{@anchor}"><xsl:apply-templates/></a> + </xsl:if> + <xsl:if test="string-length(@idref)>0"> + <a href="{@idref}.html#{@anchor}"><xsl:apply-templates/></a> + </xsl:if> + </xsl:if> + </xsl:template> + + <xsl:template match="anchor"> + <a name="{@name}"><xsl:comment>anchor</xsl:comment></a> + </xsl:template> + + <xsl:template match="jump"> + <a href="{@href}"><xsl:apply-templates/></a> + </xsl:template> + + <xsl:template match="img"> + <img src="images/{@src}" alt="{@alt}" border="0" vspace="4" hspace="4" align="right"/> + <br clear="all"/> + </xsl:template> + + <xsl:template match="resource-ref"> + <xsl:variable name="resourceFile" + select="document($stylebook.project)/book/resources/@source"/> + <xsl:variable name="xref" select="@idref"/> + <xsl:variable name="href" + select="document($resourceFile)/resources/resource[@id=$xref]/@location"/> + <xsl:variable name="label" + select="document($resourceFile)/resources/resource[@id=$xref]/@title"/> + <A href="{$href}" target="_top"><xsl:value-of select="$label"/></A> + </xsl:template> + + <xsl:template match="human-resource-ref"> + <xsl:variable name="resourceFile" + select="document($stylebook.project)/book/resources/@source"/> + <xsl:variable name="ref" select="@idref"/> + <xsl:variable name="mailto" + select="document($resourceFile)/resources/human-resource[@id=$ref]/@mailto"/> + <xsl:variable name="name" + select="document($resourceFile)/resources/human-resource[@id=$ref]/@name"/> + <A href="mailto:{$mailto}"><xsl:value-of select="$name"/></A> + </xsl:template> + +<!-- ###################################################################### --> +<!-- copy + + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> +--> +</xsl:stylesheet> diff --git a/xdocs/style/stylesheets/done.xsl b/stylebook/stylesheets/done.xsl similarity index 100% rename from xdocs/style/stylesheets/done.xsl rename to stylebook/stylesheets/done.xsl diff --git a/stylebook/stylesheets/faqs2document.xsl b/stylebook/stylesheets/faqs2document.xsl new file mode 100644 index 000000000..032f1121f --- /dev/null +++ b/stylebook/stylesheets/faqs2document.xsl @@ -0,0 +1,65 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="faqs"> + <s1 title="{@title}"> + <s2 title="Questions"> + <br/> + <xsl:apply-templates select="group" mode="index"/> + <ul> + <xsl:apply-templates select="faq" mode="index"/> + </ul> + </s2> + <s2 title="Answers"> + <br/> + <xsl:apply-templates select="group/faq"/> + <br/> + <xsl:apply-templates select="faq"/> + </s2> + </s1> + </xsl:template> + + <xsl:template match="group" mode="index"> + <xsl:value-of select="@title"/> + <ul> + <xsl:apply-templates select="faq" mode="index"/> + </ul> + </xsl:template> + + <xsl:template match="faq" mode="index"> + <li> + <link anchor="faq-{generate-id(.)}"> + <xsl:if test="string-length(@title)=0"> + <xsl:value-of select="q"/> + </xsl:if> + <xsl:if test="string-length(@title)>0"> + <xsl:value-of select="@title"/> + </xsl:if> + </link> + </li> + </xsl:template> + + <xsl:template match="faq"> + <anchor name="faq-{generate-id(.)}"/> + <s3 title="{q}"> + <br/> + <xsl:apply-templates select="a"/> + </s3> + </xsl:template> + + <xsl:template match="a"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="@*|node()"> + <xsl:copy> + <xsl:apply-templates select="@*|node()"/> + </xsl:copy> + </xsl:template> + +</xsl:stylesheet> diff --git a/stylebook/stylesheets/group2document.xsl b/stylebook/stylesheets/group2document.xsl new file mode 100644 index 000000000..0c2665132 --- /dev/null +++ b/stylebook/stylesheets/group2document.xsl @@ -0,0 +1,31 @@ +<?xml version="1.0"?> + +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> + + <xsl:template match="/"> + <xsl:apply-templates/> + </xsl:template> + + <xsl:template match="group"> + <s1 title="{@title}"> + <xsl:apply-templates/> + </s1> + </xsl:template> + + <xsl:template match="entry"> + <s2 title="{@title}"> + <p> + Read the <link idref="{@id}"><xsl:value-of select="@title"/></link> + document or jump directly to: + </p> + <ul> + <xsl:apply-templates/> + </ul> + </s2> + </xsl:template> + + <xsl:template match="voice"> + <li><link idref="{ancestor::*/@id}" anchor="faq-{position()}"><xsl:apply-templates/></link></li> + </xsl:template> + +</xsl:stylesheet> \ No newline at end of file diff --git a/stylebook/stylesheets/spec.xsl b/stylebook/stylesheets/spec.xsl new file mode 100644 index 000000000..12689282d --- /dev/null +++ b/stylebook/stylesheets/spec.xsl @@ -0,0 +1,238 @@ +<?xml version="1.0" encoding="ISO-8859-1" ?> + + <!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --> + +<!DOCTYPE xsl:stylesheet [ +<!ENTITY copy "©"> +<!ENTITY nbsp " "> +]> + +<!-- XSL Style sheet, DTD omitted --> + +<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + xmlns:redirect="org.apache.xalan.lib.Redirect" + extension-element-prefixes="redirect"> + <xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN"/> + + <xsl:param name="package-root" select="'../../../src/'"/> <!-- root of destination for package.html files --> + + <xsl:template match="spec"> + <html> + <head> + <title> + <xsl:value-of select="header/title"/> + </title> + </head> + <body> + <xsl:apply-templates/> + </body> + </html> + </xsl:template> + + <xsl:template match="spec/title[1]"> + <h1><xsl:apply-templates/></h1> + </xsl:template> + + <xsl:template match="frontmatter/pubdate"> + <p><b>Edit Date: </b><xsl:apply-templates/></p> + </xsl:template> + + <xsl:template match="frontmatter/copyright"> + <!-- p>©<xsl:apply-templates/></p --> + </xsl:template> + + <xsl:template match="frontmatter/author"> + </xsl:template> + + <xsl:template match="spec/title"> + <h2> + <xsl:choose> + <xsl:when test="@id"> + <a name="@id"> + <xsl:apply-templates/> + </a> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </h2> + </xsl:template> + + <xsl:template name="apply-id-templates"> + <xsl:choose> + <xsl:when test="@id"> + <a name="{@id}"> + <xsl:apply-templates/> + </a> + </xsl:when> + <xsl:otherwise> + <xsl:apply-templates/> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="sect2/title | spec/*/title"> + <h3> + <xsl:call-template name="apply-id-templates"/> + </h3> + </xsl:template> + + <xsl:template match="sect3/title"> + <h4> + <xsl:call-template name="apply-id-templates"/> + </h4> + </xsl:template> + + <xsl:template match="sect4/title"> + <h5> + <xsl:call-template name="apply-id-templates"/> + </h5> + </xsl:template> + + <xsl:template match="para"> + <p><xsl:apply-templates/></p> + </xsl:template> + + <xsl:template match="variablelist"> + <ul> + <xsl:for-each select="varlistentry"> + <li> + <p><b><xsl:apply-templates select="term"/></b><br/> + <xsl:apply-templates select="listitem"/></p> + </li> + </xsl:for-each> + </ul> + </xsl:template> + + <xsl:template match="orderedlist"> + <ol> + <xsl:for-each select="listitem"> + <li><xsl:apply-templates/></li> + </xsl:for-each> + </ol> + </xsl:template> + + <xsl:template match="patterns"> + <H3><xsl:value-of select="@module"/><xsl:text> </xsl:text>Patterns</H3> + <ul> + <xsl:for-each select="pattern"> + <p> + <b> + <xsl:for-each select="pattern-name"> + <xsl:call-template name="apply-id-templates"/> + </xsl:for-each> + </b> + <br/> + <xsl:apply-templates select="*[name() != 'pattern-name']"/></p> + </xsl:for-each> + </ul> + </xsl:template> + + <xsl:template match="pattern/intent"> + <br/><i>Intent: </i><xsl:apply-templates/> + </xsl:template> + + <xsl:template match="pattern/responsibilities"> + <br/><i>Responsibilities: </i><xsl:apply-templates/> + </xsl:template> + + <xsl:template match="pattern/potential-alternate-name"> + <br/><i>Potential alternate name: </i><xsl:apply-templates/> + </xsl:template> + + <xsl:template match="pattern/thread-safety"> + <br/><i>Thread safety: </i><xsl:apply-templates/> + </xsl:template> + + <xsl:template match="pattern/notes"> + <br/><i>Notes: </i><xsl:apply-templates/> + </xsl:template> + + <xsl:template match="programlisting"> + <code> + <pre> + <xsl:apply-templates/> + </pre> + </code> + </xsl:template> + + <xsl:template match="link"> + <A href="#{@linkend}"> + <xsl:apply-templates/> + </A> + </xsl:template> + <xsl:template match="ulink"> + <A href="{@url}"> + <xsl:apply-templates/> + </A> + </xsl:template> + + <xsl:template match="termref"> + <xsl:choose> + <xsl:when test="@link-url"> + <A href="#{@link-url}"> + <xsl:value-of select="."/> + </A> + </xsl:when> + <xsl:otherwise> + <U><xsl:value-of select="."/></U> + </xsl:otherwise> + </xsl:choose> + </xsl:template> + + <xsl:template match="plink"> + <xsl:text>{@link </xsl:text> + <xsl:value-of select="."/> + <xsl:text>}</xsl:text> + </xsl:template> + + <xsl:template match="sect1[@id='package']"> + <xsl:variable name="filename" select="concat($package-root,translate(title,'.', '/'),'/package.html')"/> + <redirect:write file="{$filename}"> + <xsl:call-template name="sub-package"/> + </redirect:write> + </xsl:template> + + <xsl:template match="sect2[@id='specialized-packages']"> + <xsl:message>Found specialized-packages</xsl:message> + <xsl:for-each select="sect3"> + <xsl:variable name="filename" select="concat($package-root,translate(title,'.', '/'),'/package.html')"/> + <redirect:write file="{$filename}"> + <xsl:call-template name="sub-package"/> + </redirect:write> + </xsl:for-each> + </xsl:template> + + <xsl:template name="sub-package"> + <html> + <head> + <title> + <xsl:value-of select="title"/> + </title> + </head> + <body> + <xsl:apply-templates select="*[not (name()='title')]"/> + </body> + </html> + </xsl:template> + + +</xsl:stylesheet> + diff --git a/stylebook/stylesheets/xml2fo.xsl b/stylebook/stylesheets/xml2fo.xsl new file mode 100644 index 000000000..6ead675c4 --- /dev/null +++ b/stylebook/stylesheets/xml2fo.xsl @@ -0,0 +1,507 @@ +<?xml version="1.0"?> + + <!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + --> + +<!-- XSLT stylesheet to convert the Xalan documentation collected in one xml file into a fo file + for use in FOP + +TBD: - The faq doesn't show in the content + - check why margin-bottom on the page with properties is too large + - check why keep-next not only doesn't work, but leads to repeating already printed lines + - make lines containing only code look nicer (smaller line height) + - replace bullets in ordered lists with numbers + - correct the hack replacing nbsp with '-' + - handle the links correctly which have been external in the html doc and are now internal + +--> + +<xsl:stylesheet + xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" + xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <!-- to use with document() to get resources.xml --> + <xsl:param name="resourceFile" select="'../../sources/xalan/resources.xml'"/> + <xsl:param name="project" select="Xalan"/> + +<xsl:template match ="/"> + <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> + + <!-- defines page layout --> + <fo:layout-master-set> + <fo:simple-page-master master-name="simple" + page-height="29.7cm" + page-width="21cm" + margin-top="1.5cm" + margin-bottom="2cm" + margin-left="2.5cm" + margin-right="2.5cm"> + <fo:region-body margin-top="3cm"/> + <fo:region-before extent="1.5cm"/> + <fo:region-after extent="1.5cm"/> + </fo:simple-page-master> + </fo:layout-master-set> + + <fo:page-sequence master-name="simple"> + <fo:static-content flow-name="xsl-region-before"> + <fo:block text-align="end" + font-size="10pt" + font-family="serif" + line-height="14pt" > + <xsl:value-of select="$project"/> documentation - p. <fo:page-number/> + </fo:block> + </fo:static-content> + + <fo:flow flow-name="xsl-region-body"> + + <fo:block font-size="18pt" + font-family="sans-serif" + line-height="24pt" + space-after.optimum="15pt" + background-color="blue" + color="white" + text-align="center"> + <xsl:value-of select="$project"/> - an XSL Transformer + </fo:block> + + + <!-- generates table of contents and puts it into a table --> + + <fo:block font-size="14pt" + font-family="sans-serif" + line-height="18pt" + space-after.optimum="10pt" + font-weight="bold" + start-indent="15pt"> + Content + </fo:block> + + <fo:table> + <fo:table-column column-width="1cm"/> + <fo:table-column column-width="10cm"/> + <fo:table-column column-width="5cm"/> + <fo:table-body font-size="12pt" + line-height="16pt" + font-family="sans-serif"> + <fo:table-row> + <fo:table-cell> + <fo:block text-align="end" > + </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="end" > + </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="end" > + page + </fo:block> + </fo:table-cell> + </fo:table-row> + <xsl:for-each select="documentation/chapter"> + <fo:table-row> + <fo:table-cell> + <fo:block text-align="end" > + <xsl:number value="position()" format="I"/>. + </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="start" > + <fo:basic-link color="blue"> + <xsl:attribute name="internal-destination"> + <xsl:value-of select="@id"/> + </xsl:attribute> + <xsl:value-of select="s1/@title|faqs/@title"/> + </fo:basic-link> + </fo:block> + </fo:table-cell> + <fo:table-cell> + <fo:block text-align="end"> + <fo:page-number-citation ref-id="{@id}"/> + </fo:block> + </fo:table-cell> + </fo:table-row> + </xsl:for-each> + </fo:table-body> + </fo:table> + <xsl:apply-templates/> + </fo:flow> + </fo:page-sequence> + </fo:root> +</xsl:template> + +<!--chapter--> +<xsl:template match="chapter"> + <fo:block id="{@id}" break-before="page"/> + <xsl:apply-templates/> +</xsl:template> + +<!-- s1 --> +<xsl:template match ="s1"> + <fo:block font-size="18pt" + font-family="sans-serif" + line-height="24pt" + space-before.optimum="15pt" + space-after.optimum="15pt" + background-color="blue" + color="white" + keep-with-next.within-page="always" + text-align="center"> + <xsl:attribute name="id"> + <xsl:value-of select="translate(@title,' ),-.(','____')"/> + </xsl:attribute> + <xsl:value-of select="@title"/> + </fo:block> + <xsl:apply-templates/> +</xsl:template> + +<!-- s2 --> +<xsl:template match ="s2"> + <fo:block font-size="16pt" + font-family="sans-serif" + line-height="20pt" + keep-with-next.within-page="always" + space-before.optimum="15pt" + space-after.optimum="12pt" + text-align="start" + padding-top="3pt" + > + <xsl:value-of select="@title"/> + </fo:block> + <xsl:apply-templates/> +</xsl:template> + +<!-- s3 --> +<xsl:template match ="s3"> + <fo:block font-size="14pt" + font-family="sans-serif" + line-height="18pt" + keep-with-next.within-page="always" + space-before.optimum="10pt" + space-after.optimum="9pt" + text-align="start" + padding-top="3pt"> + <xsl:value-of select="@title"/> + </fo:block> + <xsl:apply-templates/> +</xsl:template> + +<!-- p [not(code)] --> +<xsl:template match ="p"> + <fo:block font-size="11pt" + font-family="sans-serif" + line-height="13pt" + space-after.optimum="3pt" + space-before.optimum="3pt" + text-align="start"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match ="note"> + <fo:block font-size="11pt" + font-family="sans-serif" + font-weight="italic" + line-height="13pt" + space-after.optimum="3pt" + space-before.optimum="3pt" + text-align="start"> + Note: + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<xsl:template match="anchor"> + <fo:block> <!--id="concat(local-name(ancestor::node()="chapter"/@id.,'_',{./@name}"/--> + <xsl:attribute name="id"> + <xsl:value-of select="concat(ancestor::chapter/@id,'_',./@name)"/> + </xsl:attribute> + </fo:block> +</xsl:template> + +<xsl:template match="table"> + <xsl:variable name="colwidth" select="14.5 div count(tr[1]/td)"/> + <fo:table> + <xsl:for-each select="tr[1]/td"> + <fo:table-column column-width="{$colwidth}cm"/> + </xsl:for-each> + <fo:table-body font-size="10pt" font-family="sans-serif"> + <xsl:apply-templates/> + </fo:table-body> + </fo:table> +</xsl:template> +<xsl:template match="tr"> + <fo:table-row> + <xsl:apply-templates/> + </fo:table-row> +</xsl:template> +<xsl:template match="td"> + <fo:table-cell> + <fo:block> + <xsl:apply-templates/> + </fo:block> + </fo:table-cell> +</xsl:template> + +<!-- p + code +<xsl:template match ="p[code]"> + <fo:block font-size="11pt" + font-family="sans-serif" + line-height="11pt" + space-after.optimum="0pt" + space-before.optimum="0pt" + text-align="start"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> +--> + +<xsl:template match="img"> + <fo:block> + <fo:external-graphic src="file:build/docs/images/{@src}"/> + </fo:block> +</xsl:template> + +<!-- faqs --> +<xsl:template match ="faqs"> + <fo:block font-size="18pt" + font-family="sans-serif" + line-height="24pt" + space-before.optimum="15pt" + space-after.optimum="15pt" + background-color="blue" + color="white" + text-align="center" + > + <xsl:attribute name="id"> + <xsl:value-of select="translate(.,' ),-.(','____')"/> + </xsl:attribute> + <xsl:value-of select="@title"/> + </fo:block> + <xsl:apply-templates/> +</xsl:template> + +<!-- faq --> +<xsl:template match ="faq"> + <xsl:apply-templates/> +</xsl:template> + +<!-- q in faq --> +<xsl:template match="q"> + <fo:block font-size="14pt" + font-family="sans-serif" + line-height="18pt" + keep-with-next.within-page="always" + space-before.optimum="10pt" + space-after.optimum="9pt" + text-align="start" + padding-top="3pt"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> + +<!-- a in faq --> +<xsl:template match ="a"> + <xsl:apply-templates/> +</xsl:template> + + +<!-- jump (links) --> +<xsl:template match ="jump"> + <fo:basic-link color="blue"> + <xsl:attribute name="external-destination"> + <xsl:if test="starts-with(@href,'apidocs')"> + <xsl:value-of select="concat('http://xml.apache.org/xalan-j/',@href)"/> + </xsl:if> + <xsl:if test="not(starts-with(@href,'apidocs'))"> + <xsl:value-of select="@href"/> + </xsl:if> + </xsl:attribute> + <xsl:value-of select="./text()"/> + <!--xsl:apply-templates/--> + </fo:basic-link> +</xsl:template> + + <xsl:template match="link"> + <xsl:if test="string-length(@anchor)=0"> + <xsl:if test="string-length(@idref)=0"> + <xsl:apply-templates/> + </xsl:if> + <xsl:if test="string-length(@idref)>0"> + <fo:basic-link color="blue" internal-destination="{@idref}"> + <xsl:value-of select="./text()"/></fo:basic-link> + </xsl:if> + </xsl:if> + + <xsl:if test="string-length(@anchor)>0"> + <xsl:if test="string-length(@idref)=0"> + <fo:basic-link color="blue" + internal-destination="{concat(ancestor::chapter/@id,'_',@anchor)}"> + <xsl:value-of select="./text()"/></fo:basic-link> + </xsl:if> + <xsl:if test="string-length(@idref)>0"> + <fo:basic-link color="blue" internal-destination="{@idref}_{@anchor}"> + <xsl:value-of select="./text()"/></fo:basic-link> + </xsl:if> + </xsl:if> + </xsl:template> + + +<xsl:template match="resource-ref"> + <xsl:variable name="xref" select="@idref"/> + <xsl:variable name="href" + select="document($resourceFile)/resources/resource[@id=$xref]/@location"/> + <xsl:variable name="label" + select="document($resourceFile)/resources/resource[@id=$xref]/@title"/> + <fo:basic-link color="blue"> + <xsl:attribute name="external-destination"> + <xsl:if test="starts-with($href,'apidocs')"> + <xsl:value-of select="concat('http://xml.apache.org/xalan-j/',$href)"/> + </xsl:if> + <xsl:if test="not(starts-with($href,'apidocs'))"> + <xsl:value-of select="$href"/> + </xsl:if> + </xsl:attribute> + <xsl:value-of select="$label"/> + <!--xsl:apply-templates/--> + </fo:basic-link> + </xsl:template> + + <xsl:template match="human-resource-ref"> + <xsl:variable name="resourceFile" + select="./xalan/resources.xml"/> + <xsl:variable name="ref" select="@idref"/> + <xsl:variable name="mailto" + select="document($resourceFile)/resources/human-resource[@id=$ref]/@mailto"/> + <xsl:variable name="name" + select="document($resourceFile)/resources/human-resource[@id=$ref]/@name"/> + <fo:basic-link color="blue" external-destination="mailto:{$mailto}"> + <xsl:value-of select="$name"/> + <!--xsl:apply-templates/--> + </fo:basic-link> + </xsl:template> + +<xsl:template match ="source"> + <fo:block font-size="10pt" + font-family="Courier" + text-align="start" + white-space-collapse="false"> + <xsl:apply-templates/> + </fo:block> + +</xsl:template> + <xsl:template match ="br"> + <fo:block></fo:block> +</xsl:template> + +<!-- code --> +<xsl:template match ="*/code"> + <fo:inline font-size="10pt" + font-family="Courier"> + <xsl:apply-templates/> + </fo:inline> +</xsl:template> + +<!-- ul (unordered list) --> +<xsl:template match ="ul"> + <fo:list-block start-indent="1cm" + provisional-distance-between-starts="12pt" + font-family="sans-serif" + font-size="11pt" + line-height="11pt"> + <xsl:apply-templates/> + </fo:list-block> +</xsl:template> + +<!-- ol (ordered list) --> +<xsl:template match ="ol"> + <fo:list-block start-indent="1cm" + provisional-distance-between-starts="12pt" + font-family="sans-serif" + font-size="11pt" + line-height="11pt"> + <xsl:apply-templates/> + </fo:list-block> +</xsl:template> + + +<!-- li (list item) in unordered list --> +<xsl:template match ="ul/li"> + <fo:list-item> + <fo:list-item-label> + <fo:block><fo:inline font-family="Symbol">·</fo:inline></fo:block> + </fo:list-item-label> + <fo:list-item-body> + <fo:block space-after.optimum="4pt" + text-align="start" + padding-top="3pt"> + <xsl:apply-templates/> + </fo:block> + </fo:list-item-body> + </fo:list-item> +</xsl:template> + +<!-- li (list item) in ordered list --> +<xsl:template match ="ol/li"> + <fo:list-item> + <fo:list-item-label> + <fo:block> + <xsl:number level="multiple" count="li" format="1"/>) + </fo:block> + </fo:list-item-label> + <fo:list-item-body> + <fo:block space-after.optimum="4pt" + text-align="start" + padding-top="3pt"> + <xsl:apply-templates/> + </fo:block> + </fo:list-item-body> + </fo:list-item> +</xsl:template> + +<!-- temporary kludge for definition list gloss with label-item pairs ) --> + +<xsl:template match="gloss"> + <xsl:apply-templates/> +</xsl:template> +<xsl:template match="label"> + <fo:block font-size="11pt" + font-family="sans-serif" + line-height="13pt" + space-after.optimum="3pt" + space-before.optimum="6pt" + text-align="start"> + <xsl:apply-templates/> + </fo:block> +</xsl:template> +<xsl:template match="item"> + <fo:block font-size="11pt" + font-family="sans-serif" + line-height="13pt" + space-after.optimum="6pt" + space-before.optimum="0pt" + margin-left="24pt" + text-align="start"> + <xsl:apply-templates/> + <fo:block></fo:block> + </fo:block> +</xsl:template> + +<!-- end body --> + +</xsl:stylesheet> diff --git a/tools/JLex.jar b/tools/JLex.jar deleted file mode 100644 index 1c977f32a..000000000 Binary files a/tools/JLex.jar and /dev/null differ diff --git a/tools/ant.jar b/tools/ant.jar deleted file mode 100644 index 7cf87e838..000000000 Binary files a/tools/ant.jar and /dev/null differ diff --git a/tools/antRun b/tools/antRun deleted file mode 100644 index f0a18f165..000000000 --- a/tools/antRun +++ /dev/null @@ -1,9 +0,0 @@ -#! /bin/sh - -# Args: DIR command -cd "$1" -CMD="$2" -shift -shift - -exec $CMD "$@" diff --git a/tools/antRun.bat b/tools/antRun.bat deleted file mode 100644 index a989b67d4..000000000 --- a/tools/antRun.bat +++ /dev/null @@ -1,36 +0,0 @@ -@echo off -rem -rem ========================================================================== -rem = Copyright 2004 The Apache Software Foundation. -rem = -rem = Licensed under the Apache License, Version 2.0 (the "License"); -rem = you may not use this file except in compliance with the License. -rem = You may obtain a copy of the License at -rem = -rem = http://www.apache.org/licenses/LICENSE-2.0 -rem = -rem = Unless required by applicable law or agreed to in writing, software -rem = distributed under the License is distributed on an "AS IS" BASIS, -rem = WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -rem = See the License for the specific language governing permissions and -rem = limitations under the License. -rem ========================================================================== -rem -rem Change drive and directory to %1 (Win9X only for NT/2K use "cd /d") -cd %1 -%1\ -set ANT_RUN_CMD=%2 -shift -shift - -set PARAMS= -:loop -if ""%1 == "" goto runCommand -set PARAMS=%PARAMS% %1 -shift -goto loop - -:runCommand -rem echo %ANT_RUN_CMD% %PARAMS% -%ANT_RUN_CMD% %PARAMS% - diff --git a/tools/java_cup.jar b/tools/java_cup.jar deleted file mode 100644 index 3e12262fb..000000000 Binary files a/tools/java_cup.jar and /dev/null differ diff --git a/tools/xalan2jdoc.jar b/tools/xalan2jdoc.jar deleted file mode 100644 index dcc37db88..000000000 Binary files a/tools/xalan2jdoc.jar and /dev/null differ diff --git a/tools/xalan2jtaglet.jar b/tools/xalan2jtaglet.jar deleted file mode 100644 index 37049cbfe..000000000 Binary files a/tools/xalan2jtaglet.jar and /dev/null differ diff --git a/xalan/pom.xml b/xalan/pom.xml new file mode 100644 index 000000000..280f2a9bb --- /dev/null +++ b/xalan/pom.xml @@ -0,0 +1,299 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>xalan</groupId> + <artifactId>xalan-j</artifactId> + <version>2.7.3</version> + </parent> + + <artifactId>xalan</artifactId> + <name>Apache Xalan-Java</name> + <description>Apache's XSLT processor</description> + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + </properties> + <build> + <sourceDirectory>src/main/java</sourceDirectory> + + <resources> + <resource> + <directory>META-INF</directory> + <includes> + <include>LICENSE.txt</include> + <include>NOTICE.txt</include> + </includes> + </resource> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + </resource> + </resources> + + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-surefire-plugin</artifactId> + </plugin> + <!-- https://github.com/vbmacher/cup-maven-plugin + + NOTE: There is an XPathParser.java in both xalan/xsltc/compiler/ and + xpath/compiler/. THEY ARE NOT IDENTICAL. + + Stylistic: Should .cup and .lex be in src/main/resources rather than + src/main/java? --> + <plugin> + <groupId>com.github.vbmacher</groupId> + <artifactId>cup-maven-plugin</artifactId> + <version>11b-20160615-2</version> + <executions> + <execution> + <goals> + <goal>generate</goal> + </goals> + </execution> + </executions> + <configuration> + <className>XPathParser</className> + <symbolsName>sym</symbolsName> + <cupDefinition>${project.basedir}/src/main/java/org/apache/xalan/xsltc/compiler/xpath.cup</cupDefinition> + <outputDirectory>${project.basedir}/src/main/java</outputDirectory> + </configuration> + </plugin> + + <!-- https://mvnrepository.com/artifact/de.jflex/jflex + Must run after java_cup has produced the sym.java file + --> + <plugin> + <groupId>de.jflex</groupId> + <artifactId>jflex-maven-plugin</artifactId> + <version>1.9.1</version> + <executions> + <execution> + <goals> + <goal>generate</goal> + </goals> + <configuration> + <jlex>true</jlex> <!-- Request strict jlex compatibility --> + <outputDirectory>src/main/java</outputDirectory> + <lexDefinitions> + <lexDefinition>src/main/java/org/apache/xalan/xsltc/compiler/xpath.lex</lexDefinition> + </lexDefinitions> + </configuration> + </execution> + </executions> + </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-shade-plugin</artifactId> + <executions> + <execution> + <phase>package</phase> + <goals> + <goal>shade</goal> + </goals> + <configuration> + <artifactSet> + <excludes> + <exclude>com.github.vbmacher:java-cup</exclude> + <exclude>commons-logging:commons-logging</exclude> + <exclude>org.apache.commons:commons-lang3</exclude> + <exclude>org.apache.ant:ant</exclude> + <exclude>org.apache.ant:ant-launcher</exclude> + <exclude>xalan:serializer</exclude> + <exclude>de.jflex:jflex</exclude> + </excludes> + </artifactSet> + <relocations> + <!-- We could instead make java-cup-runtime another dependency + provided externally, and perhaps should, but this + replicates the ant build's practice of including it + while keeping it from interfering with a user instance. + TODO: REVIEW. + --> + <relocation> + <pattern>java_cup.runtime</pattern> + <shadedPattern>org.apache.xalan.shaded.java_cup.runtime</shadedPattern> + </relocation> + </relocations> + </configuration> + </execution> + </executions> + </plugin> + + <!-- Copy generated jarfile up to xalan-java/build/, + for backward compatibility with Ant builds. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + <!-- And -source.jar --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-resources-plugin</artifactId> + </plugin> + + </plugins> + + </build> + + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> + <!-- For javadoc generation only, hence 'provided' scope --> + <dependency> + <groupId>xalan</groupId> + <artifactId>${xalan.taglet.artifactId}</artifactId> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.apache.bcel/bcel --> + <dependency> + <groupId>org.apache.bcel</groupId> + <artifactId>bcel</artifactId> + <version>6.7.0</version> + </dependency> + <!-- https://mvnrepository.com/artifact/commons-logging/commons-logging --> + <dependency> + <groupId>commons-logging</groupId> + <artifactId>commons-logging</artifactId> + <version>1.2</version> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/org.mozilla/rhino --> + <dependency> + <groupId>org.mozilla</groupId> + <artifactId>rhino</artifactId> + <version>1.7.14</version> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/org.apache.bsf/bsf-api --> + <dependency> + <groupId>org.apache.bsf</groupId> + <artifactId>bsf-api</artifactId> + <version>3.1</version> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/javax/javaee-api --> + <dependency> + <groupId>javax</groupId> + <artifactId>javaee-api</artifactId> + <version>6.0</version> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> <!-- jakata servlet is at 6.0 --> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/xerces/xercesImpl --> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.12.2</version> + <scope>provided</scope> + </dependency> + <!-- https://mvnrepository.com/artifact/xml-apis/xml-apis --> + <dependency> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + <version>1.4.01</version> <!-- We were actually using 1.4.02 in the Ant build? --> + <scope>provided</scope> + </dependency> + + <!-- https://github.com/vbmacher/cup-maven-plugin --> + <dependency> + <groupId>com.github.vbmacher</groupId> + <artifactId>java-cup</artifactId> + <version>11b-20160615-2</version> + <scope>provided</scope> + </dependency> + <dependency> + <groupId>com.github.vbmacher</groupId> + <artifactId>java-cup-runtime</artifactId> + <version>11b-20160615-2</version> + </dependency> + + <dependency> + <groupId>de.jflex</groupId> + <artifactId>jflex</artifactId> + <version>1.9.1</version> + <scope>provided</scope> + </dependency> + + <dependency> + <groupId>regexp</groupId> + <artifactId>regexp</artifactId> + <version>1.3</version> + </dependency> + + <!-- Test dependencies --> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-engine</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-params</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-inline</artifactId> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.mockito</groupId> + <artifactId>mockito-junit-jupiter</artifactId> + <scope>test</scope> + </dependency> + + </dependencies> + + <profiles> + <profile> + <id>create-javadocs</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>create-sources</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/src/MANIFEST.MF b/xalan/src/main/java/MANIFEST.MF similarity index 100% rename from src/MANIFEST.MF rename to xalan/src/main/java/MANIFEST.MF diff --git a/src/META-INF/services/javax.xml.transform.TransformerFactory b/xalan/src/main/java/META-INF/services/javax.xml.transform.TransformerFactory similarity index 100% rename from src/META-INF/services/javax.xml.transform.TransformerFactory rename to xalan/src/main/java/META-INF/services/javax.xml.transform.TransformerFactory diff --git a/src/META-INF/services/javax.xml.xpath.XPathFactory b/xalan/src/main/java/META-INF/services/javax.xml.xpath.XPathFactory similarity index 100% rename from src/META-INF/services/javax.xml.xpath.XPathFactory rename to xalan/src/main/java/META-INF/services/javax.xml.xpath.XPathFactory diff --git a/src/META-INF/services/org.apache.xalan.extensions.bsf.BSFManager b/xalan/src/main/java/META-INF/services/org.apache.xalan.extensions.bsf.BSFManager similarity index 100% rename from src/META-INF/services/org.apache.xalan.extensions.bsf.BSFManager rename to xalan/src/main/java/META-INF/services/org.apache.xalan.extensions.bsf.BSFManager diff --git a/src/META-INF/services/org.apache.xml.dtm.DTMManager b/xalan/src/main/java/META-INF/services/org.apache.xml.dtm.DTMManager similarity index 100% rename from src/META-INF/services/org.apache.xml.dtm.DTMManager rename to xalan/src/main/java/META-INF/services/org.apache.xml.dtm.DTMManager diff --git a/src/manifest.xalan-interpretive b/xalan/src/main/java/manifest.xalan-interpretive similarity index 100% rename from src/manifest.xalan-interpretive rename to xalan/src/main/java/manifest.xalan-interpretive diff --git a/src/manifest.xsltc b/xalan/src/main/java/manifest.xsltc similarity index 100% rename from src/manifest.xsltc rename to xalan/src/main/java/manifest.xsltc diff --git a/xalan/src/main/java/org/apache/xalan/Version.java b/xalan/src/main/java/org/apache/xalan/Version.java new file mode 100644 index 000000000..4ca166919 --- /dev/null +++ b/xalan/src/main/java/org/apache/xalan/Version.java @@ -0,0 +1,221 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * $Id$ + */ +package org.apache.xalan; + +import java.io.InputStream; +import java.util.Properties; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * Administrative class to keep track of the version number of + * the Xalan release. + * <P>This class implements the upcoming standard of having + * org.apache.project-name.Version.getVersion() be a standard way + * to get version information. This class will replace the older + * org.apache.xalan.processor.Version class.</P> + * <P>See also: org/apache/xalan/res/XSLTInfo.properties for + * information about the version of the XSLT spec we support.</P> + * + * @xsl.usage general + */ +public class Version { + private static final String VERSION_NUMBER_PATTERN = "^(\\d+)[.](\\d+)[.](D)?(\\d+)(-SNAPSHOT)?$"; + private static final String NO_VERSION = "0.0.0"; + + private static int majorVersionNum; + private static int releaseVersionNum; + private static int maintenanceVersionNum; + private static int developmentVersionNum; + + private static boolean snapshot; + + static { + parseVersionNumber(readVersionNumber()); + } + + static String readVersionNumber() { + try (InputStream fromResource = getPropertiesStream()) { + Properties properties = new Properties(); + if (fromResource != null) { + properties.load(fromResource); + return properties.getProperty("version", NO_VERSION); + } + } catch (Exception e) { + new RuntimeException("Cannot read properties file to extract Xalan version number information: ", e) + .printStackTrace(); + } + return NO_VERSION; + } + + static InputStream getPropertiesStream() { + // IMPLEMENTATION NOTE: Class.getResourceAsStream uses a *relative* path by + // default, in contrast to Classloader.getResourceAsStream, which uses an + // *absolute* one. This is not clearly documented in the JDK, only + // noticeable by the absence of the word "absolute" in + // Class.getResourceAsStream javadocs. For more details, see + // https://www.baeldung.com/java-class-vs-classloader-getresource. + // + // Because we expect the properties file to be in the same directory/package + // as this class, the relative path comes in handy and as a bonus is also + // relocation-friendly (think Maven Shade). + return Version.class.getResourceAsStream("version.properties"); + } + + static void parseVersionNumber(String version) { + resetVersionNumber(); + if (version == null) + version = NO_VERSION; + Matcher matcher = Pattern.compile(VERSION_NUMBER_PATTERN).matcher(version); + if (matcher.find()) { + majorVersionNum = Integer.parseInt(matcher.group(1)); + releaseVersionNum = Integer.parseInt(matcher.group(2)); + if (matcher.group(3) == null) { + maintenanceVersionNum = Integer.parseInt(matcher.group(4)); + } else { + developmentVersionNum = Integer.parseInt(matcher.group(4)); + } + snapshot = matcher.group(5) != null && !matcher.group(5).isEmpty(); + } else { + System.err.println( + "Cannot match Xalan version \"" + version + "\" " + + "against expected pattern \"" + VERSION_NUMBER_PATTERN + "\", " + + "resetting version number to "+ NO_VERSION + ); + resetVersionNumber(); + } + } + + private static void resetVersionNumber() { + majorVersionNum = releaseVersionNum = maintenanceVersionNum = developmentVersionNum = 0; + snapshot = false; + } + + /** + * Get the basic version string for the current Xalan release. + * Version String formatted like + * <CODE>"<B>Xalan</B> <B>Java</B> v.r[.dd| <B>D</B>nn]"</CODE>. + * + * @return String denoting our current version + */ + public static String getVersion() { + return getProduct() + " " + getImplementationLanguage() + " " + + getMajorVersionNum() + "." + getReleaseVersionNum() + "." + + ((getDevelopmentVersionNum() > 0) ? + ("D" + getDevelopmentVersionNum()) : ("" + getMaintenanceVersionNum())) + + (isSnapshot() ? "-SNAPSHOT" : ""); + } + + /** + * Print the processor version to the command line. + * + * @param argv command line arguments, unused. + */ + public static void main(String argv[]) { + System.out.println(getVersion()); + } + + /** + * Name of product: Xalan. + */ + public static String getProduct() { + return "Xalan"; + } + + /** + * Implementation Language: Java. + */ + public static String getImplementationLanguage() { + return "Java"; + } + + + /** + * Major version number. + * Version number. This changes only when there is a + * significant, externally apparent enhancement from + * the previous release. 'n' represents the n'th + * version. + * <p> + * Clients should carefully consider the implications + * of new versions as external interfaces and behaviour + * may have changed. + */ + public static int getMajorVersionNum() { + return majorVersionNum; + } + + /** + * Release Number. + * Release number. This changes when: + * - a new set of functionality is to be added, eg, + * implementation of a new W3C specification. + * - API or behaviour change. + * - its designated as a reference release. + */ + public static int getReleaseVersionNum() { + return releaseVersionNum; + } + + /** + * Maintenance Drop Number. + * Optional identifier used to designate maintenance + * drop applied to a specific release and contains + * fixes for defects reported. It maintains compatibility + * with the release and contains no API changes. + * When missing, it designates the final and complete + * development drop for a release. + */ + public static int getMaintenanceVersionNum() { + return maintenanceVersionNum; + } + + /** + * Development Drop Number. + * Optional identifier designates development drop of + * a specific release. D01 is the first development drop + * of a new release. + * <p> + * Development drops are works in progress towards a + * compeleted, final release. A specific development drop + * may not completely implement all aspects of a new + * feature, which may take several development drops to + * complete. At the point of the final drop for the + * release, the D suffix will be omitted. + * <p> + * Each 'D' drops can contain functional enhancements as + * well as defect fixes. 'D' drops may not be as stable as + * the final releases. + */ + public static int getDevelopmentVersionNum() { + return developmentVersionNum; + } + + /** + * Snapshot flag. + * Specifies whether the version number has a "-SNAPSHOT" suffix, + * which by Maven/Gradle conventions designates a + * development version. + */ + public static boolean isSnapshot() { + return snapshot; + } +} diff --git a/src/org/apache/xalan/client/XSLTProcessorApplet.java b/xalan/src/main/java/org/apache/xalan/client/XSLTProcessorApplet.java similarity index 100% rename from src/org/apache/xalan/client/XSLTProcessorApplet.java rename to xalan/src/main/java/org/apache/xalan/client/XSLTProcessorApplet.java diff --git a/src/org/apache/xalan/client/package.html b/xalan/src/main/java/org/apache/xalan/client/package.html similarity index 100% rename from src/org/apache/xalan/client/package.html rename to xalan/src/main/java/org/apache/xalan/client/package.html diff --git a/src/org/apache/xalan/extensions/ExpressionContext.java b/xalan/src/main/java/org/apache/xalan/extensions/ExpressionContext.java similarity index 100% rename from src/org/apache/xalan/extensions/ExpressionContext.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExpressionContext.java diff --git a/src/org/apache/xalan/extensions/ExpressionVisitor.java b/xalan/src/main/java/org/apache/xalan/extensions/ExpressionVisitor.java similarity index 100% rename from src/org/apache/xalan/extensions/ExpressionVisitor.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExpressionVisitor.java diff --git a/src/org/apache/xalan/extensions/ExtensionHandler.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandler.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionHandler.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandler.java diff --git a/src/org/apache/xalan/extensions/ExtensionHandlerExsltFunction.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerExsltFunction.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionHandlerExsltFunction.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerExsltFunction.java diff --git a/src/org/apache/xalan/extensions/ExtensionHandlerGeneral.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerGeneral.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionHandlerGeneral.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerGeneral.java diff --git a/src/org/apache/xalan/extensions/ExtensionHandlerJava.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerJava.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionHandlerJava.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerJava.java diff --git a/src/org/apache/xalan/extensions/ExtensionHandlerJavaClass.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerJavaClass.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionHandlerJavaClass.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerJavaClass.java diff --git a/src/org/apache/xalan/extensions/ExtensionHandlerJavaPackage.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerJavaPackage.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionHandlerJavaPackage.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionHandlerJavaPackage.java diff --git a/src/org/apache/xalan/extensions/ExtensionNamespaceContext.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionNamespaceContext.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionNamespaceContext.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionNamespaceContext.java diff --git a/src/org/apache/xalan/extensions/ExtensionNamespaceSupport.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionNamespaceSupport.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionNamespaceSupport.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionNamespaceSupport.java diff --git a/src/org/apache/xalan/extensions/ExtensionNamespacesManager.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionNamespacesManager.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionNamespacesManager.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionNamespacesManager.java diff --git a/src/org/apache/xalan/extensions/ExtensionsTable.java b/xalan/src/main/java/org/apache/xalan/extensions/ExtensionsTable.java similarity index 100% rename from src/org/apache/xalan/extensions/ExtensionsTable.java rename to xalan/src/main/java/org/apache/xalan/extensions/ExtensionsTable.java diff --git a/src/org/apache/xalan/extensions/MethodResolver.java b/xalan/src/main/java/org/apache/xalan/extensions/MethodResolver.java similarity index 100% rename from src/org/apache/xalan/extensions/MethodResolver.java rename to xalan/src/main/java/org/apache/xalan/extensions/MethodResolver.java diff --git a/src/org/apache/xalan/extensions/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/extensions/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/extensions/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/extensions/ObjectFactory.java diff --git a/src/org/apache/xalan/extensions/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/extensions/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/extensions/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/extensions/SecuritySupport.java diff --git a/src/org/apache/xalan/extensions/XPathFunctionImpl.java b/xalan/src/main/java/org/apache/xalan/extensions/XPathFunctionImpl.java similarity index 100% rename from src/org/apache/xalan/extensions/XPathFunctionImpl.java rename to xalan/src/main/java/org/apache/xalan/extensions/XPathFunctionImpl.java diff --git a/src/org/apache/xalan/extensions/XPathFunctionResolverImpl.java b/xalan/src/main/java/org/apache/xalan/extensions/XPathFunctionResolverImpl.java similarity index 100% rename from src/org/apache/xalan/extensions/XPathFunctionResolverImpl.java rename to xalan/src/main/java/org/apache/xalan/extensions/XPathFunctionResolverImpl.java diff --git a/src/org/apache/xalan/extensions/XSLProcessorContext.java b/xalan/src/main/java/org/apache/xalan/extensions/XSLProcessorContext.java similarity index 100% rename from src/org/apache/xalan/extensions/XSLProcessorContext.java rename to xalan/src/main/java/org/apache/xalan/extensions/XSLProcessorContext.java diff --git a/src/org/apache/xalan/extensions/package.html b/xalan/src/main/java/org/apache/xalan/extensions/package.html similarity index 100% rename from src/org/apache/xalan/extensions/package.html rename to xalan/src/main/java/org/apache/xalan/extensions/package.html diff --git a/src/org/apache/xalan/lib/ExsltBase.java b/xalan/src/main/java/org/apache/xalan/lib/ExsltBase.java similarity index 100% rename from src/org/apache/xalan/lib/ExsltBase.java rename to xalan/src/main/java/org/apache/xalan/lib/ExsltBase.java diff --git a/src/org/apache/xalan/lib/ExsltCommon.java b/xalan/src/main/java/org/apache/xalan/lib/ExsltCommon.java similarity index 100% rename from src/org/apache/xalan/lib/ExsltCommon.java rename to xalan/src/main/java/org/apache/xalan/lib/ExsltCommon.java diff --git a/src/org/apache/xalan/lib/ExsltDatetime.java b/xalan/src/main/java/org/apache/xalan/lib/ExsltDatetime.java similarity index 100% rename from src/org/apache/xalan/lib/ExsltDatetime.java rename to xalan/src/main/java/org/apache/xalan/lib/ExsltDatetime.java diff --git a/src/org/apache/xalan/lib/ExsltDynamic.java b/xalan/src/main/java/org/apache/xalan/lib/ExsltDynamic.java similarity index 100% rename from src/org/apache/xalan/lib/ExsltDynamic.java rename to xalan/src/main/java/org/apache/xalan/lib/ExsltDynamic.java diff --git a/src/org/apache/xalan/lib/ExsltMath.java b/xalan/src/main/java/org/apache/xalan/lib/ExsltMath.java similarity index 100% rename from src/org/apache/xalan/lib/ExsltMath.java rename to xalan/src/main/java/org/apache/xalan/lib/ExsltMath.java diff --git a/src/org/apache/xalan/lib/ExsltSets.java b/xalan/src/main/java/org/apache/xalan/lib/ExsltSets.java similarity index 100% rename from src/org/apache/xalan/lib/ExsltSets.java rename to xalan/src/main/java/org/apache/xalan/lib/ExsltSets.java diff --git a/src/org/apache/xalan/lib/ExsltStrings.java b/xalan/src/main/java/org/apache/xalan/lib/ExsltStrings.java similarity index 96% rename from src/org/apache/xalan/lib/ExsltStrings.java rename to xalan/src/main/java/org/apache/xalan/lib/ExsltStrings.java index e5cad5697..5285837d5 100644 --- a/src/org/apache/xalan/lib/ExsltStrings.java +++ b/xalan/src/main/java/org/apache/xalan/lib/ExsltStrings.java @@ -184,9 +184,9 @@ public static String padding(double length) * <pre> * str:split('a, simple, list', ', ') gives the node set consisting of: * - * <token>a</token> - * <token>simple</token> - * <token>list</token> + * <tokent>a</token> + * <tokent>simple</token> + * <tokent>list</token> * </pre> * If the second argument is omitted, the default is the string ' ' (i.e. a space). * @@ -253,14 +253,14 @@ public static NodeList split(String str) * <pre> * str:tokenize('2001-06-03T11:40:23', '-T:') gives the node set consisting of: * - * <token>2001</token> - * <token>06</token> - * <token>03</token> - * <token>11</token> - * <token>40</token> - * <token>23</token> + * <tokent>2001</token> + * <tokent>06</token> + * <tokent>03</token> + * <tokent>11</token> + * <tokent>40</token> + * <tokent>23</token> * </pre> - * If the second argument is omitted, the default is the string '	

 ' + * If the second argument is omitted, the default is the string '	

 ' * (i.e. whitespace characters). * <p> * If the second argument is an empty string, the function returns a set of token diff --git a/src/org/apache/xalan/lib/Extensions.java b/xalan/src/main/java/org/apache/xalan/lib/Extensions.java similarity index 99% rename from src/org/apache/xalan/lib/Extensions.java rename to xalan/src/main/java/org/apache/xalan/lib/Extensions.java index 261f66ff1..62b5c0d03 100644 --- a/src/org/apache/xalan/lib/Extensions.java +++ b/xalan/src/main/java/org/apache/xalan/lib/Extensions.java @@ -265,8 +265,8 @@ public static NodeList tokenize(String toTokenize, String delims) /** * Returns a NodeSet containing one text node for each token in the first argument. - * Delimiters are whitespace. That is, the delimiters that are used are tab (	), - * linefeed (
), return (
), and space ( ). + * Delimiters are whitespace. That is, the delimiters that are used are tab (&#x09), + * linefeed (&#x0A), return (&#x0D), and space (&#x20). * Tokens are determined by a call to <code>StringTokenizer</code>. * If the first argument is an empty string or contains only delimiters, the result * will be an empty NodeSet. diff --git a/src/org/apache/xalan/lib/NodeInfo.java b/xalan/src/main/java/org/apache/xalan/lib/NodeInfo.java similarity index 100% rename from src/org/apache/xalan/lib/NodeInfo.java rename to xalan/src/main/java/org/apache/xalan/lib/NodeInfo.java diff --git a/src/org/apache/xalan/lib/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/lib/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/lib/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/lib/ObjectFactory.java diff --git a/src/org/apache/xalan/lib/PipeDocument.java b/xalan/src/main/java/org/apache/xalan/lib/PipeDocument.java similarity index 99% rename from src/org/apache/xalan/lib/PipeDocument.java rename to xalan/src/main/java/org/apache/xalan/lib/PipeDocument.java index c8b898ff4..974ae17c3 100644 --- a/src/org/apache/xalan/lib/PipeDocument.java +++ b/xalan/src/main/java/org/apache/xalan/lib/PipeDocument.java @@ -100,9 +100,9 @@ public class PipeDocument * Notes:</pre> * <ul> * <li>The base URI for the source attribute is the XML "listing" document.<li/> - * <li>The target attribute is taken as is (base is the current user directory).<li/> + * <li>The target attribute is taken as is (base is the current user directory).</li> * <li>The stylsheet containg the extension element is the base URI for the - * stylesheet hrefs.<li/> + * stylesheet hrefs.</li> * </ul> */ public void pipeDocument(XSLProcessorContext context, ElemExtensionCall elem) diff --git a/src/org/apache/xalan/lib/Redirect.java b/xalan/src/main/java/org/apache/xalan/lib/Redirect.java similarity index 94% rename from src/org/apache/xalan/lib/Redirect.java rename to xalan/src/main/java/org/apache/xalan/lib/Redirect.java index 090df7dce..6208ea46d 100644 --- a/src/org/apache/xalan/lib/Redirect.java +++ b/xalan/src/main/java/org/apache/xalan/lib/Redirect.java @@ -77,44 +77,44 @@ * * <p>Example:</p> * <PRE> - * <?xml version="1.0"?> + * <?xml version="1.0"?> * <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" * version="1.0" * xmlns:redirect="http://xml.apache.org/xalan/redirect" - * extension-element-prefixes="redirect"> + * extension-element-prefixes="redirect"> * - * <xsl:template match="/"> - * <out> + * <xsl:template match="/"> + * <out> * default output. - * </out> - * <redirect:open file="doc3.out"/> - * <redirect:write file="doc3.out"> - * <out> - * <redirect:write file="doc1.out"> - * <out> + * </out> + * <redirect:open file="doc3.out"/> + * <redirect:write file="doc3.out"> + * <out> + * <redirect:write file="doc1.out"> + * <out> * doc1 output. - * <redirect:write file="doc3.out"> + * <redirect:write file="doc3.out"> * Some text to doc3 - * </redirect:write> - * </out> - * </redirect:write> - * <redirect:write file="doc2.out"> - * <out> + * </redirect:write> + * </out> + * </redirect:write> + * <redirect:write file="doc2.out"> + * <out> * doc2 output. - * <redirect:write file="doc3.out"> + * <redirect:write file="doc3.out"> * Some more text to doc3 - * <redirect:write select="doc/foo"> + * <redirect:write select="doc/foo"> * text for doc4 - * </redirect:write> - * </redirect:write> - * </out> - * </redirect:write> - * </out> - * </redirect:write> - * <redirect:close file="doc3.out"/> - * </xsl:template> + * </redirect:write> + * </redirect:write> + * </out> + * </redirect:write> + * </out> + * </redirect:write> + * <redirect:close file="doc3.out"/> + * </xsl:template> * - * </xsl:stylesheet> + * </xsl:stylesheet> * </PRE> * * @author Scott Boag diff --git a/src/org/apache/xalan/lib/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/lib/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/lib/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/lib/SecuritySupport.java diff --git a/src/org/apache/xalan/lib/package.html b/xalan/src/main/java/org/apache/xalan/lib/package.html similarity index 100% rename from src/org/apache/xalan/lib/package.html rename to xalan/src/main/java/org/apache/xalan/lib/package.html diff --git a/src/org/apache/xalan/lib/sql/ConnectionPool.java b/xalan/src/main/java/org/apache/xalan/lib/sql/ConnectionPool.java similarity index 100% rename from src/org/apache/xalan/lib/sql/ConnectionPool.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/ConnectionPool.java diff --git a/src/org/apache/xalan/lib/sql/ConnectionPoolManager.java b/xalan/src/main/java/org/apache/xalan/lib/sql/ConnectionPoolManager.java similarity index 100% rename from src/org/apache/xalan/lib/sql/ConnectionPoolManager.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/ConnectionPoolManager.java diff --git a/src/org/apache/xalan/lib/sql/DTMDocument.java b/xalan/src/main/java/org/apache/xalan/lib/sql/DTMDocument.java similarity index 100% rename from src/org/apache/xalan/lib/sql/DTMDocument.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/DTMDocument.java diff --git a/src/org/apache/xalan/lib/sql/DefaultConnectionPool.java b/xalan/src/main/java/org/apache/xalan/lib/sql/DefaultConnectionPool.java similarity index 100% rename from src/org/apache/xalan/lib/sql/DefaultConnectionPool.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/DefaultConnectionPool.java diff --git a/src/org/apache/xalan/lib/sql/JNDIConnectionPool.java b/xalan/src/main/java/org/apache/xalan/lib/sql/JNDIConnectionPool.java similarity index 100% rename from src/org/apache/xalan/lib/sql/JNDIConnectionPool.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/JNDIConnectionPool.java diff --git a/src/org/apache/xalan/lib/sql/ObjectArray.java b/xalan/src/main/java/org/apache/xalan/lib/sql/ObjectArray.java similarity index 100% rename from src/org/apache/xalan/lib/sql/ObjectArray.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/ObjectArray.java diff --git a/src/org/apache/xalan/lib/sql/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/lib/sql/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/lib/sql/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/ObjectFactory.java diff --git a/src/org/apache/xalan/lib/sql/PooledConnection.java b/xalan/src/main/java/org/apache/xalan/lib/sql/PooledConnection.java similarity index 100% rename from src/org/apache/xalan/lib/sql/PooledConnection.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/PooledConnection.java diff --git a/src/org/apache/xalan/lib/sql/QueryParameter.java b/xalan/src/main/java/org/apache/xalan/lib/sql/QueryParameter.java similarity index 100% rename from src/org/apache/xalan/lib/sql/QueryParameter.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/QueryParameter.java diff --git a/src/org/apache/xalan/lib/sql/SQLDocument.java b/xalan/src/main/java/org/apache/xalan/lib/sql/SQLDocument.java similarity index 100% rename from src/org/apache/xalan/lib/sql/SQLDocument.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/SQLDocument.java diff --git a/src/org/apache/xalan/lib/sql/SQLErrorDocument.java b/xalan/src/main/java/org/apache/xalan/lib/sql/SQLErrorDocument.java similarity index 100% rename from src/org/apache/xalan/lib/sql/SQLErrorDocument.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/SQLErrorDocument.java diff --git a/src/org/apache/xalan/lib/sql/SQLQueryParser.java b/xalan/src/main/java/org/apache/xalan/lib/sql/SQLQueryParser.java similarity index 100% rename from src/org/apache/xalan/lib/sql/SQLQueryParser.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/SQLQueryParser.java diff --git a/src/org/apache/xalan/lib/sql/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/lib/sql/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/lib/sql/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/SecuritySupport.java diff --git a/src/org/apache/xalan/lib/sql/XConnection.java b/xalan/src/main/java/org/apache/xalan/lib/sql/XConnection.java similarity index 100% rename from src/org/apache/xalan/lib/sql/XConnection.java rename to xalan/src/main/java/org/apache/xalan/lib/sql/XConnection.java diff --git a/src/org/apache/xalan/lib/sql/package.html b/xalan/src/main/java/org/apache/xalan/lib/sql/package.html similarity index 100% rename from src/org/apache/xalan/lib/sql/package.html rename to xalan/src/main/java/org/apache/xalan/lib/sql/package.html diff --git a/src/org/apache/xalan/processor/ProcessorAttributeSet.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorAttributeSet.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorAttributeSet.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorAttributeSet.java diff --git a/src/org/apache/xalan/processor/ProcessorCharacters.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorCharacters.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorCharacters.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorCharacters.java diff --git a/src/org/apache/xalan/processor/ProcessorDecimalFormat.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorDecimalFormat.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorDecimalFormat.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorDecimalFormat.java diff --git a/src/org/apache/xalan/processor/ProcessorExsltFuncResult.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorExsltFuncResult.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorExsltFuncResult.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorExsltFuncResult.java diff --git a/src/org/apache/xalan/processor/ProcessorExsltFunction.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorExsltFunction.java similarity index 93% rename from src/org/apache/xalan/processor/ProcessorExsltFunction.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorExsltFunction.java index b40abcccb..00ee976d9 100644 --- a/src/org/apache/xalan/processor/ProcessorExsltFunction.java +++ b/xalan/src/main/java/org/apache/xalan/processor/ProcessorExsltFunction.java @@ -115,9 +115,14 @@ public void endElement( } /** - * Non-recursive traversal of FunctionElement tree based on TreeWalker to verify that - * there are no literal result elements except within a func:result element and that - * the func:result element does not contain any following siblings except xsl:fallback. + * Non-recursive traversal of FunctionElement tree based on + * TreeWalker to verify that there are no literal result elements + * except within a func:result element and that the func:result + * element does not contain any following siblings except + * xsl:fallback. + * @param elem FunctionElement node to be examined + * @param handler StylesheetHandler to be called against each node in turn + * @throws SAXException if handler throws one */ public void validate(ElemTemplateElement elem, StylesheetHandler handler) throws SAXException diff --git a/src/org/apache/xalan/processor/ProcessorGlobalParamDecl.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorGlobalParamDecl.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorGlobalParamDecl.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorGlobalParamDecl.java diff --git a/src/org/apache/xalan/processor/ProcessorGlobalVariableDecl.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorGlobalVariableDecl.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorGlobalVariableDecl.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorGlobalVariableDecl.java diff --git a/src/org/apache/xalan/processor/ProcessorImport.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorImport.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorImport.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorImport.java diff --git a/src/org/apache/xalan/processor/ProcessorInclude.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorInclude.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorInclude.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorInclude.java diff --git a/src/org/apache/xalan/processor/ProcessorKey.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorKey.java similarity index 98% rename from src/org/apache/xalan/processor/ProcessorKey.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorKey.java index 602649c77..e58087ea3 100644 --- a/src/org/apache/xalan/processor/ProcessorKey.java +++ b/xalan/src/main/java/org/apache/xalan/processor/ProcessorKey.java @@ -31,12 +31,12 @@ /** * TransformerFactory for xsl:key markup. * <pre> - * <!ELEMENT xsl:key EMPTY> - * <!ATTLIST xsl:key + * <!ELEMENT xsl:key EMPTY> + * <!ATTLIST xsl:key * name %qname; #REQUIRED * match %pattern; #REQUIRED * use %expr; #REQUIRED - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#dtd">XSLT DTD</a> * @see <a href="http://www.w3.org/TR/xslt#key">key in XSLT Specification</a> diff --git a/src/org/apache/xalan/processor/ProcessorLRE.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorLRE.java similarity index 99% rename from src/org/apache/xalan/processor/ProcessorLRE.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorLRE.java index 464a6b893..14669826e 100644 --- a/src/org/apache/xalan/processor/ProcessorLRE.java +++ b/xalan/src/main/java/org/apache/xalan/processor/ProcessorLRE.java @@ -315,6 +315,7 @@ else if (isUnknownTopLevel) * This method could be over-ridden by a class that extends this class. * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @return an object that represents the stylesheet element. + * @throws TransformerConfigurationException if the handler throws one */ protected Stylesheet getStylesheetRoot(StylesheetHandler handler) throws TransformerConfigurationException { diff --git a/src/org/apache/xalan/processor/ProcessorNamespaceAlias.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorNamespaceAlias.java similarity index 97% rename from src/org/apache/xalan/processor/ProcessorNamespaceAlias.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorNamespaceAlias.java index 336e1e099..74bacdb65 100644 --- a/src/org/apache/xalan/processor/ProcessorNamespaceAlias.java +++ b/xalan/src/main/java/org/apache/xalan/processor/ProcessorNamespaceAlias.java @@ -29,11 +29,11 @@ * A stylesheet can use the xsl:namespace-alias element to * declare that one namespace URI is an alias for another namespace URI. * <pre> - * <!ELEMENT xsl:namespace-alias EMPTY> - * <!ATTLIST xsl:namespace-alias + * <!ELEMENT xsl:namespace-alias EMPTY> + * <!ATTLIST xsl:namespace-alias * stylesheet-prefix CDATA #REQUIRED * result-prefix CDATA #REQUIRED - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#dtd">XSLT DTD</a> * @see <a href="http://www.w3.org/TR/xslt#literal-result-element">literal-result-element in XSLT Specification</a> diff --git a/src/org/apache/xalan/processor/ProcessorOutputElem.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorOutputElem.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorOutputElem.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorOutputElem.java diff --git a/src/org/apache/xalan/processor/ProcessorPreserveSpace.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorPreserveSpace.java similarity index 96% rename from src/org/apache/xalan/processor/ProcessorPreserveSpace.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorPreserveSpace.java index 9154cf82e..5823c8581 100644 --- a/src/org/apache/xalan/processor/ProcessorPreserveSpace.java +++ b/xalan/src/main/java/org/apache/xalan/processor/ProcessorPreserveSpace.java @@ -31,8 +31,8 @@ /** * TransformerFactory for xsl:preserve-space markup. * <pre> - * <!ELEMENT xsl:preserve-space EMPTY> - * <!ATTLIST xsl:preserve-space elements CDATA #REQUIRED> + * <!ELEMENT xsl:preserve-space EMPTY> + * <!ATTLIST xsl:preserve-space elements CDATA #REQUIRED> * </pre> */ class ProcessorPreserveSpace extends XSLTElementProcessor diff --git a/src/org/apache/xalan/processor/ProcessorStripSpace.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorStripSpace.java similarity index 96% rename from src/org/apache/xalan/processor/ProcessorStripSpace.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorStripSpace.java index 9f77bef25..ce661c8f2 100644 --- a/src/org/apache/xalan/processor/ProcessorStripSpace.java +++ b/xalan/src/main/java/org/apache/xalan/processor/ProcessorStripSpace.java @@ -31,8 +31,8 @@ /** * TransformerFactory for xsl:strip-space markup. * <pre> - * <!ELEMENT xsl:strip-space EMPTY> - * <!ATTLIST xsl:strip-space elements CDATA #REQUIRED> + * <!ELEMENT xsl:strip-space EMPTY> + * <!ATTLIST xsl:strip-space elements CDATA #REQUIRED> * </pre> */ class ProcessorStripSpace extends ProcessorPreserveSpace diff --git a/src/org/apache/xalan/processor/ProcessorStylesheetDoc.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorStylesheetDoc.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorStylesheetDoc.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorStylesheetDoc.java diff --git a/src/org/apache/xalan/processor/ProcessorStylesheetElement.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorStylesheetElement.java similarity index 98% rename from src/org/apache/xalan/processor/ProcessorStylesheetElement.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorStylesheetElement.java index 8d5159d9e..f647bfa98 100644 --- a/src/org/apache/xalan/processor/ProcessorStylesheetElement.java +++ b/xalan/src/main/java/org/apache/xalan/processor/ProcessorStylesheetElement.java @@ -116,6 +116,7 @@ public void startElement( /** * This method can be over-ridden by a class that extends this one. * @param handler The calling StylesheetHandler/TemplatesBuilder. + * @return the root element of the new stylesheet */ protected Stylesheet getStylesheetRoot(StylesheetHandler handler) throws TransformerConfigurationException { diff --git a/src/org/apache/xalan/processor/ProcessorTemplate.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorTemplate.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorTemplate.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorTemplate.java diff --git a/src/org/apache/xalan/processor/ProcessorTemplateElem.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorTemplateElem.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorTemplateElem.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorTemplateElem.java diff --git a/src/org/apache/xalan/processor/ProcessorText.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorText.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorText.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorText.java diff --git a/src/org/apache/xalan/processor/ProcessorUnknown.java b/xalan/src/main/java/org/apache/xalan/processor/ProcessorUnknown.java similarity index 100% rename from src/org/apache/xalan/processor/ProcessorUnknown.java rename to xalan/src/main/java/org/apache/xalan/processor/ProcessorUnknown.java diff --git a/src/org/apache/xalan/processor/StylesheetHandler.java b/xalan/src/main/java/org/apache/xalan/processor/StylesheetHandler.java similarity index 99% rename from src/org/apache/xalan/processor/StylesheetHandler.java rename to xalan/src/main/java/org/apache/xalan/processor/StylesheetHandler.java index e8b04382a..421ecbaf6 100644 --- a/src/org/apache/xalan/processor/StylesheetHandler.java +++ b/xalan/src/main/java/org/apache/xalan/processor/StylesheetHandler.java @@ -139,6 +139,7 @@ void init(TransformerFactoryImpl processor) * Must be public for access by the AVT class. * * @param str A non-null reference to a valid or invalid XPath expression string. + * @param owningTemplate Template element from which this is applied * * @return A non-null reference to an XPath object that represents the string argument. * @@ -563,7 +564,7 @@ private void flushCharacters() throws org.xml.sax.SAXException * @param rawName The qualified name (with prefix). * @param attributes The specified or defaulted attributes. * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if the event could not be processed */ public void startElement( String uri, String localName, String rawName, Attributes attributes) diff --git a/src/org/apache/xalan/processor/TransformerFactoryImpl.java b/xalan/src/main/java/org/apache/xalan/processor/TransformerFactoryImpl.java similarity index 98% rename from src/org/apache/xalan/processor/TransformerFactoryImpl.java rename to xalan/src/main/java/org/apache/xalan/processor/TransformerFactoryImpl.java index 3a7c78cdc..022197be0 100644 --- a/src/org/apache/xalan/processor/TransformerFactoryImpl.java +++ b/xalan/src/main/java/org/apache/xalan/processor/TransformerFactoryImpl.java @@ -241,7 +241,7 @@ javax.xml.transform.Templates processFromNode(Node node, String systemID) * * @return A Source object capable of being used to create a Templates object. * - * @throws TransformerConfigurationException + * @throws TransformerConfigurationException wrapper if there is an underlying exception. */ public Source getAssociatedStylesheet( Source source, String media, String title, String charset) @@ -608,7 +608,7 @@ else if (name.equals(FEATURE_SOURCE_LOCATION)) * * @return An XMLFilter object, or null if this feature is not supported. * - * @throws TransformerConfigurationException + * @throws TransformerConfigurationException wrapper if one is thrown by underlying code */ public XMLFilter newXMLFilter(Source src) throws TransformerConfigurationException @@ -628,7 +628,7 @@ public XMLFilter newXMLFilter(Source src) * * @return An XMLFilter object, or null if this feature is not supported. * - * @throws TransformerConfigurationException + * @throws TransformerConfigurationException wrapper if TrAXFilter construction failed */ public XMLFilter newXMLFilter(Templates templates) throws TransformerConfigurationException @@ -668,7 +668,7 @@ public XMLFilter newXMLFilter(Templates templates) * * @return TransformerHandler ready to transform SAX events. * - * @throws TransformerConfigurationException + * @throws TransformerConfigurationException if handler could not be created. */ public TransformerHandler newTransformerHandler(Source src) throws TransformerConfigurationException @@ -742,7 +742,7 @@ public TransformerHandler newTransformerHandler(Templates templates) * * @return TransformerHandler ready to transform SAX events. * - * @throws TransformerConfigurationException + * @throws TransformerConfigurationException if handler could not be created */ public TransformerHandler newTransformerHandler() throws TransformerConfigurationException diff --git a/src/org/apache/xalan/processor/WhitespaceInfoPaths.java b/xalan/src/main/java/org/apache/xalan/processor/WhitespaceInfoPaths.java similarity index 100% rename from src/org/apache/xalan/processor/WhitespaceInfoPaths.java rename to xalan/src/main/java/org/apache/xalan/processor/WhitespaceInfoPaths.java diff --git a/xalan/src/main/java/org/apache/xalan/processor/XSLProcessorVersion.java b/xalan/src/main/java/org/apache/xalan/processor/XSLProcessorVersion.java new file mode 100644 index 000000000..7f060cd48 --- /dev/null +++ b/xalan/src/main/java/org/apache/xalan/processor/XSLProcessorVersion.java @@ -0,0 +1,64 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * $Id$ + */ +package org.apache.xalan.processor; + +import org.apache.xalan.Version; + +/** + * Administrative class to keep track of the version number of + * the Xalan Processor release. + * <P>See also: org/apache/xalan/res/XSLTInfo.properties</P> + * @deprecated To be replaced by org.apache.xalan.Version.getVersion() + * @xsl.usage general + */ +public class XSLProcessorVersion extends Version { + + /** + * Get the basic version string for the current Xalan release. + * Version String formatted like + * <CODE>"<B>Xalan Processor</B> <B>Java</B> v.r[.dd| <B>D</B>nn]"</CODE>. + * + * @return String denoting our current version + */ + public static String getVersion() { + return getProduct()+" "+getImplementationLanguage()+" " + +getMajorVersionNum()+"."+getReleaseVersionNum()+"." + +( (getDevelopmentVersionNum() > 0) ? + ("D"+getDevelopmentVersionNum()) : (""+getMaintenanceVersionNum())) + +(isSnapshot() ? "-SNAPSHOT" :""); + } + + /** + * Print the processor version to the command line. + * + * @param argv command line arguments, unused. + */ + public static void main(String argv[]) { + System.out.println(getVersion()); + } + + /** + * Name of product: Xalan Processor. + */ + public static String getProduct() { + return "Xalan Processor"; + } +} diff --git a/src/org/apache/xalan/processor/XSLTAttributeDef.java b/xalan/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java similarity index 100% rename from src/org/apache/xalan/processor/XSLTAttributeDef.java rename to xalan/src/main/java/org/apache/xalan/processor/XSLTAttributeDef.java diff --git a/src/org/apache/xalan/processor/XSLTElementDef.java b/xalan/src/main/java/org/apache/xalan/processor/XSLTElementDef.java similarity index 100% rename from src/org/apache/xalan/processor/XSLTElementDef.java rename to xalan/src/main/java/org/apache/xalan/processor/XSLTElementDef.java diff --git a/src/org/apache/xalan/processor/XSLTElementProcessor.java b/xalan/src/main/java/org/apache/xalan/processor/XSLTElementProcessor.java similarity index 94% rename from src/org/apache/xalan/processor/XSLTElementProcessor.java rename to xalan/src/main/java/org/apache/xalan/processor/XSLTElementProcessor.java index 553832d11..367dbcb4e 100644 --- a/src/org/apache/xalan/processor/XSLTElementProcessor.java +++ b/xalan/src/main/java/org/apache/xalan/processor/XSLTElementProcessor.java @@ -86,6 +86,7 @@ void setElemDef(XSLTElementDef def) * document. * @return The new input source, or null to require the * default behaviour. + * @throws org.xml.sax.SAXException if StylesheetHandler throws an error. */ public InputSource resolveEntity( StylesheetHandler handler, String publicId, String systemId) @@ -137,6 +138,7 @@ public void unparsedEntityDecl(StylesheetHandler handler, String name, * is sent to the current processor when any non-text event occurs. * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. + * @throws org.xml.sax.SAXException if StylesheetHandler throws an error. */ public void startNonText(StylesheetHandler handler) throws org.xml.sax.SAXException { @@ -152,6 +154,7 @@ public void startNonText(StylesheetHandler handler) throws org.xml.sax.SAXExcept * @param localName The local name (without prefix), or empty string if not namespace processing. * @param rawName The qualified name (with prefix). * @param attributes The specified or defaulted attributes. + * @throws org.xml.sax.SAXException if StylesheetHandler throws an error. */ public void startElement( StylesheetHandler handler, String uri, String localName, String rawName, Attributes attributes) @@ -171,6 +174,7 @@ public void startElement( * @param uri The Namespace URI, or an empty string. * @param localName The local name (without prefix), or empty string if not namespace processing. * @param rawName The qualified name (with prefix). + * @throws org.xml.sax.SAXException if StylesheetHandler throws an error. */ public void endElement( StylesheetHandler handler, String uri, String localName, String rawName) @@ -192,6 +196,7 @@ public void endElement( * @param start The start position in the character array. * @param length The number of characters to use from the * character array. + * @throws org.xml.sax.SAXException if StylesheetHandler throws an error. */ public void characters( StylesheetHandler handler, char ch[], int start, int length) @@ -210,6 +215,7 @@ public void characters( * @param start The start position in the character array. * @param length The number of characters to use from the * character array. + * @throws org.xml.sax.SAXException if StylesheetHandler throws an error. */ public void ignorableWhitespace( StylesheetHandler handler, char ch[], int start, int length) @@ -227,12 +233,12 @@ public void ignorableWhitespace( * @param target The processing instruction target. * @param data The processing instruction data, or null if * none is supplied. + * @throws org.xml.sax.SAXException if StylesheetHandler throws an error. */ public void processingInstruction( StylesheetHandler handler, String target, String data) throws org.xml.sax.SAXException { - // no op } @@ -242,11 +248,11 @@ public void processingInstruction( * * @param handler non-null reference to current StylesheetHandler that is constructing the Templates. * @param name The name of the skipped entity. + * @throws org.xml.sax.SAXException never */ public void skippedEntity(StylesheetHandler handler, String name) throws org.xml.sax.SAXException { - // no op } @@ -258,6 +264,7 @@ public void skippedEntity(StylesheetHandler handler, String name) * error reporting. * @param attributes The list of attributes. * @param target The target element where the properties will be set. + * @throws org.xml.sax.SAXException if StylesheetHandler throws an error. */ void setPropertiesFromAttributes( StylesheetHandler handler, String rawName, Attributes attributes, @@ -279,7 +286,7 @@ void setPropertiesFromAttributes( * attribute is not defined. * @return the attributes not allowed on this element. * - * @throws TransformerException + * @throws org.xml.sax.SAXException if StylesheetHandler throws an error. */ Attributes setPropertiesFromAttributes( StylesheetHandler handler, String rawName, Attributes attributes, diff --git a/src/org/apache/xalan/processor/XSLTSchema.java b/xalan/src/main/java/org/apache/xalan/processor/XSLTSchema.java similarity index 100% rename from src/org/apache/xalan/processor/XSLTSchema.java rename to xalan/src/main/java/org/apache/xalan/processor/XSLTSchema.java diff --git a/src/org/apache/xalan/processor/package.html b/xalan/src/main/java/org/apache/xalan/processor/package.html similarity index 100% rename from src/org/apache/xalan/processor/package.html rename to xalan/src/main/java/org/apache/xalan/processor/package.html diff --git a/src/org/apache/xalan/res/XSLMessages.java b/xalan/src/main/java/org/apache/xalan/res/XSLMessages.java similarity index 100% rename from src/org/apache/xalan/res/XSLMessages.java rename to xalan/src/main/java/org/apache/xalan/res/XSLMessages.java diff --git a/src/org/apache/xalan/res/XSLTErrorResources.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources.java index e71f2b1ad..84dfc1672 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources.java @@ -1450,7 +1450,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_ca.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ca.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_ca.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ca.java index 6cf2211f5..eff09ad93 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_ca.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ca.java @@ -1468,7 +1468,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_cs.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_cs.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_cs.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_cs.java index 98c77a658..f0d240e75 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_cs.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_cs.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_de.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_de.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_de.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_de.java index 6d25e79df..c8d6c9cbf 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_de.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_de.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_en.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_en.java similarity index 100% rename from src/org/apache/xalan/res/XSLTErrorResources_en.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_en.java diff --git a/src/org/apache/xalan/res/XSLTErrorResources_es.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_es.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_es.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_es.java index 77b58728f..b44f920a6 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_es.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_es.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_fr.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_fr.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_fr.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_fr.java index 1ab47a9be..5beb9f182 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_fr.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_fr.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_hu.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_hu.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_hu.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_hu.java index 628bd07b0..3ff9e1b9b 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_hu.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_hu.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_it.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_it.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_it.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_it.java index 8a9048c27..6c71248f5 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_it.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_it.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_ja.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ja.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_ja.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ja.java index 3b5575844..95b8f8247 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_ja.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ja.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_ko.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ko.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_ko.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ko.java index d31922c98..887f03156 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_ko.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ko.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_pl.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_pl.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_pl.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_pl.java index 3161b7236..779a92718 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_pl.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_pl.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_pt_BR.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_pt_BR.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_pt_BR.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_pt_BR.java index e6a371882..1f591794d 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_pt_BR.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_pt_BR.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_ru.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ru.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_ru.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ru.java index de027de2c..195201330 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_ru.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_ru.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_sk.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_sk.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_sk.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_sk.java index 6133f3a4c..44760889d 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_sk.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_sk.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_sl.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_sl.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_sl.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_sl.java index 74fac0241..0c03fda0d 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_sl.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_sl.java @@ -1456,7 +1456,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_sv.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_sv.java similarity index 100% rename from src/org/apache/xalan/res/XSLTErrorResources_sv.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_sv.java diff --git a/src/org/apache/xalan/res/XSLTErrorResources_tr.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_tr.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_tr.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_tr.java index 6cd831fe1..25b581994 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_tr.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_tr.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_zh.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_zh.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_zh.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_zh.java index 0d2c80bcb..eec15708d 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_zh.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_zh.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/XSLTErrorResources_zh_CN.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_zh_CN.java similarity index 100% rename from src/org/apache/xalan/res/XSLTErrorResources_zh_CN.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_zh_CN.java diff --git a/src/org/apache/xalan/res/XSLTErrorResources_zh_TW.java b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_zh_TW.java similarity index 99% rename from src/org/apache/xalan/res/XSLTErrorResources_zh_TW.java rename to xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_zh_TW.java index 71aff268f..0e3ad7da2 100644 --- a/src/org/apache/xalan/res/XSLTErrorResources_zh_TW.java +++ b/xalan/src/main/java/org/apache/xalan/res/XSLTErrorResources_zh_TW.java @@ -1469,7 +1469,7 @@ public Object[][] getContents() * * @param className the name of the class that implements the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the requested resources can not be loaded */ public static final XSLTErrorResources loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xalan/res/package.html b/xalan/src/main/java/org/apache/xalan/res/package.html similarity index 100% rename from src/org/apache/xalan/res/package.html rename to xalan/src/main/java/org/apache/xalan/res/package.html diff --git a/src/org/apache/xalan/serialize/DOMSerializer.java b/xalan/src/main/java/org/apache/xalan/serialize/DOMSerializer.java similarity index 100% rename from src/org/apache/xalan/serialize/DOMSerializer.java rename to xalan/src/main/java/org/apache/xalan/serialize/DOMSerializer.java diff --git a/src/org/apache/xalan/serialize/Serializer.java b/xalan/src/main/java/org/apache/xalan/serialize/Serializer.java similarity index 100% rename from src/org/apache/xalan/serialize/Serializer.java rename to xalan/src/main/java/org/apache/xalan/serialize/Serializer.java diff --git a/src/org/apache/xalan/serialize/SerializerFactory.java b/xalan/src/main/java/org/apache/xalan/serialize/SerializerFactory.java similarity index 98% rename from src/org/apache/xalan/serialize/SerializerFactory.java rename to xalan/src/main/java/org/apache/xalan/serialize/SerializerFactory.java index 0c7741c7b..b2d22d1c6 100644 --- a/src/org/apache/xalan/serialize/SerializerFactory.java +++ b/xalan/src/main/java/org/apache/xalan/serialize/SerializerFactory.java @@ -49,7 +49,7 @@ private SerializerFactory() * @return A suitable serializer, or null * @throws IllegalArgumentException (apparently -sc) if method is * null or an appropriate serializer can't be found - * @throws WrappedRuntimeException (apparently -sc) if an + * @throws org.apache.xml.utils.WrappedRuntimeException (apparently -sc) if an * exception is thrown while trying to find serializer * @deprecated Use org.apache.xml.serializer.SerializerFactory */ diff --git a/src/org/apache/xalan/serialize/SerializerUtils.java b/xalan/src/main/java/org/apache/xalan/serialize/SerializerUtils.java similarity index 88% rename from src/org/apache/xalan/serialize/SerializerUtils.java rename to xalan/src/main/java/org/apache/xalan/serialize/SerializerUtils.java index 487f6241e..fdb9a7887 100644 --- a/src/org/apache/xalan/serialize/SerializerUtils.java +++ b/xalan/src/main/java/org/apache/xalan/serialize/SerializerUtils.java @@ -46,10 +46,10 @@ public class SerializerUtils * attribute templates as need be, and processing the xsl:use * attribute. * - * @param handler SerializationHandler to which the attributes are added. + * @param handler SerializationHandler to which the attributes are written * @param attr Attribute node to add to SerializationHandler. * - * @throws TransformerException + * @throws TransformerException if handler objects */ public static void addAttribute(SerializationHandler handler, int attr) throws TransformerException @@ -86,9 +86,10 @@ public static void addAttribute(SerializationHandler handler, int attr) /** * Copy DOM attributes to the result element. * + * @param handler SerializationHandler to which the attributes are written * @param src Source node with the attributes * - * @throws TransformerException + * @throws TransformerException if handler objects */ public static void addAttributes(SerializationHandler handler, int src) throws TransformerException @@ -110,10 +111,11 @@ public static void addAttributes(SerializationHandler handler, int src) * Given a result tree fragment, walk the tree and * output it to the SerializationHandler. * + * @param handler SerializationHandler to which the attributes are written * @param obj Result tree fragment object * @param support XPath context for the result tree fragment * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if handler objects */ public static void outputResultTreeFragment( SerializationHandler handler, @@ -144,16 +146,17 @@ public static void outputResultTreeFragment( } /** - * Copy <KBD>xmlns:</KBD> attributes in if not already in scope. + * Copy <code>xmlns:</code> attributes in if not already in scope. * * As a quick hack to support ClonerToResultTree, this can also be used * to copy an individual namespace node. * - * @param src Source Node - * NEEDSDOC @param type - * NEEDSDOC @param dtm + * @param handler SerializationHandler to which the attributes are written + * @param src int Source Node index in DTM + * @param type int Source Node type in DTM + * @param dtm Document Table Model containing the source node * - * @throws TransformerException + * @throws TransformerException if handler objects */ public static void processNSDecls( SerializationHandler handler, @@ -206,7 +209,7 @@ else if (type == DTM.NAMESPACE_NODE) /** * Returns whether a namespace is defined * - * + * @param serializer SerializationHandler to which the attributes are written * @param attr Namespace attribute node * @param dtm The DTM that owns attr. * @@ -240,10 +243,11 @@ public static boolean isDefinedNSDecl( * If it's not, it still needs to be declared at this point. * TODO: This needs to be done at an earlier stage in the game... -sb * - * NEEDSDOC @param dtm - * NEEDSDOC @param namespace + * @param handler SerializationHandler to which the attributes are written + * @param dtm Document Table Model containing the source node + * @param namespace DTM index number representing namespace of this node * - * @throws org.xml.sax.SAXException + * @throws org.xml.sax.SAXException if handler objects */ public static void ensureNamespaceDeclDeclared( SerializationHandler handler, diff --git a/src/org/apache/xalan/templates/AVT.java b/xalan/src/main/java/org/apache/xalan/templates/AVT.java similarity index 100% rename from src/org/apache/xalan/templates/AVT.java rename to xalan/src/main/java/org/apache/xalan/templates/AVT.java diff --git a/src/org/apache/xalan/templates/AVTPart.java b/xalan/src/main/java/org/apache/xalan/templates/AVTPart.java similarity index 100% rename from src/org/apache/xalan/templates/AVTPart.java rename to xalan/src/main/java/org/apache/xalan/templates/AVTPart.java diff --git a/src/org/apache/xalan/templates/AVTPartSimple.java b/xalan/src/main/java/org/apache/xalan/templates/AVTPartSimple.java similarity index 100% rename from src/org/apache/xalan/templates/AVTPartSimple.java rename to xalan/src/main/java/org/apache/xalan/templates/AVTPartSimple.java diff --git a/src/org/apache/xalan/templates/AVTPartXPath.java b/xalan/src/main/java/org/apache/xalan/templates/AVTPartXPath.java similarity index 100% rename from src/org/apache/xalan/templates/AVTPartXPath.java rename to xalan/src/main/java/org/apache/xalan/templates/AVTPartXPath.java diff --git a/src/org/apache/xalan/templates/AbsPathChecker.java b/xalan/src/main/java/org/apache/xalan/templates/AbsPathChecker.java similarity index 100% rename from src/org/apache/xalan/templates/AbsPathChecker.java rename to xalan/src/main/java/org/apache/xalan/templates/AbsPathChecker.java diff --git a/src/org/apache/xalan/templates/Constants.java b/xalan/src/main/java/org/apache/xalan/templates/Constants.java similarity index 100% rename from src/org/apache/xalan/templates/Constants.java rename to xalan/src/main/java/org/apache/xalan/templates/Constants.java diff --git a/src/org/apache/xalan/templates/DecimalFormatProperties.java b/xalan/src/main/java/org/apache/xalan/templates/DecimalFormatProperties.java similarity index 98% rename from src/org/apache/xalan/templates/DecimalFormatProperties.java rename to xalan/src/main/java/org/apache/xalan/templates/DecimalFormatProperties.java index 4b4a6d51e..db2592808 100644 --- a/src/org/apache/xalan/templates/DecimalFormatProperties.java +++ b/xalan/src/main/java/org/apache/xalan/templates/DecimalFormatProperties.java @@ -27,8 +27,8 @@ /** * Implement xsl:decimal-format. * <pre> - * <!ELEMENT xsl:decimal-format EMPTY> - * <!ATTLIST xsl:decimal-format + * <!ELEMENT xsl:decimal-format EMPTY> + * <!ATTLIST xsl:decimal-format * name %qname; #IMPLIED * decimal-separator %char; "." * grouping-separator %char; "," @@ -36,11 +36,11 @@ * minus-sign %char; "-" * NaN CDATA "NaN" * percent %char; "%" - * per-mille %char; "‰" + * per-mille %char; "&#x2030;" * zero-digit %char; "0" * digit %char; "#" * pattern-separator %char; ";" - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#format-number">format-number in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemApplyImport.java b/xalan/src/main/java/org/apache/xalan/templates/ElemApplyImport.java similarity index 97% rename from src/org/apache/xalan/templates/ElemApplyImport.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemApplyImport.java index c6f25b075..67437f22c 100644 --- a/src/org/apache/xalan/templates/ElemApplyImport.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemApplyImport.java @@ -29,7 +29,7 @@ /** * Implement xsl:apply-imports. * <pre> - * <!ELEMENT xsl:apply-imports EMPTY> + * <!ELEMENT xsl:apply-imports EMPTY> * </pre> * @see <a href="http://www.w3.org/TR/xslt#apply-imports">apply-imports in XSLT Specification</a> * @xsl.usage advanced @@ -98,7 +98,7 @@ public void execute( /** * Add a child to the child list. - * <!ELEMENT xsl:apply-imports EMPTY> + * <!ELEMENT xsl:apply-imports EMPTY> * * @param newChild New element to append to this element's children list * diff --git a/src/org/apache/xalan/templates/ElemApplyTemplates.java b/xalan/src/main/java/org/apache/xalan/templates/ElemApplyTemplates.java similarity index 100% rename from src/org/apache/xalan/templates/ElemApplyTemplates.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemApplyTemplates.java diff --git a/src/org/apache/xalan/templates/ElemAttribute.java b/xalan/src/main/java/org/apache/xalan/templates/ElemAttribute.java similarity index 98% rename from src/org/apache/xalan/templates/ElemAttribute.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemAttribute.java index 924f4406d..62ce571cd 100644 --- a/src/org/apache/xalan/templates/ElemAttribute.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemAttribute.java @@ -206,12 +206,12 @@ void constructNode( /** * Add a child to the child list. - * <!ELEMENT xsl:attribute %char-template;> - * <!ATTLIST xsl:attribute + * <!ELEMENT xsl:attribute %char-template;> + * <!ATTLIST xsl:attribute * name %avt; #REQUIRED * namespace %avt; #IMPLIED * %space-att; - * > + * > * * @param newChild Child to append to the list of this node's children * diff --git a/src/org/apache/xalan/templates/ElemAttributeSet.java b/xalan/src/main/java/org/apache/xalan/templates/ElemAttributeSet.java similarity index 97% rename from src/org/apache/xalan/templates/ElemAttributeSet.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemAttributeSet.java index a27f1edd4..4cb3edb79 100644 --- a/src/org/apache/xalan/templates/ElemAttributeSet.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemAttributeSet.java @@ -136,11 +136,11 @@ public void execute( /** * Add a child to the child list. - * <!ELEMENT xsl:attribute-set (xsl:attribute)*> - * <!ATTLIST xsl:attribute-set + * <!ELEMENT xsl:attribute-set (xsl:attribute)*> + * <!ATTLIST xsl:attribute-set * name %qname; #REQUIRED * use-attribute-sets %qnames; #IMPLIED - * > + * > * * @param newChild Child to be added to this node's list of children * diff --git a/src/org/apache/xalan/templates/ElemCallTemplate.java b/xalan/src/main/java/org/apache/xalan/templates/ElemCallTemplate.java similarity index 98% rename from src/org/apache/xalan/templates/ElemCallTemplate.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemCallTemplate.java index 8c06b6b42..be7f7ea9a 100644 --- a/src/org/apache/xalan/templates/ElemCallTemplate.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemCallTemplate.java @@ -325,11 +325,11 @@ public void setParamElem(ElemWithParam ParamElem) /** * Add a child to the child list. - * <!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*> - * <!ATTLIST xsl:apply-templates + * <!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*> + * <!ATTLIST xsl:apply-templates * select %expr; "node()" * mode %qname; #IMPLIED - * > + * > * * @param newChild Child to add to this node's children list * diff --git a/src/org/apache/xalan/templates/ElemChoose.java b/xalan/src/main/java/org/apache/xalan/templates/ElemChoose.java similarity index 98% rename from src/org/apache/xalan/templates/ElemChoose.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemChoose.java index d243c94b7..8a803fb0b 100644 --- a/src/org/apache/xalan/templates/ElemChoose.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemChoose.java @@ -30,8 +30,8 @@ /** * Implement xsl:choose. * <pre> - * <!ELEMENT xsl:choose (xsl:when+, xsl:otherwise?)> - * <!ATTLIST xsl:choose %space-att;> + * <!ELEMENT xsl:choose (xsl:when+, xsl:otherwise?)> + * <!ATTLIST xsl:choose %space-att;> * </pre> * @see <a href="http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:choose">XXX in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemComment.java b/xalan/src/main/java/org/apache/xalan/templates/ElemComment.java similarity index 97% rename from src/org/apache/xalan/templates/ElemComment.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemComment.java index 73790ca21..6abf57142 100644 --- a/src/org/apache/xalan/templates/ElemComment.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemComment.java @@ -28,8 +28,8 @@ /** * Implement xsl:comment. * <pre> - * <!ELEMENT xsl:comment %char-template;> - * <!ATTLIST xsl:comment %space-att;> + * <!ELEMENT xsl:comment %char-template;> + * <!ATTLIST xsl:comment %space-att;> * </pre> * @see <a href="http://www.w3.org/TR/xslt#section-Creating-Comments">section-Creating-Comments in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemCopy.java b/xalan/src/main/java/org/apache/xalan/templates/ElemCopy.java similarity index 98% rename from src/org/apache/xalan/templates/ElemCopy.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemCopy.java index b0ba63259..60f0e6349 100644 --- a/src/org/apache/xalan/templates/ElemCopy.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemCopy.java @@ -32,11 +32,11 @@ /** * Implement xsl:copy. * <pre> - * <!ELEMENT xsl:copy %template;> - * <!ATTLIST xsl:copy + * <!ELEMENT xsl:copy %template;> + * <!ATTLIST xsl:copy * %space-att; * use-attribute-sets %qnames; #IMPLIED - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#copying">copying in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemCopyOf.java b/xalan/src/main/java/org/apache/xalan/templates/ElemCopyOf.java similarity index 98% rename from src/org/apache/xalan/templates/ElemCopyOf.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemCopyOf.java index 5fadba64c..c776ee536 100644 --- a/src/org/apache/xalan/templates/ElemCopyOf.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemCopyOf.java @@ -37,8 +37,8 @@ /** * Implement xsl:copy-of. * <pre> - * <!ELEMENT xsl:copy-of EMPTY> - * <!ATTLIST xsl:copy-of select %expr; #REQUIRED> + * <!ELEMENT xsl:copy-of EMPTY> + * <!ATTLIST xsl:copy-of select %expr; #REQUIRED> * </pre> * @see <a href="http://www.w3.org/TR/xslt#copy-of">copy-of in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemElement.java b/xalan/src/main/java/org/apache/xalan/templates/ElemElement.java similarity index 99% rename from src/org/apache/xalan/templates/ElemElement.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemElement.java index 3ebbc4f84..0da2bacbf 100644 --- a/src/org/apache/xalan/templates/ElemElement.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemElement.java @@ -33,13 +33,13 @@ /** * Implement xsl:element * <pre> - * <!ELEMENT xsl:element %template;> - * <!ATTLIST xsl:element + * <!ELEMENT xsl:element %template;> + * <!ATTLIST xsl:element * name %avt; #REQUIRED * namespace %avt; #IMPLIED * use-attribute-sets %qnames; #IMPLIED * %space-att; - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#section-Creating-Elements-with-xsl:element">XXX in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemEmpty.java b/xalan/src/main/java/org/apache/xalan/templates/ElemEmpty.java similarity index 100% rename from src/org/apache/xalan/templates/ElemEmpty.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemEmpty.java diff --git a/src/org/apache/xalan/templates/ElemExsltFuncResult.java b/xalan/src/main/java/org/apache/xalan/templates/ElemExsltFuncResult.java similarity index 100% rename from src/org/apache/xalan/templates/ElemExsltFuncResult.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemExsltFuncResult.java diff --git a/src/org/apache/xalan/templates/ElemExsltFunction.java b/xalan/src/main/java/org/apache/xalan/templates/ElemExsltFunction.java similarity index 100% rename from src/org/apache/xalan/templates/ElemExsltFunction.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemExsltFunction.java diff --git a/src/org/apache/xalan/templates/ElemExtensionCall.java b/xalan/src/main/java/org/apache/xalan/templates/ElemExtensionCall.java similarity index 100% rename from src/org/apache/xalan/templates/ElemExtensionCall.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemExtensionCall.java diff --git a/src/org/apache/xalan/templates/ElemExtensionDecl.java b/xalan/src/main/java/org/apache/xalan/templates/ElemExtensionDecl.java similarity index 100% rename from src/org/apache/xalan/templates/ElemExtensionDecl.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemExtensionDecl.java diff --git a/src/org/apache/xalan/templates/ElemExtensionScript.java b/xalan/src/main/java/org/apache/xalan/templates/ElemExtensionScript.java similarity index 100% rename from src/org/apache/xalan/templates/ElemExtensionScript.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemExtensionScript.java diff --git a/src/org/apache/xalan/templates/ElemFallback.java b/xalan/src/main/java/org/apache/xalan/templates/ElemFallback.java similarity index 97% rename from src/org/apache/xalan/templates/ElemFallback.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemFallback.java index a6a48a909..d58b42e24 100644 --- a/src/org/apache/xalan/templates/ElemFallback.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemFallback.java @@ -27,8 +27,8 @@ /** * Implement xsl:fallback. * <pre> - * <!ELEMENT xsl:fallback %template;> - * <!ATTLIST xsl:fallback %space-att;> + * <!ELEMENT xsl:fallback %template;> + * <!ATTLIST xsl:fallback %space-att;> * </pre> * @see <a href="http://www.w3.org/TR/xslt#fallback">fallback in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemForEach.java b/xalan/src/main/java/org/apache/xalan/templates/ElemForEach.java similarity index 98% rename from src/org/apache/xalan/templates/ElemForEach.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemForEach.java index 7f4123a6d..c4a90143c 100644 --- a/src/org/apache/xalan/templates/ElemForEach.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemForEach.java @@ -41,17 +41,17 @@ /** * Implement xsl:for-each. * <pre> - * <!ELEMENT xsl:for-each + * <!ELEMENT xsl:for-each * (#PCDATA * %instructions; * %result-elements; * | xsl:sort) - * > + * > * - * <!ATTLIST xsl:for-each + * <!ATTLIST xsl:for-each * select %expr; #REQUIRED * %space-att; - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#for-each">for-each in XSLT Specification</a> * @xsl.usage advanced @@ -475,11 +475,11 @@ public void transformSelectedNodes(TransformerImpl transformer) /** * Add a child to the child list. - * <!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*> - * <!ATTLIST xsl:apply-templates + * <!ELEMENT xsl:apply-templates (xsl:sort|xsl:with-param)*> + * <!ATTLIST xsl:apply-templates * select %expr; "node()" * mode %qname; #IMPLIED - * > + * > * * @param newChild Child to add to child list * diff --git a/src/org/apache/xalan/templates/ElemIf.java b/xalan/src/main/java/org/apache/xalan/templates/ElemIf.java similarity index 98% rename from src/org/apache/xalan/templates/ElemIf.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemIf.java index e4f1ae059..3b1e59603 100644 --- a/src/org/apache/xalan/templates/ElemIf.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemIf.java @@ -30,11 +30,11 @@ /** * Implement xsl:if. * <pre> - * <!ELEMENT xsl:if %template;> - * <!ATTLIST xsl:if + * <!ELEMENT xsl:if %template;> + * <!ATTLIST xsl:if * test %expr; #REQUIRED * %space-att; - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:if">XXX in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemLiteralResult.java b/xalan/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java similarity index 100% rename from src/org/apache/xalan/templates/ElemLiteralResult.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemLiteralResult.java diff --git a/src/org/apache/xalan/templates/ElemMessage.java b/xalan/src/main/java/org/apache/xalan/templates/ElemMessage.java similarity index 97% rename from src/org/apache/xalan/templates/ElemMessage.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemMessage.java index 8d702d70d..cc0eb2544 100644 --- a/src/org/apache/xalan/templates/ElemMessage.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemMessage.java @@ -29,11 +29,11 @@ /** * Implement xsl:message. * <pre> - * <!ELEMENT xsl:message %template;> - * <!ATTLIST xsl:message + * <!ELEMENT xsl:message %template;> + * <!ATTLIST xsl:message * %space-att; * terminate (yes|no) "no" - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#message">message in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemNumber.java b/xalan/src/main/java/org/apache/xalan/templates/ElemNumber.java similarity index 99% rename from src/org/apache/xalan/templates/ElemNumber.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemNumber.java index d65c5a54b..eaa2b7221 100644 --- a/src/org/apache/xalan/templates/ElemNumber.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemNumber.java @@ -56,8 +56,8 @@ /** * Implement xsl:number. * <pre> - * <!ELEMENT xsl:number EMPTY> - * <!ATTLIST xsl:number + * <!ELEMENT xsl:number EMPTY> + * <!ATTLIST xsl:number * level (single|multiple|any) "single" * count %pattern; #IMPLIED * from %pattern; #IMPLIED @@ -67,7 +67,7 @@ * letter-value %avt; #IMPLIED * grouping-separator %avt; #IMPLIED * grouping-size %avt; #IMPLIED - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#number">number in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemOtherwise.java b/xalan/src/main/java/org/apache/xalan/templates/ElemOtherwise.java similarity index 94% rename from src/org/apache/xalan/templates/ElemOtherwise.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemOtherwise.java index f8fffd846..66ff99893 100644 --- a/src/org/apache/xalan/templates/ElemOtherwise.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemOtherwise.java @@ -24,8 +24,8 @@ /** * Implement xsl:otherwise. * <pre> - * <!ELEMENT xsl:otherwise %template;> - * <!ATTLIST xsl:otherwise %space-att;> + * <! xsl:otherwise %template;> + * <!ATTLIST xsl:otherwise %space-att;> * </pre> * @see <a href="http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:choose">XXX in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemPI.java b/xalan/src/main/java/org/apache/xalan/templates/ElemPI.java similarity index 98% rename from src/org/apache/xalan/templates/ElemPI.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemPI.java index 56f95c63c..bd8bc4660 100644 --- a/src/org/apache/xalan/templates/ElemPI.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemPI.java @@ -30,11 +30,11 @@ /** * Implement xsl:processing-instruction. * <pre> - * <!ELEMENT xsl:processing-instruction %char-template;> - * <!ATTLIST xsl:processing-instruction + * <!ELEMENT xsl:processing-instruction %char-template;> + * <!ATTLIST xsl:processing-instruction * name %avt; #REQUIRED * %space-att; - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#section-Creating-Processing-Instructions">section-Creating-Processing-Instructions in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemParam.java b/xalan/src/main/java/org/apache/xalan/templates/ElemParam.java similarity index 98% rename from src/org/apache/xalan/templates/ElemParam.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemParam.java index c0a4038e8..9a2713756 100644 --- a/src/org/apache/xalan/templates/ElemParam.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemParam.java @@ -29,11 +29,11 @@ /** * Implement xsl:param. * <pre> - * <!ELEMENT xsl:param %template;> - * <!ATTLIST xsl:param + * <! xsl:param %template;> + * <!ATTLIST xsl:param * name %qname; #REQUIRED * select %expr; #IMPLIED - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#variables">variables in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemSort.java b/xalan/src/main/java/org/apache/xalan/templates/ElemSort.java similarity index 98% rename from src/org/apache/xalan/templates/ElemSort.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemSort.java index 93da544ee..1cc91a9c9 100644 --- a/src/org/apache/xalan/templates/ElemSort.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemSort.java @@ -29,16 +29,16 @@ /** * Implement xsl:sort. * <pre> - * <!ELEMENT xsl:sort EMPTY> - * <!ATTLIST xsl:sort + * <!ELEMENT xsl:sort EMPTY> + * <!ATTLIST xsl:sort * select %expr; "." * lang %avt; #IMPLIED * data-type %avt; "text" * order %avt; "ascending" * case-order %avt; #IMPLIED - * > - * <!-- xsl:sort cannot occur after any other elements or - * any non-whitespace character --> + * > + * <!-- xsl:sort cannot occur after any other elements or + * any non-whitespace character --> * </pre> * @see <a href="http://www.w3.org/TR/xslt#sorting">sorting in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemTemplate.java b/xalan/src/main/java/org/apache/xalan/templates/ElemTemplate.java similarity index 99% rename from src/org/apache/xalan/templates/ElemTemplate.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemTemplate.java index 5add0aa3c..5858372c2 100644 --- a/src/org/apache/xalan/templates/ElemTemplate.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemTemplate.java @@ -31,20 +31,20 @@ /** * Implement xsl:template. * <pre> - * <!ELEMENT xsl:template + * <!ELEMENT xsl:template * (#PCDATA * %instructions; * %result-elements; * | xsl:param) - * > + * > * - * <!ATTLIST xsl:template + * <!ATTLIST xsl:template * match %pattern; #IMPLIED * name %qname; #IMPLIED * priority %priority; #IMPLIED * mode %qname; #IMPLIED * %space-att; - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#section-Defining-Template-Rules">section-Defining-Template-Rules in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemTemplateElement.java b/xalan/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java similarity index 97% rename from src/org/apache/xalan/templates/ElemTemplateElement.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java index 807c0b72d..cd4b08d53 100644 --- a/src/org/apache/xalan/templates/ElemTemplateElement.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemTemplateElement.java @@ -113,14 +113,12 @@ public String getLocalName() return getNodeName(); } - /** * This function will be called on top-level elements * only, just before the transform begins. * * @param transformer The XSLT TransformerFactory. - * - * @throws TransformerException + * @throws TransformerException if initialization could not complete */ public void runtimeInit(TransformerImpl transformer) throws TransformerException{} @@ -177,6 +175,8 @@ public StylesheetRoot getStylesheetRoot() /** * This function is called during recomposition to * control how this element is composed. + * @param root StylesheetRoot at base of tree to recompose + * @throws TransformerException if recomposition fails */ public void recompose(StylesheetRoot root) throws TransformerException { @@ -187,6 +187,8 @@ public void recompose(StylesheetRoot root) throws TransformerException * recomposed, and allows the template to set remaining * values that may be based on some other property that * depends on recomposition. + * @param sroot StylesheetRoot at base of tree to compose + * @throws TransformerException if composition fails */ public void compose(StylesheetRoot sroot) throws TransformerException { @@ -202,6 +204,8 @@ public void compose(StylesheetRoot sroot) throws TransformerException /** * This after the template's children have been composed. + * @param sroot StylesheetRoot at base of tree to compose + * @throws TransformerException if composition fails */ public void endCompose(StylesheetRoot sroot) throws TransformerException { @@ -249,7 +253,7 @@ public void error(String msg) * @param newChild Child to be added to child list * * @return Child just added to the child list - * @throws DOMException + * @throws DOMException if the child would be poorly formed or misplaced */ public Node appendChild(Node newChild) throws DOMException { @@ -389,7 +393,7 @@ public ElemTemplateElement removeChild(ElemTemplateElement childETE) * * @return The new child * - * @throws DOMException + * @throws DOMException if the replacement could not be made */ public Node replaceChild(Node newChild, Node oldChild) throws DOMException { @@ -429,7 +433,7 @@ public Node replaceChild(Node newChild, Node oldChild) throws DOMException * * @return null * - * @throws DOMException + * @throws DOMException if the insertion was not possible */ public Node insertBefore(Node newChild, Node refChild) throws DOMException { @@ -499,7 +503,7 @@ public Node insertBefore(Node newChild, Node refChild) throws DOMException * * @return The new child * - * @throws DOMException + * @throws DOMException if the replacement could not be performed */ public ElemTemplateElement replaceChild(ElemTemplateElement newChildElem, ElemTemplateElement oldChildElem) @@ -831,7 +835,7 @@ public List getDeclaredPrefixes() * @param nsSupport non-null reference to NamespaceSupport from * the ContentHandler. * - * @throws TransformerException + * @throws TransformerException if the prefixes could not be bound */ public void setPrefixes(NamespaceSupport nsSupport) throws TransformerException { @@ -847,7 +851,7 @@ public void setPrefixes(NamespaceSupport nsSupport) throws TransformerException * the ContentHandler. * @param excludeXSLDecl true if XSLT namespaces should be ignored. * - * @throws TransformerException + * @throws TransformerException if the prefixes could not be set */ public void setPrefixes(NamespaceSupport nsSupport, boolean excludeXSLDecl) throws TransformerException @@ -974,6 +978,7 @@ void setPrefixTable(List list) { * @see <a href="http://www.w3.org/TR/xslt#extension-element">extension-element in XSLT Specification</a> * * @param prefix non-null reference to prefix that might be excluded. + * @param uri non-null reference to URI that might be excluded * * @return true if the prefix should normally be excluded. */ @@ -996,7 +1001,7 @@ public boolean containsExcludeResultPrefix(String prefix, String uri) * * @return true if the given namespace should be excluded. * - * @throws TransformerException + * @throws TransformerException if exclusion could not be performed */ private boolean excludeResultNSDecl(String prefix, String uri) throws TransformerException @@ -1024,7 +1029,7 @@ private boolean excludeResultNSDecl(String prefix, String uri) * Note that this method builds m_prefixTable with aliased * namespaces, *not* the original namespaces. * - * @throws TransformerException + * @throws TransformerException if prefixes could not be resolved */ public void resolvePrefixTables() throws TransformerException { @@ -1159,7 +1164,7 @@ boolean needToCheckExclude() * * @param transformer non-null reference to the the current transform-time state. * - * @throws TransformerException + * @throws TransformerException if the handler objected to the prefix mappings */ void executeNSDecls(TransformerImpl transformer) throws TransformerException { @@ -1173,7 +1178,7 @@ void executeNSDecls(TransformerImpl transformer) throws TransformerException * @param transformer non-null reference to the the current transform-time state. * @param ignorePrefix string prefix to not startPrefixMapping * - * @throws TransformerException + * @throws TransformerException if the handler objected to the prefix mappings */ void executeNSDecls(TransformerImpl transformer, String ignorePrefix) throws TransformerException { @@ -1528,7 +1533,7 @@ else if (myPrecedence > roPrecedence) * * @return true if the whitespace should be stripped. * - * @throws TransformerException + * @throws TransformerException if stylesheet root can't answer the question */ public boolean shouldStripWhiteSpace( org.apache.xpath.XPathContext support, @@ -1629,6 +1634,7 @@ public void callVisitors(XSLTVisitor visitor) /** * Call the children visitors. * @param visitor The visitor whose appropriate method will be called. + * @param callAttributes has no effect in this implementation */ protected void callChildVisitors(XSLTVisitor visitor, boolean callAttributes) { @@ -1636,8 +1642,8 @@ protected void callChildVisitors(XSLTVisitor visitor, boolean callAttributes) node != null; node = node.m_nextSibling) { - node.callVisitors(visitor); - } + node.callVisitors(visitor); + } } /** diff --git a/src/org/apache/xalan/templates/ElemText.java b/xalan/src/main/java/org/apache/xalan/templates/ElemText.java similarity index 96% rename from src/org/apache/xalan/templates/ElemText.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemText.java index ac171be4b..b5c7729c2 100644 --- a/src/org/apache/xalan/templates/ElemText.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemText.java @@ -27,10 +27,10 @@ * This primarily acts as a marker on the element * stack to signal that whitespace should be preserved. * <pre> - * <!ELEMENT xsl:text (#PCDATA)> - * <!ATTLIST xsl:text + * <!ELEMENT xsl:text (#PCDATA)> + * <!ATTLIST xsl:text * disable-output-escaping (yes|no) "no" - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#section-Creating-Text">section-Creating-Text in XSLT Specification</a> * @xsl.usage advanced @@ -47,7 +47,7 @@ public class ElemText extends ElemTemplateElement /** * Set the "disable-output-escaping" attribute. - * Normally, the xml output method escapes & and < (and + * Normally, the xml output method escapes & and < (and * possibly other characters) when outputting text nodes. * This ensures that the output is well-formed XML. However, * it is sometimes convenient to be able to produce output @@ -72,7 +72,7 @@ public void setDisableOutputEscaping(boolean v) /** * Get the "disable-output-escaping" attribute. - * Normally, the xml output method escapes & and < (and + * Normally, the xml output method escapes & and < (and * possibly other characters) when outputting text nodes. * This ensures that the output is well-formed XML. However, * it is sometimes convenient to be able to produce output diff --git a/src/org/apache/xalan/templates/ElemTextLiteral.java b/xalan/src/main/java/org/apache/xalan/templates/ElemTextLiteral.java similarity index 98% rename from src/org/apache/xalan/templates/ElemTextLiteral.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemTextLiteral.java index bcf017610..226482601 100644 --- a/src/org/apache/xalan/templates/ElemTextLiteral.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemTextLiteral.java @@ -120,7 +120,7 @@ public synchronized String getNodeValue() /** * Set the "disable-output-escaping" attribute. - * Normally, the xml output method escapes & and < (and + * Normally, the xml output method escapes & and < (and * possibly other characters) when outputting text nodes. * This ensures that the output is well-formed XML. However, * it is sometimes convenient to be able to produce output @@ -145,7 +145,7 @@ public void setDisableOutputEscaping(boolean v) /** * Get the "disable-output-escaping" attribute. - * Normally, the xml output method escapes & and < (and + * Normally, the xml output method escapes & and < (and * possibly other characters) when outputting text nodes. * This ensures that the output is well-formed XML. However, * it is sometimes convenient to be able to produce output diff --git a/src/org/apache/xalan/templates/ElemUnknown.java b/xalan/src/main/java/org/apache/xalan/templates/ElemUnknown.java similarity index 100% rename from src/org/apache/xalan/templates/ElemUnknown.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemUnknown.java diff --git a/src/org/apache/xalan/templates/ElemUse.java b/xalan/src/main/java/org/apache/xalan/templates/ElemUse.java similarity index 100% rename from src/org/apache/xalan/templates/ElemUse.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemUse.java diff --git a/src/org/apache/xalan/templates/ElemValueOf.java b/xalan/src/main/java/org/apache/xalan/templates/ElemValueOf.java similarity index 98% rename from src/org/apache/xalan/templates/ElemValueOf.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemValueOf.java index 5cf4d4d74..b9b9d37e4 100644 --- a/src/org/apache/xalan/templates/ElemValueOf.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemValueOf.java @@ -35,11 +35,11 @@ /** * Implement xsl:value-of. * <pre> - * <!ELEMENT xsl:value-of EMPTY> - * <!ATTLIST xsl:value-of + * <!ELEMENT xsl:value-of EMPTY> + * <!ATTLIST xsl:value-of * select %expr; #REQUIRED * disable-output-escaping (yes|no) "no" - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#value-of">value-of in XSLT Specification</a> * @xsl.usage advanced @@ -102,7 +102,7 @@ public XPath getSelect() /** * Set the "disable-output-escaping" attribute. - * Normally, the xml output method escapes & and < (and + * Normally, the xml output method escapes & and < (and * possibly other characters) when outputting text nodes. * This ensures that the output is well-formed XML. However, * it is sometimes convenient to be able to produce output @@ -127,7 +127,7 @@ public void setDisableOutputEscaping(boolean v) /** * Get the "disable-output-escaping" attribute. - * Normally, the xml output method escapes & and < (and + * Normally, the xml output method escapes & and < (and * possibly other characters) when outputting text nodes. * This ensures that the output is well-formed XML. However, * it is sometimes convenient to be able to produce output diff --git a/src/org/apache/xalan/templates/ElemVariable.java b/xalan/src/main/java/org/apache/xalan/templates/ElemVariable.java similarity index 99% rename from src/org/apache/xalan/templates/ElemVariable.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemVariable.java index 12b9374ff..92905eac6 100644 --- a/src/org/apache/xalan/templates/ElemVariable.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemVariable.java @@ -35,11 +35,11 @@ /** * Implement xsl:variable. * <pre> - * <!ELEMENT xsl:variable %template;> - * <!ATTLIST xsl:variable + * <!ELEMENT xsl:variable %template;> + * <!ATTLIST xsl:variable * name %qname; #REQUIRED * select %expr; #IMPLIED - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#variables">variables in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemVariablePsuedo.java b/xalan/src/main/java/org/apache/xalan/templates/ElemVariablePsuedo.java similarity index 100% rename from src/org/apache/xalan/templates/ElemVariablePsuedo.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemVariablePsuedo.java diff --git a/src/org/apache/xalan/templates/ElemWhen.java b/xalan/src/main/java/org/apache/xalan/templates/ElemWhen.java similarity index 97% rename from src/org/apache/xalan/templates/ElemWhen.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemWhen.java index 3ca759da9..c404da2e9 100644 --- a/src/org/apache/xalan/templates/ElemWhen.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemWhen.java @@ -25,11 +25,11 @@ /** * Implement xsl:when. * <pre> - * <!ELEMENT xsl:when %template;> - * <!ATTLIST xsl:when + * <!ELEMENT xsl:when %template;> + * <!ATTLIST xsl:when * test %expr; #REQUIRED * %space-att; - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#section-Conditional-Processing-with-xsl:choose">XXX in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/ElemWithParam.java b/xalan/src/main/java/org/apache/xalan/templates/ElemWithParam.java similarity index 98% rename from src/org/apache/xalan/templates/ElemWithParam.java rename to xalan/src/main/java/org/apache/xalan/templates/ElemWithParam.java index b638bc810..f0f865b43 100644 --- a/src/org/apache/xalan/templates/ElemWithParam.java +++ b/xalan/src/main/java/org/apache/xalan/templates/ElemWithParam.java @@ -35,11 +35,11 @@ * Implement xsl:with-param. xsl:with-param is allowed within * both xsl:call-template and xsl:apply-templates. * <pre> - * <!ELEMENT xsl:with-param %template;> - * <!ATTLIST xsl:with-param + * <!ELEMENT xsl:with-param %template;> + * <!ATTLIST xsl:with-param * name %qname; #REQUIRED * select %expr; #IMPLIED - * > + * > * </pre> * @see <a href="http://www.w3.org/TR/xslt#element-with-param">element-with-param in XSLT Specification</a> * @xsl.usage advanced diff --git a/src/org/apache/xalan/templates/FuncDocument.java b/xalan/src/main/java/org/apache/xalan/templates/FuncDocument.java similarity index 100% rename from src/org/apache/xalan/templates/FuncDocument.java rename to xalan/src/main/java/org/apache/xalan/templates/FuncDocument.java diff --git a/src/org/apache/xalan/templates/FuncFormatNumb.java b/xalan/src/main/java/org/apache/xalan/templates/FuncFormatNumb.java similarity index 100% rename from src/org/apache/xalan/templates/FuncFormatNumb.java rename to xalan/src/main/java/org/apache/xalan/templates/FuncFormatNumb.java diff --git a/src/org/apache/xalan/templates/FuncKey.java b/xalan/src/main/java/org/apache/xalan/templates/FuncKey.java similarity index 100% rename from src/org/apache/xalan/templates/FuncKey.java rename to xalan/src/main/java/org/apache/xalan/templates/FuncKey.java diff --git a/src/org/apache/xalan/templates/KeyDeclaration.java b/xalan/src/main/java/org/apache/xalan/templates/KeyDeclaration.java similarity index 100% rename from src/org/apache/xalan/templates/KeyDeclaration.java rename to xalan/src/main/java/org/apache/xalan/templates/KeyDeclaration.java diff --git a/src/org/apache/xalan/templates/NamespaceAlias.java b/xalan/src/main/java/org/apache/xalan/templates/NamespaceAlias.java similarity index 100% rename from src/org/apache/xalan/templates/NamespaceAlias.java rename to xalan/src/main/java/org/apache/xalan/templates/NamespaceAlias.java diff --git a/src/org/apache/xalan/templates/OutputProperties.java b/xalan/src/main/java/org/apache/xalan/templates/OutputProperties.java similarity index 100% rename from src/org/apache/xalan/templates/OutputProperties.java rename to xalan/src/main/java/org/apache/xalan/templates/OutputProperties.java diff --git a/src/org/apache/xalan/templates/RedundentExprEliminator.java b/xalan/src/main/java/org/apache/xalan/templates/RedundentExprEliminator.java similarity index 100% rename from src/org/apache/xalan/templates/RedundentExprEliminator.java rename to xalan/src/main/java/org/apache/xalan/templates/RedundentExprEliminator.java diff --git a/src/org/apache/xalan/templates/Stylesheet.java b/xalan/src/main/java/org/apache/xalan/templates/Stylesheet.java similarity index 99% rename from src/org/apache/xalan/templates/Stylesheet.java rename to xalan/src/main/java/org/apache/xalan/templates/Stylesheet.java index a37e77597..6364d4afe 100644 --- a/src/org/apache/xalan/templates/Stylesheet.java +++ b/xalan/src/main/java/org/apache/xalan/templates/Stylesheet.java @@ -44,7 +44,7 @@ * defined in the <a href="XSLTAttributeDef#getSetterMethodName">getSetterMethodName</a> * function.</p> * <p><pre> - * <!ENTITY % top-level " + * <!ENTITY % top-level " * (xsl:import*, * (xsl:include * | xsl:strip-space @@ -58,22 +58,22 @@ * | xsl:template * | xsl:namespace-alias * %non-xsl-top-level;)*) - * "> + * "> * - * <!ENTITY % top-level-atts ' + * <!ENTITY % top-level-atts ' * extension-element-prefixes CDATA #IMPLIED * exclude-result-prefixes CDATA #IMPLIED * id ID #IMPLIED * version NMTOKEN #REQUIRED * xmlns:xsl CDATA #FIXED "http://www.w3.org/1999/XSL/Transform" * %space-att; - * '> + * '> * - * <!ELEMENT xsl:stylesheet %top-level;> - * <!ATTLIST xsl:stylesheet %top-level-atts;> + * <!ELEMENT xsl:stylesheet %top-level;> + * <!ATTLIST xsl:stylesheet %top-level-atts;> * - * <!ELEMENT xsl:transform %top-level;> - * <!ATTLIST xsl:transform %top-level-atts;> + * <!ELEMENT xsl:transform %top-level;> + * <!ATTLIST xsl:transform %top-level-atts;> * * </p></pre> * @see <a href="http://www.w3.org/TR/xslt#section-Stylesheet-Structure">section-Stylesheet-Structure in XSLT Specification</a> diff --git a/src/org/apache/xalan/templates/StylesheetComposed.java b/xalan/src/main/java/org/apache/xalan/templates/StylesheetComposed.java similarity index 100% rename from src/org/apache/xalan/templates/StylesheetComposed.java rename to xalan/src/main/java/org/apache/xalan/templates/StylesheetComposed.java diff --git a/src/org/apache/xalan/templates/StylesheetRoot.java b/xalan/src/main/java/org/apache/xalan/templates/StylesheetRoot.java similarity index 100% rename from src/org/apache/xalan/templates/StylesheetRoot.java rename to xalan/src/main/java/org/apache/xalan/templates/StylesheetRoot.java diff --git a/src/org/apache/xalan/templates/TemplateList.java b/xalan/src/main/java/org/apache/xalan/templates/TemplateList.java similarity index 100% rename from src/org/apache/xalan/templates/TemplateList.java rename to xalan/src/main/java/org/apache/xalan/templates/TemplateList.java diff --git a/src/org/apache/xalan/templates/TemplateSubPatternAssociation.java b/xalan/src/main/java/org/apache/xalan/templates/TemplateSubPatternAssociation.java similarity index 100% rename from src/org/apache/xalan/templates/TemplateSubPatternAssociation.java rename to xalan/src/main/java/org/apache/xalan/templates/TemplateSubPatternAssociation.java diff --git a/src/org/apache/xalan/templates/VarNameCollector.java b/xalan/src/main/java/org/apache/xalan/templates/VarNameCollector.java similarity index 100% rename from src/org/apache/xalan/templates/VarNameCollector.java rename to xalan/src/main/java/org/apache/xalan/templates/VarNameCollector.java diff --git a/src/org/apache/xalan/templates/WhiteSpaceInfo.java b/xalan/src/main/java/org/apache/xalan/templates/WhiteSpaceInfo.java similarity index 100% rename from src/org/apache/xalan/templates/WhiteSpaceInfo.java rename to xalan/src/main/java/org/apache/xalan/templates/WhiteSpaceInfo.java diff --git a/src/org/apache/xalan/templates/XMLNSDecl.java b/xalan/src/main/java/org/apache/xalan/templates/XMLNSDecl.java similarity index 100% rename from src/org/apache/xalan/templates/XMLNSDecl.java rename to xalan/src/main/java/org/apache/xalan/templates/XMLNSDecl.java diff --git a/src/org/apache/xalan/templates/XSLTVisitable.java b/xalan/src/main/java/org/apache/xalan/templates/XSLTVisitable.java similarity index 100% rename from src/org/apache/xalan/templates/XSLTVisitable.java rename to xalan/src/main/java/org/apache/xalan/templates/XSLTVisitable.java diff --git a/src/org/apache/xalan/templates/XSLTVisitor.java b/xalan/src/main/java/org/apache/xalan/templates/XSLTVisitor.java similarity index 100% rename from src/org/apache/xalan/templates/XSLTVisitor.java rename to xalan/src/main/java/org/apache/xalan/templates/XSLTVisitor.java diff --git a/src/org/apache/xalan/templates/XUnresolvedVariable.java b/xalan/src/main/java/org/apache/xalan/templates/XUnresolvedVariable.java similarity index 100% rename from src/org/apache/xalan/templates/XUnresolvedVariable.java rename to xalan/src/main/java/org/apache/xalan/templates/XUnresolvedVariable.java diff --git a/src/org/apache/xalan/templates/XUnresolvedVariableSimple.java b/xalan/src/main/java/org/apache/xalan/templates/XUnresolvedVariableSimple.java similarity index 100% rename from src/org/apache/xalan/templates/XUnresolvedVariableSimple.java rename to xalan/src/main/java/org/apache/xalan/templates/XUnresolvedVariableSimple.java diff --git a/src/org/apache/xalan/templates/package.html b/xalan/src/main/java/org/apache/xalan/templates/package.html similarity index 100% rename from src/org/apache/xalan/templates/package.html rename to xalan/src/main/java/org/apache/xalan/templates/package.html diff --git a/src/org/apache/xalan/trace/EndSelectionEvent.java b/xalan/src/main/java/org/apache/xalan/trace/EndSelectionEvent.java similarity index 100% rename from src/org/apache/xalan/trace/EndSelectionEvent.java rename to xalan/src/main/java/org/apache/xalan/trace/EndSelectionEvent.java diff --git a/src/org/apache/xalan/trace/ExtensionEvent.java b/xalan/src/main/java/org/apache/xalan/trace/ExtensionEvent.java similarity index 100% rename from src/org/apache/xalan/trace/ExtensionEvent.java rename to xalan/src/main/java/org/apache/xalan/trace/ExtensionEvent.java diff --git a/src/org/apache/xalan/trace/GenerateEvent.java b/xalan/src/main/java/org/apache/xalan/trace/GenerateEvent.java similarity index 100% rename from src/org/apache/xalan/trace/GenerateEvent.java rename to xalan/src/main/java/org/apache/xalan/trace/GenerateEvent.java diff --git a/src/org/apache/xalan/trace/PrintTraceListener.java b/xalan/src/main/java/org/apache/xalan/trace/PrintTraceListener.java similarity index 100% rename from src/org/apache/xalan/trace/PrintTraceListener.java rename to xalan/src/main/java/org/apache/xalan/trace/PrintTraceListener.java diff --git a/src/org/apache/xalan/trace/SelectionEvent.java b/xalan/src/main/java/org/apache/xalan/trace/SelectionEvent.java similarity index 100% rename from src/org/apache/xalan/trace/SelectionEvent.java rename to xalan/src/main/java/org/apache/xalan/trace/SelectionEvent.java diff --git a/src/org/apache/xalan/trace/TraceListener.java b/xalan/src/main/java/org/apache/xalan/trace/TraceListener.java similarity index 100% rename from src/org/apache/xalan/trace/TraceListener.java rename to xalan/src/main/java/org/apache/xalan/trace/TraceListener.java diff --git a/src/org/apache/xalan/trace/TraceListenerEx.java b/xalan/src/main/java/org/apache/xalan/trace/TraceListenerEx.java similarity index 100% rename from src/org/apache/xalan/trace/TraceListenerEx.java rename to xalan/src/main/java/org/apache/xalan/trace/TraceListenerEx.java diff --git a/src/org/apache/xalan/trace/TraceListenerEx2.java b/xalan/src/main/java/org/apache/xalan/trace/TraceListenerEx2.java similarity index 100% rename from src/org/apache/xalan/trace/TraceListenerEx2.java rename to xalan/src/main/java/org/apache/xalan/trace/TraceListenerEx2.java diff --git a/src/org/apache/xalan/trace/TraceListenerEx3.java b/xalan/src/main/java/org/apache/xalan/trace/TraceListenerEx3.java similarity index 100% rename from src/org/apache/xalan/trace/TraceListenerEx3.java rename to xalan/src/main/java/org/apache/xalan/trace/TraceListenerEx3.java diff --git a/src/org/apache/xalan/trace/TraceManager.java b/xalan/src/main/java/org/apache/xalan/trace/TraceManager.java similarity index 100% rename from src/org/apache/xalan/trace/TraceManager.java rename to xalan/src/main/java/org/apache/xalan/trace/TraceManager.java diff --git a/src/org/apache/xalan/trace/TracerEvent.java b/xalan/src/main/java/org/apache/xalan/trace/TracerEvent.java similarity index 100% rename from src/org/apache/xalan/trace/TracerEvent.java rename to xalan/src/main/java/org/apache/xalan/trace/TracerEvent.java diff --git a/src/org/apache/xalan/trace/package.html b/xalan/src/main/java/org/apache/xalan/trace/package.html similarity index 100% rename from src/org/apache/xalan/trace/package.html rename to xalan/src/main/java/org/apache/xalan/trace/package.html diff --git a/src/org/apache/xalan/transformer/ClonerToResultTree.java b/xalan/src/main/java/org/apache/xalan/transformer/ClonerToResultTree.java similarity index 100% rename from src/org/apache/xalan/transformer/ClonerToResultTree.java rename to xalan/src/main/java/org/apache/xalan/transformer/ClonerToResultTree.java diff --git a/src/org/apache/xalan/transformer/Counter.java b/xalan/src/main/java/org/apache/xalan/transformer/Counter.java similarity index 100% rename from src/org/apache/xalan/transformer/Counter.java rename to xalan/src/main/java/org/apache/xalan/transformer/Counter.java diff --git a/src/org/apache/xalan/transformer/CountersTable.java b/xalan/src/main/java/org/apache/xalan/transformer/CountersTable.java similarity index 100% rename from src/org/apache/xalan/transformer/CountersTable.java rename to xalan/src/main/java/org/apache/xalan/transformer/CountersTable.java diff --git a/src/org/apache/xalan/transformer/DecimalToRoman.java b/xalan/src/main/java/org/apache/xalan/transformer/DecimalToRoman.java similarity index 100% rename from src/org/apache/xalan/transformer/DecimalToRoman.java rename to xalan/src/main/java/org/apache/xalan/transformer/DecimalToRoman.java diff --git a/src/org/apache/xalan/transformer/KeyIterator.java b/xalan/src/main/java/org/apache/xalan/transformer/KeyIterator.java similarity index 100% rename from src/org/apache/xalan/transformer/KeyIterator.java rename to xalan/src/main/java/org/apache/xalan/transformer/KeyIterator.java diff --git a/src/org/apache/xalan/transformer/KeyManager.java b/xalan/src/main/java/org/apache/xalan/transformer/KeyManager.java similarity index 100% rename from src/org/apache/xalan/transformer/KeyManager.java rename to xalan/src/main/java/org/apache/xalan/transformer/KeyManager.java diff --git a/src/org/apache/xalan/transformer/KeyRefIterator.java b/xalan/src/main/java/org/apache/xalan/transformer/KeyRefIterator.java similarity index 100% rename from src/org/apache/xalan/transformer/KeyRefIterator.java rename to xalan/src/main/java/org/apache/xalan/transformer/KeyRefIterator.java diff --git a/src/org/apache/xalan/transformer/KeyTable.java b/xalan/src/main/java/org/apache/xalan/transformer/KeyTable.java similarity index 100% rename from src/org/apache/xalan/transformer/KeyTable.java rename to xalan/src/main/java/org/apache/xalan/transformer/KeyTable.java diff --git a/src/org/apache/xalan/transformer/MsgMgr.java b/xalan/src/main/java/org/apache/xalan/transformer/MsgMgr.java similarity index 100% rename from src/org/apache/xalan/transformer/MsgMgr.java rename to xalan/src/main/java/org/apache/xalan/transformer/MsgMgr.java diff --git a/src/org/apache/xalan/transformer/NodeSortKey.java b/xalan/src/main/java/org/apache/xalan/transformer/NodeSortKey.java similarity index 100% rename from src/org/apache/xalan/transformer/NodeSortKey.java rename to xalan/src/main/java/org/apache/xalan/transformer/NodeSortKey.java diff --git a/src/org/apache/xalan/transformer/NodeSorter.java b/xalan/src/main/java/org/apache/xalan/transformer/NodeSorter.java similarity index 100% rename from src/org/apache/xalan/transformer/NodeSorter.java rename to xalan/src/main/java/org/apache/xalan/transformer/NodeSorter.java diff --git a/src/org/apache/xalan/transformer/NumeratorFormatter.java b/xalan/src/main/java/org/apache/xalan/transformer/NumeratorFormatter.java similarity index 100% rename from src/org/apache/xalan/transformer/NumeratorFormatter.java rename to xalan/src/main/java/org/apache/xalan/transformer/NumeratorFormatter.java diff --git a/src/org/apache/xalan/transformer/QueuedEvents.java b/xalan/src/main/java/org/apache/xalan/transformer/QueuedEvents.java similarity index 100% rename from src/org/apache/xalan/transformer/QueuedEvents.java rename to xalan/src/main/java/org/apache/xalan/transformer/QueuedEvents.java diff --git a/src/org/apache/xalan/transformer/ResultNameSpace.java b/xalan/src/main/java/org/apache/xalan/transformer/ResultNameSpace.java similarity index 100% rename from src/org/apache/xalan/transformer/ResultNameSpace.java rename to xalan/src/main/java/org/apache/xalan/transformer/ResultNameSpace.java diff --git a/src/org/apache/xalan/transformer/SerializerSwitcher.java b/xalan/src/main/java/org/apache/xalan/transformer/SerializerSwitcher.java similarity index 100% rename from src/org/apache/xalan/transformer/SerializerSwitcher.java rename to xalan/src/main/java/org/apache/xalan/transformer/SerializerSwitcher.java diff --git a/src/org/apache/xalan/transformer/StackGuard.java b/xalan/src/main/java/org/apache/xalan/transformer/StackGuard.java similarity index 100% rename from src/org/apache/xalan/transformer/StackGuard.java rename to xalan/src/main/java/org/apache/xalan/transformer/StackGuard.java diff --git a/src/org/apache/xalan/transformer/TrAXFilter.java b/xalan/src/main/java/org/apache/xalan/transformer/TrAXFilter.java similarity index 100% rename from src/org/apache/xalan/transformer/TrAXFilter.java rename to xalan/src/main/java/org/apache/xalan/transformer/TrAXFilter.java diff --git a/src/org/apache/xalan/transformer/TransformSnapshot.java b/xalan/src/main/java/org/apache/xalan/transformer/TransformSnapshot.java similarity index 100% rename from src/org/apache/xalan/transformer/TransformSnapshot.java rename to xalan/src/main/java/org/apache/xalan/transformer/TransformSnapshot.java diff --git a/src/org/apache/xalan/transformer/TransformSnapshotImpl.java b/xalan/src/main/java/org/apache/xalan/transformer/TransformSnapshotImpl.java similarity index 100% rename from src/org/apache/xalan/transformer/TransformSnapshotImpl.java rename to xalan/src/main/java/org/apache/xalan/transformer/TransformSnapshotImpl.java diff --git a/src/org/apache/xalan/transformer/TransformState.java b/xalan/src/main/java/org/apache/xalan/transformer/TransformState.java similarity index 100% rename from src/org/apache/xalan/transformer/TransformState.java rename to xalan/src/main/java/org/apache/xalan/transformer/TransformState.java diff --git a/src/org/apache/xalan/transformer/TransformerClient.java b/xalan/src/main/java/org/apache/xalan/transformer/TransformerClient.java similarity index 100% rename from src/org/apache/xalan/transformer/TransformerClient.java rename to xalan/src/main/java/org/apache/xalan/transformer/TransformerClient.java diff --git a/src/org/apache/xalan/transformer/TransformerHandlerImpl.java b/xalan/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java similarity index 100% rename from src/org/apache/xalan/transformer/TransformerHandlerImpl.java rename to xalan/src/main/java/org/apache/xalan/transformer/TransformerHandlerImpl.java diff --git a/src/org/apache/xalan/transformer/TransformerIdentityImpl.java b/xalan/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java similarity index 100% rename from src/org/apache/xalan/transformer/TransformerIdentityImpl.java rename to xalan/src/main/java/org/apache/xalan/transformer/TransformerIdentityImpl.java diff --git a/src/org/apache/xalan/transformer/TransformerImpl.java b/xalan/src/main/java/org/apache/xalan/transformer/TransformerImpl.java similarity index 100% rename from src/org/apache/xalan/transformer/TransformerImpl.java rename to xalan/src/main/java/org/apache/xalan/transformer/TransformerImpl.java diff --git a/src/org/apache/xalan/transformer/TreeWalker2Result.java b/xalan/src/main/java/org/apache/xalan/transformer/TreeWalker2Result.java similarity index 98% rename from src/org/apache/xalan/transformer/TreeWalker2Result.java rename to xalan/src/main/java/org/apache/xalan/transformer/TreeWalker2Result.java index 453059bb9..fcb0d6cff 100644 --- a/src/org/apache/xalan/transformer/TreeWalker2Result.java +++ b/xalan/src/main/java/org/apache/xalan/transformer/TreeWalker2Result.java @@ -25,6 +25,7 @@ import org.apache.xml.dtm.ref.DTMTreeWalker; import org.apache.xml.serializer.SerializationHandler; import org.apache.xpath.XPathContext; +import javax.xml.transform.TransformerException; /** * Handle a walk of a tree, but screen out attributes for diff --git a/src/org/apache/xalan/transformer/XSLInfiniteLoopException.java b/xalan/src/main/java/org/apache/xalan/transformer/XSLInfiniteLoopException.java similarity index 100% rename from src/org/apache/xalan/transformer/XSLInfiniteLoopException.java rename to xalan/src/main/java/org/apache/xalan/transformer/XSLInfiniteLoopException.java diff --git a/src/org/apache/xalan/transformer/XalanProperties.java b/xalan/src/main/java/org/apache/xalan/transformer/XalanProperties.java similarity index 100% rename from src/org/apache/xalan/transformer/XalanProperties.java rename to xalan/src/main/java/org/apache/xalan/transformer/XalanProperties.java diff --git a/src/org/apache/xalan/transformer/XalanTransformState.java b/xalan/src/main/java/org/apache/xalan/transformer/XalanTransformState.java similarity index 100% rename from src/org/apache/xalan/transformer/XalanTransformState.java rename to xalan/src/main/java/org/apache/xalan/transformer/XalanTransformState.java diff --git a/src/org/apache/xalan/transformer/package.html b/xalan/src/main/java/org/apache/xalan/transformer/package.html similarity index 100% rename from src/org/apache/xalan/transformer/package.html rename to xalan/src/main/java/org/apache/xalan/transformer/package.html diff --git a/src/org/apache/xalan/xslt/EnvironmentCheck.java b/xalan/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java similarity index 100% rename from src/org/apache/xalan/xslt/EnvironmentCheck.java rename to xalan/src/main/java/org/apache/xalan/xslt/EnvironmentCheck.java diff --git a/src/org/apache/xalan/xslt/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/xslt/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/xslt/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/xslt/ObjectFactory.java diff --git a/src/org/apache/xalan/xslt/Process.java b/xalan/src/main/java/org/apache/xalan/xslt/Process.java similarity index 100% rename from src/org/apache/xalan/xslt/Process.java rename to xalan/src/main/java/org/apache/xalan/xslt/Process.java diff --git a/src/org/apache/xalan/xslt/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/xslt/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/xslt/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/xslt/SecuritySupport.java diff --git a/src/org/apache/xalan/xslt/package.html b/xalan/src/main/java/org/apache/xalan/xslt/package.html similarity index 100% rename from src/org/apache/xalan/xslt/package.html rename to xalan/src/main/java/org/apache/xalan/xslt/package.html diff --git a/src/org/apache/xalan/xslt/util/XslTransformErrorLocatorHelper.java b/xalan/src/main/java/org/apache/xalan/xslt/util/XslTransformErrorLocatorHelper.java similarity index 100% rename from src/org/apache/xalan/xslt/util/XslTransformErrorLocatorHelper.java rename to xalan/src/main/java/org/apache/xalan/xslt/util/XslTransformErrorLocatorHelper.java diff --git a/src/org/apache/xalan/xsltc/CollatorFactory.java b/xalan/src/main/java/org/apache/xalan/xsltc/CollatorFactory.java similarity index 100% rename from src/org/apache/xalan/xsltc/CollatorFactory.java rename to xalan/src/main/java/org/apache/xalan/xsltc/CollatorFactory.java diff --git a/src/org/apache/xalan/xsltc/DOM.java b/xalan/src/main/java/org/apache/xalan/xsltc/DOM.java similarity index 100% rename from src/org/apache/xalan/xsltc/DOM.java rename to xalan/src/main/java/org/apache/xalan/xsltc/DOM.java diff --git a/src/org/apache/xalan/xsltc/DOMCache.java b/xalan/src/main/java/org/apache/xalan/xsltc/DOMCache.java similarity index 100% rename from src/org/apache/xalan/xsltc/DOMCache.java rename to xalan/src/main/java/org/apache/xalan/xsltc/DOMCache.java diff --git a/src/org/apache/xalan/xsltc/DOMEnhancedForDTM.java b/xalan/src/main/java/org/apache/xalan/xsltc/DOMEnhancedForDTM.java similarity index 100% rename from src/org/apache/xalan/xsltc/DOMEnhancedForDTM.java rename to xalan/src/main/java/org/apache/xalan/xsltc/DOMEnhancedForDTM.java diff --git a/src/org/apache/xalan/xsltc/NodeIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/NodeIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/NodeIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/NodeIterator.java diff --git a/src/org/apache/xalan/xsltc/ProcessorVersion.java b/xalan/src/main/java/org/apache/xalan/xsltc/ProcessorVersion.java similarity index 93% rename from src/org/apache/xalan/xsltc/ProcessorVersion.java rename to xalan/src/main/java/org/apache/xalan/xsltc/ProcessorVersion.java index 43c411f3d..33120f636 100644 --- a/src/org/apache/xalan/xsltc/ProcessorVersion.java +++ b/xalan/src/main/java/org/apache/xalan/xsltc/ProcessorVersion.java @@ -35,6 +35,10 @@ * architectural changes. MINOR field goes to zero * and MAJOR is incremented such as: {...,1.1.14,1.2,2.0} * Stability of a release follows: X.0 > X.X > X.X.X + * + * Futurework: have this read version info from jar manifest, + * pom.properties, and/or a file updated during maven build. + * * @author G. Todd Miller */ public class ProcessorVersion { diff --git a/src/org/apache/xalan/xsltc/StripFilter.java b/xalan/src/main/java/org/apache/xalan/xsltc/StripFilter.java similarity index 100% rename from src/org/apache/xalan/xsltc/StripFilter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/StripFilter.java diff --git a/src/org/apache/xalan/xsltc/Translet.java b/xalan/src/main/java/org/apache/xalan/xsltc/Translet.java similarity index 100% rename from src/org/apache/xalan/xsltc/Translet.java rename to xalan/src/main/java/org/apache/xalan/xsltc/Translet.java diff --git a/src/org/apache/xalan/xsltc/TransletException.java b/xalan/src/main/java/org/apache/xalan/xsltc/TransletException.java similarity index 100% rename from src/org/apache/xalan/xsltc/TransletException.java rename to xalan/src/main/java/org/apache/xalan/xsltc/TransletException.java diff --git a/src/org/apache/xalan/xsltc/cmdline/Compile.java b/xalan/src/main/java/org/apache/xalan/xsltc/cmdline/Compile.java similarity index 100% rename from src/org/apache/xalan/xsltc/cmdline/Compile.java rename to xalan/src/main/java/org/apache/xalan/xsltc/cmdline/Compile.java diff --git a/src/org/apache/xalan/xsltc/cmdline/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/xsltc/cmdline/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/xsltc/cmdline/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/xsltc/cmdline/ObjectFactory.java diff --git a/src/org/apache/xalan/xsltc/cmdline/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/xsltc/cmdline/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/xsltc/cmdline/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/xsltc/cmdline/SecuritySupport.java diff --git a/src/org/apache/xalan/xsltc/cmdline/Transform.java b/xalan/src/main/java/org/apache/xalan/xsltc/cmdline/Transform.java similarity index 100% rename from src/org/apache/xalan/xsltc/cmdline/Transform.java rename to xalan/src/main/java/org/apache/xalan/xsltc/cmdline/Transform.java diff --git a/src/org/apache/xalan/xsltc/cmdline/getopt/GetOpt.java b/xalan/src/main/java/org/apache/xalan/xsltc/cmdline/getopt/GetOpt.java similarity index 100% rename from src/org/apache/xalan/xsltc/cmdline/getopt/GetOpt.java rename to xalan/src/main/java/org/apache/xalan/xsltc/cmdline/getopt/GetOpt.java diff --git a/src/org/apache/xalan/xsltc/cmdline/getopt/GetOptsException.java b/xalan/src/main/java/org/apache/xalan/xsltc/cmdline/getopt/GetOptsException.java similarity index 100% rename from src/org/apache/xalan/xsltc/cmdline/getopt/GetOptsException.java rename to xalan/src/main/java/org/apache/xalan/xsltc/cmdline/getopt/GetOptsException.java diff --git a/src/org/apache/xalan/xsltc/cmdline/getopt/IllegalArgumentException.java b/xalan/src/main/java/org/apache/xalan/xsltc/cmdline/getopt/IllegalArgumentException.java similarity index 100% rename from src/org/apache/xalan/xsltc/cmdline/getopt/IllegalArgumentException.java rename to xalan/src/main/java/org/apache/xalan/xsltc/cmdline/getopt/IllegalArgumentException.java diff --git a/src/org/apache/xalan/xsltc/cmdline/getopt/MissingOptArgException.java b/xalan/src/main/java/org/apache/xalan/xsltc/cmdline/getopt/MissingOptArgException.java similarity index 100% rename from src/org/apache/xalan/xsltc/cmdline/getopt/MissingOptArgException.java rename to xalan/src/main/java/org/apache/xalan/xsltc/cmdline/getopt/MissingOptArgException.java diff --git a/src/org/apache/xalan/xsltc/compiler/AbsoluteLocationPath.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/AbsoluteLocationPath.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/AbsoluteLocationPath.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/AbsoluteLocationPath.java diff --git a/src/org/apache/xalan/xsltc/compiler/AbsolutePathPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/AbsolutePathPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/AbsolutePathPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/AbsolutePathPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/AlternativePattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/AlternativePattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/AlternativePattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/AlternativePattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/AncestorPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/AncestorPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/AncestorPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/AncestorPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/ApplyImports.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ApplyImports.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ApplyImports.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ApplyImports.java diff --git a/src/org/apache/xalan/xsltc/compiler/ApplyTemplates.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ApplyTemplates.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ApplyTemplates.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ApplyTemplates.java diff --git a/src/org/apache/xalan/xsltc/compiler/ArgumentList.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ArgumentList.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ArgumentList.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ArgumentList.java diff --git a/src/org/apache/xalan/xsltc/compiler/Attribute.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Attribute.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Attribute.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Attribute.java diff --git a/src/org/apache/xalan/xsltc/compiler/AttributeSet.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/AttributeSet.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/AttributeSet.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/AttributeSet.java diff --git a/src/org/apache/xalan/xsltc/compiler/AttributeValue.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/AttributeValue.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/AttributeValue.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/AttributeValue.java diff --git a/src/org/apache/xalan/xsltc/compiler/AttributeValueTemplate.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/AttributeValueTemplate.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/AttributeValueTemplate.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/AttributeValueTemplate.java diff --git a/src/org/apache/xalan/xsltc/compiler/BinOpExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/BinOpExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/BinOpExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/BinOpExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/BooleanCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/BooleanCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/BooleanCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/BooleanCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/BooleanExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/BooleanExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/BooleanExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/BooleanExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/CallTemplate.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/CallTemplate.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/CallTemplate.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/CallTemplate.java diff --git a/src/org/apache/xalan/xsltc/compiler/CastCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/CastCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/CastCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/CastCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/CastExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/CastExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/CastExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/CastExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/CeilingCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/CeilingCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/CeilingCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/CeilingCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/Choose.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Choose.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Choose.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Choose.java diff --git a/src/org/apache/xalan/xsltc/compiler/Closure.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Closure.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Closure.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Closure.java diff --git a/src/org/apache/xalan/xsltc/compiler/Comment.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Comment.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Comment.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Comment.java diff --git a/src/org/apache/xalan/xsltc/compiler/CompilerException.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/CompilerException.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/CompilerException.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/CompilerException.java diff --git a/src/org/apache/xalan/xsltc/compiler/ConcatCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ConcatCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ConcatCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ConcatCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/Constants.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Constants.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Constants.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Constants.java diff --git a/src/org/apache/xalan/xsltc/compiler/ContainsCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ContainsCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ContainsCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ContainsCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/Copy.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Copy.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Copy.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Copy.java diff --git a/src/org/apache/xalan/xsltc/compiler/CopyOf.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/CopyOf.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/CopyOf.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/CopyOf.java diff --git a/src/org/apache/xalan/xsltc/compiler/CurrentCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/CurrentCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/CurrentCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/CurrentCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/DecimalFormatting.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/DecimalFormatting.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/DecimalFormatting.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/DecimalFormatting.java diff --git a/src/org/apache/xalan/xsltc/compiler/DocumentCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/DocumentCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/DocumentCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/DocumentCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/ElementAvailableCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ElementAvailableCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ElementAvailableCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ElementAvailableCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/EqualityExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/EqualityExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/EqualityExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/EqualityExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/Expression.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Expression.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Expression.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Expression.java diff --git a/src/org/apache/xalan/xsltc/compiler/Fallback.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Fallback.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Fallback.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Fallback.java diff --git a/src/org/apache/xalan/xsltc/compiler/FilterExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/FilterExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/FilterExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/FilterExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/FilterParentPath.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/FilterParentPath.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/FilterParentPath.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/FilterParentPath.java diff --git a/src/org/apache/xalan/xsltc/compiler/FilteredAbsoluteLocationPath.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/FilteredAbsoluteLocationPath.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/FilteredAbsoluteLocationPath.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/FilteredAbsoluteLocationPath.java diff --git a/src/org/apache/xalan/xsltc/compiler/FloorCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/FloorCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/FloorCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/FloorCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/FlowList.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/FlowList.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/FlowList.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/FlowList.java diff --git a/src/org/apache/xalan/xsltc/compiler/ForEach.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ForEach.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ForEach.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ForEach.java diff --git a/src/org/apache/xalan/xsltc/compiler/FormatNumberCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/FormatNumberCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/FormatNumberCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/FormatNumberCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/FunctionAvailableCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/FunctionAvailableCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/FunctionAvailableCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/FunctionAvailableCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/FunctionCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/FunctionCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/FunctionCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/FunctionCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/GenerateIdCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/GenerateIdCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/GenerateIdCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/GenerateIdCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/IdKeyPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/IdKeyPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/IdKeyPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/IdKeyPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/IdPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/IdPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/IdPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/IdPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/If.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/If.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/If.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/If.java diff --git a/src/org/apache/xalan/xsltc/compiler/IllegalCharException.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/IllegalCharException.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/IllegalCharException.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/IllegalCharException.java diff --git a/src/org/apache/xalan/xsltc/compiler/Import.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Import.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Import.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Import.java diff --git a/src/org/apache/xalan/xsltc/compiler/Include.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Include.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Include.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Include.java diff --git a/src/org/apache/xalan/xsltc/compiler/Instruction.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Instruction.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Instruction.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Instruction.java diff --git a/src/org/apache/xalan/xsltc/compiler/IntExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/IntExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/IntExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/IntExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/Key.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Key.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Key.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Key.java diff --git a/src/org/apache/xalan/xsltc/compiler/KeyCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/KeyCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/KeyCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/KeyCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/KeyPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/KeyPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/KeyPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/KeyPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/LangCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/LangCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/LangCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/LangCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/LastCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/LastCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/LastCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/LastCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/LiteralAttribute.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/LiteralAttribute.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/LiteralAttribute.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/LiteralAttribute.java diff --git a/src/org/apache/xalan/xsltc/compiler/LiteralElement.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/LiteralElement.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/LiteralElement.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/LiteralElement.java diff --git a/src/org/apache/xalan/xsltc/compiler/LiteralExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/LiteralExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/LiteralExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/LiteralExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/LocalNameCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/LocalNameCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/LocalNameCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/LocalNameCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/LocationPathPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/LocationPathPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/LocationPathPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/LocationPathPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/LogicalExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/LogicalExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/LogicalExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/LogicalExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/Makefile.inc b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Makefile.inc similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Makefile.inc rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Makefile.inc diff --git a/src/org/apache/xalan/xsltc/compiler/Message.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Message.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Message.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Message.java diff --git a/src/org/apache/xalan/xsltc/compiler/Mode.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Mode.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Mode.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Mode.java diff --git a/src/org/apache/xalan/xsltc/compiler/NameBase.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/NameBase.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/NameBase.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/NameBase.java diff --git a/src/org/apache/xalan/xsltc/compiler/NameCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/NameCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/NameCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/NameCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/NamespaceAlias.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/NamespaceAlias.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/NamespaceAlias.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/NamespaceAlias.java diff --git a/src/org/apache/xalan/xsltc/compiler/NamespaceUriCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/NamespaceUriCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/NamespaceUriCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/NamespaceUriCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/NodeTest.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/NodeTest.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/NodeTest.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/NodeTest.java diff --git a/src/org/apache/xalan/xsltc/compiler/NotCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/NotCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/NotCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/NotCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/Number.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Number.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Number.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Number.java diff --git a/src/org/apache/xalan/xsltc/compiler/NumberCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/NumberCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/NumberCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/NumberCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ObjectFactory.java diff --git a/src/org/apache/xalan/xsltc/compiler/Otherwise.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Otherwise.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Otherwise.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Otherwise.java diff --git a/src/org/apache/xalan/xsltc/compiler/Output.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Output.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Output.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Output.java diff --git a/src/org/apache/xalan/xsltc/compiler/Param.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Param.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Param.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Param.java diff --git a/src/org/apache/xalan/xsltc/compiler/ParameterRef.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ParameterRef.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ParameterRef.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ParameterRef.java diff --git a/src/org/apache/xalan/xsltc/compiler/ParentLocationPath.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ParentLocationPath.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ParentLocationPath.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ParentLocationPath.java diff --git a/src/org/apache/xalan/xsltc/compiler/ParentPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ParentPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ParentPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ParentPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/Parser.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Parser.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Parser.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Parser.java diff --git a/src/org/apache/xalan/xsltc/compiler/Pattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Pattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Pattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Pattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/PositionCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/PositionCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/PositionCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/PositionCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/Predicate.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Predicate.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Predicate.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Predicate.java diff --git a/src/org/apache/xalan/xsltc/compiler/ProcessingInstruction.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ProcessingInstruction.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ProcessingInstruction.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ProcessingInstruction.java diff --git a/src/org/apache/xalan/xsltc/compiler/ProcessingInstructionPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ProcessingInstructionPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ProcessingInstructionPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ProcessingInstructionPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/QName.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/QName.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/QName.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/QName.java diff --git a/src/org/apache/xalan/xsltc/compiler/RealExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/RealExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/RealExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/RealExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/RelationalExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/RelationalExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/RelationalExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/RelationalExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/RelativeLocationPath.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/RelativeLocationPath.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/RelativeLocationPath.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/RelativeLocationPath.java diff --git a/src/org/apache/xalan/xsltc/compiler/RelativePathPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/RelativePathPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/RelativePathPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/RelativePathPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/RoundCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/RoundCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/RoundCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/RoundCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/SecuritySupport.java diff --git a/src/org/apache/xalan/xsltc/compiler/SimpleAttributeValue.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/SimpleAttributeValue.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/SimpleAttributeValue.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/SimpleAttributeValue.java diff --git a/src/org/apache/xalan/xsltc/compiler/Sort.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Sort.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Sort.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Sort.java diff --git a/src/org/apache/xalan/xsltc/compiler/SourceLoader.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/SourceLoader.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/SourceLoader.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/SourceLoader.java diff --git a/src/org/apache/xalan/xsltc/compiler/StartsWithCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/StartsWithCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/StartsWithCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/StartsWithCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/Step.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Step.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Step.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Step.java diff --git a/src/org/apache/xalan/xsltc/compiler/StepPattern.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/StepPattern.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/StepPattern.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/StepPattern.java diff --git a/src/org/apache/xalan/xsltc/compiler/StringCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/StringCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/StringCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/StringCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/StringLengthCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/StringLengthCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/StringLengthCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/StringLengthCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/Stylesheet.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Stylesheet.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Stylesheet.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Stylesheet.java diff --git a/src/org/apache/xalan/xsltc/compiler/SymbolTable.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/SymbolTable.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/SymbolTable.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/SymbolTable.java diff --git a/src/org/apache/xalan/xsltc/compiler/SyntaxTreeNode.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/SyntaxTreeNode.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/SyntaxTreeNode.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/SyntaxTreeNode.java diff --git a/src/org/apache/xalan/xsltc/compiler/Template.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Template.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Template.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Template.java diff --git a/src/org/apache/xalan/xsltc/compiler/TestSeq.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/TestSeq.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/TestSeq.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/TestSeq.java diff --git a/src/org/apache/xalan/xsltc/compiler/Text.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Text.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Text.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Text.java diff --git a/src/org/apache/xalan/xsltc/compiler/TopLevelElement.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/TopLevelElement.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/TopLevelElement.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/TopLevelElement.java diff --git a/src/org/apache/xalan/xsltc/compiler/TransletOutput.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/TransletOutput.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/TransletOutput.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/TransletOutput.java diff --git a/src/org/apache/xalan/xsltc/compiler/UnaryOpExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnaryOpExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/UnaryOpExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnaryOpExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/UnionPathExpr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnionPathExpr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/UnionPathExpr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnionPathExpr.java diff --git a/src/org/apache/xalan/xsltc/compiler/UnparsedEntityUriCall.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnparsedEntityUriCall.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/UnparsedEntityUriCall.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnparsedEntityUriCall.java diff --git a/src/org/apache/xalan/xsltc/compiler/UnresolvedRef.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnresolvedRef.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/UnresolvedRef.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnresolvedRef.java diff --git a/src/org/apache/xalan/xsltc/compiler/UnsupportedElement.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnsupportedElement.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/UnsupportedElement.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/UnsupportedElement.java diff --git a/src/org/apache/xalan/xsltc/compiler/UseAttributeSets.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/UseAttributeSets.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/UseAttributeSets.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/UseAttributeSets.java diff --git a/src/org/apache/xalan/xsltc/compiler/ValueOf.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/ValueOf.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/ValueOf.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/ValueOf.java diff --git a/src/org/apache/xalan/xsltc/compiler/Variable.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Variable.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Variable.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Variable.java diff --git a/src/org/apache/xalan/xsltc/compiler/VariableBase.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/VariableBase.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/VariableBase.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/VariableBase.java diff --git a/src/org/apache/xalan/xsltc/compiler/VariableRef.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/VariableRef.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/VariableRef.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/VariableRef.java diff --git a/src/org/apache/xalan/xsltc/compiler/VariableRefBase.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/VariableRefBase.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/VariableRefBase.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/VariableRefBase.java diff --git a/src/org/apache/xalan/xsltc/compiler/When.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/When.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/When.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/When.java diff --git a/src/org/apache/xalan/xsltc/compiler/Whitespace.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/Whitespace.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/Whitespace.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/Whitespace.java diff --git a/src/org/apache/xalan/xsltc/compiler/WithParam.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/WithParam.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/WithParam.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/WithParam.java diff --git a/src/org/apache/xalan/xsltc/compiler/XSLTC.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/XSLTC.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/XSLTC.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/XSLTC.java diff --git a/src/org/apache/xalan/xsltc/compiler/XslAttribute.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/XslAttribute.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/XslAttribute.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/XslAttribute.java diff --git a/src/org/apache/xalan/xsltc/compiler/XslElement.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/XslElement.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/XslElement.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/XslElement.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/AttributeSetMethodGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/AttributeSetMethodGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/AttributeSetMethodGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/AttributeSetMethodGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/BooleanType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/BooleanType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/BooleanType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/BooleanType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ClassGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ClassGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ClassGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ClassGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/CompareGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/CompareGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/CompareGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/CompareGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ca.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ca.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ca.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ca.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_cs.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_cs.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_cs.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_cs.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_de.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_de.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_de.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_de.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_es.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_es.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_es.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_es.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_fr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_fr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_fr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_fr.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_hu.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_hu.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_hu.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_hu.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_it.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_it.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_it.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_it.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ja.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ja.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ja.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ja.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ko.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ko.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ko.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ko.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_no.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_no.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_no.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_no.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_pl.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_pl.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_pl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_pl.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_pt_BR.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_pt_BR.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_pt_BR.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_pt_BR.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ru.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ru.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ru.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_ru.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_sk.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_sk.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_sk.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_sk.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_sl.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_sl.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_sl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_sl.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_tr.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_tr.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_tr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_tr.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_zh.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_zh.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_zh.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_zh.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_zh_TW.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_zh_TW.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMessages_zh_TW.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMessages_zh_TW.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ErrorMsg.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/FilterGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/FilterGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/FilterGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/FilterGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/IntType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/IntType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/IntType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/IntType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/InternalError.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/InternalError.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/InternalError.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/InternalError.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/MarkerInstruction.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MarkerInstruction.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/MarkerInstruction.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MarkerInstruction.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/MatchGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MatchGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/MatchGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MatchGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/MethodGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MethodGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/MethodGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MethodGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/MethodType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MethodType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/MethodType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MethodType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/MultiHashtable.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MultiHashtable.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/MultiHashtable.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/MultiHashtable.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/NamedMethodGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NamedMethodGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/NamedMethodGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NamedMethodGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/NodeCounterGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeCounterGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/NodeCounterGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeCounterGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/NodeSetType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeSetType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/NodeSetType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeSetType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/NodeSortRecordFactGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeSortRecordFactGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/NodeSortRecordFactGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeSortRecordFactGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/NodeSortRecordGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeSortRecordGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/NodeSortRecordGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeSortRecordGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/NodeType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/NodeType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NodeType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/NumberType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NumberType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/NumberType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/NumberType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ObjectFactory.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ObjectType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ObjectType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ObjectType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ObjectType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/OutlineableChunkEnd.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/OutlineableChunkEnd.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/OutlineableChunkEnd.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/OutlineableChunkEnd.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/OutlineableChunkStart.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/OutlineableChunkStart.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/OutlineableChunkStart.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/OutlineableChunkStart.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/RealType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/RealType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/RealType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/RealType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ReferenceType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ReferenceType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ReferenceType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ReferenceType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/ResultTreeType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ResultTreeType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/ResultTreeType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/ResultTreeType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/RtMethodGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/RtMethodGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/RtMethodGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/RtMethodGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/SecuritySupport.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/SlotAllocator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/SlotAllocator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/SlotAllocator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/SlotAllocator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/StringStack.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/StringStack.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/StringStack.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/StringStack.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/StringType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/StringType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/StringType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/StringType.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/TestGenerator.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/TestGenerator.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/TestGenerator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/TestGenerator.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/Type.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/Type.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/Type.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/Type.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/TypeCheckError.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/TypeCheckError.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/TypeCheckError.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/TypeCheckError.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/Util.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/Util.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/Util.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/Util.java diff --git a/src/org/apache/xalan/xsltc/compiler/util/VoidType.java b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/VoidType.java similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/util/VoidType.java rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/util/VoidType.java diff --git a/src/org/apache/xalan/xsltc/compiler/xpath.cup b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/xpath.cup similarity index 100% rename from src/org/apache/xalan/xsltc/compiler/xpath.cup rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/xpath.cup diff --git a/src/org/apache/xalan/xsltc/compiler/xpath.lex b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/xpath.lex similarity index 78% rename from src/org/apache/xalan/xsltc/compiler/xpath.lex rename to xalan/src/main/java/org/apache/xalan/xsltc/compiler/xpath.lex index e37194154..7008db280 100644 --- a/src/org/apache/xalan/xsltc/compiler/xpath.lex +++ b/xalan/src/main/java/org/apache/xalan/xsltc/compiler/xpath.lex @@ -14,6 +14,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +/* Modified from Jlex manual lookahead to JFlex RE LA */ /* * $Id$ */ @@ -22,7 +23,7 @@ * @author Jacek Ambroziak * @author Santiago Pericas-Geertsen * @author Morten Jorgensen - * + * @author Joseph Kesselman */ package org.apache.xalan.xsltc.compiler; @@ -46,29 +47,10 @@ import java_cup.runtime.Symbol; } /** - * If symbol is not followed by '::' or '(', then treat it as a + * Lookahead disambiguation is now handled in the patterns: If + * symbol is not followed by '::' or '(', then treat it as a * name instead of an axis or function (Jira-1912). - */ - Symbol disambiguateAxisOrFunction(int ss) throws Exception { - // Peek in the input buffer without changing the internal state - int index = yy_buffer_index; - - // Skip whitespace - while (index < yy_buffer_read && isWhitespace(yy_buffer[index])) { - index++; - } - - // If end of buffer, can't disambiguate :( - if (index >= yy_buffer_read) { - // Can't disambiguate, so return as symbol - return new Symbol(ss); - } - - // Return symbol if next token is '::' or '(' - return (yy_buffer[index] == ':' && yy_buffer[index+1] == ':' || - yy_buffer[index] == '(') ? - newSymbol(ss) : newSymbol(sym.QNAME, yytext()); - } + */ /** * If symbol is first token or if it follows any of the operators @@ -189,6 +171,8 @@ HighSurrogate=[\uD800-\uDBFF] LowSurrogate=[\uDC00-\uDFFF] +%state COMMENT + %% "*" { return disambiguateStar(); } @@ -210,32 +194,66 @@ LowSurrogate=[\uDC00-\uDFFF] ">" { return newSymbol(sym.GT); } "<=" { return newSymbol(sym.LE); } ">=" { return newSymbol(sym.GE); } -"id" { return disambiguateAxisOrFunction(sym.ID); } -"key" { return disambiguateAxisOrFunction(sym.KEY); } -"text()" { return newSymbol(sym.TEXT); } -"text"+[ \t\r\n\f]+"()" { return newSymbol(sym.TEXT); } -"node()" { return newSymbol(sym.NODE); } -"node"+[ \t\r\n\f]+"()" { return newSymbol(sym.NODE); } -"comment()" { return newSymbol(sym.COMMENT); } -"comment"+[ \t\r\n\f]+"()" { return newSymbol(sym.COMMENT); } -"processing-instruction" { return disambiguateAxisOrFunction(sym.PIPARAM); } -"processing-instruction()" { return newSymbol(sym.PI); } -"processing-instruction"+[ \t\r\n\f]+"()" { return newSymbol(sym.PI); } -"or" { return disambiguateOperator(sym.OR); } -"and" { return disambiguateOperator(sym.AND); } -"child" { return disambiguateAxisOrFunction(sym.CHILD); } -"attribute" { return disambiguateAxisOrFunction(sym.ATTRIBUTE); } -"ancestor" { return disambiguateAxisOrFunction(sym.ANCESTOR); } -"ancestor-or-self" { return disambiguateAxisOrFunction(sym.ANCESTORORSELF); } -"descendant" { return disambiguateAxisOrFunction(sym.DESCENDANT); } -"descendant-or-self" { return disambiguateAxisOrFunction(sym.DESCENDANTORSELF); } -"following" { return disambiguateAxisOrFunction(sym.FOLLOWING); } -"following-sibling" { return disambiguateAxisOrFunction(sym.FOLLOWINGSIBLING); } -"namespace" { return disambiguateAxisOrFunction(sym.NAMESPACE); } -"parent" { return disambiguateAxisOrFunction(sym.PARENT); } -"preceding" { return disambiguateAxisOrFunction(sym.PRECEDING); } -"preceding-sibling" { return disambiguateAxisOrFunction(sym.PRECEDINGSIBLING); } -"self" { return disambiguateAxisOrFunction(sym.SELF); } + +"id"/\s*"(" { return newSymbol(sym.ID); } +"id"/\s*"::" { return newSymbol(sym.ID); } + +"key"/\s*"(" { return newSymbol(sym.KEY); } +"key"/\s*"::" { return newSymbol(sym.KEY); } + +"text"\s*"()" { return newSymbol(sym.TEXT); } +"node"\s*"()" { return newSymbol(sym.NODE); } +"comment"\s*"()" { return newSymbol(sym.COMMENT); } + +"processing-instruction"\s*"()" { return newSymbol(sym.PI); } +/* NOTE: This may be redundent with next rule. */ +"processing-instruction"/\s*"::" { return newSymbol(sym.PIPARAM); } +/* NOTE PI's departure from usual fallthrough (QNAME) */ +"processing-instruction" { return newSymbol(sym.PIPARAM); } + +"or" { return disambiguateOperator(sym.OR); } +"and" { return disambiguateOperator(sym.AND); } + +"child"/\s*"(" { return newSymbol(sym.CHILD); } +"child"/\s*"::" { return newSymbol(sym.CHILD); } + + +"attribute"/\s*"::" { return newSymbol(sym.ATTRIBUTE); } +"attribute"/\s*"(" { return newSymbol(sym.ATTRIBUTE); } + +"ancestor"/\s*"::" { return newSymbol(sym.ANCESTOR); } +"ancestor"/\s*"(" { return newSymbol(sym.ANCESTOR); } + +"ancestor-or-self"/\s*"::" { return newSymbol(sym.ANCESTORORSELF); } +"ancestor-or-self"/\s*"(" { return newSymbol(sym.ANCESTORORSELF); } + +"descendant"/\s*"::" { return newSymbol(sym.DESCENDANT); } +"descendant"/\s*"(" { return newSymbol(sym.DESCENDANT); } + +"descendant-or-self"/\s*"::" { return newSymbol(sym.DESCENDANTORSELF); } +"descendant-or-self"/\s*"(" { return newSymbol(sym.DESCENDANTORSELF); } + +"following"/\s*"::" { return newSymbol(sym.FOLLOWING); } +"following"/\s*"(" { return newSymbol(sym.FOLLOWING); } + +"following-sibling"/\s*"::" { return newSymbol(sym.FOLLOWINGSIBLING); } +"following-sibling"/\s*"(" { return newSymbol(sym.FOLLOWINGSIBLING); } + +"namespace"/\s*"::" { return newSymbol(sym.NAMESPACE); } +"namespace"/\s*"(" { return newSymbol(sym.NAMESPACE); } + +"parent"/\s*"::" { return newSymbol(sym.PARENT); } +"parent"/\s*"(" { return newSymbol(sym.PARENT); } + +"preceding"/\s*"::" { return newSymbol(sym.PRECEDING); } +"preceding"/\s*"(" { return newSymbol(sym.PRECEDING); } + +"preceding-sibling"/\s*"::" { return newSymbol(sym.PRECEDINGSIBLING); } +"preceding-sibling"/\s*"(" { return newSymbol(sym.PRECEDINGSIBLING); } + +"self"/\s*"::" { return newSymbol(sym.SELF); } +"self"/\s*"(" { return newSymbol(sym.SELF); } + "[" { return newSymbol(sym.LBRACK); } "]" { return newSymbol(sym.RBRACK); } "(" { return newSymbol(sym.LPAREN); } @@ -253,5 +271,5 @@ LowSurrogate=[\uDC00-\uDFFF] ({NCName}":")?{NCName} { return newSymbol(sym.QNAME, yytext()); } ({NCName}":")?"*" { return newSymbol(sym.QNAME, yytext()); } ({NCName}":")?"@*" { return newSymbol(sym.QNAME, yytext()); } -[ \t\r\n\f] { /* ignore white space. */ } +\s { /* ignore white space. */ } . { throw new Exception(yytext()); } diff --git a/src/org/apache/xalan/xsltc/dom/AbsoluteIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/AbsoluteIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/AbsoluteIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/AbsoluteIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/AdaptiveResultTreeImpl.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/AdaptiveResultTreeImpl.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/AdaptiveResultTreeImpl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/AdaptiveResultTreeImpl.java diff --git a/src/org/apache/xalan/xsltc/dom/AnyNodeCounter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/AnyNodeCounter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/AnyNodeCounter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/AnyNodeCounter.java diff --git a/src/org/apache/xalan/xsltc/dom/ArrayNodeListIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/ArrayNodeListIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/ArrayNodeListIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/ArrayNodeListIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/BitArray.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/BitArray.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/BitArray.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/BitArray.java diff --git a/src/org/apache/xalan/xsltc/dom/CachedNodeListIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/CachedNodeListIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/CachedNodeListIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/CachedNodeListIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/ClonedNodeListIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/ClonedNodeListIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/ClonedNodeListIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/ClonedNodeListIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/CollatorFactoryBase.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/CollatorFactoryBase.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/CollatorFactoryBase.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/CollatorFactoryBase.java diff --git a/src/org/apache/xalan/xsltc/dom/CurrentNodeListFilter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/CurrentNodeListFilter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/CurrentNodeListFilter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/CurrentNodeListFilter.java diff --git a/src/org/apache/xalan/xsltc/dom/CurrentNodeListIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/CurrentNodeListIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/CurrentNodeListIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/CurrentNodeListIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/DOMAdapter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/DOMAdapter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/DOMAdapter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/DOMAdapter.java diff --git a/src/org/apache/xalan/xsltc/dom/DOMBuilder.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/DOMBuilder.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/DOMBuilder.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/DOMBuilder.java diff --git a/src/org/apache/xalan/xsltc/dom/DOMWSFilter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/DOMWSFilter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/DOMWSFilter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/DOMWSFilter.java diff --git a/src/org/apache/xalan/xsltc/dom/DocumentCache.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/DocumentCache.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/DocumentCache.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/DocumentCache.java diff --git a/src/org/apache/xalan/xsltc/dom/DupFilterIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/DupFilterIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/DupFilterIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/DupFilterIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/EmptyFilter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/EmptyFilter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/EmptyFilter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/EmptyFilter.java diff --git a/src/org/apache/xalan/xsltc/dom/ExtendedSAX.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/ExtendedSAX.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/ExtendedSAX.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/ExtendedSAX.java diff --git a/src/org/apache/xalan/xsltc/dom/Filter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/Filter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/Filter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/Filter.java diff --git a/src/org/apache/xalan/xsltc/dom/FilterIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/FilterIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/FilterIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/FilterIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/FilteredStepIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/FilteredStepIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/FilteredStepIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/FilteredStepIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/ForwardPositionIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/ForwardPositionIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/ForwardPositionIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/ForwardPositionIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/KeyIndex.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/KeyIndex.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/KeyIndex.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/KeyIndex.java diff --git a/src/org/apache/xalan/xsltc/dom/LoadDocument.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/LoadDocument.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/LoadDocument.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/LoadDocument.java diff --git a/src/org/apache/xalan/xsltc/dom/MatchingIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/MatchingIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/MatchingIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/MatchingIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/MultiDOM.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/MultiDOM.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/MultiDOM.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/MultiDOM.java diff --git a/src/org/apache/xalan/xsltc/dom/MultiValuedNodeHeapIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/MultiValuedNodeHeapIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/MultiValuedNodeHeapIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/MultiValuedNodeHeapIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/MultipleNodeCounter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/MultipleNodeCounter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/MultipleNodeCounter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/MultipleNodeCounter.java diff --git a/src/org/apache/xalan/xsltc/dom/NodeCounter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/NodeCounter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/NodeCounter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/NodeCounter.java diff --git a/src/org/apache/xalan/xsltc/dom/NodeIteratorBase.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/NodeIteratorBase.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/NodeIteratorBase.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/NodeIteratorBase.java diff --git a/src/org/apache/xalan/xsltc/dom/NodeSortRecord.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/NodeSortRecord.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/NodeSortRecord.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/NodeSortRecord.java diff --git a/src/org/apache/xalan/xsltc/dom/NodeSortRecordFactory.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/NodeSortRecordFactory.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/NodeSortRecordFactory.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/NodeSortRecordFactory.java diff --git a/src/org/apache/xalan/xsltc/dom/NthIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/NthIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/NthIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/NthIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/ObjectFactory.java diff --git a/src/org/apache/xalan/xsltc/dom/SAXImpl.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/SAXImpl.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/SAXImpl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/SAXImpl.java diff --git a/src/org/apache/xalan/xsltc/dom/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/SecuritySupport.java diff --git a/src/org/apache/xalan/xsltc/dom/SimpleResultTreeImpl.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/SimpleResultTreeImpl.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/SimpleResultTreeImpl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/SimpleResultTreeImpl.java diff --git a/src/org/apache/xalan/xsltc/dom/SingleNodeCounter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/SingleNodeCounter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/SingleNodeCounter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/SingleNodeCounter.java diff --git a/src/org/apache/xalan/xsltc/dom/SingletonIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/SingletonIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/SingletonIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/SingletonIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/SortSettings.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/SortSettings.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/SortSettings.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/SortSettings.java diff --git a/src/org/apache/xalan/xsltc/dom/SortingIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/SortingIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/SortingIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/SortingIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/StepIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/StepIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/StepIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/StepIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/StripWhitespaceFilter.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/StripWhitespaceFilter.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/StripWhitespaceFilter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/StripWhitespaceFilter.java diff --git a/src/org/apache/xalan/xsltc/dom/UnionIterator.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/UnionIterator.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/UnionIterator.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/UnionIterator.java diff --git a/src/org/apache/xalan/xsltc/dom/XSLTCDTMManager.java b/xalan/src/main/java/org/apache/xalan/xsltc/dom/XSLTCDTMManager.java similarity index 100% rename from src/org/apache/xalan/xsltc/dom/XSLTCDTMManager.java rename to xalan/src/main/java/org/apache/xalan/xsltc/dom/XSLTCDTMManager.java diff --git a/src/org/apache/xalan/xsltc/javax.xml.transform.TransformerFactory b/xalan/src/main/java/org/apache/xalan/xsltc/javax.xml.transform.TransformerFactory similarity index 100% rename from src/org/apache/xalan/xsltc/javax.xml.transform.TransformerFactory rename to xalan/src/main/java/org/apache/xalan/xsltc/javax.xml.transform.TransformerFactory diff --git a/src/org/apache/xalan/xsltc/runtime/AbstractTranslet.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/AbstractTranslet.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/AbstractTranslet.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/AbstractTranslet.java diff --git a/src/org/apache/xalan/xsltc/runtime/AttributeList.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/AttributeList.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/AttributeList.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/AttributeList.java diff --git a/src/org/apache/xalan/xsltc/runtime/Attributes.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/Attributes.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/Attributes.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/Attributes.java diff --git a/src/org/apache/xalan/xsltc/runtime/BasisLibrary.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/BasisLibrary.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/BasisLibrary.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/BasisLibrary.java diff --git a/src/org/apache/xalan/xsltc/runtime/Constants.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/Constants.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/Constants.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/Constants.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_ca.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_ca.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_ca.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_ca.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_cs.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_cs.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_cs.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_cs.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_de.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_de.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_de.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_de.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_es.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_es.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_es.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_es.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_fr.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_fr.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_fr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_fr.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_hu.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_hu.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_hu.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_hu.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_it.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_it.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_it.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_it.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_ja.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_ja.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_ja.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_ja.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_ko.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_ko.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_ko.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_ko.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_no.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_no.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_no.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_no.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_pl.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_pl.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_pl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_pl.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_pt_BR.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_pt_BR.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_pt_BR.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_pt_BR.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_ru.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_ru.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_ru.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_ru.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_sk.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_sk.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_sk.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_sk.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_sl.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_sl.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_sl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_sl.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_tr.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_tr.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_tr.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_tr.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_zh.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_zh.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_zh.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_zh.java diff --git a/src/org/apache/xalan/xsltc/runtime/ErrorMessages_zh_TW.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_zh_TW.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ErrorMessages_zh_TW.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ErrorMessages_zh_TW.java diff --git a/src/org/apache/xalan/xsltc/runtime/Hashtable.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/Hashtable.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/Hashtable.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/Hashtable.java diff --git a/src/org/apache/xalan/xsltc/runtime/InternalRuntimeError.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/InternalRuntimeError.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/InternalRuntimeError.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/InternalRuntimeError.java diff --git a/src/org/apache/xalan/xsltc/runtime/MessageHandler.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/MessageHandler.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/MessageHandler.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/MessageHandler.java diff --git a/src/org/apache/xalan/xsltc/runtime/Node.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/Node.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/Node.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/Node.java diff --git a/src/org/apache/xalan/xsltc/runtime/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/ObjectFactory.java diff --git a/src/org/apache/xalan/xsltc/runtime/Operators.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/Operators.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/Operators.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/Operators.java diff --git a/src/org/apache/xalan/xsltc/runtime/Parameter.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/Parameter.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/Parameter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/Parameter.java diff --git a/src/org/apache/xalan/xsltc/runtime/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/SecuritySupport.java diff --git a/src/org/apache/xalan/xsltc/runtime/StringValueHandler.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/StringValueHandler.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/StringValueHandler.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/StringValueHandler.java diff --git a/src/org/apache/xalan/xsltc/runtime/output/OutputBuffer.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/output/OutputBuffer.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/output/OutputBuffer.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/output/OutputBuffer.java diff --git a/src/org/apache/xalan/xsltc/runtime/output/StringOutputBuffer.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/output/StringOutputBuffer.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/output/StringOutputBuffer.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/output/StringOutputBuffer.java diff --git a/src/org/apache/xalan/xsltc/runtime/output/TransletOutputHandlerFactory.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/output/TransletOutputHandlerFactory.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/output/TransletOutputHandlerFactory.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/output/TransletOutputHandlerFactory.java diff --git a/src/org/apache/xalan/xsltc/runtime/output/WriterOutputBuffer.java b/xalan/src/main/java/org/apache/xalan/xsltc/runtime/output/WriterOutputBuffer.java similarity index 100% rename from src/org/apache/xalan/xsltc/runtime/output/WriterOutputBuffer.java rename to xalan/src/main/java/org/apache/xalan/xsltc/runtime/output/WriterOutputBuffer.java diff --git a/src/org/apache/xalan/xsltc/trax/DOM2SAX.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/DOM2SAX.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/DOM2SAX.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/DOM2SAX.java diff --git a/src/org/apache/xalan/xsltc/trax/DOM2TO.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/DOM2TO.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/DOM2TO.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/DOM2TO.java diff --git a/src/org/apache/xalan/xsltc/trax/ObjectFactory.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/ObjectFactory.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/ObjectFactory.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/ObjectFactory.java diff --git a/src/org/apache/xalan/xsltc/trax/OutputSettings.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/OutputSettings.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/OutputSettings.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/OutputSettings.java diff --git a/src/org/apache/xalan/xsltc/trax/SAX2DOM.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/SAX2DOM.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/SAX2DOM.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/SAX2DOM.java diff --git a/src/org/apache/xalan/xsltc/trax/SecuritySupport.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/SecuritySupport.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/SecuritySupport.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/SecuritySupport.java diff --git a/src/org/apache/xalan/xsltc/trax/SmartTransformerFactoryImpl.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/SmartTransformerFactoryImpl.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/SmartTransformerFactoryImpl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/SmartTransformerFactoryImpl.java diff --git a/src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/TemplatesHandlerImpl.java diff --git a/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/TemplatesImpl.java similarity index 99% rename from src/org/apache/xalan/xsltc/trax/TemplatesImpl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/TemplatesImpl.java index 7e4cbcba8..481328ad2 100644 --- a/src/org/apache/xalan/xsltc/trax/TemplatesImpl.java +++ b/xalan/src/main/java/org/apache/xalan/xsltc/trax/TemplatesImpl.java @@ -407,4 +407,4 @@ public DOM getStylesheetDOM() { public void setStylesheetDOM(DOM sdom) { _sdom.set(sdom); } -} \ No newline at end of file +} diff --git a/src/org/apache/xalan/xsltc/trax/TrAXFilter.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/TrAXFilter.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/TrAXFilter.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/TrAXFilter.java diff --git a/src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/TransformerFactoryImpl.java diff --git a/src/org/apache/xalan/xsltc/trax/TransformerHandlerImpl.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/TransformerHandlerImpl.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/TransformerHandlerImpl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/TransformerHandlerImpl.java diff --git a/src/org/apache/xalan/xsltc/trax/TransformerImpl.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/TransformerImpl.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/TransformerImpl.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/TransformerImpl.java diff --git a/src/org/apache/xalan/xsltc/trax/Util.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/Util.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/Util.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/Util.java diff --git a/src/org/apache/xalan/xsltc/trax/XSLTCSource.java b/xalan/src/main/java/org/apache/xalan/xsltc/trax/XSLTCSource.java similarity index 100% rename from src/org/apache/xalan/xsltc/trax/XSLTCSource.java rename to xalan/src/main/java/org/apache/xalan/xsltc/trax/XSLTCSource.java diff --git a/src/org/apache/xalan/xsltc/util/IntegerArray.java b/xalan/src/main/java/org/apache/xalan/xsltc/util/IntegerArray.java similarity index 100% rename from src/org/apache/xalan/xsltc/util/IntegerArray.java rename to xalan/src/main/java/org/apache/xalan/xsltc/util/IntegerArray.java diff --git a/src/org/apache/xml/dtm/Axis.java b/xalan/src/main/java/org/apache/xml/dtm/Axis.java similarity index 100% rename from src/org/apache/xml/dtm/Axis.java rename to xalan/src/main/java/org/apache/xml/dtm/Axis.java diff --git a/src/org/apache/xml/dtm/DTM.java b/xalan/src/main/java/org/apache/xml/dtm/DTM.java similarity index 100% rename from src/org/apache/xml/dtm/DTM.java rename to xalan/src/main/java/org/apache/xml/dtm/DTM.java diff --git a/src/org/apache/xml/dtm/DTMAxisIterator.java b/xalan/src/main/java/org/apache/xml/dtm/DTMAxisIterator.java similarity index 100% rename from src/org/apache/xml/dtm/DTMAxisIterator.java rename to xalan/src/main/java/org/apache/xml/dtm/DTMAxisIterator.java diff --git a/src/org/apache/xml/dtm/DTMAxisTraverser.java b/xalan/src/main/java/org/apache/xml/dtm/DTMAxisTraverser.java similarity index 100% rename from src/org/apache/xml/dtm/DTMAxisTraverser.java rename to xalan/src/main/java/org/apache/xml/dtm/DTMAxisTraverser.java diff --git a/src/org/apache/xml/dtm/DTMConfigurationException.java b/xalan/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java similarity index 100% rename from src/org/apache/xml/dtm/DTMConfigurationException.java rename to xalan/src/main/java/org/apache/xml/dtm/DTMConfigurationException.java diff --git a/src/org/apache/xml/dtm/DTMDOMException.java b/xalan/src/main/java/org/apache/xml/dtm/DTMDOMException.java similarity index 100% rename from src/org/apache/xml/dtm/DTMDOMException.java rename to xalan/src/main/java/org/apache/xml/dtm/DTMDOMException.java diff --git a/src/org/apache/xml/dtm/DTMException.java b/xalan/src/main/java/org/apache/xml/dtm/DTMException.java similarity index 100% rename from src/org/apache/xml/dtm/DTMException.java rename to xalan/src/main/java/org/apache/xml/dtm/DTMException.java diff --git a/src/org/apache/xml/dtm/DTMFilter.java b/xalan/src/main/java/org/apache/xml/dtm/DTMFilter.java similarity index 100% rename from src/org/apache/xml/dtm/DTMFilter.java rename to xalan/src/main/java/org/apache/xml/dtm/DTMFilter.java diff --git a/src/org/apache/xml/dtm/DTMIterator.java b/xalan/src/main/java/org/apache/xml/dtm/DTMIterator.java similarity index 100% rename from src/org/apache/xml/dtm/DTMIterator.java rename to xalan/src/main/java/org/apache/xml/dtm/DTMIterator.java diff --git a/src/org/apache/xml/dtm/DTMManager.java b/xalan/src/main/java/org/apache/xml/dtm/DTMManager.java similarity index 100% rename from src/org/apache/xml/dtm/DTMManager.java rename to xalan/src/main/java/org/apache/xml/dtm/DTMManager.java diff --git a/src/org/apache/xml/dtm/DTMWSFilter.java b/xalan/src/main/java/org/apache/xml/dtm/DTMWSFilter.java similarity index 100% rename from src/org/apache/xml/dtm/DTMWSFilter.java rename to xalan/src/main/java/org/apache/xml/dtm/DTMWSFilter.java diff --git a/src/org/apache/xml/dtm/ObjectFactory.java b/xalan/src/main/java/org/apache/xml/dtm/ObjectFactory.java similarity index 100% rename from src/org/apache/xml/dtm/ObjectFactory.java rename to xalan/src/main/java/org/apache/xml/dtm/ObjectFactory.java diff --git a/src/org/apache/xml/dtm/SecuritySupport.java b/xalan/src/main/java/org/apache/xml/dtm/SecuritySupport.java similarity index 100% rename from src/org/apache/xml/dtm/SecuritySupport.java rename to xalan/src/main/java/org/apache/xml/dtm/SecuritySupport.java diff --git a/src/org/apache/xml/dtm/ref/ChunkedIntArray.java b/xalan/src/main/java/org/apache/xml/dtm/ref/ChunkedIntArray.java similarity index 100% rename from src/org/apache/xml/dtm/ref/ChunkedIntArray.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/ChunkedIntArray.java diff --git a/src/org/apache/xml/dtm/ref/CoroutineManager.java b/xalan/src/main/java/org/apache/xml/dtm/ref/CoroutineManager.java similarity index 100% rename from src/org/apache/xml/dtm/ref/CoroutineManager.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/CoroutineManager.java diff --git a/src/org/apache/xml/dtm/ref/CoroutineParser.java b/xalan/src/main/java/org/apache/xml/dtm/ref/CoroutineParser.java similarity index 100% rename from src/org/apache/xml/dtm/ref/CoroutineParser.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/CoroutineParser.java diff --git a/src/org/apache/xml/dtm/ref/CustomStringPool.java b/xalan/src/main/java/org/apache/xml/dtm/ref/CustomStringPool.java similarity index 100% rename from src/org/apache/xml/dtm/ref/CustomStringPool.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/CustomStringPool.java diff --git a/src/org/apache/xml/dtm/ref/DTMAxisIterNodeList.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMAxisIterNodeList.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMAxisIterNodeList.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMAxisIterNodeList.java diff --git a/src/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMAxisIteratorBase.java diff --git a/src/org/apache/xml/dtm/ref/DTMChildIterNodeList.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMChildIterNodeList.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMChildIterNodeList.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMChildIterNodeList.java diff --git a/src/org/apache/xml/dtm/ref/DTMDefaultBase.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMDefaultBase.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBase.java diff --git a/src/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseIterators.java diff --git a/src/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMDefaultBaseTraversers.java diff --git a/src/org/apache/xml/dtm/ref/DTMDocumentImpl.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMDocumentImpl.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMDocumentImpl.java diff --git a/src/org/apache/xml/dtm/ref/DTMManagerDefault.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMManagerDefault.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMManagerDefault.java diff --git a/src/org/apache/xml/dtm/ref/DTMNamedNodeMap.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMNamedNodeMap.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMNamedNodeMap.java diff --git a/src/org/apache/xml/dtm/ref/DTMNodeIterator.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMNodeIterator.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMNodeIterator.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMNodeIterator.java diff --git a/src/org/apache/xml/dtm/ref/DTMNodeList.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMNodeList.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMNodeList.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMNodeList.java diff --git a/src/org/apache/xml/dtm/ref/DTMNodeListBase.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMNodeListBase.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMNodeListBase.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMNodeListBase.java diff --git a/src/org/apache/xml/dtm/ref/DTMNodeProxy.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMNodeProxy.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMNodeProxy.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMNodeProxy.java diff --git a/src/org/apache/xml/dtm/ref/DTMSafeStringPool.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMSafeStringPool.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMSafeStringPool.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMSafeStringPool.java diff --git a/src/org/apache/xml/dtm/ref/DTMStringPool.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMStringPool.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMStringPool.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMStringPool.java diff --git a/src/org/apache/xml/dtm/ref/DTMTreeWalker.java b/xalan/src/main/java/org/apache/xml/dtm/ref/DTMTreeWalker.java similarity index 100% rename from src/org/apache/xml/dtm/ref/DTMTreeWalker.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/DTMTreeWalker.java diff --git a/src/org/apache/xml/dtm/ref/EmptyIterator.java b/xalan/src/main/java/org/apache/xml/dtm/ref/EmptyIterator.java similarity index 100% rename from src/org/apache/xml/dtm/ref/EmptyIterator.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/EmptyIterator.java diff --git a/src/org/apache/xml/dtm/ref/ExpandedNameTable.java b/xalan/src/main/java/org/apache/xml/dtm/ref/ExpandedNameTable.java similarity index 100% rename from src/org/apache/xml/dtm/ref/ExpandedNameTable.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/ExpandedNameTable.java diff --git a/src/org/apache/xml/dtm/ref/ExtendedType.java b/xalan/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java similarity index 100% rename from src/org/apache/xml/dtm/ref/ExtendedType.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/ExtendedType.java diff --git a/src/org/apache/xml/dtm/ref/IncrementalSAXSource.java b/xalan/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource.java similarity index 100% rename from src/org/apache/xml/dtm/ref/IncrementalSAXSource.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource.java diff --git a/src/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java b/xalan/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java similarity index 100% rename from src/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Filter.java diff --git a/src/org/apache/xml/dtm/ref/IncrementalSAXSource_Xerces.java b/xalan/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Xerces.java similarity index 100% rename from src/org/apache/xml/dtm/ref/IncrementalSAXSource_Xerces.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/IncrementalSAXSource_Xerces.java diff --git a/src/org/apache/xml/dtm/ref/NodeLocator.java b/xalan/src/main/java/org/apache/xml/dtm/ref/NodeLocator.java similarity index 100% rename from src/org/apache/xml/dtm/ref/NodeLocator.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/NodeLocator.java diff --git a/src/org/apache/xml/dtm/ref/ObjectFactory.java b/xalan/src/main/java/org/apache/xml/dtm/ref/ObjectFactory.java similarity index 100% rename from src/org/apache/xml/dtm/ref/ObjectFactory.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/ObjectFactory.java diff --git a/src/org/apache/xml/dtm/ref/SecuritySupport.java b/xalan/src/main/java/org/apache/xml/dtm/ref/SecuritySupport.java similarity index 100% rename from src/org/apache/xml/dtm/ref/SecuritySupport.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/SecuritySupport.java diff --git a/src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java b/xalan/src/main/java/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java similarity index 100% rename from src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/dom2dtm/DOM2DTM.java diff --git a/src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java b/xalan/src/main/java/org/apache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java similarity index 100% rename from src/org/apache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/dom2dtm/DOM2DTMdefaultNamespaceDeclarationNode.java diff --git a/src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM.java b/xalan/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM.java similarity index 100% rename from src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM.java diff --git a/src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java b/xalan/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java similarity index 100% rename from src/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2DTM2.java diff --git a/src/org/apache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java b/xalan/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java similarity index 100% rename from src/org/apache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java rename to xalan/src/main/java/org/apache/xml/dtm/ref/sax2dtm/SAX2RTFDTM.java diff --git a/src/org/apache/xml/res/XMLErrorResources.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources.java diff --git a/src/org/apache/xml/res/XMLErrorResources_ca.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_ca.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_ca.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_ca.java diff --git a/src/org/apache/xml/res/XMLErrorResources_cs.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_cs.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_cs.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_cs.java diff --git a/src/org/apache/xml/res/XMLErrorResources_de.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_de.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_de.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_de.java diff --git a/src/org/apache/xml/res/XMLErrorResources_en.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_en.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_en.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_en.java diff --git a/src/org/apache/xml/res/XMLErrorResources_es.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_es.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_es.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_es.java diff --git a/src/org/apache/xml/res/XMLErrorResources_fr.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_fr.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_fr.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_fr.java diff --git a/src/org/apache/xml/res/XMLErrorResources_hu.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_hu.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_hu.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_hu.java diff --git a/src/org/apache/xml/res/XMLErrorResources_it.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_it.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_it.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_it.java diff --git a/src/org/apache/xml/res/XMLErrorResources_ja.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_ja.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_ja.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_ja.java diff --git a/src/org/apache/xml/res/XMLErrorResources_ko.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_ko.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_ko.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_ko.java diff --git a/src/org/apache/xml/res/XMLErrorResources_pl.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_pl.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_pl.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_pl.java diff --git a/src/org/apache/xml/res/XMLErrorResources_pt_BR.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_pt_BR.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_pt_BR.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_pt_BR.java diff --git a/src/org/apache/xml/res/XMLErrorResources_ru.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_ru.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_ru.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_ru.java diff --git a/src/org/apache/xml/res/XMLErrorResources_sk.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_sk.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_sk.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_sk.java diff --git a/src/org/apache/xml/res/XMLErrorResources_sl.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_sl.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_sl.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_sl.java diff --git a/src/org/apache/xml/res/XMLErrorResources_sv.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_sv.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_sv.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_sv.java diff --git a/src/org/apache/xml/res/XMLErrorResources_tr.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_tr.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_tr.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_tr.java diff --git a/src/org/apache/xml/res/XMLErrorResources_zh.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_zh.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_zh.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_zh.java diff --git a/src/org/apache/xml/res/XMLErrorResources_zh_TW.java b/xalan/src/main/java/org/apache/xml/res/XMLErrorResources_zh_TW.java similarity index 100% rename from src/org/apache/xml/res/XMLErrorResources_zh_TW.java rename to xalan/src/main/java/org/apache/xml/res/XMLErrorResources_zh_TW.java diff --git a/src/org/apache/xml/res/XMLMessages.java b/xalan/src/main/java/org/apache/xml/res/XMLMessages.java similarity index 98% rename from src/org/apache/xml/res/XMLMessages.java rename to xalan/src/main/java/org/apache/xml/res/XMLMessages.java index c1e31641d..6185ac6cb 100644 --- a/src/org/apache/xml/res/XMLMessages.java +++ b/xalan/src/main/java/org/apache/xml/res/XMLMessages.java @@ -160,7 +160,7 @@ public static final String createMsg(ListResourceBundle fResourceBundle, * * @param className The class name of the resource bundle. * @return the ResourceBundle - * @throws MissingResourceException + * @throws MissingResourceException if the resource bundle can not be retrieved */ public static ListResourceBundle loadResourceBundle(String className) throws MissingResourceException diff --git a/src/org/apache/xml/utils/AttList.java b/xalan/src/main/java/org/apache/xml/utils/AttList.java similarity index 100% rename from src/org/apache/xml/utils/AttList.java rename to xalan/src/main/java/org/apache/xml/utils/AttList.java diff --git a/src/org/apache/xml/utils/BoolStack.java b/xalan/src/main/java/org/apache/xml/utils/BoolStack.java similarity index 99% rename from src/org/apache/xml/utils/BoolStack.java rename to xalan/src/main/java/org/apache/xml/utils/BoolStack.java index b36ed7079..7bb621970 100644 --- a/src/org/apache/xml/utils/BoolStack.java +++ b/xalan/src/main/java/org/apache/xml/utils/BoolStack.java @@ -19,7 +19,7 @@ * $Id$ */ package org.apache.xml.utils; - +import java.util.EmptyStackException; /** * Simple stack for boolean values. diff --git a/src/org/apache/xml/utils/Constants.java b/xalan/src/main/java/org/apache/xml/utils/Constants.java similarity index 100% rename from src/org/apache/xml/utils/Constants.java rename to xalan/src/main/java/org/apache/xml/utils/Constants.java diff --git a/src/org/apache/xml/utils/DOM2Helper.java b/xalan/src/main/java/org/apache/xml/utils/DOM2Helper.java similarity index 100% rename from src/org/apache/xml/utils/DOM2Helper.java rename to xalan/src/main/java/org/apache/xml/utils/DOM2Helper.java diff --git a/src/org/apache/xml/utils/DOMBuilder.java b/xalan/src/main/java/org/apache/xml/utils/DOMBuilder.java similarity index 100% rename from src/org/apache/xml/utils/DOMBuilder.java rename to xalan/src/main/java/org/apache/xml/utils/DOMBuilder.java diff --git a/src/org/apache/xml/utils/DOMHelper.java b/xalan/src/main/java/org/apache/xml/utils/DOMHelper.java similarity index 100% rename from src/org/apache/xml/utils/DOMHelper.java rename to xalan/src/main/java/org/apache/xml/utils/DOMHelper.java diff --git a/src/org/apache/xml/utils/DOMOrder.java b/xalan/src/main/java/org/apache/xml/utils/DOMOrder.java similarity index 100% rename from src/org/apache/xml/utils/DOMOrder.java rename to xalan/src/main/java/org/apache/xml/utils/DOMOrder.java diff --git a/src/org/apache/xml/utils/DefaultErrorHandler.java b/xalan/src/main/java/org/apache/xml/utils/DefaultErrorHandler.java similarity index 100% rename from src/org/apache/xml/utils/DefaultErrorHandler.java rename to xalan/src/main/java/org/apache/xml/utils/DefaultErrorHandler.java diff --git a/src/org/apache/xml/utils/ElemDesc.java b/xalan/src/main/java/org/apache/xml/utils/ElemDesc.java similarity index 100% rename from src/org/apache/xml/utils/ElemDesc.java rename to xalan/src/main/java/org/apache/xml/utils/ElemDesc.java diff --git a/src/org/apache/xml/utils/FastStringBuffer.java b/xalan/src/main/java/org/apache/xml/utils/FastStringBuffer.java similarity index 100% rename from src/org/apache/xml/utils/FastStringBuffer.java rename to xalan/src/main/java/org/apache/xml/utils/FastStringBuffer.java diff --git a/src/org/apache/xml/utils/Hashtree2Node.java b/xalan/src/main/java/org/apache/xml/utils/Hashtree2Node.java similarity index 100% rename from src/org/apache/xml/utils/Hashtree2Node.java rename to xalan/src/main/java/org/apache/xml/utils/Hashtree2Node.java diff --git a/src/org/apache/xml/utils/IntStack.java b/xalan/src/main/java/org/apache/xml/utils/IntStack.java similarity index 99% rename from src/org/apache/xml/utils/IntStack.java rename to xalan/src/main/java/org/apache/xml/utils/IntStack.java index 7969913c5..ce9a28ec4 100644 --- a/src/org/apache/xml/utils/IntStack.java +++ b/xalan/src/main/java/org/apache/xml/utils/IntStack.java @@ -19,7 +19,6 @@ * $Id$ */ package org.apache.xml.utils; - import java.util.EmptyStackException; /** diff --git a/src/org/apache/xml/utils/IntVector.java b/xalan/src/main/java/org/apache/xml/utils/IntVector.java similarity index 100% rename from src/org/apache/xml/utils/IntVector.java rename to xalan/src/main/java/org/apache/xml/utils/IntVector.java diff --git a/src/org/apache/xml/utils/ListingErrorHandler.java b/xalan/src/main/java/org/apache/xml/utils/ListingErrorHandler.java similarity index 100% rename from src/org/apache/xml/utils/ListingErrorHandler.java rename to xalan/src/main/java/org/apache/xml/utils/ListingErrorHandler.java diff --git a/src/org/apache/xml/utils/LocaleUtility.java b/xalan/src/main/java/org/apache/xml/utils/LocaleUtility.java similarity index 100% rename from src/org/apache/xml/utils/LocaleUtility.java rename to xalan/src/main/java/org/apache/xml/utils/LocaleUtility.java diff --git a/src/org/apache/xml/utils/MutableAttrListImpl.java b/xalan/src/main/java/org/apache/xml/utils/MutableAttrListImpl.java similarity index 100% rename from src/org/apache/xml/utils/MutableAttrListImpl.java rename to xalan/src/main/java/org/apache/xml/utils/MutableAttrListImpl.java diff --git a/src/org/apache/xml/utils/NSInfo.java b/xalan/src/main/java/org/apache/xml/utils/NSInfo.java similarity index 100% rename from src/org/apache/xml/utils/NSInfo.java rename to xalan/src/main/java/org/apache/xml/utils/NSInfo.java diff --git a/src/org/apache/xml/utils/NameSpace.java b/xalan/src/main/java/org/apache/xml/utils/NameSpace.java similarity index 100% rename from src/org/apache/xml/utils/NameSpace.java rename to xalan/src/main/java/org/apache/xml/utils/NameSpace.java diff --git a/src/org/apache/xml/utils/NamespaceSupport2.java b/xalan/src/main/java/org/apache/xml/utils/NamespaceSupport2.java similarity index 100% rename from src/org/apache/xml/utils/NamespaceSupport2.java rename to xalan/src/main/java/org/apache/xml/utils/NamespaceSupport2.java diff --git a/src/org/apache/xml/utils/NodeConsumer.java b/xalan/src/main/java/org/apache/xml/utils/NodeConsumer.java similarity index 100% rename from src/org/apache/xml/utils/NodeConsumer.java rename to xalan/src/main/java/org/apache/xml/utils/NodeConsumer.java diff --git a/src/org/apache/xml/utils/NodeVector.java b/xalan/src/main/java/org/apache/xml/utils/NodeVector.java similarity index 100% rename from src/org/apache/xml/utils/NodeVector.java rename to xalan/src/main/java/org/apache/xml/utils/NodeVector.java diff --git a/src/org/apache/xml/utils/ObjectFactory.java b/xalan/src/main/java/org/apache/xml/utils/ObjectFactory.java similarity index 100% rename from src/org/apache/xml/utils/ObjectFactory.java rename to xalan/src/main/java/org/apache/xml/utils/ObjectFactory.java diff --git a/src/org/apache/xml/utils/ObjectPool.java b/xalan/src/main/java/org/apache/xml/utils/ObjectPool.java similarity index 100% rename from src/org/apache/xml/utils/ObjectPool.java rename to xalan/src/main/java/org/apache/xml/utils/ObjectPool.java diff --git a/src/org/apache/xml/utils/ObjectStack.java b/xalan/src/main/java/org/apache/xml/utils/ObjectStack.java similarity index 99% rename from src/org/apache/xml/utils/ObjectStack.java rename to xalan/src/main/java/org/apache/xml/utils/ObjectStack.java index 7b406f6fa..b91c4eaa5 100644 --- a/src/org/apache/xml/utils/ObjectStack.java +++ b/xalan/src/main/java/org/apache/xml/utils/ObjectStack.java @@ -19,7 +19,6 @@ * $Id$ */ package org.apache.xml.utils; - import java.util.EmptyStackException; /** diff --git a/src/org/apache/xml/utils/ObjectVector.java b/xalan/src/main/java/org/apache/xml/utils/ObjectVector.java similarity index 100% rename from src/org/apache/xml/utils/ObjectVector.java rename to xalan/src/main/java/org/apache/xml/utils/ObjectVector.java diff --git a/src/org/apache/xml/utils/PrefixResolver.java b/xalan/src/main/java/org/apache/xml/utils/PrefixResolver.java similarity index 100% rename from src/org/apache/xml/utils/PrefixResolver.java rename to xalan/src/main/java/org/apache/xml/utils/PrefixResolver.java diff --git a/src/org/apache/xml/utils/PrefixResolverDefault.java b/xalan/src/main/java/org/apache/xml/utils/PrefixResolverDefault.java similarity index 100% rename from src/org/apache/xml/utils/PrefixResolverDefault.java rename to xalan/src/main/java/org/apache/xml/utils/PrefixResolverDefault.java diff --git a/src/org/apache/xml/utils/QName.java b/xalan/src/main/java/org/apache/xml/utils/QName.java similarity index 100% rename from src/org/apache/xml/utils/QName.java rename to xalan/src/main/java/org/apache/xml/utils/QName.java diff --git a/src/org/apache/xml/utils/RawCharacterHandler.java b/xalan/src/main/java/org/apache/xml/utils/RawCharacterHandler.java similarity index 100% rename from src/org/apache/xml/utils/RawCharacterHandler.java rename to xalan/src/main/java/org/apache/xml/utils/RawCharacterHandler.java diff --git a/src/org/apache/xml/utils/SAXSourceLocator.java b/xalan/src/main/java/org/apache/xml/utils/SAXSourceLocator.java similarity index 100% rename from src/org/apache/xml/utils/SAXSourceLocator.java rename to xalan/src/main/java/org/apache/xml/utils/SAXSourceLocator.java diff --git a/src/org/apache/xml/utils/SecuritySupport.java b/xalan/src/main/java/org/apache/xml/utils/SecuritySupport.java similarity index 100% rename from src/org/apache/xml/utils/SecuritySupport.java rename to xalan/src/main/java/org/apache/xml/utils/SecuritySupport.java diff --git a/src/org/apache/xml/utils/SerializableLocatorImpl.java b/xalan/src/main/java/org/apache/xml/utils/SerializableLocatorImpl.java similarity index 100% rename from src/org/apache/xml/utils/SerializableLocatorImpl.java rename to xalan/src/main/java/org/apache/xml/utils/SerializableLocatorImpl.java diff --git a/src/org/apache/xml/utils/StopParseException.java b/xalan/src/main/java/org/apache/xml/utils/StopParseException.java similarity index 100% rename from src/org/apache/xml/utils/StopParseException.java rename to xalan/src/main/java/org/apache/xml/utils/StopParseException.java diff --git a/src/org/apache/xml/utils/StringBufferPool.java b/xalan/src/main/java/org/apache/xml/utils/StringBufferPool.java similarity index 100% rename from src/org/apache/xml/utils/StringBufferPool.java rename to xalan/src/main/java/org/apache/xml/utils/StringBufferPool.java diff --git a/src/org/apache/xml/utils/StringComparable.java b/xalan/src/main/java/org/apache/xml/utils/StringComparable.java similarity index 100% rename from src/org/apache/xml/utils/StringComparable.java rename to xalan/src/main/java/org/apache/xml/utils/StringComparable.java diff --git a/src/org/apache/xml/utils/StringToIntTable.java b/xalan/src/main/java/org/apache/xml/utils/StringToIntTable.java similarity index 100% rename from src/org/apache/xml/utils/StringToIntTable.java rename to xalan/src/main/java/org/apache/xml/utils/StringToIntTable.java diff --git a/src/org/apache/xml/utils/StringToStringTable.java b/xalan/src/main/java/org/apache/xml/utils/StringToStringTable.java similarity index 100% rename from src/org/apache/xml/utils/StringToStringTable.java rename to xalan/src/main/java/org/apache/xml/utils/StringToStringTable.java diff --git a/src/org/apache/xml/utils/StringToStringTableVector.java b/xalan/src/main/java/org/apache/xml/utils/StringToStringTableVector.java similarity index 100% rename from src/org/apache/xml/utils/StringToStringTableVector.java rename to xalan/src/main/java/org/apache/xml/utils/StringToStringTableVector.java diff --git a/src/org/apache/xml/utils/StringVector.java b/xalan/src/main/java/org/apache/xml/utils/StringVector.java similarity index 100% rename from src/org/apache/xml/utils/StringVector.java rename to xalan/src/main/java/org/apache/xml/utils/StringVector.java diff --git a/src/org/apache/xml/utils/StylesheetPIHandler.java b/xalan/src/main/java/org/apache/xml/utils/StylesheetPIHandler.java similarity index 100% rename from src/org/apache/xml/utils/StylesheetPIHandler.java rename to xalan/src/main/java/org/apache/xml/utils/StylesheetPIHandler.java diff --git a/src/org/apache/xml/utils/SuballocatedByteVector.java b/xalan/src/main/java/org/apache/xml/utils/SuballocatedByteVector.java similarity index 100% rename from src/org/apache/xml/utils/SuballocatedByteVector.java rename to xalan/src/main/java/org/apache/xml/utils/SuballocatedByteVector.java diff --git a/src/org/apache/xml/utils/SuballocatedIntVector.java b/xalan/src/main/java/org/apache/xml/utils/SuballocatedIntVector.java similarity index 100% rename from src/org/apache/xml/utils/SuballocatedIntVector.java rename to xalan/src/main/java/org/apache/xml/utils/SuballocatedIntVector.java diff --git a/src/org/apache/xml/utils/SystemIDResolver.java b/xalan/src/main/java/org/apache/xml/utils/SystemIDResolver.java similarity index 100% rename from src/org/apache/xml/utils/SystemIDResolver.java rename to xalan/src/main/java/org/apache/xml/utils/SystemIDResolver.java diff --git a/src/org/apache/xml/utils/ThreadControllerWrapper.java b/xalan/src/main/java/org/apache/xml/utils/ThreadControllerWrapper.java similarity index 100% rename from src/org/apache/xml/utils/ThreadControllerWrapper.java rename to xalan/src/main/java/org/apache/xml/utils/ThreadControllerWrapper.java diff --git a/src/org/apache/xml/utils/TreeWalker.java b/xalan/src/main/java/org/apache/xml/utils/TreeWalker.java similarity index 100% rename from src/org/apache/xml/utils/TreeWalker.java rename to xalan/src/main/java/org/apache/xml/utils/TreeWalker.java diff --git a/src/org/apache/xml/utils/URI.java b/xalan/src/main/java/org/apache/xml/utils/URI.java similarity index 100% rename from src/org/apache/xml/utils/URI.java rename to xalan/src/main/java/org/apache/xml/utils/URI.java diff --git a/src/org/apache/xml/utils/UnImplNode.java b/xalan/src/main/java/org/apache/xml/utils/UnImplNode.java similarity index 90% rename from src/org/apache/xml/utils/UnImplNode.java rename to xalan/src/main/java/org/apache/xml/utils/UnImplNode.java index 8f29913dc..f4d298501 100644 --- a/src/org/apache/xml/utils/UnImplNode.java +++ b/xalan/src/main/java/org/apache/xml/utils/UnImplNode.java @@ -43,7 +43,8 @@ import org.w3c.dom.DOMConfiguration; import org.w3c.dom.TypeInfo; /** - * To be subclassed by classes that wish to fake being nodes. + * No-op Node implementation. To be subclassed by classes that wish to + * fake being nodes. * @xsl.usage internal */ public class UnImplNode implements Node, Element, NodeList, Document @@ -87,9 +88,9 @@ public void error(String msg, Object[] args) * * @param newChild New node to append to the list of this node's children * - * @return null + * @return null, meaning the append can't be done * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Node appendChild(Node newChild) throws DOMException { @@ -283,9 +284,10 @@ public NodeList getElementsByTagName(String name) * * @param oldAttr Attribute to be removed from this node's list of attributes * - * @return null + * @return null, meaning the remove could not be done in this implementation * - * @throws DOMException + * @throws DOMException always, "not supported!" + */ public Attr removeAttributeNode(Attr oldAttr) throws DOMException { @@ -300,9 +302,9 @@ public Attr removeAttributeNode(Attr oldAttr) throws DOMException * * @param newAttr Attribute node to be added to this node's list of attributes * - * @return null + * @return null, meaning attribute could not be set in this implementation. * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Attr setAttributeNode(Attr newAttr) throws DOMException { @@ -329,13 +331,11 @@ public boolean hasAttribute(String name) } /** - * Unimplemented. See org.w3c.dom.Element - * - * - * @param name - * @param x - * - * @return false + * Unimplemented + * {@inheritDoc} + * @see org.w3c.dom.Element#hasAttributeNS(String,String) + * @return false + * @throws DOMException always, "not supported!" */ public boolean hasAttributeNS(String name, String x) { @@ -346,12 +346,11 @@ public boolean hasAttributeNS(String name, String x) } /** - * Unimplemented. See org.w3c.dom.Element - * + * Unimplemented. + * @see org.w3c.dom.Element#getAttributeNode(String) * * @param name Attribute node name - * - * @return null + * @return null; always, "not supported!" empty in this implementation. */ public Attr getAttributeNode(String name) { @@ -362,11 +361,12 @@ public Attr getAttributeNode(String name) } /** - * Unimplemented. See org.w3c.dom.Element + * Unimplemented. + * @see org.w3c.dom.Element#removeAttribute(String) * * @param name Attribute node name to remove from list of attributes * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void removeAttribute(String name) throws DOMException { @@ -374,12 +374,13 @@ public void removeAttribute(String name) throws DOMException } /** - * Unimplemented. See org.w3c.dom.Element + * Unimplemented. + * @see org.w3c.dom.Element#setAttribute(String,String) * * @param name Name of attribute to set * @param value Value of attribute * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void setAttribute(String name, String value) throws DOMException { @@ -387,11 +388,12 @@ public void setAttribute(String name, String value) throws DOMException } /** - * Unimplemented. See org.w3c.dom.Element + * Unimplemented. + * @see org.w3c.dom.Element#getAttribute(String) * * @param name Name of attribute to get * - * @return null + * @return null always, "not supported!" (no match) in this implementation */ public String getAttribute(String name) { @@ -403,8 +405,9 @@ public String getAttribute(String name) /** * Unimplemented. Introduced in DOM Level 2. + * {@inheritDoc} * - * @return false + * @return false; this implementation will never have attributes */ public boolean hasAttributes() { @@ -415,12 +418,14 @@ public boolean hasAttributes() } /** - * Unimplemented. See org.w3c.dom.Element + * Unimplemented. + * {@inheritDoc} + * @see org.w3c.dom.Element#getElementsByTagNameNS(String,String) * * @param namespaceURI Namespace URI of the element * @param localName Local part of qualified name of the element * - * @return null + * @return null always, "not supported!", in this implementation */ public NodeList getElementsByTagNameNS(String namespaceURI, String localName) @@ -438,7 +443,7 @@ public NodeList getElementsByTagNameNS(String namespaceURI, * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Attr setAttributeNodeNS(Attr newAttr) throws DOMException { @@ -470,7 +475,7 @@ public Attr getAttributeNodeNS(String namespaceURI, String localName) * @param namespaceURI Namespace URI of attribute node to remove * @param localName Local part of qualified name of attribute node to remove * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void removeAttributeNS(String namespaceURI, String localName) throws DOMException @@ -485,7 +490,7 @@ public void removeAttributeNS(String namespaceURI, String localName) * NEEDSDOC @param qualifiedName * @param value value of attribute * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void setAttributeNS( String namespaceURI, String qualifiedName, String value) @@ -543,7 +548,7 @@ public Node cloneNode(boolean deep) * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public String getNodeValue() throws DOMException { @@ -558,7 +563,7 @@ public String getNodeValue() throws DOMException * * @param nodeValue Value to set this node to * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void setNodeValue(String nodeValue) throws DOMException { @@ -572,7 +577,7 @@ public void setNodeValue(String nodeValue) throws DOMException * NEEDSDOC @param value * @return value Node value * - * @throws DOMException + * @throws DOMException always, "not supported!" */ // public String getValue () @@ -586,19 +591,18 @@ public void setNodeValue(String nodeValue) throws DOMException * * @param value Value to set this node to * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void setValue(String value) throws DOMException { error(XMLErrorResources.ER_FUNCTION_NOT_SUPPORTED); //"setValue not supported!"); } - /** - * Returns the name of this attribute. - * - * @return the name of this attribute. - */ - + // /** + // * Returns the name of this attribute. + // * + // * @return the name of this attribute. + // */ // public String getName() // { // return this.getNodeName(); @@ -608,6 +612,7 @@ public void setValue(String value) throws DOMException * Unimplemented. See org.w3c.dom.Node * * @return null + * @throws DOMException always, "not supported!" */ public Element getOwnerElement() { @@ -651,7 +656,7 @@ public NamedNodeMap getAttributes() * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Node insertBefore(Node newChild, Node refChild) throws DOMException { @@ -669,7 +674,7 @@ public Node insertBefore(Node newChild, Node refChild) throws DOMException * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Node replaceChild(Node newChild, Node oldChild) throws DOMException { @@ -686,7 +691,7 @@ public Node replaceChild(Node newChild, Node oldChild) throws DOMException * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Node removeChild(Node oldChild) throws DOMException { @@ -746,7 +751,7 @@ public String getPrefix() * * @param prefix Prefix to set for this node * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void setPrefix(String prefix) throws DOMException { @@ -812,7 +817,7 @@ public Element getDocumentElement() * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Element createElement(String tagName) throws DOMException { @@ -872,7 +877,7 @@ public Comment createComment(String data) * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public CDATASection createCDATASection(String data) throws DOMException { @@ -890,7 +895,7 @@ public CDATASection createCDATASection(String data) throws DOMException * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public ProcessingInstruction createProcessingInstruction( String target, String data) throws DOMException @@ -908,7 +913,7 @@ public ProcessingInstruction createProcessingInstruction( * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Attr createAttribute(String name) throws DOMException { @@ -925,7 +930,7 @@ public Attr createAttribute(String name) throws DOMException * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public EntityReference createEntityReference(String name) throws DOMException @@ -947,7 +952,7 @@ public EntityReference createEntityReference(String name) * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Node importNode(Node importedNode, boolean deep) throws DOMException { @@ -965,7 +970,7 @@ public Node importNode(Node importedNode, boolean deep) throws DOMException * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Element createElementNS(String namespaceURI, String qualifiedName) throws DOMException @@ -984,7 +989,7 @@ public Element createElementNS(String namespaceURI, String qualifiedName) * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Attr createAttributeNS(String namespaceURI, String qualifiedName) throws DOMException @@ -1016,7 +1021,7 @@ public Element getElementById(String elementId) * * @param data data to set for this node * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void setData(String data) throws DOMException { @@ -1031,7 +1036,7 @@ public void setData(String data) throws DOMException * * @return null * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public String substringData(int offset, int count) throws DOMException { @@ -1046,7 +1051,7 @@ public String substringData(int offset, int count) throws DOMException * * @param arg String data to append * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void appendData(String arg) throws DOMException { @@ -1056,10 +1061,10 @@ public void appendData(String arg) throws DOMException /** * Unimplemented. * - * @param offset Start offset of substring to insert. - * NEEDSDOC @param arg + * @param offset Start offset at which to insert data + * @param arg String to be inserted. * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void insertData(int offset, String arg) throws DOMException { @@ -1072,7 +1077,7 @@ public void insertData(int offset, String arg) throws DOMException * @param offset Start offset of substring to delete. * @param count The length of the substring to delete. * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void deleteData(int offset, int count) throws DOMException { @@ -1086,7 +1091,7 @@ public void deleteData(int offset, int count) throws DOMException * @param count The length of the substring to replace. * @param arg substring to replace with * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public void replaceData(int offset, int count, String arg) throws DOMException @@ -1101,7 +1106,7 @@ public void replaceData(int offset, int count, String arg) * * @return null, unimplemented * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Text splitText(int offset) throws DOMException { @@ -1119,7 +1124,7 @@ public Text splitText(int offset) throws DOMException * * NEEDSDOC (adoptNode) @return * - * @throws DOMException + * @throws DOMException always, "not supported!" */ public Node adoptNode(Node source) throws DOMException { @@ -1157,7 +1162,7 @@ public String getInputEncoding() * of this document. This is <code>null</code> when unspecified. * @since DOM Level 3 * - * NEEDSDOC @param encoding + * @param encoding String containing the encoding name for this document */ public void setInputEncoding(String encoding) { @@ -1288,9 +1293,6 @@ public Object getFeature(String feature, String version) { * <code>Text</code> nodes, as well as any user data or event listeners * registered on the nodes. * @param arg The node to compare equality with. - * @param deep If <code>true</code>, recursively compare the subtrees; if - * <code>false</code>, compare only the nodes themselves (and its - * attributes, if it is an <code>Element</code>). * @return If the nodes, and possibly subtrees are equal, * <code>true</code> otherwise <code>false</code>. * @since DOM Level 3 @@ -1367,8 +1369,8 @@ else if (!getBaseURI().equals(((NodeImpl) arg).getBaseURI())) { * Look up the namespace URI associated to the given prefix, starting from this node. * Use lookupNamespaceURI(null) to lookup the default namespace * - * @param namespaceURI - * @return th URI for the namespace + * @param specifiedPrefix String to be resolved, or null to look up the default namespace + * @return String, the URI for the namespace, or null if prefix not bound * @since DOM Level 3 */ public String lookupNamespaceURI(String specifiedPrefix) { @@ -1531,10 +1533,10 @@ public boolean isDefaultNamespace(String namespaceURI){ /** * * DOM Level 3: - * Look up the prefix associated to the given namespace URI, starting from this node. + * Look up the prefix associated to the given namespace URI, starting from this node. REVIEW: What happens if more than one prefix is bound to the same namespace? I suspect any valid prefix may be resolved, but there may be some "nearest" logic; check the DOM Level 3 spec. * - * @param namespaceURI - * @return the prefix for the namespace + * @param namespaceURI String namespace URI to be resolved to a prefix + * @return String prefix for the namespace in this context. */ public String lookupPrefix(String namespaceURI){ @@ -1615,6 +1617,7 @@ public boolean isSameNode(Node other) { * <br>The string returned is made of the text content of this node * depending on its type, as defined below: * <table border='1'> + * <caption>Text Content of DOM nodes, by node type</caption> * <tr> * <th>Node type</th> * <th>Content</th> @@ -1665,6 +1668,7 @@ public void setTextContent(String textContent) * <br>The string returned is made of the text content of this node * depending on its type, as defined below: * <table border='1'> + * <caption>Text Content of DOM nodes, by node type</caption> * <tr> * <th>Node type</th> * <th>Content</th> @@ -1798,8 +1802,8 @@ public String getDocumentURI(){ /** * DOM Level 3 - * An attribute specifying the actual encoding of this document. This is - * <code>null</code> otherwise. + * @return a String specifying the actual encoding of this document, or + * <code>null</code> if no encoding could be retrieved * <br> This attribute represents the property [character encoding scheme] * defined in . * @since DOM Level 3 @@ -1810,10 +1814,10 @@ public String getActualEncoding() { /** * DOM Level 3 - * An attribute specifying the actual encoding of this document. This is - * <code>null</code> otherwise. * <br> This attribute represents the property [character encoding scheme] * defined in . + * @param value A string specifying the actual encoding of this document. This is + * <code>null</code> otherwise. * @since DOM Level 3 */ public void setActualEncoding(String value) { @@ -1821,7 +1825,9 @@ public void setActualEncoding(String value) { } /** - * DOM Level 3 + * DOM Level 3, UNIMPLEMENTED + * @param content String, new text to replace all of the node's text content + * @return null until implemented. */ public Text replaceWholeText(String content) throws DOMException{ @@ -1871,9 +1877,8 @@ public Text replaceWholeText(String content) } /** - * DOM Level 3 - * Returns all text of <code>Text</code> nodes logically-adjacent text - * nodes to this node, concatenated in document order. + * DOM Level 3, UNIMPLEMENTED. + * @return all text of <code>Text</code> nodes logically-adjacent to this node, concatenated in document order... or, in UnImplNode, null. * @since DOM Level 3 */ public String getWholeText(){ @@ -1898,24 +1903,28 @@ public String getWholeText(){ /** * DOM Level 3 - * Returns whether this text node contains whitespace in element content, - * often abusively called "ignorable whitespace". + * @return whether this text node contains whitespace in element + * content, often abusively called "ignorable whitespace". In + * UnImplNode, return false. */ public boolean isWhitespaceInElementContent(){ return false; } /** - * NON-DOM: set the type of this attribute to be ID type. + * NON-DOM, UNIMPLEMENTED: set the type of this attribute node to + * be ID type. * - * @param id + * @param id boolean, true or false to set new state */ public void setIdAttribute(boolean id){ //PENDING } /** - * DOM Level 3: register the given attribute node as an ID attribute + * DOM Level 3: register or deregister the given attribute node of this element as an ID attribute + * @param name Attribute node name + * @param makeID boolean, true or false to set new state */ public void setIdAttribute(String name, boolean makeId) { //PENDING @@ -1923,6 +1932,8 @@ public void setIdAttribute(String name, boolean makeId) { /** * DOM Level 3: register the given attribute node as an ID attribute + * @param at Attr node object to be registered or deregistered + * @param makeId boolean, true or false */ public void setIdAttributeNode(Attr at, boolean makeId) { //PENDING @@ -1930,6 +1941,9 @@ public void setIdAttributeNode(Attr at, boolean makeId) { /** * DOM Level 3: register the given attribute node as an ID attribute + * @param namespaceURI: String, namespace of attribute to be bound + * @param localName String, localName of attribute to be bound + * @param makeId boolean, true or false */ public void setIdAttributeNS(String namespaceURI, String localName, boolean makeId) { @@ -1938,7 +1952,8 @@ public void setIdAttributeNS(String namespaceURI, String localName, /** * Method getSchemaTypeInfo. - * @return TypeInfo + * @return TypeInfo for this node, if it has a schema type, or null if not. + * (In this implementation, always null) */ public TypeInfo getSchemaTypeInfo(){ return null; //PENDING diff --git a/src/org/apache/xml/utils/WrappedRuntimeException.java b/xalan/src/main/java/org/apache/xml/utils/WrappedRuntimeException.java similarity index 100% rename from src/org/apache/xml/utils/WrappedRuntimeException.java rename to xalan/src/main/java/org/apache/xml/utils/WrappedRuntimeException.java diff --git a/src/org/apache/xml/utils/WrongParserException.java b/xalan/src/main/java/org/apache/xml/utils/WrongParserException.java similarity index 100% rename from src/org/apache/xml/utils/WrongParserException.java rename to xalan/src/main/java/org/apache/xml/utils/WrongParserException.java diff --git a/src/org/apache/xml/utils/XML11Char.java b/xalan/src/main/java/org/apache/xml/utils/XML11Char.java similarity index 100% rename from src/org/apache/xml/utils/XML11Char.java rename to xalan/src/main/java/org/apache/xml/utils/XML11Char.java diff --git a/src/org/apache/xml/utils/XMLChar.java b/xalan/src/main/java/org/apache/xml/utils/XMLChar.java similarity index 100% rename from src/org/apache/xml/utils/XMLChar.java rename to xalan/src/main/java/org/apache/xml/utils/XMLChar.java diff --git a/src/org/apache/xml/utils/XMLCharacterRecognizer.java b/xalan/src/main/java/org/apache/xml/utils/XMLCharacterRecognizer.java similarity index 100% rename from src/org/apache/xml/utils/XMLCharacterRecognizer.java rename to xalan/src/main/java/org/apache/xml/utils/XMLCharacterRecognizer.java diff --git a/src/org/apache/xml/utils/XMLReaderManager.java b/xalan/src/main/java/org/apache/xml/utils/XMLReaderManager.java similarity index 97% rename from src/org/apache/xml/utils/XMLReaderManager.java rename to xalan/src/main/java/org/apache/xml/utils/XMLReaderManager.java index 780cc4bf9..409136cbe 100644 --- a/src/org/apache/xml/utils/XMLReaderManager.java +++ b/xalan/src/main/java/org/apache/xml/utils/XMLReaderManager.java @@ -146,17 +146,17 @@ public synchronized XMLReader getXMLReader() throws SAXException { } /** - * Mark the cached XMLReader as available. If the reader was not - * actually in the cache, do nothing. + * Mark the cached XMLReader as available for reuse. * * @param reader The XMLReader that's being released. */ public synchronized void releaseXMLReader(XMLReader reader) { - if (reader == null) { + if (reader == null) { return; } // If the reader that's being released is the cached reader // for this thread, mark it as no longer being in use. + // TODO: REVIEW. I'm not sure this sequence makes sense. if (m_readers.get() == reader) { m_readers.set(null); m_inUse.put(reader, Boolean.FALSE); diff --git a/src/org/apache/xml/utils/XMLString.java b/xalan/src/main/java/org/apache/xml/utils/XMLString.java similarity index 100% rename from src/org/apache/xml/utils/XMLString.java rename to xalan/src/main/java/org/apache/xml/utils/XMLString.java diff --git a/src/org/apache/xml/utils/XMLStringDefault.java b/xalan/src/main/java/org/apache/xml/utils/XMLStringDefault.java similarity index 100% rename from src/org/apache/xml/utils/XMLStringDefault.java rename to xalan/src/main/java/org/apache/xml/utils/XMLStringDefault.java diff --git a/src/org/apache/xml/utils/XMLStringFactory.java b/xalan/src/main/java/org/apache/xml/utils/XMLStringFactory.java similarity index 100% rename from src/org/apache/xml/utils/XMLStringFactory.java rename to xalan/src/main/java/org/apache/xml/utils/XMLStringFactory.java diff --git a/src/org/apache/xml/utils/XMLStringFactoryDefault.java b/xalan/src/main/java/org/apache/xml/utils/XMLStringFactoryDefault.java similarity index 100% rename from src/org/apache/xml/utils/XMLStringFactoryDefault.java rename to xalan/src/main/java/org/apache/xml/utils/XMLStringFactoryDefault.java diff --git a/src/org/apache/xml/utils/package.html b/xalan/src/main/java/org/apache/xml/utils/package.html similarity index 100% rename from src/org/apache/xml/utils/package.html rename to xalan/src/main/java/org/apache/xml/utils/package.html diff --git a/src/org/apache/xml/utils/res/CharArrayWrapper.java b/xalan/src/main/java/org/apache/xml/utils/res/CharArrayWrapper.java similarity index 100% rename from src/org/apache/xml/utils/res/CharArrayWrapper.java rename to xalan/src/main/java/org/apache/xml/utils/res/CharArrayWrapper.java diff --git a/src/org/apache/xml/utils/res/IntArrayWrapper.java b/xalan/src/main/java/org/apache/xml/utils/res/IntArrayWrapper.java similarity index 100% rename from src/org/apache/xml/utils/res/IntArrayWrapper.java rename to xalan/src/main/java/org/apache/xml/utils/res/IntArrayWrapper.java diff --git a/src/org/apache/xml/utils/res/LongArrayWrapper.java b/xalan/src/main/java/org/apache/xml/utils/res/LongArrayWrapper.java similarity index 100% rename from src/org/apache/xml/utils/res/LongArrayWrapper.java rename to xalan/src/main/java/org/apache/xml/utils/res/LongArrayWrapper.java diff --git a/src/org/apache/xml/utils/res/StringArrayWrapper.java b/xalan/src/main/java/org/apache/xml/utils/res/StringArrayWrapper.java similarity index 100% rename from src/org/apache/xml/utils/res/StringArrayWrapper.java rename to xalan/src/main/java/org/apache/xml/utils/res/StringArrayWrapper.java diff --git a/src/org/apache/xml/utils/res/XResourceBundle.java b/xalan/src/main/java/org/apache/xml/utils/res/XResourceBundle.java similarity index 100% rename from src/org/apache/xml/utils/res/XResourceBundle.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResourceBundle.java diff --git a/src/org/apache/xml/utils/res/XResourceBundleBase.java b/xalan/src/main/java/org/apache/xml/utils/res/XResourceBundleBase.java similarity index 100% rename from src/org/apache/xml/utils/res/XResourceBundleBase.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResourceBundleBase.java diff --git a/src/org/apache/xml/utils/res/XResources_cy.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_cy.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_cy.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_cy.java diff --git a/src/org/apache/xml/utils/res/XResources_de.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_de.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_de.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_de.java diff --git a/src/org/apache/xml/utils/res/XResources_el.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_el.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_el.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_el.java diff --git a/src/org/apache/xml/utils/res/XResources_en.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_en.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_en.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_en.java diff --git a/src/org/apache/xml/utils/res/XResources_es.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_es.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_es.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_es.java diff --git a/src/org/apache/xml/utils/res/XResources_fr.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_fr.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_fr.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_fr.java diff --git a/src/org/apache/xml/utils/res/XResources_he.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_he.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_he.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_he.java diff --git a/src/org/apache/xml/utils/res/XResources_hy.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_hy.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_hy.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_hy.java diff --git a/src/org/apache/xml/utils/res/XResources_it.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_it.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_it.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_it.java diff --git a/src/org/apache/xml/utils/res/XResources_ja_JP_A.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_ja_JP_A.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_ja_JP_A.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_ja_JP_A.java diff --git a/src/org/apache/xml/utils/res/XResources_ja_JP_HA.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_ja_JP_HA.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_ja_JP_HA.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_ja_JP_HA.java diff --git a/src/org/apache/xml/utils/res/XResources_ja_JP_HI.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_ja_JP_HI.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_ja_JP_HI.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_ja_JP_HI.java diff --git a/src/org/apache/xml/utils/res/XResources_ja_JP_I.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_ja_JP_I.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_ja_JP_I.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_ja_JP_I.java diff --git a/src/org/apache/xml/utils/res/XResources_ka.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_ka.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_ka.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_ka.java diff --git a/src/org/apache/xml/utils/res/XResources_ko.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_ko.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_ko.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_ko.java diff --git a/src/org/apache/xml/utils/res/XResources_sv.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_sv.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_sv.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_sv.java diff --git a/src/org/apache/xml/utils/res/XResources_zh_CN.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_zh_CN.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_zh_CN.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_zh_CN.java diff --git a/src/org/apache/xml/utils/res/XResources_zh_TW.java b/xalan/src/main/java/org/apache/xml/utils/res/XResources_zh_TW.java similarity index 100% rename from src/org/apache/xml/utils/res/XResources_zh_TW.java rename to xalan/src/main/java/org/apache/xml/utils/res/XResources_zh_TW.java diff --git a/src/org/apache/xpath/Arg.java b/xalan/src/main/java/org/apache/xpath/Arg.java similarity index 100% rename from src/org/apache/xpath/Arg.java rename to xalan/src/main/java/org/apache/xpath/Arg.java diff --git a/src/org/apache/xpath/CachedXPathAPI.java b/xalan/src/main/java/org/apache/xpath/CachedXPathAPI.java similarity index 100% rename from src/org/apache/xpath/CachedXPathAPI.java rename to xalan/src/main/java/org/apache/xpath/CachedXPathAPI.java diff --git a/src/org/apache/xpath/Expression.java b/xalan/src/main/java/org/apache/xpath/Expression.java similarity index 100% rename from src/org/apache/xpath/Expression.java rename to xalan/src/main/java/org/apache/xpath/Expression.java diff --git a/src/org/apache/xpath/ExpressionNode.java b/xalan/src/main/java/org/apache/xpath/ExpressionNode.java similarity index 77% rename from src/org/apache/xpath/ExpressionNode.java rename to xalan/src/main/java/org/apache/xpath/ExpressionNode.java index 3a16d7090..a6edd57e5 100644 --- a/src/org/apache/xpath/ExpressionNode.java +++ b/xalan/src/main/java/org/apache/xpath/ExpressionNode.java @@ -33,20 +33,28 @@ */ public interface ExpressionNode extends SourceLocator { - /** This pair of methods are used to inform the node of its - parent. */ + /** @param n ExpressionNode to be set as parent of this one + */ public void exprSetParent(ExpressionNode n); + /** @return ExpressionNode currently set as parent of this one + */ public ExpressionNode exprGetParent(); /** This method tells the node to add its argument to the node's - list of children. */ + list of children. + @param n ExpressionNode to be added to the list of children + @param i Insertion offset within that list + */ public void exprAddChild(ExpressionNode n, int i); /** This method returns a child node. The children are numbered - from zero, left to right. */ + from zero, left to right. + @param i Index of child to be returned + @return ExpressionNode at that child offset, or null if none found + */ public ExpressionNode exprGetChild(int i); - /** Return the number of children the node has. */ + /** @return the number of children this ExpressionNode has. */ public int exprGetNumChildren(); } diff --git a/src/org/apache/xpath/ExpressionOwner.java b/xalan/src/main/java/org/apache/xpath/ExpressionOwner.java similarity index 100% rename from src/org/apache/xpath/ExpressionOwner.java rename to xalan/src/main/java/org/apache/xpath/ExpressionOwner.java diff --git a/src/org/apache/xpath/ExtensionsProvider.java b/xalan/src/main/java/org/apache/xpath/ExtensionsProvider.java similarity index 100% rename from src/org/apache/xpath/ExtensionsProvider.java rename to xalan/src/main/java/org/apache/xpath/ExtensionsProvider.java diff --git a/src/org/apache/xpath/FoundIndex.java b/xalan/src/main/java/org/apache/xpath/FoundIndex.java similarity index 100% rename from src/org/apache/xpath/FoundIndex.java rename to xalan/src/main/java/org/apache/xpath/FoundIndex.java diff --git a/src/org/apache/xpath/NodeSet.java b/xalan/src/main/java/org/apache/xpath/NodeSet.java similarity index 100% rename from src/org/apache/xpath/NodeSet.java rename to xalan/src/main/java/org/apache/xpath/NodeSet.java diff --git a/src/org/apache/xpath/NodeSetDTM.java b/xalan/src/main/java/org/apache/xpath/NodeSetDTM.java similarity index 100% rename from src/org/apache/xpath/NodeSetDTM.java rename to xalan/src/main/java/org/apache/xpath/NodeSetDTM.java diff --git a/src/org/apache/xpath/SourceTree.java b/xalan/src/main/java/org/apache/xpath/SourceTree.java similarity index 100% rename from src/org/apache/xpath/SourceTree.java rename to xalan/src/main/java/org/apache/xpath/SourceTree.java diff --git a/src/org/apache/xpath/SourceTreeManager.java b/xalan/src/main/java/org/apache/xpath/SourceTreeManager.java similarity index 100% rename from src/org/apache/xpath/SourceTreeManager.java rename to xalan/src/main/java/org/apache/xpath/SourceTreeManager.java diff --git a/src/org/apache/xpath/VariableStack.java b/xalan/src/main/java/org/apache/xpath/VariableStack.java similarity index 100% rename from src/org/apache/xpath/VariableStack.java rename to xalan/src/main/java/org/apache/xpath/VariableStack.java diff --git a/src/org/apache/xpath/WhitespaceStrippingElementMatcher.java b/xalan/src/main/java/org/apache/xpath/WhitespaceStrippingElementMatcher.java similarity index 95% rename from src/org/apache/xpath/WhitespaceStrippingElementMatcher.java rename to xalan/src/main/java/org/apache/xpath/WhitespaceStrippingElementMatcher.java index 2af8fdc41..9720f6866 100644 --- a/src/org/apache/xpath/WhitespaceStrippingElementMatcher.java +++ b/xalan/src/main/java/org/apache/xpath/WhitespaceStrippingElementMatcher.java @@ -39,7 +39,7 @@ public interface WhitespaceStrippingElementMatcher * * @return true if the whitespace should be stripped. * - * @throws TransformerException + * @throws TransformerException if the question can't be answered (bad arguments, bad state). */ public boolean shouldStripWhiteSpace( XPathContext support, Element targetElement) throws TransformerException; diff --git a/src/org/apache/xpath/XPath.java b/xalan/src/main/java/org/apache/xpath/XPath.java similarity index 100% rename from src/org/apache/xpath/XPath.java rename to xalan/src/main/java/org/apache/xpath/XPath.java diff --git a/src/org/apache/xpath/XPathAPI.java b/xalan/src/main/java/org/apache/xpath/XPathAPI.java similarity index 100% rename from src/org/apache/xpath/XPathAPI.java rename to xalan/src/main/java/org/apache/xpath/XPathAPI.java diff --git a/src/org/apache/xpath/XPathContext.java b/xalan/src/main/java/org/apache/xpath/XPathContext.java similarity index 100% rename from src/org/apache/xpath/XPathContext.java rename to xalan/src/main/java/org/apache/xpath/XPathContext.java diff --git a/src/org/apache/xpath/XPathException.java b/xalan/src/main/java/org/apache/xpath/XPathException.java similarity index 100% rename from src/org/apache/xpath/XPathException.java rename to xalan/src/main/java/org/apache/xpath/XPathException.java diff --git a/src/org/apache/xpath/XPathFactory.java b/xalan/src/main/java/org/apache/xpath/XPathFactory.java similarity index 100% rename from src/org/apache/xpath/XPathFactory.java rename to xalan/src/main/java/org/apache/xpath/XPathFactory.java diff --git a/src/org/apache/xpath/XPathProcessorException.java b/xalan/src/main/java/org/apache/xpath/XPathProcessorException.java similarity index 100% rename from src/org/apache/xpath/XPathProcessorException.java rename to xalan/src/main/java/org/apache/xpath/XPathProcessorException.java diff --git a/src/org/apache/xpath/XPathVisitable.java b/xalan/src/main/java/org/apache/xpath/XPathVisitable.java similarity index 100% rename from src/org/apache/xpath/XPathVisitable.java rename to xalan/src/main/java/org/apache/xpath/XPathVisitable.java diff --git a/src/org/apache/xpath/XPathVisitor.java b/xalan/src/main/java/org/apache/xpath/XPathVisitor.java similarity index 100% rename from src/org/apache/xpath/XPathVisitor.java rename to xalan/src/main/java/org/apache/xpath/XPathVisitor.java diff --git a/src/org/apache/xpath/axes/AttributeIterator.java b/xalan/src/main/java/org/apache/xpath/axes/AttributeIterator.java similarity index 100% rename from src/org/apache/xpath/axes/AttributeIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/AttributeIterator.java diff --git a/src/org/apache/xpath/axes/AxesWalker.java b/xalan/src/main/java/org/apache/xpath/axes/AxesWalker.java similarity index 100% rename from src/org/apache/xpath/axes/AxesWalker.java rename to xalan/src/main/java/org/apache/xpath/axes/AxesWalker.java diff --git a/src/org/apache/xpath/axes/BasicTestIterator.java b/xalan/src/main/java/org/apache/xpath/axes/BasicTestIterator.java similarity index 100% rename from src/org/apache/xpath/axes/BasicTestIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/BasicTestIterator.java diff --git a/src/org/apache/xpath/axes/ChildIterator.java b/xalan/src/main/java/org/apache/xpath/axes/ChildIterator.java similarity index 100% rename from src/org/apache/xpath/axes/ChildIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/ChildIterator.java diff --git a/src/org/apache/xpath/axes/ChildTestIterator.java b/xalan/src/main/java/org/apache/xpath/axes/ChildTestIterator.java similarity index 100% rename from src/org/apache/xpath/axes/ChildTestIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/ChildTestIterator.java diff --git a/src/org/apache/xpath/axes/ContextNodeList.java b/xalan/src/main/java/org/apache/xpath/axes/ContextNodeList.java similarity index 100% rename from src/org/apache/xpath/axes/ContextNodeList.java rename to xalan/src/main/java/org/apache/xpath/axes/ContextNodeList.java diff --git a/src/org/apache/xpath/axes/DescendantIterator.java b/xalan/src/main/java/org/apache/xpath/axes/DescendantIterator.java similarity index 100% rename from src/org/apache/xpath/axes/DescendantIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/DescendantIterator.java diff --git a/src/org/apache/xpath/axes/FilterExprIterator.java b/xalan/src/main/java/org/apache/xpath/axes/FilterExprIterator.java similarity index 100% rename from src/org/apache/xpath/axes/FilterExprIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/FilterExprIterator.java diff --git a/src/org/apache/xpath/axes/FilterExprIteratorSimple.java b/xalan/src/main/java/org/apache/xpath/axes/FilterExprIteratorSimple.java similarity index 100% rename from src/org/apache/xpath/axes/FilterExprIteratorSimple.java rename to xalan/src/main/java/org/apache/xpath/axes/FilterExprIteratorSimple.java diff --git a/src/org/apache/xpath/axes/FilterExprWalker.java b/xalan/src/main/java/org/apache/xpath/axes/FilterExprWalker.java similarity index 100% rename from src/org/apache/xpath/axes/FilterExprWalker.java rename to xalan/src/main/java/org/apache/xpath/axes/FilterExprWalker.java diff --git a/src/org/apache/xpath/axes/HasPositionalPredChecker.java b/xalan/src/main/java/org/apache/xpath/axes/HasPositionalPredChecker.java similarity index 100% rename from src/org/apache/xpath/axes/HasPositionalPredChecker.java rename to xalan/src/main/java/org/apache/xpath/axes/HasPositionalPredChecker.java diff --git a/src/org/apache/xpath/axes/IteratorPool.java b/xalan/src/main/java/org/apache/xpath/axes/IteratorPool.java similarity index 100% rename from src/org/apache/xpath/axes/IteratorPool.java rename to xalan/src/main/java/org/apache/xpath/axes/IteratorPool.java diff --git a/src/org/apache/xpath/axes/LocPathIterator.java b/xalan/src/main/java/org/apache/xpath/axes/LocPathIterator.java similarity index 99% rename from src/org/apache/xpath/axes/LocPathIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/LocPathIterator.java index 38ef745d0..23fecf175 100644 --- a/src/org/apache/xpath/axes/LocPathIterator.java +++ b/xalan/src/main/java/org/apache/xpath/axes/LocPathIterator.java @@ -598,7 +598,7 @@ public int previousNode() * show. It is here only to fullfill the DOM NodeIterator * interface.</p> * - * @return For now, always NodeFilter.SHOW_ALL & ~NodeFilter.SHOW_ENTITY_REFERENCE. + * @return For now, always NodeFilter.SHOW_ALL & ~NodeFilter.SHOW_ENTITY_REFERENCE. * @see org.w3c.dom.traversal.NodeIterator */ public int getWhatToShow() diff --git a/src/org/apache/xpath/axes/MatchPatternIterator.java b/xalan/src/main/java/org/apache/xpath/axes/MatchPatternIterator.java similarity index 100% rename from src/org/apache/xpath/axes/MatchPatternIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/MatchPatternIterator.java diff --git a/src/org/apache/xpath/axes/NodeSequence.java b/xalan/src/main/java/org/apache/xpath/axes/NodeSequence.java similarity index 100% rename from src/org/apache/xpath/axes/NodeSequence.java rename to xalan/src/main/java/org/apache/xpath/axes/NodeSequence.java diff --git a/src/org/apache/xpath/axes/OneStepIterator.java b/xalan/src/main/java/org/apache/xpath/axes/OneStepIterator.java similarity index 100% rename from src/org/apache/xpath/axes/OneStepIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/OneStepIterator.java diff --git a/src/org/apache/xpath/axes/OneStepIteratorForward.java b/xalan/src/main/java/org/apache/xpath/axes/OneStepIteratorForward.java similarity index 98% rename from src/org/apache/xpath/axes/OneStepIteratorForward.java rename to xalan/src/main/java/org/apache/xpath/axes/OneStepIteratorForward.java index 2fe1583a8..4af845294 100644 --- a/src/org/apache/xpath/axes/OneStepIteratorForward.java +++ b/xalan/src/main/java/org/apache/xpath/axes/OneStepIteratorForward.java @@ -133,7 +133,7 @@ public void setRoot(int context, Object environment) // } /** - * Get the next node via getFirstAttribute && getNextAttribute. + * Get the next node via getFirstAttribute and getNextAttribute. */ protected int getNextNode() { diff --git a/src/org/apache/xpath/axes/PathComponent.java b/xalan/src/main/java/org/apache/xpath/axes/PathComponent.java similarity index 100% rename from src/org/apache/xpath/axes/PathComponent.java rename to xalan/src/main/java/org/apache/xpath/axes/PathComponent.java diff --git a/src/org/apache/xpath/axes/PredicatedNodeTest.java b/xalan/src/main/java/org/apache/xpath/axes/PredicatedNodeTest.java similarity index 100% rename from src/org/apache/xpath/axes/PredicatedNodeTest.java rename to xalan/src/main/java/org/apache/xpath/axes/PredicatedNodeTest.java diff --git a/src/org/apache/xpath/axes/RTFIterator.java b/xalan/src/main/java/org/apache/xpath/axes/RTFIterator.java similarity index 100% rename from src/org/apache/xpath/axes/RTFIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/RTFIterator.java diff --git a/src/org/apache/xpath/axes/ReverseAxesWalker.java b/xalan/src/main/java/org/apache/xpath/axes/ReverseAxesWalker.java similarity index 100% rename from src/org/apache/xpath/axes/ReverseAxesWalker.java rename to xalan/src/main/java/org/apache/xpath/axes/ReverseAxesWalker.java diff --git a/src/org/apache/xpath/axes/SelfIteratorNoPredicate.java b/xalan/src/main/java/org/apache/xpath/axes/SelfIteratorNoPredicate.java similarity index 100% rename from src/org/apache/xpath/axes/SelfIteratorNoPredicate.java rename to xalan/src/main/java/org/apache/xpath/axes/SelfIteratorNoPredicate.java diff --git a/src/org/apache/xpath/axes/SubContextList.java b/xalan/src/main/java/org/apache/xpath/axes/SubContextList.java similarity index 100% rename from src/org/apache/xpath/axes/SubContextList.java rename to xalan/src/main/java/org/apache/xpath/axes/SubContextList.java diff --git a/src/org/apache/xpath/axes/UnionChildIterator.java b/xalan/src/main/java/org/apache/xpath/axes/UnionChildIterator.java similarity index 100% rename from src/org/apache/xpath/axes/UnionChildIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/UnionChildIterator.java diff --git a/src/org/apache/xpath/axes/UnionPathIterator.java b/xalan/src/main/java/org/apache/xpath/axes/UnionPathIterator.java similarity index 100% rename from src/org/apache/xpath/axes/UnionPathIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/UnionPathIterator.java diff --git a/src/org/apache/xpath/axes/WalkerFactory.java b/xalan/src/main/java/org/apache/xpath/axes/WalkerFactory.java similarity index 100% rename from src/org/apache/xpath/axes/WalkerFactory.java rename to xalan/src/main/java/org/apache/xpath/axes/WalkerFactory.java diff --git a/src/org/apache/xpath/axes/WalkingIterator.java b/xalan/src/main/java/org/apache/xpath/axes/WalkingIterator.java similarity index 100% rename from src/org/apache/xpath/axes/WalkingIterator.java rename to xalan/src/main/java/org/apache/xpath/axes/WalkingIterator.java diff --git a/src/org/apache/xpath/axes/WalkingIteratorSorted.java b/xalan/src/main/java/org/apache/xpath/axes/WalkingIteratorSorted.java similarity index 100% rename from src/org/apache/xpath/axes/WalkingIteratorSorted.java rename to xalan/src/main/java/org/apache/xpath/axes/WalkingIteratorSorted.java diff --git a/src/org/apache/xpath/axes/package.html b/xalan/src/main/java/org/apache/xpath/axes/package.html similarity index 100% rename from src/org/apache/xpath/axes/package.html rename to xalan/src/main/java/org/apache/xpath/axes/package.html diff --git a/src/org/apache/xpath/compiler/Compiler.java b/xalan/src/main/java/org/apache/xpath/compiler/Compiler.java similarity index 100% rename from src/org/apache/xpath/compiler/Compiler.java rename to xalan/src/main/java/org/apache/xpath/compiler/Compiler.java diff --git a/src/org/apache/xpath/compiler/FunctionTable.java b/xalan/src/main/java/org/apache/xpath/compiler/FunctionTable.java similarity index 100% rename from src/org/apache/xpath/compiler/FunctionTable.java rename to xalan/src/main/java/org/apache/xpath/compiler/FunctionTable.java diff --git a/src/org/apache/xpath/compiler/Keywords.java b/xalan/src/main/java/org/apache/xpath/compiler/Keywords.java similarity index 100% rename from src/org/apache/xpath/compiler/Keywords.java rename to xalan/src/main/java/org/apache/xpath/compiler/Keywords.java diff --git a/src/org/apache/xpath/compiler/Lexer.java b/xalan/src/main/java/org/apache/xpath/compiler/Lexer.java similarity index 100% rename from src/org/apache/xpath/compiler/Lexer.java rename to xalan/src/main/java/org/apache/xpath/compiler/Lexer.java diff --git a/src/org/apache/xpath/compiler/OpCodes.java b/xalan/src/main/java/org/apache/xpath/compiler/OpCodes.java similarity index 100% rename from src/org/apache/xpath/compiler/OpCodes.java rename to xalan/src/main/java/org/apache/xpath/compiler/OpCodes.java diff --git a/src/org/apache/xpath/compiler/OpMap.java b/xalan/src/main/java/org/apache/xpath/compiler/OpMap.java similarity index 100% rename from src/org/apache/xpath/compiler/OpMap.java rename to xalan/src/main/java/org/apache/xpath/compiler/OpMap.java diff --git a/src/org/apache/xpath/compiler/OpMapVector.java b/xalan/src/main/java/org/apache/xpath/compiler/OpMapVector.java similarity index 100% rename from src/org/apache/xpath/compiler/OpMapVector.java rename to xalan/src/main/java/org/apache/xpath/compiler/OpMapVector.java diff --git a/src/org/apache/xpath/compiler/PsuedoNames.java b/xalan/src/main/java/org/apache/xpath/compiler/PsuedoNames.java similarity index 100% rename from src/org/apache/xpath/compiler/PsuedoNames.java rename to xalan/src/main/java/org/apache/xpath/compiler/PsuedoNames.java diff --git a/src/org/apache/xpath/compiler/XPathDumper.java b/xalan/src/main/java/org/apache/xpath/compiler/XPathDumper.java similarity index 100% rename from src/org/apache/xpath/compiler/XPathDumper.java rename to xalan/src/main/java/org/apache/xpath/compiler/XPathDumper.java diff --git a/src/org/apache/xpath/compiler/XPathParser.java b/xalan/src/main/java/org/apache/xpath/compiler/XPathParser.java similarity index 100% rename from src/org/apache/xpath/compiler/XPathParser.java rename to xalan/src/main/java/org/apache/xpath/compiler/XPathParser.java diff --git a/src/org/apache/xpath/compiler/package.html b/xalan/src/main/java/org/apache/xpath/compiler/package.html similarity index 100% rename from src/org/apache/xpath/compiler/package.html rename to xalan/src/main/java/org/apache/xpath/compiler/package.html diff --git a/src/org/apache/xpath/domapi/XPathEvaluatorImpl.java b/xalan/src/main/java/org/apache/xpath/domapi/XPathEvaluatorImpl.java similarity index 100% rename from src/org/apache/xpath/domapi/XPathEvaluatorImpl.java rename to xalan/src/main/java/org/apache/xpath/domapi/XPathEvaluatorImpl.java diff --git a/src/org/apache/xpath/domapi/XPathExpressionImpl.java b/xalan/src/main/java/org/apache/xpath/domapi/XPathExpressionImpl.java similarity index 100% rename from src/org/apache/xpath/domapi/XPathExpressionImpl.java rename to xalan/src/main/java/org/apache/xpath/domapi/XPathExpressionImpl.java diff --git a/src/org/apache/xpath/domapi/XPathNSResolverImpl.java b/xalan/src/main/java/org/apache/xpath/domapi/XPathNSResolverImpl.java similarity index 100% rename from src/org/apache/xpath/domapi/XPathNSResolverImpl.java rename to xalan/src/main/java/org/apache/xpath/domapi/XPathNSResolverImpl.java diff --git a/src/org/apache/xpath/domapi/XPathNamespaceImpl.java b/xalan/src/main/java/org/apache/xpath/domapi/XPathNamespaceImpl.java similarity index 100% rename from src/org/apache/xpath/domapi/XPathNamespaceImpl.java rename to xalan/src/main/java/org/apache/xpath/domapi/XPathNamespaceImpl.java diff --git a/src/org/apache/xpath/domapi/XPathResultImpl.java b/xalan/src/main/java/org/apache/xpath/domapi/XPathResultImpl.java similarity index 100% rename from src/org/apache/xpath/domapi/XPathResultImpl.java rename to xalan/src/main/java/org/apache/xpath/domapi/XPathResultImpl.java diff --git a/src/org/apache/xpath/domapi/XPathStylesheetDOM3Exception.java b/xalan/src/main/java/org/apache/xpath/domapi/XPathStylesheetDOM3Exception.java similarity index 100% rename from src/org/apache/xpath/domapi/XPathStylesheetDOM3Exception.java rename to xalan/src/main/java/org/apache/xpath/domapi/XPathStylesheetDOM3Exception.java diff --git a/src/org/apache/xpath/domapi/package.html b/xalan/src/main/java/org/apache/xpath/domapi/package.html similarity index 100% rename from src/org/apache/xpath/domapi/package.html rename to xalan/src/main/java/org/apache/xpath/domapi/package.html diff --git a/src/org/apache/xpath/functions/FuncBoolean.java b/xalan/src/main/java/org/apache/xpath/functions/FuncBoolean.java similarity index 100% rename from src/org/apache/xpath/functions/FuncBoolean.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncBoolean.java diff --git a/src/org/apache/xpath/functions/FuncCeiling.java b/xalan/src/main/java/org/apache/xpath/functions/FuncCeiling.java similarity index 100% rename from src/org/apache/xpath/functions/FuncCeiling.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncCeiling.java diff --git a/src/org/apache/xpath/functions/FuncConcat.java b/xalan/src/main/java/org/apache/xpath/functions/FuncConcat.java similarity index 100% rename from src/org/apache/xpath/functions/FuncConcat.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncConcat.java diff --git a/src/org/apache/xpath/functions/FuncContains.java b/xalan/src/main/java/org/apache/xpath/functions/FuncContains.java similarity index 100% rename from src/org/apache/xpath/functions/FuncContains.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncContains.java diff --git a/src/org/apache/xpath/functions/FuncCount.java b/xalan/src/main/java/org/apache/xpath/functions/FuncCount.java similarity index 100% rename from src/org/apache/xpath/functions/FuncCount.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncCount.java diff --git a/src/org/apache/xpath/functions/FuncCurrent.java b/xalan/src/main/java/org/apache/xpath/functions/FuncCurrent.java similarity index 100% rename from src/org/apache/xpath/functions/FuncCurrent.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncCurrent.java diff --git a/src/org/apache/xpath/functions/FuncDoclocation.java b/xalan/src/main/java/org/apache/xpath/functions/FuncDoclocation.java similarity index 100% rename from src/org/apache/xpath/functions/FuncDoclocation.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncDoclocation.java diff --git a/src/org/apache/xpath/functions/FuncExtElementAvailable.java b/xalan/src/main/java/org/apache/xpath/functions/FuncExtElementAvailable.java similarity index 100% rename from src/org/apache/xpath/functions/FuncExtElementAvailable.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncExtElementAvailable.java diff --git a/src/org/apache/xpath/functions/FuncExtFunction.java b/xalan/src/main/java/org/apache/xpath/functions/FuncExtFunction.java similarity index 100% rename from src/org/apache/xpath/functions/FuncExtFunction.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncExtFunction.java diff --git a/src/org/apache/xpath/functions/FuncExtFunctionAvailable.java b/xalan/src/main/java/org/apache/xpath/functions/FuncExtFunctionAvailable.java similarity index 100% rename from src/org/apache/xpath/functions/FuncExtFunctionAvailable.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncExtFunctionAvailable.java diff --git a/src/org/apache/xpath/functions/FuncFalse.java b/xalan/src/main/java/org/apache/xpath/functions/FuncFalse.java similarity index 100% rename from src/org/apache/xpath/functions/FuncFalse.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncFalse.java diff --git a/src/org/apache/xpath/functions/FuncFloor.java b/xalan/src/main/java/org/apache/xpath/functions/FuncFloor.java similarity index 100% rename from src/org/apache/xpath/functions/FuncFloor.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncFloor.java diff --git a/src/org/apache/xpath/functions/FuncGenerateId.java b/xalan/src/main/java/org/apache/xpath/functions/FuncGenerateId.java similarity index 100% rename from src/org/apache/xpath/functions/FuncGenerateId.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncGenerateId.java diff --git a/src/org/apache/xpath/functions/FuncId.java b/xalan/src/main/java/org/apache/xpath/functions/FuncId.java similarity index 100% rename from src/org/apache/xpath/functions/FuncId.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncId.java diff --git a/src/org/apache/xpath/functions/FuncLang.java b/xalan/src/main/java/org/apache/xpath/functions/FuncLang.java similarity index 100% rename from src/org/apache/xpath/functions/FuncLang.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncLang.java diff --git a/src/org/apache/xpath/functions/FuncLast.java b/xalan/src/main/java/org/apache/xpath/functions/FuncLast.java similarity index 100% rename from src/org/apache/xpath/functions/FuncLast.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncLast.java diff --git a/src/org/apache/xpath/functions/FuncLocalPart.java b/xalan/src/main/java/org/apache/xpath/functions/FuncLocalPart.java similarity index 100% rename from src/org/apache/xpath/functions/FuncLocalPart.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncLocalPart.java diff --git a/src/org/apache/xpath/functions/FuncNamespace.java b/xalan/src/main/java/org/apache/xpath/functions/FuncNamespace.java similarity index 100% rename from src/org/apache/xpath/functions/FuncNamespace.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncNamespace.java diff --git a/src/org/apache/xpath/functions/FuncNormalizeSpace.java b/xalan/src/main/java/org/apache/xpath/functions/FuncNormalizeSpace.java similarity index 100% rename from src/org/apache/xpath/functions/FuncNormalizeSpace.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncNormalizeSpace.java diff --git a/src/org/apache/xpath/functions/FuncNot.java b/xalan/src/main/java/org/apache/xpath/functions/FuncNot.java similarity index 100% rename from src/org/apache/xpath/functions/FuncNot.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncNot.java diff --git a/src/org/apache/xpath/functions/FuncNumber.java b/xalan/src/main/java/org/apache/xpath/functions/FuncNumber.java similarity index 100% rename from src/org/apache/xpath/functions/FuncNumber.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncNumber.java diff --git a/src/org/apache/xpath/functions/FuncPosition.java b/xalan/src/main/java/org/apache/xpath/functions/FuncPosition.java similarity index 100% rename from src/org/apache/xpath/functions/FuncPosition.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncPosition.java diff --git a/src/org/apache/xpath/functions/FuncQname.java b/xalan/src/main/java/org/apache/xpath/functions/FuncQname.java similarity index 100% rename from src/org/apache/xpath/functions/FuncQname.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncQname.java diff --git a/src/org/apache/xpath/functions/FuncRound.java b/xalan/src/main/java/org/apache/xpath/functions/FuncRound.java similarity index 100% rename from src/org/apache/xpath/functions/FuncRound.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncRound.java diff --git a/src/org/apache/xpath/functions/FuncStartsWith.java b/xalan/src/main/java/org/apache/xpath/functions/FuncStartsWith.java similarity index 100% rename from src/org/apache/xpath/functions/FuncStartsWith.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncStartsWith.java diff --git a/src/org/apache/xpath/functions/FuncString.java b/xalan/src/main/java/org/apache/xpath/functions/FuncString.java similarity index 100% rename from src/org/apache/xpath/functions/FuncString.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncString.java diff --git a/src/org/apache/xpath/functions/FuncStringLength.java b/xalan/src/main/java/org/apache/xpath/functions/FuncStringLength.java similarity index 100% rename from src/org/apache/xpath/functions/FuncStringLength.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncStringLength.java diff --git a/src/org/apache/xpath/functions/FuncSubstring.java b/xalan/src/main/java/org/apache/xpath/functions/FuncSubstring.java similarity index 100% rename from src/org/apache/xpath/functions/FuncSubstring.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncSubstring.java diff --git a/src/org/apache/xpath/functions/FuncSubstringAfter.java b/xalan/src/main/java/org/apache/xpath/functions/FuncSubstringAfter.java similarity index 100% rename from src/org/apache/xpath/functions/FuncSubstringAfter.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncSubstringAfter.java diff --git a/src/org/apache/xpath/functions/FuncSubstringBefore.java b/xalan/src/main/java/org/apache/xpath/functions/FuncSubstringBefore.java similarity index 100% rename from src/org/apache/xpath/functions/FuncSubstringBefore.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncSubstringBefore.java diff --git a/src/org/apache/xpath/functions/FuncSum.java b/xalan/src/main/java/org/apache/xpath/functions/FuncSum.java similarity index 100% rename from src/org/apache/xpath/functions/FuncSum.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncSum.java diff --git a/src/org/apache/xpath/functions/FuncSystemProperty.java b/xalan/src/main/java/org/apache/xpath/functions/FuncSystemProperty.java similarity index 100% rename from src/org/apache/xpath/functions/FuncSystemProperty.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncSystemProperty.java diff --git a/src/org/apache/xpath/functions/FuncTranslate.java b/xalan/src/main/java/org/apache/xpath/functions/FuncTranslate.java similarity index 100% rename from src/org/apache/xpath/functions/FuncTranslate.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncTranslate.java diff --git a/src/org/apache/xpath/functions/FuncTrue.java b/xalan/src/main/java/org/apache/xpath/functions/FuncTrue.java similarity index 100% rename from src/org/apache/xpath/functions/FuncTrue.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncTrue.java diff --git a/src/org/apache/xpath/functions/FuncUnparsedEntityURI.java b/xalan/src/main/java/org/apache/xpath/functions/FuncUnparsedEntityURI.java similarity index 100% rename from src/org/apache/xpath/functions/FuncUnparsedEntityURI.java rename to xalan/src/main/java/org/apache/xpath/functions/FuncUnparsedEntityURI.java diff --git a/src/org/apache/xpath/functions/Function.java b/xalan/src/main/java/org/apache/xpath/functions/Function.java similarity index 100% rename from src/org/apache/xpath/functions/Function.java rename to xalan/src/main/java/org/apache/xpath/functions/Function.java diff --git a/src/org/apache/xpath/functions/Function2Args.java b/xalan/src/main/java/org/apache/xpath/functions/Function2Args.java similarity index 100% rename from src/org/apache/xpath/functions/Function2Args.java rename to xalan/src/main/java/org/apache/xpath/functions/Function2Args.java diff --git a/src/org/apache/xpath/functions/Function3Args.java b/xalan/src/main/java/org/apache/xpath/functions/Function3Args.java similarity index 100% rename from src/org/apache/xpath/functions/Function3Args.java rename to xalan/src/main/java/org/apache/xpath/functions/Function3Args.java diff --git a/src/org/apache/xpath/functions/FunctionDef1Arg.java b/xalan/src/main/java/org/apache/xpath/functions/FunctionDef1Arg.java similarity index 100% rename from src/org/apache/xpath/functions/FunctionDef1Arg.java rename to xalan/src/main/java/org/apache/xpath/functions/FunctionDef1Arg.java diff --git a/src/org/apache/xpath/functions/FunctionMultiArgs.java b/xalan/src/main/java/org/apache/xpath/functions/FunctionMultiArgs.java similarity index 100% rename from src/org/apache/xpath/functions/FunctionMultiArgs.java rename to xalan/src/main/java/org/apache/xpath/functions/FunctionMultiArgs.java diff --git a/src/org/apache/xpath/functions/FunctionOneArg.java b/xalan/src/main/java/org/apache/xpath/functions/FunctionOneArg.java similarity index 100% rename from src/org/apache/xpath/functions/FunctionOneArg.java rename to xalan/src/main/java/org/apache/xpath/functions/FunctionOneArg.java diff --git a/src/org/apache/xpath/functions/ObjectFactory.java b/xalan/src/main/java/org/apache/xpath/functions/ObjectFactory.java similarity index 100% rename from src/org/apache/xpath/functions/ObjectFactory.java rename to xalan/src/main/java/org/apache/xpath/functions/ObjectFactory.java diff --git a/src/org/apache/xpath/functions/SecuritySupport.java b/xalan/src/main/java/org/apache/xpath/functions/SecuritySupport.java similarity index 100% rename from src/org/apache/xpath/functions/SecuritySupport.java rename to xalan/src/main/java/org/apache/xpath/functions/SecuritySupport.java diff --git a/src/org/apache/xpath/functions/WrongNumberArgsException.java b/xalan/src/main/java/org/apache/xpath/functions/WrongNumberArgsException.java similarity index 100% rename from src/org/apache/xpath/functions/WrongNumberArgsException.java rename to xalan/src/main/java/org/apache/xpath/functions/WrongNumberArgsException.java diff --git a/src/org/apache/xpath/functions/package.html b/xalan/src/main/java/org/apache/xpath/functions/package.html similarity index 100% rename from src/org/apache/xpath/functions/package.html rename to xalan/src/main/java/org/apache/xpath/functions/package.html diff --git a/src/org/apache/xpath/jaxp/JAXPExtensionsProvider.java b/xalan/src/main/java/org/apache/xpath/jaxp/JAXPExtensionsProvider.java similarity index 100% rename from src/org/apache/xpath/jaxp/JAXPExtensionsProvider.java rename to xalan/src/main/java/org/apache/xpath/jaxp/JAXPExtensionsProvider.java diff --git a/src/org/apache/xpath/jaxp/JAXPPrefixResolver.java b/xalan/src/main/java/org/apache/xpath/jaxp/JAXPPrefixResolver.java similarity index 100% rename from src/org/apache/xpath/jaxp/JAXPPrefixResolver.java rename to xalan/src/main/java/org/apache/xpath/jaxp/JAXPPrefixResolver.java diff --git a/src/org/apache/xpath/jaxp/JAXPVariableStack.java b/xalan/src/main/java/org/apache/xpath/jaxp/JAXPVariableStack.java similarity index 100% rename from src/org/apache/xpath/jaxp/JAXPVariableStack.java rename to xalan/src/main/java/org/apache/xpath/jaxp/JAXPVariableStack.java diff --git a/src/org/apache/xpath/jaxp/XPathExpressionImpl.java b/xalan/src/main/java/org/apache/xpath/jaxp/XPathExpressionImpl.java similarity index 100% rename from src/org/apache/xpath/jaxp/XPathExpressionImpl.java rename to xalan/src/main/java/org/apache/xpath/jaxp/XPathExpressionImpl.java diff --git a/src/org/apache/xpath/jaxp/XPathFactoryImpl.java b/xalan/src/main/java/org/apache/xpath/jaxp/XPathFactoryImpl.java similarity index 100% rename from src/org/apache/xpath/jaxp/XPathFactoryImpl.java rename to xalan/src/main/java/org/apache/xpath/jaxp/XPathFactoryImpl.java diff --git a/src/org/apache/xpath/jaxp/XPathImpl.java b/xalan/src/main/java/org/apache/xpath/jaxp/XPathImpl.java similarity index 99% rename from src/org/apache/xpath/jaxp/XPathImpl.java rename to xalan/src/main/java/org/apache/xpath/jaxp/XPathImpl.java index d213ba995..420325b6f 100644 --- a/src/org/apache/xpath/jaxp/XPathImpl.java +++ b/xalan/src/main/java/org/apache/xpath/jaxp/XPathImpl.java @@ -283,7 +283,7 @@ public Object evaluate(String expression, Object item, QName returnType) } catch ( java.lang.NullPointerException npe ) { // If VariableResolver returns null Or if we get // NullPointerException at this stage for some other reason - // then we have to return XPathException + // then we have to return XPathException throw new XPathExpressionException ( npe ); } catch ( javax.xml.transform.TransformerException te ) { Throwable nestedException = te.getException(); diff --git a/src/org/apache/xpath/objects/DTMXRTreeFrag.java b/xalan/src/main/java/org/apache/xpath/objects/DTMXRTreeFrag.java similarity index 100% rename from src/org/apache/xpath/objects/DTMXRTreeFrag.java rename to xalan/src/main/java/org/apache/xpath/objects/DTMXRTreeFrag.java diff --git a/src/org/apache/xpath/objects/XBoolean.java b/xalan/src/main/java/org/apache/xpath/objects/XBoolean.java similarity index 100% rename from src/org/apache/xpath/objects/XBoolean.java rename to xalan/src/main/java/org/apache/xpath/objects/XBoolean.java diff --git a/src/org/apache/xpath/objects/XBooleanStatic.java b/xalan/src/main/java/org/apache/xpath/objects/XBooleanStatic.java similarity index 100% rename from src/org/apache/xpath/objects/XBooleanStatic.java rename to xalan/src/main/java/org/apache/xpath/objects/XBooleanStatic.java diff --git a/src/org/apache/xpath/objects/XMLStringFactoryImpl.java b/xalan/src/main/java/org/apache/xpath/objects/XMLStringFactoryImpl.java similarity index 100% rename from src/org/apache/xpath/objects/XMLStringFactoryImpl.java rename to xalan/src/main/java/org/apache/xpath/objects/XMLStringFactoryImpl.java diff --git a/src/org/apache/xpath/objects/XNodeSet.java b/xalan/src/main/java/org/apache/xpath/objects/XNodeSet.java similarity index 100% rename from src/org/apache/xpath/objects/XNodeSet.java rename to xalan/src/main/java/org/apache/xpath/objects/XNodeSet.java diff --git a/src/org/apache/xpath/objects/XNodeSetForDOM.java b/xalan/src/main/java/org/apache/xpath/objects/XNodeSetForDOM.java similarity index 100% rename from src/org/apache/xpath/objects/XNodeSetForDOM.java rename to xalan/src/main/java/org/apache/xpath/objects/XNodeSetForDOM.java diff --git a/src/org/apache/xpath/objects/XNull.java b/xalan/src/main/java/org/apache/xpath/objects/XNull.java similarity index 100% rename from src/org/apache/xpath/objects/XNull.java rename to xalan/src/main/java/org/apache/xpath/objects/XNull.java diff --git a/src/org/apache/xpath/objects/XNumber.java b/xalan/src/main/java/org/apache/xpath/objects/XNumber.java similarity index 100% rename from src/org/apache/xpath/objects/XNumber.java rename to xalan/src/main/java/org/apache/xpath/objects/XNumber.java diff --git a/src/org/apache/xpath/objects/XObject.java b/xalan/src/main/java/org/apache/xpath/objects/XObject.java similarity index 100% rename from src/org/apache/xpath/objects/XObject.java rename to xalan/src/main/java/org/apache/xpath/objects/XObject.java diff --git a/src/org/apache/xpath/objects/XObjectFactory.java b/xalan/src/main/java/org/apache/xpath/objects/XObjectFactory.java similarity index 100% rename from src/org/apache/xpath/objects/XObjectFactory.java rename to xalan/src/main/java/org/apache/xpath/objects/XObjectFactory.java diff --git a/src/org/apache/xpath/objects/XRTreeFrag.java b/xalan/src/main/java/org/apache/xpath/objects/XRTreeFrag.java similarity index 100% rename from src/org/apache/xpath/objects/XRTreeFrag.java rename to xalan/src/main/java/org/apache/xpath/objects/XRTreeFrag.java diff --git a/src/org/apache/xpath/objects/XRTreeFragSelectWrapper.java b/xalan/src/main/java/org/apache/xpath/objects/XRTreeFragSelectWrapper.java similarity index 100% rename from src/org/apache/xpath/objects/XRTreeFragSelectWrapper.java rename to xalan/src/main/java/org/apache/xpath/objects/XRTreeFragSelectWrapper.java diff --git a/src/org/apache/xpath/objects/XString.java b/xalan/src/main/java/org/apache/xpath/objects/XString.java similarity index 100% rename from src/org/apache/xpath/objects/XString.java rename to xalan/src/main/java/org/apache/xpath/objects/XString.java diff --git a/src/org/apache/xpath/objects/XStringForChars.java b/xalan/src/main/java/org/apache/xpath/objects/XStringForChars.java similarity index 100% rename from src/org/apache/xpath/objects/XStringForChars.java rename to xalan/src/main/java/org/apache/xpath/objects/XStringForChars.java diff --git a/src/org/apache/xpath/objects/XStringForFSB.java b/xalan/src/main/java/org/apache/xpath/objects/XStringForFSB.java similarity index 100% rename from src/org/apache/xpath/objects/XStringForFSB.java rename to xalan/src/main/java/org/apache/xpath/objects/XStringForFSB.java diff --git a/src/org/apache/xpath/objects/package.html b/xalan/src/main/java/org/apache/xpath/objects/package.html similarity index 100% rename from src/org/apache/xpath/objects/package.html rename to xalan/src/main/java/org/apache/xpath/objects/package.html diff --git a/src/org/apache/xpath/operations/And.java b/xalan/src/main/java/org/apache/xpath/operations/And.java similarity index 100% rename from src/org/apache/xpath/operations/And.java rename to xalan/src/main/java/org/apache/xpath/operations/And.java diff --git a/src/org/apache/xpath/operations/Bool.java b/xalan/src/main/java/org/apache/xpath/operations/Bool.java similarity index 100% rename from src/org/apache/xpath/operations/Bool.java rename to xalan/src/main/java/org/apache/xpath/operations/Bool.java diff --git a/src/org/apache/xpath/operations/Div.java b/xalan/src/main/java/org/apache/xpath/operations/Div.java similarity index 100% rename from src/org/apache/xpath/operations/Div.java rename to xalan/src/main/java/org/apache/xpath/operations/Div.java diff --git a/src/org/apache/xpath/operations/Equals.java b/xalan/src/main/java/org/apache/xpath/operations/Equals.java similarity index 100% rename from src/org/apache/xpath/operations/Equals.java rename to xalan/src/main/java/org/apache/xpath/operations/Equals.java diff --git a/src/org/apache/xpath/operations/Gt.java b/xalan/src/main/java/org/apache/xpath/operations/Gt.java similarity index 100% rename from src/org/apache/xpath/operations/Gt.java rename to xalan/src/main/java/org/apache/xpath/operations/Gt.java diff --git a/src/org/apache/xpath/operations/Gte.java b/xalan/src/main/java/org/apache/xpath/operations/Gte.java similarity index 100% rename from src/org/apache/xpath/operations/Gte.java rename to xalan/src/main/java/org/apache/xpath/operations/Gte.java diff --git a/src/org/apache/xpath/operations/Lt.java b/xalan/src/main/java/org/apache/xpath/operations/Lt.java similarity index 100% rename from src/org/apache/xpath/operations/Lt.java rename to xalan/src/main/java/org/apache/xpath/operations/Lt.java diff --git a/src/org/apache/xpath/operations/Lte.java b/xalan/src/main/java/org/apache/xpath/operations/Lte.java similarity index 100% rename from src/org/apache/xpath/operations/Lte.java rename to xalan/src/main/java/org/apache/xpath/operations/Lte.java diff --git a/src/org/apache/xpath/operations/Minus.java b/xalan/src/main/java/org/apache/xpath/operations/Minus.java similarity index 100% rename from src/org/apache/xpath/operations/Minus.java rename to xalan/src/main/java/org/apache/xpath/operations/Minus.java diff --git a/src/org/apache/xpath/operations/Mod.java b/xalan/src/main/java/org/apache/xpath/operations/Mod.java similarity index 100% rename from src/org/apache/xpath/operations/Mod.java rename to xalan/src/main/java/org/apache/xpath/operations/Mod.java diff --git a/src/org/apache/xpath/operations/Mult.java b/xalan/src/main/java/org/apache/xpath/operations/Mult.java similarity index 100% rename from src/org/apache/xpath/operations/Mult.java rename to xalan/src/main/java/org/apache/xpath/operations/Mult.java diff --git a/src/org/apache/xpath/operations/Neg.java b/xalan/src/main/java/org/apache/xpath/operations/Neg.java similarity index 100% rename from src/org/apache/xpath/operations/Neg.java rename to xalan/src/main/java/org/apache/xpath/operations/Neg.java diff --git a/src/org/apache/xpath/operations/NotEquals.java b/xalan/src/main/java/org/apache/xpath/operations/NotEquals.java similarity index 100% rename from src/org/apache/xpath/operations/NotEquals.java rename to xalan/src/main/java/org/apache/xpath/operations/NotEquals.java diff --git a/src/org/apache/xpath/operations/Number.java b/xalan/src/main/java/org/apache/xpath/operations/Number.java similarity index 100% rename from src/org/apache/xpath/operations/Number.java rename to xalan/src/main/java/org/apache/xpath/operations/Number.java diff --git a/src/org/apache/xpath/operations/Operation.java b/xalan/src/main/java/org/apache/xpath/operations/Operation.java similarity index 100% rename from src/org/apache/xpath/operations/Operation.java rename to xalan/src/main/java/org/apache/xpath/operations/Operation.java diff --git a/src/org/apache/xpath/operations/Or.java b/xalan/src/main/java/org/apache/xpath/operations/Or.java similarity index 100% rename from src/org/apache/xpath/operations/Or.java rename to xalan/src/main/java/org/apache/xpath/operations/Or.java diff --git a/src/org/apache/xpath/operations/Plus.java b/xalan/src/main/java/org/apache/xpath/operations/Plus.java similarity index 100% rename from src/org/apache/xpath/operations/Plus.java rename to xalan/src/main/java/org/apache/xpath/operations/Plus.java diff --git a/src/org/apache/xpath/operations/Quo.java b/xalan/src/main/java/org/apache/xpath/operations/Quo.java similarity index 100% rename from src/org/apache/xpath/operations/Quo.java rename to xalan/src/main/java/org/apache/xpath/operations/Quo.java diff --git a/src/org/apache/xpath/operations/String.java b/xalan/src/main/java/org/apache/xpath/operations/String.java similarity index 100% rename from src/org/apache/xpath/operations/String.java rename to xalan/src/main/java/org/apache/xpath/operations/String.java diff --git a/src/org/apache/xpath/operations/UnaryOperation.java b/xalan/src/main/java/org/apache/xpath/operations/UnaryOperation.java similarity index 100% rename from src/org/apache/xpath/operations/UnaryOperation.java rename to xalan/src/main/java/org/apache/xpath/operations/UnaryOperation.java diff --git a/src/org/apache/xpath/operations/Variable.java b/xalan/src/main/java/org/apache/xpath/operations/Variable.java similarity index 100% rename from src/org/apache/xpath/operations/Variable.java rename to xalan/src/main/java/org/apache/xpath/operations/Variable.java diff --git a/src/org/apache/xpath/operations/VariableSafeAbsRef.java b/xalan/src/main/java/org/apache/xpath/operations/VariableSafeAbsRef.java similarity index 100% rename from src/org/apache/xpath/operations/VariableSafeAbsRef.java rename to xalan/src/main/java/org/apache/xpath/operations/VariableSafeAbsRef.java diff --git a/src/org/apache/xpath/operations/package.html b/xalan/src/main/java/org/apache/xpath/operations/package.html similarity index 100% rename from src/org/apache/xpath/operations/package.html rename to xalan/src/main/java/org/apache/xpath/operations/package.html diff --git a/src/org/apache/xpath/package.html b/xalan/src/main/java/org/apache/xpath/package.html similarity index 100% rename from src/org/apache/xpath/package.html rename to xalan/src/main/java/org/apache/xpath/package.html diff --git a/src/org/apache/xpath/patterns/ContextMatchStepPattern.java b/xalan/src/main/java/org/apache/xpath/patterns/ContextMatchStepPattern.java similarity index 100% rename from src/org/apache/xpath/patterns/ContextMatchStepPattern.java rename to xalan/src/main/java/org/apache/xpath/patterns/ContextMatchStepPattern.java diff --git a/src/org/apache/xpath/patterns/FunctionPattern.java b/xalan/src/main/java/org/apache/xpath/patterns/FunctionPattern.java similarity index 100% rename from src/org/apache/xpath/patterns/FunctionPattern.java rename to xalan/src/main/java/org/apache/xpath/patterns/FunctionPattern.java diff --git a/src/org/apache/xpath/patterns/NodeTest.java b/xalan/src/main/java/org/apache/xpath/patterns/NodeTest.java similarity index 100% rename from src/org/apache/xpath/patterns/NodeTest.java rename to xalan/src/main/java/org/apache/xpath/patterns/NodeTest.java diff --git a/src/org/apache/xpath/patterns/NodeTestFilter.java b/xalan/src/main/java/org/apache/xpath/patterns/NodeTestFilter.java similarity index 100% rename from src/org/apache/xpath/patterns/NodeTestFilter.java rename to xalan/src/main/java/org/apache/xpath/patterns/NodeTestFilter.java diff --git a/src/org/apache/xpath/patterns/StepPattern.java b/xalan/src/main/java/org/apache/xpath/patterns/StepPattern.java similarity index 100% rename from src/org/apache/xpath/patterns/StepPattern.java rename to xalan/src/main/java/org/apache/xpath/patterns/StepPattern.java diff --git a/src/org/apache/xpath/patterns/UnionPattern.java b/xalan/src/main/java/org/apache/xpath/patterns/UnionPattern.java similarity index 100% rename from src/org/apache/xpath/patterns/UnionPattern.java rename to xalan/src/main/java/org/apache/xpath/patterns/UnionPattern.java diff --git a/src/org/apache/xpath/patterns/package.html b/xalan/src/main/java/org/apache/xpath/patterns/package.html similarity index 100% rename from src/org/apache/xpath/patterns/package.html rename to xalan/src/main/java/org/apache/xpath/patterns/package.html diff --git a/src/org/apache/xpath/res/XPATHErrorResources.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_ca.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_ca.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_ca.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_ca.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_cs.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_cs.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_cs.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_cs.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_de.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_de.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_de.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_de.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_en.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_en.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_en.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_en.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_es.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_es.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_es.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_es.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_fr.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_fr.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_fr.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_fr.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_hu.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_hu.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_hu.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_hu.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_it.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_it.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_it.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_it.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_ja.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_ja.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_ja.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_ja.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_ko.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_ko.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_ko.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_ko.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_pl.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_pl.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_pl.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_pl.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_pt_BR.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_pt_BR.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_pt_BR.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_pt_BR.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_ru.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_ru.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_ru.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_ru.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_sk.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_sk.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_sk.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_sk.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_sl.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_sl.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_sl.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_sl.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_sv.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_sv.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_sv.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_sv.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_tr.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_tr.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_tr.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_tr.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_zh.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_zh.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_zh.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_zh.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_zh_CN.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_zh_CN.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_zh_CN.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_zh_CN.java diff --git a/src/org/apache/xpath/res/XPATHErrorResources_zh_TW.java b/xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_zh_TW.java similarity index 100% rename from src/org/apache/xpath/res/XPATHErrorResources_zh_TW.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHErrorResources_zh_TW.java diff --git a/src/org/apache/xpath/res/XPATHMessages.java b/xalan/src/main/java/org/apache/xpath/res/XPATHMessages.java similarity index 100% rename from src/org/apache/xpath/res/XPATHMessages.java rename to xalan/src/main/java/org/apache/xpath/res/XPATHMessages.java diff --git a/src/org/apache/xpath/res/package.html b/xalan/src/main/java/org/apache/xpath/res/package.html similarity index 100% rename from src/org/apache/xpath/res/package.html rename to xalan/src/main/java/org/apache/xpath/res/package.html diff --git a/src/org/apache/xalan/res/XSLTInfo.properties b/xalan/src/main/resources/org/apache/xalan/res/XSLTInfo.properties similarity index 100% rename from src/org/apache/xalan/res/XSLTInfo.properties rename to xalan/src/main/resources/org/apache/xalan/res/XSLTInfo.properties diff --git a/xalan/src/main/resources/org/apache/xalan/version.properties b/xalan/src/main/resources/org/apache/xalan/version.properties new file mode 100644 index 000000000..defbd4820 --- /dev/null +++ b/xalan/src/main/resources/org/apache/xalan/version.properties @@ -0,0 +1 @@ +version=${project.version} diff --git a/src/trax/trax.properties b/xalan/src/main/resources/trax/trax.properties similarity index 100% rename from src/trax/trax.properties rename to xalan/src/main/resources/trax/trax.properties diff --git a/xalan/src/site/resources/images/compilation.gif b/xalan/src/site/resources/images/compilation.gif new file mode 100644 index 000000000..675d7d4ff Binary files /dev/null and b/xalan/src/site/resources/images/compilation.gif differ diff --git a/xalan/src/site/resources/images/conceptual.gif b/xalan/src/site/resources/images/conceptual.gif new file mode 100644 index 000000000..283fee57d Binary files /dev/null and b/xalan/src/site/resources/images/conceptual.gif differ diff --git a/xalan/src/site/resources/images/data.gif b/xalan/src/site/resources/images/data.gif new file mode 100644 index 000000000..0f28a177a Binary files /dev/null and b/xalan/src/site/resources/images/data.gif differ diff --git a/xalan/src/site/resources/images/org_apache.gif b/xalan/src/site/resources/images/org_apache.gif new file mode 100644 index 000000000..105f2643b Binary files /dev/null and b/xalan/src/site/resources/images/org_apache.gif differ diff --git a/xalan/src/site/resources/images/trax.gif b/xalan/src/site/resources/images/trax.gif new file mode 100644 index 000000000..8eb96144d Binary files /dev/null and b/xalan/src/site/resources/images/trax.gif differ diff --git a/xalan/src/site/resources/images/xalan1_1x1.gif b/xalan/src/site/resources/images/xalan1_1x1.gif new file mode 100644 index 000000000..c9e153631 Binary files /dev/null and b/xalan/src/site/resources/images/xalan1_1x1.gif differ diff --git a/xalan/src/site/resources/images/xmllogo.gif b/xalan/src/site/resources/images/xmllogo.gif new file mode 100644 index 000000000..b63188dd2 Binary files /dev/null and b/xalan/src/site/resources/images/xmllogo.gif differ diff --git a/xalan/src/site/resources/images/xpath.gif b/xalan/src/site/resources/images/xpath.gif new file mode 100644 index 000000000..cf28f9cb7 Binary files /dev/null and b/xalan/src/site/resources/images/xpath.gif differ diff --git a/xalan/src/site/resources/images/xslt_abstract.gif b/xalan/src/site/resources/images/xslt_abstract.gif new file mode 100644 index 000000000..fa041a640 Binary files /dev/null and b/xalan/src/site/resources/images/xslt_abstract.gif differ diff --git a/xalan/src/site/xhtml/design2_0_0.xhtml b/xalan/src/site/xhtml/design2_0_0.xhtml new file mode 100644 index 000000000..6869f0f86 --- /dev/null +++ b/xalan/src/site/xhtml/design2_0_0.xhtml @@ -0,0 +1,277 @@ +<html><head><title>Xalan-J 2.0 Design</title></head><body alink="#ff0000" bgcolor="#ffffff" leftmargin="4" link="#0000ff" marginheight="4" marginwidth="4" text="#000000" topmargin="4" vlink="#0000aa"><h1><a href="http://xml.apache.org"><img alt="" src="images/xmllogo.gif"/></a> + Xalan-J 2.0 Design</h1><hr/> + <p></p> + <p>Author: Scott Boag<br/>State: In Progress</p> + <ul> + <li><a href="#intro">Introduction</a></li> + <li><a href="#requirements">Xalan Requirements</a></li> + <li><a href="#overarch">Overview of Architecture</a></li> + <li><a href="#process">Process Module</a></li> + <li><a href="#templates">Templates Module</a></li> + <li><a href="#transformer">Transformer Module</a></li> + <ul> + <li><a href="#stree">Stree Module</a></li> + <li><a href="#extensions">Extensions Module</a></li> + </ul> + <li><a href="#xpath">XPath Module</a></li> + <ul><li><a href="#xpathdbconn">XPath Database Connection</a></li></ul> + <li><a href="#utils">Utils Package</a></li> + <li><a href="#other">Other Packages</a></li> + <li><a href="#compilation">Xalan Stylesheet Complilation to Java</a></li><li><a href="#optimizations">Future Optimizations</a></li><li><a href="#coding">Coding Conventions</a></li> + + <li><a href="../apidocs/index.html">Xalan-J 2.0 Javadoc</a></li> + </ul><a name="intro"><!--anchor--></a> + <h2>Introduction</h2> + <p>This document presents the basic design for Xalan-J 2.0, which is a + <a href="http://www.awl.com/cseng/titles/0-201-89542-0/techniques/refactoring.htm">refactoring</a> + and redesign of the Xalan-J 1.x processor. This document will expand and grow over time, and is also incomplete in some sections, though hopefully overall accurate. The reader should be able to get a good overall idea of the internal design of Xalan, and begin to understand the process flow, and also the technical challenges.</p> + <p>The main goals of this redesign are + to: </p><ol> + <li>Make the design and code more understandable by Open Source + people.</li> + <li>Reduce code size and complexity.</li> + <li>By simplifying the code, make optimization easier.</li> + <li>Make modules generally more localized, and less tangled with other + modules.</li> + <li>Conform to the <a href="http://java.sun.com/aboutJava/communityprocess/jsr/jsr_063_jaxp11.html">javax.xml.transform (TrAX [Transformations for XML])</a> interfaces.</li> + <li>Increase the ability to incrementally produce the result tree.</li></ol> + <p>The techniques used toward these goals are to:</p> + <ol> + <li>In general, flatten the hierarchy of packages, in order to make the + structure more apparent from the top-level view.</li> + <li>Break the construction and the validation of the XSLT stylesheet from + the stylesheet objects themselves.</li> + <li>Drive the construction of the stylesheet through a table, so that it + is less prone to error.</li> + <li>Break the transformation process into a separate package, away from + the stylesheet objects.</li> + <li>Create this design document, as a starting point for people interested in + approaching the code.</li> + </ol> + <p>The goals are not:</p> + <ol> + <li>To add more features in the progress of this refactoring. This is + design and code clean-up in order to meet the above-named goals. We expect that it will be <b>much</b> easier to add + features once this work is completed.</li> + <li>To optimize code for the sake of optimization. However, we + expect that the code will be faster once this work is complete.</li> + </ol> + <p>How well we've achieved the goals will be measured by feedback from the + <a href="http://marc.info/?l=xalan-dev">Xalan-dev</a> list, and by software metrics tools.</p> + <p>Please note that the diagrams in this design document are meant to be + useful abstractions, and may not always be exact.</p> + <a name="requirements"><!--anchor--></a> + <h2>Xalan Requirements</h2> + <p>These are the concrete general requirements of Xalan, as I understand them, and covering both the Java and C++ versions. These requirements have been built up over time by experience with product groups and general users.</p><ol><li>Java, C++ Versions.</li><li>XSLT 1.0 conformance, and beyond. (i.e. conform to the current W3C recommendation).</li><li>Have design and Code understandable by Open Source Community.</li><li>Ability to interoperate with standard APIs. (SAX2, DOM2, JAXP) [this is currently Less of an issue with C++].</li><li>High Performance (Raw performance, Incremental ability, Scaleability to large documents, Reduction of Garbage Collection for the Java version.)</li><li>Tooling API (Access stylesheet data structures, Access source node from result event, Ask runtime questions, Debugging API).</li><li>Support addressing of XML in standalone fashion (i.e. XPath API).</li><li>Extensibility (Ability to call Java, Ability to call JavaScript, other languages).</li><li>Multiple data sources (JDBC, LDAP, other data sources, Direct XML repository coupling).</li></ol><a name="overarch"><!--anchor--></a> + <h2>Overview of Architecture</h2> + <p>The following diagram shows the XSLT abstract processing model. A transformation expressed in XSLT describes rules for transforming a <a href="http://www.w3.org/TR/xpath#data-model">Source Tree </a> into a result tree. The transformation is achieved by associating patterns with templates. A pattern is matched against elements in the source tree. A template is instantiated to create part of the result tree. The result tree is separate from the source tree. The structure of the result tree can be completely different from the structure of the source tree. In constructing the result tree, elements from the source tree can be filtered and reordered, and arbitrary structure can be added. + +</p><p>The term "tree", as used within this document, describes an + abstract structure that consists of nodes or events that may be produced by + XML. A Tree physically may be a DOM tree, a series of well balanced parse + events (such as those coming from a SAX2 ContentHander), a series of requests + (the result of which can describe a tree), or a stream of marked-up + characters.</p><p><center><img alt="xslt_abstract.gif" src="images/xslt_abstract.gif"/></center></p><p>The primary interface for Xalan 2.0 external usage is defined in the <a href="../apidocs/javax/xml/transform/package-summary.html#package_description">javax.xml.transform</a> interfaces. These interfaces define a standard and powerful interface to perform tree-based transformations.</p> + <p>The internal architecture of Xalan 2.0 is divided into four major modules, and various smaller + modules. The main modules are:</p> + <dl> + <dt><a href="../apidocs/org/apache/xalan/processor/package-summary.html">org.apache.xalan.processor</a></dt> + <dd>The module that processes the stylesheet, and provides the main + entry point into Xalan.</dd> + </dl> + <dl> + <dt><a href="../apidocs/org/apache/xalan/templates/package-summary.html">org.apache.xalan.templates</a></dt> + <dd>The module that defines the stylesheet structures, including the + Stylesheet object, template element instructions, and Attribute Value + Templates. </dd> + </dl> + <dl> + <dt><a href="../apidocs/org/apache/xalan/transformer/package-summary.html">org.apache.xalan.transformer</a></dt> + <dd>The module that applies the source tree to the Templates, and + produces a result tree.</dd> + </dl> + <dl> + <dt><a href="../apidocs/org/apache/xpath/package-summary.html">org.apache.xpath</a></dt> + <dd>The module that processes both XPath expressions, and XSLT Match + patterns.</dd> + </dl> + <p>In addition to the above modules, Xalan implements the + <a href="../apidocs/javax/xml/transform/package-summary.html#package_description">javax.xml.transform</a> interfaces, and depends on the + <a href="http://www.megginson.com/SAX/Java/index.html">SAX2</a> and <a href="http://www.w3.org/TR/DOM-Level-2/">DOM</a> packages. +</p><p><center><img alt="trax.gif" src="images/trax.gif"/></center></p><p>There is also a general utilities package that contains both XML utility + classes such as QName, but generally useful classes such as + StringToIntTable.</p> + <p>In the diagram below, the dashed lines denote visibility. All packages + access the SAX2 and DOM packages.</p> + <p><center><img alt="xalan1_1x1.gif" src="images/xalan1_1x1.gif"/></center></p> + <p>In addition to the above packages, there are the following additional + packages:</p> + <dl> + <dt><a href="../apidocs/org/apache/xalan/client/package-summary.html">org.apache.xalan.client</a></dt> + <dd>This package has a client applet. I suspect this should be moved + into the samples directory.</dd> + </dl> + <dl> + <dt><a href="../apidocs/org/apache/xalan/extensions/package-summary.html">org.apache.xalan.extensions</a></dt> + <dd>This holds classes belonging to the Xalan extensions mechanism, + which allows Java code and script to be called from within a stylesheet.</dd> + + </dl> + <dl> + <dt><a href="../apidocs/org/apache/xalan/lib/package-summary.html">org.apache.xalan.lib</a></dt> + <dd>This is the built-in Xalan extensions library, which holds + extensions such as Redirect (which allows a stylesheet to produce multiple + output files).</dd> + </dl> + <dl> + <dt><a href="../apidocs/org/apache/xalan/res/package-summary.html">org.apache.xalan.res</a></dt> + <dd>This holds resource files needed by Xalan, such as error message + resources.</dd> + </dl> + + <dl> + <dt><a href="../apidocs/org/apache/xalan/trace/package-summary.html">org.apache.xalan.trace</a></dt> + <dd>This package contains classes and interfaces that allow a caller to + add trace listeners to the transformation, allowing an interface to XSLT + debuggers and similar tools.</dd> + </dl> + <dl> + <dt><a href="../apidocs/org/apache/xalan/xslt/package-summary.html">org.apache.xalan.xslt</a></dt> + <dd>This package holds the Xalan2 command line processor.</dd> + </dl> + <p>A more conceptual view of this architecture is as follows:</p><p><center><img alt="Picture of conceptual architecture." src="images/conceptual.gif"/></center></p><a name="process"><!--anchor--></a> + <h2>Process Module</h2> + <p>The <a href="../apidocs/org/apache/xalan/processor/package-summary.html">org.apache.xalan.processor</a> module implements the + <a href="../apidocs/javax/xml/transform/TransformerFactory.html">javax.xml.transform.TransformerFactory</a> interface, which provides a + factory method for creating a concrete Processor instance, and provides methods + for creating a <a href="../apidocs/javax/xml/transform/Templates.html">javax.xml.transform.Templates</a> instance, which, in + Xalan and XSLT terms, is the Stylesheet. Thus the task of the process module is + to read the XSLT input in the form of a file, stream, SAX events, or a DOM + tree, and produce a Templates/Stylesheet object.</p> + <p>The overall strategy is to define a schema in that dictates the legal + structure for XSLT elements and attributes, and to associate with those + elements construction-time processors that can fill in the appropriate fields + in the top-level Stylesheet object, and also associate classes in the templates + module that can be created in a generalized fashion. This makes the validation + object-to-class associations centralized and declarative.</p> + <p>The schema's root class is + <a href="../apidocs/org/apache/xalan/processor/XSLTSchema.html">org.apache.xalan.processor.XSLTSchema</a>, and it is here that the + XSLT schema structure is defined. XSLTSchema uses + <a href="../apidocs/org/apache/xalan/processor/XSLTElementDef.html">org.apache.xalan.processor.XSLTElementDef</a> to define elements, and + <a href="../apidocs/org/apache/xalan/processor/XSLTAttributeDef.html">org.apache.xalan.processor.XSLTAttributeDef</a> to define attributes. + Both classes hold the allowed namespace, local name, and type of element or + attribute. The XSLTElementDef also holds a reference to a + <a href="../apidocs/org/apache/xalan/processor/XSLTElementProcessor.html">org.apache.xalan.processor.XSLTElementProcessor</a>, and a sometimes a + <code><font face="courier, monospaced">Class</font></code> object, with which it can create objects that derive from + <a href="../apidocs/org/apache/xalan/templates/ElemTemplateElement.html">org.apache.xalan.templates.ElemTemplateElement</a>. In addition, the + XSLTElementDef instance holds a list of XSLTElementDef instances that define + legal elements or character events that are allowed as children of the given + element.</p> + <p>The implementation of the <a href="../apidocs/javax/xml/transform/TransformerFactory.html">javax.xml.transform.TransformerFactory</a> + interface is in <a href="../apidocs/org/apache/xalan/processor/TransformerFactoryImpl.html">org.apache.xalan.processor.TransformerFactoryImpl</a>, + which creates a <a href="../apidocs/org/apache/xalan/processor/StylesheetHandler.html">org.apache.xalan.processor.StylesheetHandler</a> + instance. This instance acts as the ContentHandler for the parse events, and is + handed to the <a href="../apidocs/org/xml/sax/XMLReader.html">org.xml.sax.XMLReader</a>, which the StylesheetProcessor + uses to parse the XSLT document. The <code><font face="courier, monospaced">StylesheetHandler</font></code> then receives the parse + events, which maintains the state of the construction, and passes the events on + to the appropriate <code><font face="courier, monospaced">XSLTElementProcessor</font></code> for the given event, as dictated by the + <code><font face="courier, monospaced">XSLTElementDef</font></code> that is associated with the given event.</p> + <a name="templates"><!--anchor--></a> + <h2>Templates Module</h2> + <p>The <a href="../apidocs/org/apache/xalan/templates/package-summary.html">org.apache.xalan.templates</a> module implements the + <a href="../apidocs/javax/xml/transform/Templates.html">javax.xml.transform.Templates</a> interface, and defines a set of + classes that represent a Stylesheet. The primary purpose of this module is to + hold stylesheet data, not to perform procedural tasks associated with the + construction of the data, nor tasks associated with the transformation itself. + </p> + <p>The base class of all templates objects that are associated with an XSLT element is the <a href="../apidocs/org/apache/xalan/templates/ElemTemplateElement.html">ElemTemplateElement</a> object, which in turn implements <a href="../apidocs/org/apache/xml/utils/UnImplNode.html">UnImplNode</a>. A <code><font face="courier, monospaced">ElemTemplateElement</font></code> object must be immutable once it's constructed, so that it may be shared among multiple threads concurrently. Ideally, a <code><font face="courier, monospaced">ElemTemplateElement</font></code> should be a data object only, and be used via a visitor pattern. However, in practice this is impractical, because it would cause too much data exposure and would have a significant impact on performance. Therefore, each <code><font face="courier, monospaced">ElemTemplateElement</font></code> class has an <a href="../apidocs/org/apache/xalan/templates/ElemTemplateElement.html#execute(org.apache.xalan.transformer.TransformerImpl, org.w3c.dom.Node, org.apache.xml.utils.QName)">execute</a> method where it performs it's transformation duties. A <code><font face="courier, monospaced">ElemTemplateElement</font></code> also knows it's position in the source stylesheet, and can answer questions about current namespace nodes.</p><p>A <a href="../apidocs/org/apache/xalan/templates/StylesheetRoot.html">StylesheetRoot</a>, which implements the + <code><font face="courier, monospaced">Templates</font></code> interface, is a type of <a href="../apidocs/org/apache/xalan/templates/StylesheetComposed.html">StylesheetComposed</a>, + which is a <a href="../apidocs/org/apache/xalan/templates/Stylesheet.html">Stylesheet</a> composed of itself and all included + <code><font face="courier, monospaced">Stylesheet</font></code> objects. A <code><font face="courier, monospaced">StylesheetRoot</font></code> has a global + imports list, which is a list of all imported <code><font face="courier, monospaced">StylesheetComposed</font></code> + instances. From each <code><font face="courier, monospaced">StylesheetComposed</font></code> object, one can iterate + through the list of directly or indirectly included <code><font face="courier, monospaced">Stylesheet</font></code> + objects, and one call also iterate through the list of all + <code><font face="courier, monospaced">StylesheetComposed</font></code> objects of lesser import precedence. + <code><font face="courier, monospaced">StylesheetRoot</font></code> is a <code><font face="courier, monospaced">StylesheetComposed</font></code>, which is a + <code><font face="courier, monospaced">Stylesheet</font></code>.</p> + <p>Each stylesheet has a set of properties, which can be set by various + means, usually either via an attribute on xsl:stylesheet, or via a top-level + xsl instruction (for instance, xsl:attribute-set). The get methods for these + properties only access the declaration within the given <code><font face="courier, monospaced">Stylesheet</font></code> + object, and never takes into account included or imported stylesheets. The + <code><font face="courier, monospaced">StylesheetComposed</font></code> derivative object, if it is a root + <code><font face="courier, monospaced">Stylesheet</font></code> or imported <code><font face="courier, monospaced">Stylesheet</font></code>, has "composed" + getter methods that do take into account imported and included stylesheets, for + some of these properties.</p> + + <a name="transformer"><!--anchor--></a> + <h2>Transformer Module</h2> + <p>The <a href="../apidocs/org/apache/xalan/transformer/package-summary.html">Transformer</a> module is in charge of run-time transformations. The <a href="../apidocs/org/apache/xalan/transformer/TransformerImpl.html">TransformerImpl</a> object, which implements the TrAX <a href="../apidocs/javax/xml/transform/Transformer.html">Transformer</a> interface, and has an association with a <a href="../apidocs/org/apache/xalan/templates/StylesheetRoot.html">StylesheetRoot</a> object, begins the processing of the source tree (or provides a <a href="http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/ContentHandler.html">ContentHandler</a> reference via the <a href="../apidocs/org/apache/xalan/stree/SourceTreeHandler.html">SourceTreeHandler</a>), and performs the transformation. The Transformer package does as much of the transformation as it can, but element level operations are generally performed in the <a href="../apidocs/org/apache/xalan/templates/ElemTemplateElement.html#execute(org.apache.xalan.transformer.TransformerImpl, org.w3c.dom.Node, org.apache.xalan.utils.QName)">ElemTemplateElement.execute(...)</a> methods.</p><p>Result Tree events are fed into a <a href="../apidocs/org/apache/xalan/transformer/ResultTreeHandler.html">ResultTreeHandler</a> object, which acts as a layer between the direct calls to the result +tree content handler (often a <a href="../apidocs/org/apache/xalan/serialize/package-summary.html">Serializer</a>), and the <code><font face="courier, monospaced">Transformer</font></code>. For one thing, + we have to delay the call to + startElement(name, atts) because of the + xsl:attribute and xsl:copy calls. In other words, + the attributes have to be fully collected before you + can call startElement.</p><p>Other important classes in this package are:</p><dl><dt>CountersTable and Counter</dt><dd>The <a href="../apidocs/org/apache/xalan/transformer/Counter.html">Counter</a> class does incremental counting for support of xsl:number. + This class stores a cache of counted nodes (m_countNodes). + It tries to cache the counted nodes in document order... + the node count is based on its position in the cache list. The <a href="../apidocs/org/apache/xalan/transformer/CountersTable.html">CountersTable</a> class is a table of counters, keyed by <a href="../apidocs/org/apache/xalan/templates/ElemNumber.html">ElemNumber</a> objects, each + of which has a list of <code><font face="courier, monospaced">Counter</font></code> objects.</dd></dl><dl><dt>KeyIterator, KeyManager, and KeyTable</dt><dd>These classes handle mapping of keys declared with the xsl:key element. They attempt to work incrementally, locating nodes on request but indexing all as they traverse the tree, and stopping when the requested node is found. If a requested node is not found, then the entire tree will be traversed. Such is the nature of xsl:key.</dd></dl><dl><dt>TransformState</dt><dd>This interface is meant to be used by a consumer of SAX2 events produced by Xalan, and enables the consumer + to get information about the state of the transform. It + is primarily intended as a tooling interface.</dd></dl><p>Even though the following modules are defined in the <code><font face="courier, monospaced">org.apache.xalan</font></code> package, instead of the transformer package, they are defined in this section as they are mostly related to runtime transformation.</p><a name="stree"><!--anchor--></a> + <h3>Stree Module [and discussions about streaming]</h3> + <p>The Stree module implements the default <a href="http://www.w3.org/TR/xpath#data-model">Source Tree </a> for Xalan, that is to be transformed. It implements read-only <a href="http://www.w3.org/TR/DOM-Level-2/">DOM2</a> interfaces, and provides some information needed for fast transforms, such as document order indexes. It also attempts to allow an incremental transform by launching the transform on a secondary thread as soon as the SAX2 <a href="http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/ContentHandler.html#startDocument()">StartDocument</a> event has occurred. When the transform requests a node, and the node is not present, the getFirstChild and GetNextSibling methods will wait until the child node has arrived, or an <a href="http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/ContentHandler.html#endElement(java.lang.String,%20java.lang.String,%20java.lang.String)">endElement</a> event has occurred.</p><p>Note that the secondary thread is an issue. It would be better to do the same thing as described above on a single thread, but using the parser in 'pull' mode, or simply with a parseNext method so the parse would occur in blocks. However, this model would only be possible</p><p>This kind of incrementality is not perfect because it still requires an entire source tree to be concretely built. There have been a lot of good discussions on the xalan-dev list about how to do static analysis of a stylesheet, and be able to allocate only the nodes needed by the transform, while they are needed (or not allocate source objects at all).</p> +<a name="serializer"><!--anchor--></a> +<h3>Serializer Module</h3> +<p>XML serialization is a term used for turning a tree or set of events into a stream, and should not be confused with Java object serialization. The Xalan serializers implement the <a href="http://www.megginson.com/SAX/Java/javadoc/org/xml/sax/ContentHandler.html">ContentHandler</a> to turn parser events coming from the transform, into a stream of XML, HTML, or plain text. The serializers also implement the <a href="../apidocs/org/apache/xml/serializer/Serializer.html">Serializer</a> which allows the transform process to set XSLT output properties and the output stream or Writer.</p><a name="extensions"><!--anchor--></a> +<h3>Extensions Module</h3> +<p>This package contains an implementation of Xalan Extension Mechanism, which uses the <a href="http://oss.software.ibm.com/developerworks/opensource/bsf/">Bean Scripting Framework</a>. + +The Bean Scripting Framework (BSF) is an architecture for incorporating scripting into Java applications and applets. Scripting languages such as Netscape Rhino (Javascript), VBScript, Perl, Tcl, Python, NetRexx and Rexx can be used to augment XSLT's functionality. In addition, the Xalan extension mechanism allows use of Java classes. See the <a href="http://xml.apache.org/xalan/extensions.html">Xalan-J 2 extension documentation</a> for a description of using extensions in a stylesheet. Please note that the W3C XSL Working Group is working on a specification for standard extension bindings, and this module will change to follow that specification. </p><p>[More needed... -sb]</p><a name="xpath"><!--anchor--></a> + <h2>XPath Module</h2> + <p>This module is pulled out of the Xalan package, and put in the org.apache package, to emphasize that the intention is that this package can be used independently of the XSLT engine, even though it has dependencies on the Xalan utils module.</p><p><center><img alt="xalan ---> xpath" src="images/org_apache.gif"/></center></p> + <p>The XPath module first compiles the XPath strings into expression trees, and then executes these expressions via a call to the XPath execute(...) function. </p> <p>Major classes are:</p><dl><dt>XPath</dt><dd>Represents a compiled XPath. Major function is <code><font face="courier, monospaced">XObject execute(XPathContext xctxt, Node contextNode, + PrefixResolver namespaceContext)</font></code>.</dd></dl><dl><dt>XPathAPI</dt><dd>The methods in this class are convenience methods into the + low-level XPath API.</dd></dl><dl><dt>XPathContext</dt><dd>Used as the runtime execution context for XPath.</dd></dl><dl><dt>DOMHelper</dt><dd>Used as a helper for handling DOM issues. May be subclassed to take advantage + of specific DOM implementations.</dd></dl><dl><dt>SourceTreeManager</dt><dd>bottlenecks all management of source trees. The methods + in this class should allow easy garbage collection of source + trees, and should centralize parsing for those source trees.</dd></dl><dl><dt>Expression</dt><dd>The base-class of all expression objects, allowing polymorphic behaviors.</dd></dl><p>The general architecture of the XPath module is divided into the compiler, and categories of expression objects.</p><p><center><img alt="xpath modules" src="images/xpath.gif"/></center></p><p>The most important module is the axes module. This module implements the DOM2 <a href="http://www.w3.org/TR/DOM-Level-2/traversal.html#Iterator-overview">NodeIterator</a> interface, and is meant to allow XPath clients to either override the default behavior or to replace this behavior.</p><p>The <a href="../apidocs/org/apache/xpath/axes/LocPathIterator.html">LocPathIterator</a> and <a href="../apidocs/org/apache/xpath/axes/UnionPathIterator.html">UnionPathIterator</a> classes implement the <a href="http://www.w3.org/TR/DOM-Level-2/java-binding.html#org.w3c.dom.traversal.NodeIterator">NodeIterator</a> interface, and polymorphically use <a href="../apidocs/org/apache/xpath/axes/AxesWalker.html">AxesWalker</a> derived objects to execute each step in the path. The whole trick is to execute the <code><font face="courier, monospaced">LocationPath</font></code> in depth-first document order so that nodes can be found without necessarily looking ahead or performing a breadth-first search. Because a document order depth-first search requires state to be saved for many expressions, the default operations create "Waiter" clones that have to wait while the main <code><font face="courier, monospaced">AxesWalkers</font></code> traverses child nodes (think carefully about what happens when a "//foo/baz" expression is executed). Optimization is done by implementing specialized iterators and <code><font face="courier, monospaced">AxesWalkers</font></code> for certain types of operations. The decision as to what type of iterator or walker will be created is done in the <a href="../apidocs/org/apache/xpath/axes/WalkerFactory.html">WalkerFactory</a> class.</p><p>[Frankly, the implementation of the default AxesWalker, with it's waiters, is the one totally incomprehensible part of Xalan. It gets especially difficult because you can not look to the node ahead. I would be very interested if any rocket scientists out there can come up with a better algorithm.]</p><a name="xpathdbconn"><!--anchor--></a> +<h3>XPath Database Connection</h3> +<p>An important part of the XPath design in both Xalan 1 and Xalan 2, is to enable database connections to be used as drivers directly to the XPath <a href="http://www.w3.org/TR/xpath#location-paths">LocationPath</a> handling. This allows databases to be directly connected to the transform, and be able to take advantage of internal indexing and the like. While in Xalan 1 this was done via the <a href="http://xml.apache.org/xalan/apidocs/org/apache/xalan/xpath/XLocator.html">XLocator</a> interface, in Xalan 2 this interface is no longer used, and has been replaced by the DOM2 <a href="http://www.w3.org/TR/DOM-Level-2/traversal.html#Iterator-overview">NodeIterator</a> interface. An application or extension should be able to install their own NodeIterator for a given document.</p><p><center><img alt="data.gif" src="images/data.gif"/></center></p><p>[More to do]</p><a name="utils"><!--anchor--></a> + <h2>Utils Package</h2> + <p>This package contains general utilities for use by both the xalan and xpath packages.</p><a name="other"><!--anchor--></a> + <h2>Other Packages</h2> + <dl><dt>client</dt><dd>Implementation of Xalan Applet [should we keep this?]. + +</dd></dl> + + + <dl><dt>lib</dt><dd>Implementation of Xalan-specific extensions.</dd></dl><dl><dt>res</dt><dd>Contains strings that require internationalization.</dd></dl><a name="compilation"><!--anchor--></a> +<h2>Xalan Stylesheet Complilation to Java</h2> +<p>We are doing some work on compiling stylesheet objects to Java. This is a work in progress, and is not meant for general use yet. For the moment, we are writing out Java text files, and then compiling them to bytecodes via javac, rather than directly producing bytecodes. The CompilingStylesheetProcessor derives from TransformerFactoryImpl to produce these classes, which are then bundled into a jar file. For the moment the full Xalan jar is required, but we're looking at ways to only use a subset of Xalan, so that only a minimal jar would be required.</p><p><center><img alt="compilation.gif" src="images/compilation.gif"/></center></p><a name="optimizations"><!--anchor--></a> +<h2>Future Optimizations</h2> +<p>This section enumerates some optimizations that we're planning to do in future versions of Xalan.</p><p>Likely near term optimizations (next six months?):</p><ol><li>By pre-analysis of the stylesheet, prune nodes from the tree that have been processed and can be predicted that they won't be visited again.</li><li>Eliminate redundent expressions (xsl:when, variable sets, rooted patterns, etc.).</li><li>Optimize variable patterns such as <xsl:variable name="foo"><xsl:variable select="yada"/></xsl:variable> into <xsl:variable name="foo" select="string(yada)"/>, in order to reduce result tree fragment creation.</li><li>Reduce size of Stree nodes.</li><li>Implement our own NamespaceSupport class (the SAX2 one is too expensive).</li><li>More specialization of itterators and walkers.</li><li>Full Java compilation support.</li><li>Schema Awareness (if "//foo", the Schema can tell us where to look, but we need standard interface to Schemas).</li></ol><p>Likely longer term optimizations (12-18 months?):</p><ol><li>On-the-fly indexing.</li><li>Predict if nodes won't be processed at all, and so don't build them, achieve full streaming support for a certain class of stylesheets.</li></ol><a name="coding"><!--anchor--></a> + <h2>Coding Conventions</h2> + <p>This section documents the coding conventions used in the Xalan + source.</p> + <ol> + <li>Class files are arranged with constructors and possibly an init() + function first, public API methods second, package specific, protected, and + private methods following (arranged based on related functionality), member + variables with their getter/setter access methods last.</li> + <li>Non-static member variables are prefixed with "m_".</li> + <li>static final member variables should always be upper case, without + the "m_" prefix. They need not have accessors.</li> + <li>Private member variables that are not accessed outside the class need + not have getter/setter methods declared.</li> + <li>Private member variables that are accessed outside the class should + have either package specific or public getter/setter methods declared. All + accessors should follow the bean design patterns.</li> + <li>Package-scoped member variables, public member variables, and + protected member variables should not be declared.</li> + </ol> + <a name="open"><!--anchor--></a> + +<hr/><font color="#0086b2" size="-1"><i> + Copyright © 1999-2023 The Apache Software Foundation</i></font></body></html> diff --git a/src/javadocOverview.html b/xalan/src/site/xhtml/javadocOverview.xhtml similarity index 92% rename from src/javadocOverview.html rename to xalan/src/site/xhtml/javadocOverview.xhtml index 70ce354f1..619ee8803 100644 --- a/src/javadocOverview.html +++ b/xalan/src/site/xhtml/javadocOverview.xhtml @@ -18,8 +18,8 @@ <html> <head><title>Xalan-Java 2</title></head> <body> -<p>Xalan-Java implements the <A href="http://www.w3.org/TR/xslt" target="_top">W3C Recommendation 16 November 1999 XSL -Transformations (XSLT) Version 1.0</A>.</p> +<p>Xalan-Java implements the <a href="http://www.w3.org/TR/xslt" target="_top">W3C Recommendation 16 November 1999 XSL +Transformations (XSLT) Version 1.0</a>.</p> <p>XLST is a stylesheet language for transforming XML documents into other XML documents, HTML documents, other document types, or text. The language includes the XSL Transformation vocabulary and XPath, a language for addressing parts of an XML document. An XSL stylesheet describes how to transform the tree of nodes in the XML diff --git a/xalan/src/site/xhtml/org/apache/xalan/client/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/client/package.xhtml new file mode 100644 index 000000000..154cd5465 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/client/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan Client Package.</title> + <body> + <p>Implementation of Xalan applet.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xalan/extensions/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/extensions/package.xhtml new file mode 100644 index 000000000..ed2d808db --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/extensions/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id --> +<html> + <title>Xalan Extension Mechanism Package.</title> + <body> + <p>Implementation of Xalan Extension Mechanism.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xalan/lib/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/lib/package.xhtml new file mode 100644 index 000000000..451db3585 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/lib/package.xhtml @@ -0,0 +1,27 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan and EXSLT Extensions.</title> + <body> + <p>Extension elements and functions shipped with Xalan-Java, including EXSLT functions.</p> + <p>We are adding extensions to this package.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xalan/lib/sql/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/lib/sql/package.xhtml new file mode 100644 index 000000000..26e6da0d0 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/lib/sql/package.xhtml @@ -0,0 +1,91 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan SQL Extension</title> + <body> +<p>Provides extension functions for connecting to a JDBC data source, executing a query, +and working incrementally through a "streamable" result set. Streaming (reuse of a single row node to traverse the result set) is the default mode of operation. If you want unlimited access to the entire result set, you can cache the query result set (1 row node for each row in the result set).</p> +<p><em>If you use streaming mode (the default), you can only access row elements one at a time moving forward through the result set. The use of XPath expressions in your stylesheet, for example, that attempt to return nodes from the result set in any other manner may produce unpredictable results.</em></p> + <p>XConnection provides three extension functions that you can use in your stylesheet.</p> + <ol> + <li><p>new() -- Use one of the XConnection constructors to connect to a data source, and return an XConnection + object.</p></li> + <li><p>query() -- Use the XConnection object query() method to return a "streamable" result set in the form of a row-set + node. Work your way through the row-set one row at a time. The same row element is used over and over again, so you can + begin "transforming" the row-set before the entire result set has been returned.</p></li> + <li>close() -- Use the XConnection object close() method to terminate the connection.</li> + </ol> + <p>The query() extension function returns a Document node that contains (as needed) an array of column-header elements, + a single row element that is used repeatedly, and an array of col elements. Each column-header element (one per column in the + row-set) contains an attribute (ColumnAttribute) for each of the column descriptors in the ResultSetMetaData object. + Each col element contains a text node with a textual representation of the value for that column in the current row.</p> + <h2>Example</h2> + <p>This example displays the result set from a table in a sample InstantDB database.</p> +<pre><?xml version="1.0"?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0" + xmlns:sql="org.apache.xalan.lib.sql.XConnection" + extension-element-prefixes="sql"> + <xsl:output method="html" indent="yes"/> + <xsl:param name="query" select="'SELECT * FROM import1'"/> + + <xsl:template match="/"> + <!-- 1. Make the connection --> + <xsl:variable name="products" + select="sql:new('org.enhydra.instantdb.jdbc.idbDriver', + 'jdbc:idb:D:\instantdb\Examples\sample.prp')"/> + <HTML> + <HEAD> + </HEAD> + <BODY> + <TABLE border="1"> + <!--2. Execute the query --> + <xsl:variable name="table" select='sql:query($products, $query)'/> + <TR> + <!-- Get column-label attribute from each column-header--> + <xsl:for-each select="$table/sql/metadata/column-header"> + <TH><xsl:value-of select="@column-label"/></TH> + </xsl:for-each> + </TR> + <xsl:apply-templates select="$table/sql/row-set/row"/> + <xsl:text>&#10;</xsl:text> + </TABLE> + </BODY> + </HTML> + <!-- 3. Close the connection --> + <xsl:value-of select="sql:close($products)"/> + </xsl:template> + + <xsl:template match="row"> + <TR> + <xsl:apply-templates select="col"/> + </TR> + </xsl:template> + + <xsl:template match="col"> + <TD> + <!-- Here is the column data --> + <xsl:value-of select="text()"/> + </TD> + </xsl:template> + +</xsl:stylesheet> +</pre> + </body> +</html> diff --git a/xalan/src/site/xhtml/org/apache/xalan/processor/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/processor/package.xhtml new file mode 100644 index 000000000..9b70da668 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/processor/package.xhtml @@ -0,0 +1,41 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan Processor Package.</title> + <body> + <p>Parses an XSLT stylesheet document (which may include and import other stylesheet documents) and produces a StylesheetRoot + (a TRaX Templates object).</p> + + <p>StylesheetProcessor implements the TRaX {@link javax.xml.transform.TransformerFactory} interface, + as well as the {@link javax.xml.transform.sax.SAXTransformerFactory} interface. + It registers the {@link org.apache.xalan.processor.StylesheetHandler} object + (a TrAX {@link javax.xml.transform.sax.TemplatesHandler} implementation) + as the SAX ContentHandler for an XMLReader, and uses the XMLReader to parse + the stylesheet document.</p> + <p>Before parsing the XSLT input, StylesheetHandler assembles an {@link org.apache.xalan.processor.XSLTSchema}, + which uses {@link org.apache.xalan.processor.XSLTElementDef} + and {@link org.apache.xalan.processor.XSLTAttributeDef} objects to + recursively define the elements and attributes that an XSLT stylesheet may + contain. The StylesheetHandler then passes on each parse event to the + {@link org.apache.xalan.processor.XSLTElementProcessor} which the + XSLTElementDef assigned to the element associated with that event.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xalan/res/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/res/package.xhtml new file mode 100644 index 000000000..cc60c9061 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/res/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan resource Package.</title> + <body> + <p>Contains strings that require internationalization.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xalan/templates/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/templates/package.xhtml new file mode 100644 index 000000000..21a149f70 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/templates/package.xhtml @@ -0,0 +1,43 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan Templates Package.</title> + <body> + <p>Implements the {@link javax.xml.transform.Templates} interface, + and defines a set of classes that represent an XSLT stylesheet.</p> + + <p>{@link org.apache.xalan.templates.StylesheetRoot} implements the {@link javax.xml.transform.Templates} interface, and + extends {@link org.apache.xalan.templates.StylesheetComposed}, + which is a {@link org.apache.xalan.templates.Stylesheet} composed of itself + and its included Stylesheet objects. A StylesheetRoot also contains a + global list of all imported StylesheetComposed objects. The + role of these objects is to hold immutable stylesheet data, not to perform + procedural tasks associated with the + construction of the data (the org.apache.xalan.processor package) or with the transformation (the org.apache.xalan.transformer + package).</p> + <p>{@link org.apache.xalan.templates.ElemTemplateElement} is the superclass of + all XSLT instruction elements, including Stylesheet. The <i>x</i>Func classes + extend members of the org.apache.xpath package and implement XSLT functions. Unlike + the Stylesheet "container" objects, the + instruction element and function classes do contain procedural execute() + methods that are called during the transformation.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xalan/trace/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/trace/package.xhtml new file mode 100644 index 000000000..5fd7f73fe --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/trace/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan Trace (debugger) Package.</title> + <body> + <p>Implementation of Xalan Trace events, for use by a debugger.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xalan/transformer/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/transformer/package.xhtml new file mode 100644 index 000000000..fb13b95c5 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/transformer/package.xhtml @@ -0,0 +1,39 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan Transformer Package.</title> + <body> + <p>In charge of run-time transformations and the production of result trees.</p> + + <p>{@link org.apache.xalan.transformer.TransformerImpl} implements the + {@link javax.xml.transform.Transformer} interface, and is the core representation + of the transformation execution.</p> + <p>For each node in the XML source, TransformerImpl uses the StylesheetRoot and underlying XSLT schema to determine which + template to apply: one of the templates in the StylesheetRoot, a default template rule as specified in the XSLT spec, or + none.</p> + <p>The Transformer works with {@link org.apache.xml.serializer.SerializationHandler} to + forward the SAX-like events produced by the + transformation to the appropriate output ContentHandler.</p> + <p>To the degree possible, the parsing of the XML source and application of the Templates object to that source are performed + concurrently in separate threads. When necessary, the Transformer waits for the parse events that must be in place before a + given template may be applied.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xalan/xslt/package.xhtml b/xalan/src/site/xhtml/org/apache/xalan/xslt/package.xhtml new file mode 100644 index 000000000..12684aa8b --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xalan/xslt/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan command-line interface.</title> + <body> + <p>Implementation of Xalan command-line interface.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xml/utils/package.xhtml b/xalan/src/site/xhtml/org/apache/xml/utils/package.xhtml new file mode 100644 index 000000000..b55175c37 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xml/utils/package.xhtml @@ -0,0 +1,27 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan utilities.</title> + <body> + <p>Implementation of Xalan utility classes. This package is also shared by XPath. + There *should* be no outward dependencies to XPath or Xalan by classes in this package.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xpath/axes/package.xhtml b/xalan/src/site/xhtml/org/apache/xpath/axes/package.xhtml new file mode 100644 index 000000000..1a2fba220 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xpath/axes/package.xhtml @@ -0,0 +1,27 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>XPath LocationPath support.</title> + <body> + <p>Implementation of XPath LocationPath support -- primary classes are + LocPathIterator and UnionPathIterator.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xpath/compiler/package.xhtml b/xalan/src/site/xhtml/org/apache/xpath/compiler/package.xhtml new file mode 100644 index 000000000..ef2f39932 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xpath/compiler/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<html> + <title>XPath parsing and compilation support Package.</title> + <body> + <p>Implements an XPath parser which produces an OpMap, and a so-called Compiler + which produces an expression tree for fast evaluation.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xpath/domapi/package.xhtml b/xalan/src/site/xhtml/org/apache/xpath/domapi/package.xhtml new file mode 100644 index 000000000..8db081d71 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xpath/domapi/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>XPath domapi Package.</title> + <body> + <p>Implements DOM Level 3 XPath API</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xpath/functions/package.xhtml b/xalan/src/site/xhtml/org/apache/xpath/functions/package.xhtml new file mode 100644 index 000000000..c1d30ba89 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xpath/functions/package.xhtml @@ -0,0 +1,29 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>XPath functions Package.</title> + <body> + <p>Implements XPath functions -- each function is derived from Function, + FunctionOneArg, Function2Args, etc, with number-of-arguments checking being + applied mainly at compile time -- this package only implements XPath functions, + XSLT functions are found in the "templates" package.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xpath/objects/package.xhtml b/xalan/src/site/xhtml/org/apache/xpath/objects/package.xhtml new file mode 100644 index 000000000..bf5e5dfbd --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xpath/objects/package.xhtml @@ -0,0 +1,27 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>XPath objects Package.</title> + <body> + <p>Implementation of XPath polymorphic type objects -- this package will grow + as XPath objects are expanded to support XML Schema data types.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xpath/operations/package.xhtml b/xalan/src/site/xhtml/org/apache/xpath/operations/package.xhtml new file mode 100644 index 000000000..e86126443 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xpath/operations/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>Xalan XPath operations.</title> + <body> + <p>Support for XPath operations, such as +, -, string(), etc.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xpath/package.xhtml b/xalan/src/site/xhtml/org/apache/xpath/package.xhtml new file mode 100644 index 000000000..7eb95a629 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xpath/package.xhtml @@ -0,0 +1,27 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>XPath support Package.</title> + <body> + <p>Implementation of XPath; for the most part, only classes meant for public use are + found at this root level of the XPath packages.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xpath/patterns/package.xhtml b/xalan/src/site/xhtml/org/apache/xpath/patterns/package.xhtml new file mode 100644 index 000000000..d23b37b09 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xpath/patterns/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>XPath nodetest and XSLT pattern matching support.</title> + <body> + <p>Implementation of XPath nodeTest support, and XSLT pattern matching support.</p> + </body> +</html> + + diff --git a/xalan/src/site/xhtml/org/apache/xpath/res/package.xhtml b/xalan/src/site/xhtml/org/apache/xpath/res/package.xhtml new file mode 100644 index 000000000..d27c0a2e8 --- /dev/null +++ b/xalan/src/site/xhtml/org/apache/xpath/res/package.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!-- $Id$ --> +<html> + <title>XPath resources.</title> + <body> + <p>Contains strings for XPath support that require internationalization.</p> + </body> +</html> + + diff --git a/xalan/src/test/java/org/apache/xalan/VersionAccessor.java b/xalan/src/test/java/org/apache/xalan/VersionAccessor.java new file mode 100644 index 000000000..4b5409dc0 --- /dev/null +++ b/xalan/src/test/java/org/apache/xalan/VersionAccessor.java @@ -0,0 +1,16 @@ +package org.apache.xalan; + +/** + * Provides tests in other packages with access to (package) protected methods + * in class {@link Version}, passing through parameters and results + */ +public class VersionAccessor { + /** + * Provides tests in other packages with access to (package) protected method + * {@link Version#parseVersionNumber(String)}, passing through parameters and + * results + */ + public static void parseVersionNumber(String version) { + Version.parseVersionNumber(version); + } +} diff --git a/xalan/src/test/java/org/apache/xalan/VersionTest.java b/xalan/src/test/java/org/apache/xalan/VersionTest.java new file mode 100644 index 000000000..b4a0cb995 --- /dev/null +++ b/xalan/src/test/java/org/apache/xalan/VersionTest.java @@ -0,0 +1,132 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.xalan; + +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.parallel.Isolated; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; +import org.mockito.MockedStatic; +import org.mockito.Mockito; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; + +@Isolated("redirecting System.err is not thread-safe") +public class VersionTest { + private static final PrintStream originalPrintStream = System.err; + private static final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + private static final PrintStream mockPrintStream = new PrintStream(buffer, true); + + @BeforeAll + public static void beforeAll() { + System.setErr(mockPrintStream); + } + + @AfterAll + public static void afterAll() { + System.setErr(originalPrintStream); + } + + @BeforeEach + public void beforeEach() { + buffer.reset(); + } + + @ParameterizedTest(name = "{0} -> {2}") + @MethodSource("testReadPropertiesArgs") + public void testReadProperties(String ignoredName, String properties, String version) { + try (MockedStatic<Version> versionMock = Mockito.mockStatic(Version.class, Mockito.CALLS_REAL_METHODS)) { + versionMock + .when(Version::getPropertiesStream) + .thenReturn(new ByteArrayInputStream(properties.getBytes())); + assertEquals(version, Version.readVersionNumber()); + } + } + + private static Stream<Arguments> testReadPropertiesArgs() { + return Stream.of( + Arguments.of("single line without line feed", "version=1.2.3", "1.2.3"), + Arguments.of("single line with line feed", "version=4.5.D6-SNAPSHOT\n", "4.5.D6-SNAPSHOT"), + Arguments.of("multiple lines with version number", "foo=bar\nversion=7.8.9\nbaz=zot\n", "7.8.9"), + Arguments.of("single line without version number", "verXion=7.8.9\n", "0.0.0"), + Arguments.of("multiple lines without version number", "foo=bar\nverXion=7.8.9\nbaz=zot\n", "0.0.0") + ); + } + + @Test + public void testCannotReadProperties() { + try (MockedStatic<Version> versionMock = Mockito.mockStatic(Version.class, Mockito.CALLS_REAL_METHODS)) { + versionMock + .when(Version::getPropertiesStream) + .thenThrow(NullPointerException.class); + assertEquals("0.0.0", Version.readVersionNumber()); + assertTrue(buffer.toString().contains("RuntimeException: Cannot read properties file")); + } + } + + @ParameterizedTest(name = "{0} -> {1}") + @MethodSource("testParseVersionNumberArgs") + public void testParseVersionNumber( + String inputVersion, boolean matchSuccessful, String parsedVersion, + int major, int release, int maintenance, int development, boolean snapshot + ) { + Version.parseVersionNumber(inputVersion); + assertEquals(parsedVersion, Version.getVersion()); + assertEquals(major, Version.getMajorVersionNum()); + assertEquals(release, Version.getReleaseVersionNum()); + assertEquals(maintenance, Version.getMaintenanceVersionNum()); + assertEquals(development, Version.getDevelopmentVersionNum()); + assertEquals(snapshot, Version.isSnapshot()); + boolean cannotMatchWarningFound = buffer.toString().contains("Cannot match Xalan version"); + assertEquals(matchSuccessful, !cannotMatchWarningFound); + } + + private static Stream<Arguments> testParseVersionNumberArgs() { + return Stream.of( + // Pattern match + Arguments.of("1.2.3", true, "Xalan Java 1.2.3", 1, 2, 3, 0, false), + Arguments.of("1.2.D3", true, "Xalan Java 1.2.D3", 1, 2, 0, 3, false), + Arguments.of("1.2.3-SNAPSHOT", true, "Xalan Java 1.2.3-SNAPSHOT", 1, 2, 3, 0, true), + Arguments.of("1.2.D03-SNAPSHOT", true, "Xalan Java 1.2.D3-SNAPSHOT", 1, 2, 0, 3, true), + Arguments.of("0.0.0", true, "Xalan Java 0.0.0", 0, 0, 0, 0, false), + // No pattern match + Arguments.of("", false, "Xalan Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("-1.2.3", false, "Xalan Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("-1.2.3", false, "Xalan Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1. 2.3", false, "Xalan Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.D3x", false, "Xalan Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.3-XSNAPSHOT", false, "Xalan Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.D3-snapshot", false, "Xalan Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.D3-SNAPSHOT-1", false, "Xalan Java 0.0.0", 0, 0, 0, 0, false), + // Input version null -> cannot happen in class under test, but we know + // what would happen if it did + Arguments.of(null, true, "Xalan Java 0.0.0", 0, 0, 0, 0, false) + ); + } + +} diff --git a/xalan/src/test/java/org/apache/xalan/processor/XSLProcessorVersionTest.java b/xalan/src/test/java/org/apache/xalan/processor/XSLProcessorVersionTest.java new file mode 100644 index 000000000..711e28f3c --- /dev/null +++ b/xalan/src/test/java/org/apache/xalan/processor/XSLProcessorVersionTest.java @@ -0,0 +1,96 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.xalan.processor; + +import org.apache.xalan.VersionAccessor; +import org.junit.jupiter.api.AfterAll; +import org.junit.jupiter.api.BeforeAll; +import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.parallel.Isolated; +import org.junit.jupiter.params.ParameterizedTest; +import org.junit.jupiter.params.provider.Arguments; +import org.junit.jupiter.params.provider.MethodSource; + +import java.io.ByteArrayOutputStream; +import java.io.PrintStream; +import java.util.stream.Stream; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +@Isolated("redirecting System.err is not thread-safe") +public class XSLProcessorVersionTest { + private static final PrintStream originalPrintStream = System.err; + private static final ByteArrayOutputStream buffer = new ByteArrayOutputStream(); + private static final PrintStream mockPrintStream = new PrintStream(buffer, true); + + @BeforeAll + public static void beforeAll() { + System.setErr(mockPrintStream); + } + + @AfterAll + public static void afterAll() { + System.setErr(originalPrintStream); + } + + @BeforeEach + public void beforeEach() { + buffer.reset(); + } + + @ParameterizedTest(name = "{0} -> {1}") + @MethodSource("testParseVersionNumberArgs") + public void testParseVersionNumber( + String inputVersion, boolean matchSuccessful, String parsedVersion, + int major, int release, int maintenance, int development, boolean snapshot + ) { + VersionAccessor.parseVersionNumber(inputVersion); + assertEquals(parsedVersion, XSLProcessorVersion.getVersion()); + assertEquals(major, XSLProcessorVersion.getMajorVersionNum()); + assertEquals(release, XSLProcessorVersion.getReleaseVersionNum()); + assertEquals(maintenance, XSLProcessorVersion.getMaintenanceVersionNum()); + assertEquals(development, XSLProcessorVersion.getDevelopmentVersionNum()); + assertEquals(snapshot, XSLProcessorVersion.isSnapshot()); + boolean cannotMatchWarningFound = buffer.toString().contains("Cannot match Xalan version"); + assertEquals(matchSuccessful, !cannotMatchWarningFound); + } + + private static Stream<Arguments> testParseVersionNumberArgs() { + return Stream.of( + // Pattern match + Arguments.of("1.2.3", true, "Xalan Processor Java 1.2.3", 1, 2, 3, 0, false), + Arguments.of("1.2.D3", true, "Xalan Processor Java 1.2.D3", 1, 2, 0, 3, false), + Arguments.of("1.2.3-SNAPSHOT", true, "Xalan Processor Java 1.2.3-SNAPSHOT", 1, 2, 3, 0, true), + Arguments.of("1.2.D03-SNAPSHOT", true, "Xalan Processor Java 1.2.D3-SNAPSHOT", 1, 2, 0, 3, true), + Arguments.of("0.0.0", true, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false), + // No pattern match + Arguments.of("", false, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("-1.2.3", false, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("-1.2.3", false, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1. 2.3", false, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.D3x", false, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.3-XSNAPSHOT", false, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.D3-snapshot", false, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false), + Arguments.of("1.2.D3-SNAPSHOT-1", false, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false), + // Input version null -> cannot happen in class under test, but we know + // what would happen if it did + Arguments.of(null, true, "Xalan Processor Java 0.0.0", 0, 0, 0, 0, false) + ); + } + +} diff --git a/xalan2jtaglet/pom.xml b/xalan2jtaglet/pom.xml new file mode 100644 index 000000000..0bdd9c8e0 --- /dev/null +++ b/xalan2jtaglet/pom.xml @@ -0,0 +1,41 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>xalan</groupId> + <artifactId>xalan-j</artifactId> + <version>2.7.3</version> + </parent> + + <artifactId>xalan2jtaglet</artifactId> + <name>@xsl.usage taglet JDK 8</name> + <description> + Implementation of the @xsl.usage taglet, used in the Xalan package's javadoc + to indicate classes which, while public for cross-module access, are not + intended to be called by end-users. + </description> + + <dependencies> + <!-- Automatically depends on tools.jar up to JDK 8, but not on JDK 9+. + This way, we do not need to manually define profiles for this task. + --> + <dependency> + <groupId>com.github.olivergondza</groupId> + <artifactId>maven-jdk-tools-wrapper</artifactId> + <version>0.1</version> + </dependency> + </dependencies> + + <build> + <plugins> + <!-- Copy generated jarfile up to xalan-java/build/, + for backward compatibility with Ant builds. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> + +</project> diff --git a/xalan2jtaglet/src/main/java/xalan2jtaglet/XSLUsage.java b/xalan2jtaglet/src/main/java/xalan2jtaglet/XSLUsage.java new file mode 100644 index 000000000..e7eff5fbe --- /dev/null +++ b/xalan2jtaglet/src/main/java/xalan2jtaglet/XSLUsage.java @@ -0,0 +1,51 @@ +package xalan2jtaglet; + +import com.sun.javadoc.Tag; + +/** + * Taglet for Xalan-Java documentation, giving us a standard way to + * indicate when classes are public only because they are shared + * across packages within Xalan code, not because they are intended for use + * by others. Typical: "@xsl.usage internal" + * <p> + * Technically it might be better to OSGIfy the Xalan code, which + * would also permit demand-loading of only the classes actually being + * used by this execution... but that's an idea for the future. + * <p> + * This code renders the tag keywords (internal, advanced, experimental) + * into their expanded renderings in the Javadoc. + * <p> + * Source code recreated from xalan2jtaglet.jar by IntelliJ IDEA (powered by + * FernFlower decompiler), then adjusted to JDK 8 taglet API. + */ +public class XSLUsage { + public static final String TAG = "xsl.usage"; + private static final int INTERNAL = 0; + private static final int ADVANCED = 1; + private static final int EXPERIMENTAL = 2; + private static final int UNSPECIFIED = -1; + private static final String[] names = new String[]{ + "internal", "advanced", "experimental" + }; + private static final String[] colours = new String[]{ + "FF0000", "00FF00", "0000FF" + }; + private static final String[] messages = new String[]{ + "**For internal use only**", "**For advanced use only**", "**Experimental**" + }; + + public static String getHTML(Tag usageTag) { + int key = getKey(usageTag); + return key == -1 + ? "" + : "<i><font size=\"-1\" color=\"#" + colours[key] + "\"> " + messages[key] + "</font></i></DD>\n"; + } + + private static int getKey(Tag usageTag) { + for (int i = 0; i < names.length; ++i) { + if (names[i].equals(usageTag.text())) + return i; + } + return -1; + } +} diff --git a/xalan2jtaglet/src/main/java/xalan2jtaglet/XSLUsageTag.java b/xalan2jtaglet/src/main/java/xalan2jtaglet/XSLUsageTag.java new file mode 100644 index 000000000..c2cf80941 --- /dev/null +++ b/xalan2jtaglet/src/main/java/xalan2jtaglet/XSLUsageTag.java @@ -0,0 +1,92 @@ +package xalan2jtaglet; + +import com.sun.javadoc.Tag; +import com.sun.tools.doclets.Taglet; + +import java.util.Map; + +/** + * Taglet for Xalan-Java documentation, giving us a standard way to + * indicate when classes are public only because they are shared + * across packages within Xalan code, not because they are intended for use + * by others. Typical: "@xsl.usage internal" + * <p> + * Technically it might be better to OSGIfy the Xalan code, which + * would also permit demand-loading of only the classes actually being + * used by this execution... but that's an idea for the future. + * <p> + * This code renders the tag keywords (internal, advanced, experimental) + * into their expanded renderings in the Javadoc. + * <p> + * Source code recreated from xalan2jtaglet.jar by IntelliJ IDEA (powered by + * FernFlower decompiler), then adjusted to JDK 8 taglet API. + */ +public class XSLUsageTag implements Taglet { + private static final String HEADER = "Usage:"; + + @Override + public boolean inConstructor() { + return true; + } + + @Override + public boolean inField() { + return true; + } + + @Override + public boolean inMethod() { + return true; + } + + @Override + public boolean inOverview() { + return true; + } + + @Override + public boolean inPackage() { + return true; + } + + @Override + public boolean inType() { + return true; + } + + @Override + public boolean isInlineTag() { + return false; + } + + @Override + public String getName() { + return "xsl.usage"; + } + + @Override + public String toString(Tag tag) { + return "\n<DT><b>Usage:</b><DD>" + XSLUsage.getHTML(tag) + "</DD>\n"; + } + + @Override + public String toString(Tag[] tags) { + if (tags == null || tags.length == 0) + return ""; + + String string = "\n<DT><b>Usage:</b><DD>"; + for (Tag tag : tags) + string = string + XSLUsage.getHTML(tag) + ", "; + + // Remove trailing ", ", add end tag + return string.substring(0, string.length() - 2) + "</DD>\n"; + } + + public static void register(Map tagletMap) { + XSLUsageTag tag = new XSLUsageTag(); + Taglet t = (Taglet) tagletMap.get(tag.getName()); + if (t != null) + tagletMap.remove(tag.getName()); + tagletMap.put(tag.getName(), tag); + } +} diff --git a/xalan2jtaglet_jdk9/pom.xml b/xalan2jtaglet_jdk9/pom.xml new file mode 100644 index 000000000..7dc59fbee --- /dev/null +++ b/xalan2jtaglet_jdk9/pom.xml @@ -0,0 +1,39 @@ +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>xalan</groupId> + <artifactId>xalan-j</artifactId> + <version>2.7.3</version> + </parent> + + <artifactId>xalan2jtaglet_jdk9</artifactId> + <name>@xsl.usage taglet JDK9+</name> + <description> + Implementation of the @xsl.usage taglet, used in the Xalan package's javadoc + to indicate classes which, while public for cross-module access, are not + intended to be called by end-users. + </description> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <!-- Override default 1.8 from parent POM --> + <source>9</source> + <target>9</target> + </configuration> + </plugin> + <!-- Copy generated jarfile up to xalan-java/build/, + for backward compatibility with Ant builds. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> + +</project> diff --git a/xalan2jtaglet_jdk9/src/main/java/xalan2jtaglet/XSLUsage.java b/xalan2jtaglet_jdk9/src/main/java/xalan2jtaglet/XSLUsage.java new file mode 100644 index 000000000..be7ad1ff2 --- /dev/null +++ b/xalan2jtaglet_jdk9/src/main/java/xalan2jtaglet/XSLUsage.java @@ -0,0 +1,55 @@ +package xalan2jtaglet; + +import com.sun.source.doctree.DocTree; +import com.sun.source.doctree.UnknownBlockTagTree; + +/** + * Taglet for Xalan-Java documentation, giving us a standard way to + * indicate when classes are public only because they are shared + * across packages within Xalan code, not because they are intended for use + * by others. Typical: "@xsl.usage internal" + * <p> + * Technically it might be better to OSGIfy the Xalan code, which + * would also permit demand-loading of only the classes actually being + * used by this execution... but that's an idea for the future. + * <p> + * This code renders the tag keywords (internal, advanced, experimental) + * into their expanded renderings in the Javadoc. + * <p> + * Source code recreated from xalan2jtaglet.jar by IntelliJ IDEA (powered by + * FernFlower decompiler), then adjusted to JDK 9+ taglet API. + */ +public class XSLUsage { + public static final String TAG = "xsl.usage"; + private static final int INTERNAL = 0; + private static final int ADVANCED = 1; + private static final int EXPERIMENTAL = 2; + private static final int UNSPECIFIED = -1; + private static final String[] names = new String[]{ + "internal", "advanced", "experimental" + }; + private static final String[] colours = new String[]{ + "FF0000", "00FF00", "0000FF" + }; + private static final String[] messages = new String[]{ + "**For internal use only**", "**For advanced use only**", "**Experimental**" + }; + + public static String getHTML(DocTree usageTag) { + int key = getKey(usageTag); + return key == -1 + ? "" + : "<i><font size=\"-1\" color=\"#" + colours[key] + "\"> " + messages[key] + "</font></i></DD>\n"; + } + + private static int getKey(DocTree usageTag) { + if (usageTag instanceof UnknownBlockTagTree) { + UnknownBlockTagTree tag = (UnknownBlockTagTree) usageTag; + for (int i = 0; i < names.length; ++i) { + if (names[i].equals(tag.getContent().toString())) + return i; + } + } + return -1; + } +} diff --git a/xalan2jtaglet_jdk9/src/main/java/xalan2jtaglet/XSLUsageTag.java b/xalan2jtaglet_jdk9/src/main/java/xalan2jtaglet/XSLUsageTag.java new file mode 100644 index 000000000..e29f8d53a --- /dev/null +++ b/xalan2jtaglet_jdk9/src/main/java/xalan2jtaglet/XSLUsageTag.java @@ -0,0 +1,63 @@ +package xalan2jtaglet; + +import com.sun.source.doctree.DocTree; +import jdk.javadoc.doclet.Taglet; + +import javax.lang.model.element.Element; +import java.util.*; + +/** + * Taglet for Xalan-Java documentation, giving us a standard way to + * indicate when classes are public only because they are shared + * across packages within Xalan code, not because they are intended for use + * by others. Typical: "@xsl.usage internal" + * <p> + * Technically it might be better to OSGIfy the Xalan code, which + * would also permit demand-loading of only the classes actually being + * used by this execution... but that's an idea for the future. + * <p> + * This code renders the tag keywords (internal, advanced, experimental) + * into their expanded renderings in the Javadoc. + * <p> + * Source code recreated from xalan2jtaglet.jar by IntelliJ IDEA (powered by + * FernFlower decompiler), then adjusted to JDK 9+ taglet API. + */ +public class XSLUsageTag implements Taglet { + private static final String HEADER = "Usage:"; + + @Override + public Set<Location> getAllowedLocations() { + return new HashSet<>(Arrays.asList(Location.values())); + } + + @Override + public boolean isInlineTag() { + return false; + } + + @Override + public String getName() { + return "xsl.usage"; + } + + @Override + public String toString(List<? extends DocTree> tags, Element element) { + if (tags == null || tags.isEmpty()) + return ""; + + String string = "\n<DT><b>Usage:</b><DD>"; + for (DocTree tag : tags) + string = string + XSLUsage.getHTML(tag) + ", "; + + // Remove trailing ", ", add end tag + return string.substring(0, string.length() - 2) + "</DD>\n"; + } + + public static void register(Map tagletMap) { + XSLUsageTag tag = new XSLUsageTag(); + Taglet t = (Taglet) tagletMap.get(tag.getName()); + if (t != null) + tagletMap.remove(tag.getName()); + tagletMap.put(tag.getName(), tag); + } +} diff --git a/xalansamples/pom.xml b/xalansamples/pom.xml new file mode 100644 index 000000000..6e7db9443 --- /dev/null +++ b/xalansamples/pom.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>xalan-j</artifactId> + <groupId>xalan</groupId> + <version>2.7.3</version> + </parent> + + <artifactId>xalansamples</artifactId> + <name>Apache Xalan-Java Samples</name> + <!-- FIXME change it to the project's website --> + <url>http://www.example.com</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </dependency> + <!-- For javadoc generation only, hence 'provided' scope --> + <dependency> + <groupId>xalan</groupId> + <artifactId>${xalan.taglet.artifactId}</artifactId> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> <!-- jakata servlet is at 6.0 --> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.ejb/ejb-api --> + <dependency> + <groupId>javax.ejb</groupId> + <artifactId>ejb-api</artifactId> + <version>3.0</version> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/xerces/xercesImpl --> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.12.2</version> + <scope>provided</scope> + </dependency> + + <!-- https://github.com/dev-aspectj/brazil --> + <dependency> + <groupId>dev.aspectj</groupId> + <artifactId>sunlabs.brazil</artifactId> + <version>2.3.1</version> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec --> + <dependency> + <groupId>org.jboss.spec.javax.rmi</groupId> + <artifactId>jboss-rmi-api_1.0_spec</artifactId> + <version>1.0.6.Final</version> + </dependency> + + </dependencies> + + <build> + <plugins> + <!-- Copy generated jarfile up to xalan-java/build/, + for backward compatibility with Ant builds. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>create-javadocs</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>create-sources</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/samples/AppletXMLtoHTML/README.html b/xalansamples/src/main/java/samples/AppletXMLtoHTML/README.html similarity index 100% rename from samples/AppletXMLtoHTML/README.html rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/README.html diff --git a/samples/AppletXMLtoHTML/appletXMLtoHTML.html b/xalansamples/src/main/java/samples/AppletXMLtoHTML/appletXMLtoHTML.html similarity index 100% rename from samples/AppletXMLtoHTML/appletXMLtoHTML.html rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/appletXMLtoHTML.html diff --git a/samples/AppletXMLtoHTML/client.html b/xalansamples/src/main/java/samples/AppletXMLtoHTML/client.html similarity index 100% rename from samples/AppletXMLtoHTML/client.html rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/client.html diff --git a/samples/AppletXMLtoHTML/foo-s1.xml b/xalansamples/src/main/java/samples/AppletXMLtoHTML/foo-s1.xml similarity index 100% rename from samples/AppletXMLtoHTML/foo-s1.xml rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/foo-s1.xml diff --git a/samples/AppletXMLtoHTML/lts3611beac.jpg b/xalansamples/src/main/java/samples/AppletXMLtoHTML/lts3611beac.jpg similarity index 100% rename from samples/AppletXMLtoHTML/lts3611beac.jpg rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/lts3611beac.jpg diff --git a/samples/AppletXMLtoHTML/rabbitwhorn.jpg b/xalansamples/src/main/java/samples/AppletXMLtoHTML/rabbitwhorn.jpg similarity index 100% rename from samples/AppletXMLtoHTML/rabbitwhorn.jpg rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/rabbitwhorn.jpg diff --git a/samples/AppletXMLtoHTML/s1ToHTML.xsl b/xalansamples/src/main/java/samples/AppletXMLtoHTML/s1ToHTML.xsl similarity index 100% rename from samples/AppletXMLtoHTML/s1ToHTML.xsl rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/s1ToHTML.xsl diff --git a/samples/AppletXMLtoHTML/target.html b/xalansamples/src/main/java/samples/AppletXMLtoHTML/target.html similarity index 100% rename from samples/AppletXMLtoHTML/target.html rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/target.html diff --git a/samples/AppletXMLtoHTML/trax.xml b/xalansamples/src/main/java/samples/AppletXMLtoHTML/trax.xml similarity index 100% rename from samples/AppletXMLtoHTML/trax.xml rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/trax.xml diff --git a/samples/AppletXMLtoHTML/xalanApplets.xml b/xalansamples/src/main/java/samples/AppletXMLtoHTML/xalanApplets.xml similarity index 100% rename from samples/AppletXMLtoHTML/xalanApplets.xml rename to xalansamples/src/main/java/samples/AppletXMLtoHTML/xalanApplets.xml diff --git a/samples/ApplyXPath/ApplyXPath.java b/xalansamples/src/main/java/samples/ApplyXPath/ApplyXPath.java similarity index 99% rename from samples/ApplyXPath/ApplyXPath.java rename to xalansamples/src/main/java/samples/ApplyXPath/ApplyXPath.java index fe8478f9d..a536d26ff 100644 --- a/samples/ApplyXPath/ApplyXPath.java +++ b/xalansamples/src/main/java/samples/ApplyXPath/ApplyXPath.java @@ -19,6 +19,7 @@ * $Id$ */ // This file uses 4 space indents, no tabs. +package samples.ApplyXPath; import java.io.FileInputStream; import java.io.OutputStreamWriter; diff --git a/samples/ApplyXPath/foo.xml b/xalansamples/src/main/java/samples/ApplyXPath/foo.xml similarity index 100% rename from samples/ApplyXPath/foo.xml rename to xalansamples/src/main/java/samples/ApplyXPath/foo.xml diff --git a/samples/ApplyXPath/readme.html b/xalansamples/src/main/java/samples/ApplyXPath/readme.html similarity index 100% rename from samples/ApplyXPath/readme.html rename to xalansamples/src/main/java/samples/ApplyXPath/readme.html diff --git a/samples/ApplyXPathDOM/ApplyXPathDOM.java b/xalansamples/src/main/java/samples/ApplyXPathDOM/ApplyXPathDOM.java similarity index 99% rename from samples/ApplyXPathDOM/ApplyXPathDOM.java rename to xalansamples/src/main/java/samples/ApplyXPathDOM/ApplyXPathDOM.java index 7ebb1d267..b3b3d94d4 100644 --- a/samples/ApplyXPathDOM/ApplyXPathDOM.java +++ b/xalansamples/src/main/java/samples/ApplyXPathDOM/ApplyXPathDOM.java @@ -20,6 +20,9 @@ */ // This file uses 4 space indents, no tabs. +package samples.ApplyXPathDOM; + + import java.io.FileInputStream; import java.io.OutputStreamWriter; diff --git a/samples/ApplyXPathDOM/foo.xml b/xalansamples/src/main/java/samples/ApplyXPathDOM/foo.xml similarity index 100% rename from samples/ApplyXPathDOM/foo.xml rename to xalansamples/src/main/java/samples/ApplyXPathDOM/foo.xml diff --git a/samples/ApplyXPathDOM/readme.html b/xalansamples/src/main/java/samples/ApplyXPathDOM/readme.html similarity index 100% rename from samples/ApplyXPathDOM/readme.html rename to xalansamples/src/main/java/samples/ApplyXPathDOM/readme.html diff --git a/samples/CompiledJAXP/Compile.java b/xalansamples/src/main/java/samples/CompiledJAXP/Compile.java similarity index 98% rename from samples/CompiledJAXP/Compile.java rename to xalansamples/src/main/java/samples/CompiledJAXP/Compile.java index a2c08b358..00250a62d 100644 --- a/samples/CompiledJAXP/Compile.java +++ b/xalansamples/src/main/java/samples/CompiledJAXP/Compile.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.CompiledJAXP; import javax.xml.transform.Templates; import javax.xml.transform.TransformerFactory; diff --git a/samples/CompiledJAXP/README.cjaxp b/xalansamples/src/main/java/samples/CompiledJAXP/README.cjaxp similarity index 100% rename from samples/CompiledJAXP/README.cjaxp rename to xalansamples/src/main/java/samples/CompiledJAXP/README.cjaxp diff --git a/samples/CompiledJAXP/Transform.java b/xalansamples/src/main/java/samples/CompiledJAXP/Transform.java similarity index 98% rename from samples/CompiledJAXP/Transform.java rename to xalansamples/src/main/java/samples/CompiledJAXP/Transform.java index da9ac396b..935f33206 100644 --- a/samples/CompiledJAXP/Transform.java +++ b/xalansamples/src/main/java/samples/CompiledJAXP/Transform.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.CompiledJAXP; import java.io.OutputStreamWriter; diff --git a/samples/DOM2DOM/DOM2DOM.java b/xalansamples/src/main/java/samples/DOM2DOM/DOM2DOM.java similarity index 99% rename from samples/DOM2DOM/DOM2DOM.java rename to xalansamples/src/main/java/samples/DOM2DOM/DOM2DOM.java index 8e9c82a4b..fa5e77a60 100644 --- a/samples/DOM2DOM/DOM2DOM.java +++ b/xalansamples/src/main/java/samples/DOM2DOM/DOM2DOM.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.DOM2DOM; import java.io.FileNotFoundException; import java.io.IOException; diff --git a/samples/DOM2DOM/birds.xml b/xalansamples/src/main/java/samples/DOM2DOM/birds.xml similarity index 100% rename from samples/DOM2DOM/birds.xml rename to xalansamples/src/main/java/samples/DOM2DOM/birds.xml diff --git a/samples/DOM2DOM/birds.xsl b/xalansamples/src/main/java/samples/DOM2DOM/birds.xsl similarity index 100% rename from samples/DOM2DOM/birds.xsl rename to xalansamples/src/main/java/samples/DOM2DOM/birds.xsl diff --git a/samples/DOM2DOM/readme.html b/xalansamples/src/main/java/samples/DOM2DOM/readme.html similarity index 100% rename from samples/DOM2DOM/readme.html rename to xalansamples/src/main/java/samples/DOM2DOM/readme.html diff --git a/samples/Pipe/Pipe.java b/xalansamples/src/main/java/samples/Pipe/Pipe.java similarity index 99% rename from samples/Pipe/Pipe.java rename to xalansamples/src/main/java/samples/Pipe/Pipe.java index 798c243fc..8ef67b751 100644 --- a/samples/Pipe/Pipe.java +++ b/xalansamples/src/main/java/samples/Pipe/Pipe.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.Pipe; import java.io.IOException; diff --git a/samples/Pipe/foo.xml b/xalansamples/src/main/java/samples/Pipe/foo.xml similarity index 100% rename from samples/Pipe/foo.xml rename to xalansamples/src/main/java/samples/Pipe/foo.xml diff --git a/samples/Pipe/foo1.xsl b/xalansamples/src/main/java/samples/Pipe/foo1.xsl similarity index 100% rename from samples/Pipe/foo1.xsl rename to xalansamples/src/main/java/samples/Pipe/foo1.xsl diff --git a/samples/Pipe/foo2.xsl b/xalansamples/src/main/java/samples/Pipe/foo2.xsl similarity index 100% rename from samples/Pipe/foo2.xsl rename to xalansamples/src/main/java/samples/Pipe/foo2.xsl diff --git a/samples/Pipe/foo3.xsl b/xalansamples/src/main/java/samples/Pipe/foo3.xsl similarity index 100% rename from samples/Pipe/foo3.xsl rename to xalansamples/src/main/java/samples/Pipe/foo3.xsl diff --git a/samples/Pipe/readme.html b/xalansamples/src/main/java/samples/Pipe/readme.html similarity index 100% rename from samples/Pipe/readme.html rename to xalansamples/src/main/java/samples/Pipe/readme.html diff --git a/samples/SAX2SAX/SAX2SAX.java b/xalansamples/src/main/java/samples/SAX2SAX/SAX2SAX.java similarity index 99% rename from samples/SAX2SAX/SAX2SAX.java rename to xalansamples/src/main/java/samples/SAX2SAX/SAX2SAX.java index bbcd4022e..68e14e726 100644 --- a/samples/SAX2SAX/SAX2SAX.java +++ b/xalansamples/src/main/java/samples/SAX2SAX/SAX2SAX.java @@ -24,6 +24,7 @@ * Replicate the SimpleTransform sample, explicitly using the SAX model to handle the * stylesheet, the XML input, and the transformation. */ +package samples.SAX2SAX; import java.io.FileOutputStream; import java.io.IOException; diff --git a/samples/SAX2SAX/birds.xml b/xalansamples/src/main/java/samples/SAX2SAX/birds.xml similarity index 100% rename from samples/SAX2SAX/birds.xml rename to xalansamples/src/main/java/samples/SAX2SAX/birds.xml diff --git a/samples/SAX2SAX/birds.xsl b/xalansamples/src/main/java/samples/SAX2SAX/birds.xsl similarity index 100% rename from samples/SAX2SAX/birds.xsl rename to xalansamples/src/main/java/samples/SAX2SAX/birds.xsl diff --git a/samples/SAX2SAX/foo.xml b/xalansamples/src/main/java/samples/SAX2SAX/foo.xml similarity index 100% rename from samples/SAX2SAX/foo.xml rename to xalansamples/src/main/java/samples/SAX2SAX/foo.xml diff --git a/samples/SAX2SAX/foo.xsl b/xalansamples/src/main/java/samples/SAX2SAX/foo.xsl similarity index 100% rename from samples/SAX2SAX/foo.xsl rename to xalansamples/src/main/java/samples/SAX2SAX/foo.xsl diff --git a/samples/SimpleTransform/SimpleTransform.java b/xalansamples/src/main/java/samples/SimpleTransform/SimpleTransform.java similarity index 50% rename from samples/SimpleTransform/SimpleTransform.java rename to xalansamples/src/main/java/samples/SimpleTransform/SimpleTransform.java index fbb1ca0cf..6b252a76c 100644 --- a/samples/SimpleTransform/SimpleTransform.java +++ b/xalansamples/src/main/java/samples/SimpleTransform/SimpleTransform.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.SimpleTransform; import java.io.FileNotFoundException; import java.io.FileOutputStream; @@ -36,25 +37,36 @@ */ public class SimpleTransform { - public static void main(String[] args) - throws TransformerException, TransformerConfigurationException, - FileNotFoundException, IOException - { - // Use the static TransformerFactory.newInstance() method to instantiate - // a TransformerFactory. The javax.xml.transform.TransformerFactory - // system property setting determines the actual class to instantiate -- - // org.apache.xalan.transformer.TransformerImpl. - TransformerFactory tFactory = TransformerFactory.newInstance(); - - // Use the TransformerFactory to instantiate a Transformer that will work with - // the stylesheet you specify. This method call also processes the stylesheet - // into a compiled Templates object. - Transformer transformer = tFactory.newTransformer(new StreamSource("birds.xsl")); - - // Use the Transformer to apply the associated Templates object to an XML document - // (foo.xml) and write the output to a file (foo.out). - transformer.transform(new StreamSource("birds.xml"), new StreamResult(new FileOutputStream("birds.out"))); - - System.out.println("************* The result is in birds.out *************"); + public static void main(String[] args) + throws TransformerException, TransformerConfigurationException, + FileNotFoundException, IOException + { + // Use the static TransformerFactory.newInstance() method to instantiate + // a TransformerFactory. The javax.xml.transform.TransformerFactory + // system property setting determines the actual class to instantiate -- + // for Xalan, org.apache.xalan.transformer.TransformerImpl. + TransformerFactory tFactory = TransformerFactory.newInstance(); + + // Grab the Name of the Stylesheet from the command line + String stylesheet="birds.xml"; + if (args.length == 0) + { + System.out.println("You must provide the path and name to a stylesheet to process birds.xml into birds.out"); + System.out.println("Defaulting to birds.xsl"); + } + else + stylesheet = args[0]; + + System.out.println("Transforming birds.xml with stylesheet "+ stylesheet); + + // processes the stylesheet into a compiled Templates object. + Transformer transformer = tFactory.newTransformer(new StreamSource("birds.xsl")); + + // Use the Transformer to apply the associated Templates object to + // an XML document and write the output to a file + transformer.transform(new StreamSource("birds.xml"), + new StreamResult(new FileOutputStream("birds.out"))); + + System.out.println("************* The result is in birds.out *************"); } } diff --git a/samples/SimpleTransform/birds.xml b/xalansamples/src/main/java/samples/SimpleTransform/birds.xml similarity index 100% rename from samples/SimpleTransform/birds.xml rename to xalansamples/src/main/java/samples/SimpleTransform/birds.xml diff --git a/samples/SimpleTransform/birds.xsl b/xalansamples/src/main/java/samples/SimpleTransform/birds.xsl similarity index 100% rename from samples/SimpleTransform/birds.xsl rename to xalansamples/src/main/java/samples/SimpleTransform/birds.xsl diff --git a/samples/SimpleTransform/foo.xml b/xalansamples/src/main/java/samples/SimpleTransform/foo.xml similarity index 100% rename from samples/SimpleTransform/foo.xml rename to xalansamples/src/main/java/samples/SimpleTransform/foo.xml diff --git a/samples/SimpleTransform/foo.xsl b/xalansamples/src/main/java/samples/SimpleTransform/foo.xsl similarity index 100% rename from samples/SimpleTransform/foo.xsl rename to xalansamples/src/main/java/samples/SimpleTransform/foo.xsl diff --git a/samples/SimpleTransform/readme.html b/xalansamples/src/main/java/samples/SimpleTransform/readme.html similarity index 100% rename from samples/SimpleTransform/readme.html rename to xalansamples/src/main/java/samples/SimpleTransform/readme.html diff --git a/samples/Trace/Trace.java b/xalansamples/src/main/java/samples/Trace/Trace.java similarity index 99% rename from samples/Trace/Trace.java rename to xalansamples/src/main/java/samples/Trace/Trace.java index 05d90e771..17615b949 100644 --- a/samples/Trace/Trace.java +++ b/xalansamples/src/main/java/samples/Trace/Trace.java @@ -18,6 +18,8 @@ /* * $Id$ */ +package samples.Trace; + import javax.xml.transform.Transformer; import javax.xml.transform.TransformerConfigurationException; import javax.xml.transform.TransformerException; diff --git a/samples/Trace/foo.xml b/xalansamples/src/main/java/samples/Trace/foo.xml similarity index 100% rename from samples/Trace/foo.xml rename to xalansamples/src/main/java/samples/Trace/foo.xml diff --git a/samples/Trace/foo.xsl b/xalansamples/src/main/java/samples/Trace/foo.xsl similarity index 100% rename from samples/Trace/foo.xsl rename to xalansamples/src/main/java/samples/Trace/foo.xsl diff --git a/samples/TransformThread/TransformThread.java b/xalansamples/src/main/java/samples/TransformThread/TransformThread.java similarity index 99% rename from samples/TransformThread/TransformThread.java rename to xalansamples/src/main/java/samples/TransformThread/TransformThread.java index c6e437b4f..7ece806c3 100644 --- a/samples/TransformThread/TransformThread.java +++ b/xalansamples/src/main/java/samples/TransformThread/TransformThread.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.TransformThread; import java.io.File; import java.io.FileInputStream; diff --git a/samples/TransformThread/foo0.xml b/xalansamples/src/main/java/samples/TransformThread/foo0.xml similarity index 100% rename from samples/TransformThread/foo0.xml rename to xalansamples/src/main/java/samples/TransformThread/foo0.xml diff --git a/samples/TransformThread/foo0.xsl b/xalansamples/src/main/java/samples/TransformThread/foo0.xsl similarity index 100% rename from samples/TransformThread/foo0.xsl rename to xalansamples/src/main/java/samples/TransformThread/foo0.xsl diff --git a/samples/TransformThread/foo1.xml b/xalansamples/src/main/java/samples/TransformThread/foo1.xml similarity index 100% rename from samples/TransformThread/foo1.xml rename to xalansamples/src/main/java/samples/TransformThread/foo1.xml diff --git a/samples/TransformThread/foo1.xsl b/xalansamples/src/main/java/samples/TransformThread/foo1.xsl similarity index 100% rename from samples/TransformThread/foo1.xsl rename to xalansamples/src/main/java/samples/TransformThread/foo1.xsl diff --git a/samples/UseStylesheetPI/UseStylesheetPI.java b/xalansamples/src/main/java/samples/UseStylesheetPI/UseStylesheetPI.java similarity index 98% rename from samples/UseStylesheetPI/UseStylesheetPI.java rename to xalansamples/src/main/java/samples/UseStylesheetPI/UseStylesheetPI.java index 0e2ee9824..77baaf552 100644 --- a/samples/UseStylesheetPI/UseStylesheetPI.java +++ b/xalansamples/src/main/java/samples/UseStylesheetPI/UseStylesheetPI.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.UseStylesheetPI; import javax.xml.transform.Source; import javax.xml.transform.Transformer; diff --git a/samples/UseStylesheetPI/foo.xsl b/xalansamples/src/main/java/samples/UseStylesheetPI/foo.xsl similarity index 100% rename from samples/UseStylesheetPI/foo.xsl rename to xalansamples/src/main/java/samples/UseStylesheetPI/foo.xsl diff --git a/samples/UseStylesheetPI/fooX.xml b/xalansamples/src/main/java/samples/UseStylesheetPI/fooX.xml similarity index 100% rename from samples/UseStylesheetPI/fooX.xml rename to xalansamples/src/main/java/samples/UseStylesheetPI/fooX.xml diff --git a/samples/UseStylesheetParam/UseStylesheetParam.java b/xalansamples/src/main/java/samples/UseStylesheetParam/UseStylesheetParam.java similarity index 98% rename from samples/UseStylesheetParam/UseStylesheetParam.java rename to xalansamples/src/main/java/samples/UseStylesheetParam/UseStylesheetParam.java index 24b655c13..939361394 100644 --- a/samples/UseStylesheetParam/UseStylesheetParam.java +++ b/xalansamples/src/main/java/samples/UseStylesheetParam/UseStylesheetParam.java @@ -18,7 +18,7 @@ /* * $Id$ */ - +package samples.UseStylesheetParam; import java.io.IOException; import java.io.OutputStreamWriter; diff --git a/samples/UseStylesheetParam/foo.xml b/xalansamples/src/main/java/samples/UseStylesheetParam/foo.xml similarity index 100% rename from samples/UseStylesheetParam/foo.xml rename to xalansamples/src/main/java/samples/UseStylesheetParam/foo.xml diff --git a/samples/UseStylesheetParam/foo.xsl b/xalansamples/src/main/java/samples/UseStylesheetParam/foo.xsl similarity index 100% rename from samples/UseStylesheetParam/foo.xsl rename to xalansamples/src/main/java/samples/UseStylesheetParam/foo.xsl diff --git a/samples/UseStylesheetParam/readme.html b/xalansamples/src/main/java/samples/UseStylesheetParam/readme.html similarity index 100% rename from samples/UseStylesheetParam/readme.html rename to xalansamples/src/main/java/samples/UseStylesheetParam/readme.html diff --git a/samples/UseXMLFilters/UseXMLFilters.java b/xalansamples/src/main/java/samples/UseXMLFilters/UseXMLFilters.java similarity index 99% rename from samples/UseXMLFilters/UseXMLFilters.java rename to xalansamples/src/main/java/samples/UseXMLFilters/UseXMLFilters.java index 10b909396..7aaddc587 100644 --- a/samples/UseXMLFilters/UseXMLFilters.java +++ b/xalansamples/src/main/java/samples/UseXMLFilters/UseXMLFilters.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.UseXMLFilters; import java.io.IOException; diff --git a/samples/UseXMLFilters/foo.xml b/xalansamples/src/main/java/samples/UseXMLFilters/foo.xml similarity index 100% rename from samples/UseXMLFilters/foo.xml rename to xalansamples/src/main/java/samples/UseXMLFilters/foo.xml diff --git a/samples/UseXMLFilters/foo1.xsl b/xalansamples/src/main/java/samples/UseXMLFilters/foo1.xsl similarity index 100% rename from samples/UseXMLFilters/foo1.xsl rename to xalansamples/src/main/java/samples/UseXMLFilters/foo1.xsl diff --git a/samples/UseXMLFilters/foo2.xsl b/xalansamples/src/main/java/samples/UseXMLFilters/foo2.xsl similarity index 100% rename from samples/UseXMLFilters/foo2.xsl rename to xalansamples/src/main/java/samples/UseXMLFilters/foo2.xsl diff --git a/samples/UseXMLFilters/foo3.xsl b/xalansamples/src/main/java/samples/UseXMLFilters/foo3.xsl similarity index 100% rename from samples/UseXMLFilters/foo3.xsl rename to xalansamples/src/main/java/samples/UseXMLFilters/foo3.xsl diff --git a/samples/UseXMLFilters/readme.html b/xalansamples/src/main/java/samples/UseXMLFilters/readme.html similarity index 100% rename from samples/UseXMLFilters/readme.html rename to xalansamples/src/main/java/samples/UseXMLFilters/readme.html diff --git a/samples/Validate/Validate.java b/xalansamples/src/main/java/samples/Validate/Validate.java similarity index 99% rename from samples/Validate/Validate.java rename to xalansamples/src/main/java/samples/Validate/Validate.java index 5756d0f45..5b794775b 100644 --- a/samples/Validate/Validate.java +++ b/xalansamples/src/main/java/samples/Validate/Validate.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.Validate; import java.io.File; import java.io.FileInputStream; diff --git a/samples/Validate/ValidateXMLInput.java b/xalansamples/src/main/java/samples/Validate/ValidateXMLInput.java similarity index 99% rename from samples/Validate/ValidateXMLInput.java rename to xalansamples/src/main/java/samples/Validate/ValidateXMLInput.java index 99e815797..b25f3d79d 100644 --- a/samples/Validate/ValidateXMLInput.java +++ b/xalansamples/src/main/java/samples/Validate/ValidateXMLInput.java @@ -18,6 +18,8 @@ /* * $Id$ */ +package samples.Validate; + import javax.xml.parsers.SAXParserFactory; import javax.xml.transform.Transformer; import javax.xml.transform.TransformerException; diff --git a/samples/Validate/birds.xml b/xalansamples/src/main/java/samples/Validate/birds.xml similarity index 100% rename from samples/Validate/birds.xml rename to xalansamples/src/main/java/samples/Validate/birds.xml diff --git a/samples/Validate/birds.xsl b/xalansamples/src/main/java/samples/Validate/birds.xsl similarity index 100% rename from samples/Validate/birds.xsl rename to xalansamples/src/main/java/samples/Validate/birds.xsl diff --git a/samples/Validate/readme.html b/xalansamples/src/main/java/samples/Validate/readme.html similarity index 100% rename from samples/Validate/readme.html rename to xalansamples/src/main/java/samples/Validate/readme.html diff --git a/samples/XPathAPI/ApplyXPathJAXP.java b/xalansamples/src/main/java/samples/XPathAPI/ApplyXPathJAXP.java similarity index 99% rename from samples/XPathAPI/ApplyXPathJAXP.java rename to xalansamples/src/main/java/samples/XPathAPI/ApplyXPathJAXP.java index 0bba26fa7..c18c57c83 100644 --- a/samples/XPathAPI/ApplyXPathJAXP.java +++ b/xalansamples/src/main/java/samples/XPathAPI/ApplyXPathJAXP.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +package samples.XPathAPI; import java.io.OutputStreamWriter; diff --git a/samples/XPathAPI/ExtensionFunctionResolver.java b/xalansamples/src/main/java/samples/XPathAPI/ExtensionFunctionResolver.java similarity index 99% rename from samples/XPathAPI/ExtensionFunctionResolver.java rename to xalansamples/src/main/java/samples/XPathAPI/ExtensionFunctionResolver.java index f3ebf3ff5..6e6ae7835 100644 --- a/samples/XPathAPI/ExtensionFunctionResolver.java +++ b/xalansamples/src/main/java/samples/XPathAPI/ExtensionFunctionResolver.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +package samples.XPathAPI; import javax.xml.xpath.XPath; import javax.xml.xpath.XPathConstants; diff --git a/samples/XPathAPI/ExtensionTest.java b/xalansamples/src/main/java/samples/XPathAPI/ExtensionTest.java similarity index 97% rename from samples/XPathAPI/ExtensionTest.java rename to xalansamples/src/main/java/samples/XPathAPI/ExtensionTest.java index a97a2c0ed..c7b8459c2 100644 --- a/samples/XPathAPI/ExtensionTest.java +++ b/xalansamples/src/main/java/samples/XPathAPI/ExtensionTest.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +package samples.XPathAPI; public class ExtensionTest { diff --git a/samples/XPathAPI/XPathResolver.java b/xalansamples/src/main/java/samples/XPathAPI/XPathResolver.java similarity index 99% rename from samples/XPathAPI/XPathResolver.java rename to xalansamples/src/main/java/samples/XPathAPI/XPathResolver.java index 50cbddabd..f11edcb07 100644 --- a/samples/XPathAPI/XPathResolver.java +++ b/xalansamples/src/main/java/samples/XPathAPI/XPathResolver.java @@ -15,6 +15,7 @@ * See the License for the specific language governing permissions and * limitations under the License. */ +package samples.XPathAPI; import javax.xml.namespace.*; import javax.xml.xpath.*; diff --git a/samples/XPathAPI/foo.xml b/xalansamples/src/main/java/samples/XPathAPI/foo.xml similarity index 100% rename from samples/XPathAPI/foo.xml rename to xalansamples/src/main/java/samples/XPathAPI/foo.xml diff --git a/samples/XPathAPI/numlist.xml b/xalansamples/src/main/java/samples/XPathAPI/numlist.xml similarity index 100% rename from samples/XPathAPI/numlist.xml rename to xalansamples/src/main/java/samples/XPathAPI/numlist.xml diff --git a/samples/extensions/1-redir.xml b/xalansamples/src/main/java/samples/extensions/1-redir.xml similarity index 100% rename from samples/extensions/1-redir.xml rename to xalansamples/src/main/java/samples/extensions/1-redir.xml diff --git a/samples/extensions/1-redir.xsl b/xalansamples/src/main/java/samples/extensions/1-redir.xsl similarity index 100% rename from samples/extensions/1-redir.xsl rename to xalansamples/src/main/java/samples/extensions/1-redir.xsl diff --git a/samples/extensions/2-basicJscript.xml b/xalansamples/src/main/java/samples/extensions/2-basicJscript.xml similarity index 100% rename from samples/extensions/2-basicJscript.xml rename to xalansamples/src/main/java/samples/extensions/2-basicJscript.xml diff --git a/samples/extensions/2-basicJscript.xsl b/xalansamples/src/main/java/samples/extensions/2-basicJscript.xsl similarity index 100% rename from samples/extensions/2-basicJscript.xsl rename to xalansamples/src/main/java/samples/extensions/2-basicJscript.xsl diff --git a/samples/extensions/3-java-namespace.xml b/xalansamples/src/main/java/samples/extensions/3-java-namespace.xml similarity index 100% rename from samples/extensions/3-java-namespace.xml rename to xalansamples/src/main/java/samples/extensions/3-java-namespace.xml diff --git a/samples/extensions/3-java-namespace.xsl b/xalansamples/src/main/java/samples/extensions/3-java-namespace.xsl similarity index 100% rename from samples/extensions/3-java-namespace.xsl rename to xalansamples/src/main/java/samples/extensions/3-java-namespace.xsl diff --git a/samples/extensions/4-numlistJava.xsl b/xalansamples/src/main/java/samples/extensions/4-numlistJava.xsl similarity index 100% rename from samples/extensions/4-numlistJava.xsl rename to xalansamples/src/main/java/samples/extensions/4-numlistJava.xsl diff --git a/samples/extensions/5-numlistJscript.xsl b/xalansamples/src/main/java/samples/extensions/5-numlistJscript.xsl similarity index 100% rename from samples/extensions/5-numlistJscript.xsl rename to xalansamples/src/main/java/samples/extensions/5-numlistJscript.xsl diff --git a/samples/extensions/IntDate.java b/xalansamples/src/main/java/samples/extensions/IntDate.java similarity index 97% rename from samples/extensions/IntDate.java rename to xalansamples/src/main/java/samples/extensions/IntDate.java index 41c29fa2b..ca94e29ad 100644 --- a/samples/extensions/IntDate.java +++ b/xalansamples/src/main/java/samples/extensions/IntDate.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.extensions; import java.util.Calendar; import java.util.Date; diff --git a/samples/extensions/MyCounter.java b/xalansamples/src/main/java/samples/extensions/MyCounter.java similarity index 98% rename from samples/extensions/MyCounter.java rename to xalansamples/src/main/java/samples/extensions/MyCounter.java index 6accf7df0..e2aa6ae84 100644 --- a/samples/extensions/MyCounter.java +++ b/xalansamples/src/main/java/samples/extensions/MyCounter.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.extensions; import java.util.Hashtable; public class MyCounter { diff --git a/samples/extensions/numlist.xml b/xalansamples/src/main/java/samples/extensions/numlist.xml similarity index 100% rename from samples/extensions/numlist.xml rename to xalansamples/src/main/java/samples/extensions/numlist.xml diff --git a/samples/extensions/readme.html b/xalansamples/src/main/java/samples/extensions/readme.html similarity index 100% rename from samples/extensions/readme.html rename to xalansamples/src/main/java/samples/extensions/readme.html diff --git a/samples/extensions/sql/GETTING_STARTED.txt b/xalansamples/src/main/java/samples/extensions/sql/GETTING_STARTED.txt similarity index 100% rename from samples/extensions/sql/GETTING_STARTED.txt rename to xalansamples/src/main/java/samples/extensions/sql/GETTING_STARTED.txt diff --git a/samples/extensions/sql/basic-connection/DumpSQL.xsl b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/DumpSQL.xsl similarity index 100% rename from samples/extensions/sql/basic-connection/DumpSQL.xsl rename to xalansamples/src/main/java/samples/extensions/sql/basic-connection/DumpSQL.xsl diff --git a/samples/extensions/sql/basic-connection/dbinfo.xml b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbinfo.xml similarity index 100% rename from samples/extensions/sql/basic-connection/dbinfo.xml rename to xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbinfo.xml diff --git a/samples/extensions/sql/basic-connection/dbtest-cinfo.xsl b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest-cinfo.xsl similarity index 100% rename from samples/extensions/sql/basic-connection/dbtest-cinfo.xsl rename to xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest-cinfo.xsl diff --git a/samples/extensions/sql/basic-connection/dbtest.xsl b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest.xsl similarity index 100% rename from samples/extensions/sql/basic-connection/dbtest.xsl rename to xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest.xsl diff --git a/samples/extensions/sql/basic-connection/readme.html b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/readme.html similarity index 100% rename from samples/extensions/sql/basic-connection/readme.html rename to xalansamples/src/main/java/samples/extensions/sql/basic-connection/readme.html diff --git a/samples/extensions/sql/createdb.sql b/xalansamples/src/main/java/samples/extensions/sql/createdb.sql similarity index 100% rename from samples/extensions/sql/createdb.sql rename to xalansamples/src/main/java/samples/extensions/sql/createdb.sql diff --git a/xalansamples/src/main/java/samples/extensions/sql/extConnection/#ExternalConnection.java# b/xalansamples/src/main/java/samples/extensions/sql/extConnection/#ExternalConnection.java# new file mode 100644 index 000000000..d8fbb587f --- /dev/null +++ b/xalansamples/src/main/java/samples/extensions/sql/extConnection/#ExternalConnection.java# @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * $Id$ + */ +package extensions.sql.extConnection; + +// Imported TraX classes +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.Transformer; +import javax.xml.transform.stream.StreamSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerConfigurationException; + +import org.apache.xalan.lib.sql.DefaultConnectionPool; +import org.apache.xalan.lib.sql.ConnectionPoolManager; + + +// Imported java classes +import java.io.StringReader; +import java.io.FileOutputStream; +import java.io.FileNotFoundException; +import java.io.IOException; + +/** + * Use the TraX interface to perform a transformation in the simplest manner possible + * (3 statements). + */ +public class ExternalConnection +{ + public static void main(String[] args) + throws TransformerException, TransformerConfigurationException, + FileNotFoundException, IOException + { + + // Create a connection to the database server + // Up the connection pool count for testing + DefaultConnectionPool cp = new DefaultConnectionPool(); + cp.setDriver("org.apache.derby.jdbc.EmbeddedDriver"); + cp.setURL("jdbc:derby:sampleDB"); + //cp.setUser("sa"); + //cp.setPassword(""); + cp.setMinConnections(10); + cp.setPoolEnabled(true); + + // Now let's register our connection pool so we can use + // in a stylesheet + ConnectionPoolManager pm = new ConnectionPoolManager(); + pm.registerPool("extpool", cp); + + + // Use the static TransformerFactory.newInstance() method to instantiate + // a TransformerFactory. The javax.xml.transform.TransformerFactory + // system property setting determines the actual class to instantiate -- + // org.apache.xalan.transformer.TransformerImpl. + TransformerFactory tFactory = TransformerFactory.newInstance(); + + // Grab the Name of the Stylesheet from the command line + if (args.length == 0) + { + System.out.println("You must provide the path and name to a stylesheet to process"); + System.exit(0); + } + + String stylesheet = args[0]; + System.out.println("Transforming Stylesheet " + stylesheet); + + // Use the TransformerFactory to instantiate a Transformer that will work with + // the stylesheet you specify. This method call also processes the stylesheet + // into a compiled Templates object. + Transformer transformer = tFactory.newTransformer( + new StreamSource(stylesheet)); + + // For this transformation, all the required information is in the + // stylesheet, so generate a minimal XML source document for the + // input. Note: the command-line processor + // (org.apache.xalan.xslt.Process) uses this strategy when the user + // does not provide an -IN parameter. + StringReader reader = + new StringReader("<?xml version=\"1.0\"?> <doc/>"); + + // Use the Transformer to apply the associated Templates object to + // an XML document and write the output to a file. + transformer.transform( + new StreamSource(reader), + new StreamResult(new FileOutputStream("dbtest-out.html"))); + + System.out.println("************* The result is in dbtest-out.html *************"); + + cp.setPoolEnabled(false); + } +} diff --git a/xalansamples/src/main/java/samples/extensions/sql/extConnection/ExternalConnection.java b/xalansamples/src/main/java/samples/extensions/sql/extConnection/ExternalConnection.java new file mode 100644 index 000000000..5ebba0d59 --- /dev/null +++ b/xalansamples/src/main/java/samples/extensions/sql/extConnection/ExternalConnection.java @@ -0,0 +1,108 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +/* + * $Id$ + */ +package samples.extensions.sql.extConnection; + +// Imported TraX classes +import javax.xml.transform.TransformerFactory; +import javax.xml.transform.Transformer; +import javax.xml.transform.stream.StreamSource; +import javax.xml.transform.stream.StreamResult; +import javax.xml.transform.TransformerException; +import javax.xml.transform.TransformerConfigurationException; + +import org.apache.xalan.lib.sql.DefaultConnectionPool; +import org.apache.xalan.lib.sql.ConnectionPoolManager; + + +// Imported java classes +import java.io.StringReader; +import java.io.FileOutputStream; +import java.io.FileNotFoundException; +import java.io.IOException; + +/** + * Use the TraX interface to perform a transformation in the simplest manner possible + * (3 statements). + */ +public class ExternalConnection +{ + public static void main(String[] args) + throws TransformerException, TransformerConfigurationException, + FileNotFoundException, IOException + { + + // Create a connection to the database server + // Up the connection pool count for testing + DefaultConnectionPool cp = new DefaultConnectionPool(); + cp.setDriver("org.apache.derby.jdbc.EmbeddedDriver"); + cp.setURL("jdbc:derby:sampleDB"); + //cp.setUser("sa"); + //cp.setPassword(""); + cp.setMinConnections(10); + cp.setPoolEnabled(true); + + // Now let's register our connection pool so we can use + // in a stylesheet + ConnectionPoolManager pm = new ConnectionPoolManager(); + pm.registerPool("extpool", cp); + + + // Use the static TransformerFactory.newInstance() method to instantiate + // a TransformerFactory. The javax.xml.transform.TransformerFactory + // system property setting determines the actual class to instantiate -- + // org.apache.xalan.transformer.TransformerImpl. + TransformerFactory tFactory = TransformerFactory.newInstance(); + + // Grab the Name of the Stylesheet from the command line + if (args.length == 0) + { + System.out.println("You must provide the path and name to a stylesheet to process"); + System.exit(0); + } + + String stylesheet = args[0]; + System.out.println("Transforming Stylesheet " + stylesheet); + + // Use the TransformerFactory to instantiate a Transformer that will work with + // the stylesheet you specify. This method call also processes the stylesheet + // into a compiled Templates object. + Transformer transformer = tFactory.newTransformer( + new StreamSource(stylesheet)); + + // For this transformation, all the required information is in the + // stylesheet, so generate a minimal XML source document for the + // input. Note: the command-line processor + // (org.apache.xalan.xslt.Process) uses this strategy when the user + // does not provide an -IN parameter. + StringReader reader = + new StringReader("<?xml version=\"1.0\"?> <doc/>"); + + // Use the Transformer to apply the associated Templates object to + // an XML document and write the output to a file. + transformer.transform( + new StreamSource(reader), + new StreamResult(new FileOutputStream("dbtest-out.html"))); + + System.out.println("************* The result is in dbtest-out.html *************"); + + cp.setPoolEnabled(false); + } +} diff --git a/samples/extensions/sql/ext-connection/dbtest.xsl b/xalansamples/src/main/java/samples/extensions/sql/extConnection/dbtest.xsl similarity index 100% rename from samples/extensions/sql/ext-connection/dbtest.xsl rename to xalansamples/src/main/java/samples/extensions/sql/extConnection/dbtest.xsl diff --git a/samples/extensions/sql/ext-connection/readme.html b/xalansamples/src/main/java/samples/extensions/sql/extConnection/readme.html similarity index 100% rename from samples/extensions/sql/ext-connection/readme.html rename to xalansamples/src/main/java/samples/extensions/sql/extConnection/readme.html diff --git a/samples/extensions/sql/pquery/dbinfo.xml b/xalansamples/src/main/java/samples/extensions/sql/pquery/dbinfo.xml similarity index 100% rename from samples/extensions/sql/pquery/dbinfo.xml rename to xalansamples/src/main/java/samples/extensions/sql/pquery/dbinfo.xml diff --git a/samples/extensions/sql/pquery/dbtest.xsl b/xalansamples/src/main/java/samples/extensions/sql/pquery/dbtest.xsl similarity index 100% rename from samples/extensions/sql/pquery/dbtest.xsl rename to xalansamples/src/main/java/samples/extensions/sql/pquery/dbtest.xsl diff --git a/samples/extensions/sql/pquery/readme.html b/xalansamples/src/main/java/samples/extensions/sql/pquery/readme.html similarity index 100% rename from samples/extensions/sql/pquery/readme.html rename to xalansamples/src/main/java/samples/extensions/sql/pquery/readme.html diff --git a/samples/extensions/sql/readme.html b/xalansamples/src/main/java/samples/extensions/sql/readme.html similarity index 100% rename from samples/extensions/sql/readme.html rename to xalansamples/src/main/java/samples/extensions/sql/readme.html diff --git a/samples/extensions/sql/runDerby.bat b/xalansamples/src/main/java/samples/extensions/sql/runDerby.bat similarity index 100% rename from samples/extensions/sql/runDerby.bat rename to xalansamples/src/main/java/samples/extensions/sql/runDerby.bat diff --git a/samples/extensions/sql/runDerby.sh b/xalansamples/src/main/java/samples/extensions/sql/runDerby.sh similarity index 100% rename from samples/extensions/sql/runDerby.sh rename to xalansamples/src/main/java/samples/extensions/sql/runDerby.sh diff --git a/samples/extensions/sql/runExtConnection.bat b/xalansamples/src/main/java/samples/extensions/sql/runExtConnection.bat similarity index 100% rename from samples/extensions/sql/runExtConnection.bat rename to xalansamples/src/main/java/samples/extensions/sql/runExtConnection.bat diff --git a/samples/extensions/sql/runExtConnection.sh b/xalansamples/src/main/java/samples/extensions/sql/runExtConnection.sh similarity index 100% rename from samples/extensions/sql/runExtConnection.sh rename to xalansamples/src/main/java/samples/extensions/sql/runExtConnection.sh diff --git a/samples/extensions/sql/runXalan.bat b/xalansamples/src/main/java/samples/extensions/sql/runXalan.bat similarity index 100% rename from samples/extensions/sql/runXalan.bat rename to xalansamples/src/main/java/samples/extensions/sql/runXalan.bat diff --git a/samples/extensions/sql/runXalan.sh b/xalansamples/src/main/java/samples/extensions/sql/runXalan.sh similarity index 100% rename from samples/extensions/sql/runXalan.sh rename to xalansamples/src/main/java/samples/extensions/sql/runXalan.sh diff --git a/samples/extensions/sql/show-error/dbinfo.xml b/xalansamples/src/main/java/samples/extensions/sql/show-error/dbinfo.xml similarity index 100% rename from samples/extensions/sql/show-error/dbinfo.xml rename to xalansamples/src/main/java/samples/extensions/sql/show-error/dbinfo.xml diff --git a/samples/extensions/sql/show-error/invalidConn.xsl b/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidConn.xsl similarity index 100% rename from samples/extensions/sql/show-error/invalidConn.xsl rename to xalansamples/src/main/java/samples/extensions/sql/show-error/invalidConn.xsl diff --git a/samples/extensions/sql/show-error/invalidPQuery.xsl b/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidPQuery.xsl similarity index 100% rename from samples/extensions/sql/show-error/invalidPQuery.xsl rename to xalansamples/src/main/java/samples/extensions/sql/show-error/invalidPQuery.xsl diff --git a/samples/extensions/sql/show-error/invalidQuery.xsl b/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidQuery.xsl similarity index 100% rename from samples/extensions/sql/show-error/invalidQuery.xsl rename to xalansamples/src/main/java/samples/extensions/sql/show-error/invalidQuery.xsl diff --git a/samples/extensions/sql/show-error/readme.html b/xalansamples/src/main/java/samples/extensions/sql/show-error/readme.html similarity index 100% rename from samples/extensions/sql/show-error/readme.html rename to xalansamples/src/main/java/samples/extensions/sql/show-error/readme.html diff --git a/samples/extensions/sql/streamable/cachedNodes.xsl b/xalansamples/src/main/java/samples/extensions/sql/streamable/cachedNodes.xsl similarity index 100% rename from samples/extensions/sql/streamable/cachedNodes.xsl rename to xalansamples/src/main/java/samples/extensions/sql/streamable/cachedNodes.xsl diff --git a/samples/extensions/sql/streamable/dbinfo.xml b/xalansamples/src/main/java/samples/extensions/sql/streamable/dbinfo.xml similarity index 100% rename from samples/extensions/sql/streamable/dbinfo.xml rename to xalansamples/src/main/java/samples/extensions/sql/streamable/dbinfo.xml diff --git a/samples/extensions/sql/streamable/pivot.xsl b/xalansamples/src/main/java/samples/extensions/sql/streamable/pivot.xsl similarity index 100% rename from samples/extensions/sql/streamable/pivot.xsl rename to xalansamples/src/main/java/samples/extensions/sql/streamable/pivot.xsl diff --git a/samples/extensions/sql/streamable/readme.html b/xalansamples/src/main/java/samples/extensions/sql/streamable/readme.html similarity index 100% rename from samples/extensions/sql/streamable/readme.html rename to xalansamples/src/main/java/samples/extensions/sql/streamable/readme.html diff --git a/samples/extensions/sql/streamable/streamNodes.xsl b/xalansamples/src/main/java/samples/extensions/sql/streamable/streamNodes.xsl similarity index 100% rename from samples/extensions/sql/streamable/streamNodes.xsl rename to xalansamples/src/main/java/samples/extensions/sql/streamable/streamNodes.xsl diff --git a/samples/translets/JAXPTransletMultipleTransformations.java b/xalansamples/src/main/java/samples/translets/JAXPTransletMultipleTransformations.java similarity index 99% rename from samples/translets/JAXPTransletMultipleTransformations.java rename to xalansamples/src/main/java/samples/translets/JAXPTransletMultipleTransformations.java index ffe82a0fb..7ecfa3ba2 100644 --- a/samples/translets/JAXPTransletMultipleTransformations.java +++ b/xalansamples/src/main/java/samples/translets/JAXPTransletMultipleTransformations.java @@ -18,6 +18,9 @@ /* * $Id$ */ + +package samples.translets; + import java.io.FileNotFoundException; import java.io.FileOutputStream; diff --git a/samples/translets/JAXPTransletOneTransformation.java b/xalansamples/src/main/java/samples/translets/JAXPTransletOneTransformation.java similarity index 99% rename from samples/translets/JAXPTransletOneTransformation.java rename to xalansamples/src/main/java/samples/translets/JAXPTransletOneTransformation.java index 45614e235..e320d15aa 100644 --- a/samples/translets/JAXPTransletOneTransformation.java +++ b/xalansamples/src/main/java/samples/translets/JAXPTransletOneTransformation.java @@ -18,6 +18,8 @@ /* * $Id$ */ +package samples.translets; + import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; diff --git a/samples/servlet/readme.html b/xalansamples/src/main/java/samples/translets/readme.html similarity index 100% rename from samples/servlet/readme.html rename to xalansamples/src/main/java/samples/translets/readme.html diff --git a/samples/translets/todo.xml b/xalansamples/src/main/java/samples/translets/todo.xml similarity index 100% rename from samples/translets/todo.xml rename to xalansamples/src/main/java/samples/translets/todo.xml diff --git a/samples/translets/todo.xsl b/xalansamples/src/main/java/samples/translets/todo.xsl similarity index 100% rename from samples/translets/todo.xsl rename to xalansamples/src/main/java/samples/translets/todo.xsl diff --git a/samples/translets/todotoo.xml b/xalansamples/src/main/java/samples/translets/todotoo.xml similarity index 100% rename from samples/translets/todotoo.xml rename to xalansamples/src/main/java/samples/translets/todotoo.xml diff --git a/samples/trax/ExampleContentHandler.java b/xalansamples/src/main/java/samples/trax/ExampleContentHandler.java similarity index 99% rename from samples/trax/ExampleContentHandler.java rename to xalansamples/src/main/java/samples/trax/ExampleContentHandler.java index 1d4cfc84b..cfaed15ea 100644 --- a/samples/trax/ExampleContentHandler.java +++ b/xalansamples/src/main/java/samples/trax/ExampleContentHandler.java @@ -18,6 +18,8 @@ /* * $Id$ */ +package samples.trax; + import org.xml.sax.Attributes; import org.xml.sax.ContentHandler; import org.xml.sax.Locator; diff --git a/samples/trax/Examples.java b/xalansamples/src/main/java/samples/trax/Examples.java similarity index 99% rename from samples/trax/Examples.java rename to xalansamples/src/main/java/samples/trax/Examples.java index c0be12599..88975d7a5 100644 --- a/samples/trax/Examples.java +++ b/xalansamples/src/main/java/samples/trax/Examples.java @@ -18,6 +18,8 @@ /* * $Id$ */ +package samples.trax; + import java.io.BufferedInputStream; import java.io.BufferedReader; import java.io.File; diff --git a/samples/trax/xml/baz.xml b/xalansamples/src/main/java/samples/trax/xml/baz.xml similarity index 100% rename from samples/trax/xml/baz.xml rename to xalansamples/src/main/java/samples/trax/xml/baz.xml diff --git a/samples/trax/xml/foo.xml b/xalansamples/src/main/java/samples/trax/xml/foo.xml similarity index 100% rename from samples/trax/xml/foo.xml rename to xalansamples/src/main/java/samples/trax/xml/foo.xml diff --git a/samples/trax/xml/subdir1/foo2.xml b/xalansamples/src/main/java/samples/trax/xml/subdir1/foo2.xml similarity index 100% rename from samples/trax/xml/subdir1/foo2.xml rename to xalansamples/src/main/java/samples/trax/xml/subdir1/foo2.xml diff --git a/samples/trax/xml/subdir1/subdir2/foo3.xml b/xalansamples/src/main/java/samples/trax/xml/subdir1/subdir2/foo3.xml similarity index 100% rename from samples/trax/xml/subdir1/subdir2/foo3.xml rename to xalansamples/src/main/java/samples/trax/xml/subdir1/subdir2/foo3.xml diff --git a/samples/trax/xsl/baz.xsl b/xalansamples/src/main/java/samples/trax/xsl/baz.xsl similarity index 100% rename from samples/trax/xsl/baz.xsl rename to xalansamples/src/main/java/samples/trax/xsl/baz.xsl diff --git a/samples/trax/xsl/foo.xsl b/xalansamples/src/main/java/samples/trax/xsl/foo.xsl similarity index 100% rename from samples/trax/xsl/foo.xsl rename to xalansamples/src/main/java/samples/trax/xsl/foo.xsl diff --git a/samples/trax/xsl/foo2.xsl b/xalansamples/src/main/java/samples/trax/xsl/foo2.xsl similarity index 100% rename from samples/trax/xsl/foo2.xsl rename to xalansamples/src/main/java/samples/trax/xsl/foo2.xsl diff --git a/samples/trax/xsl/foo3.xsl b/xalansamples/src/main/java/samples/trax/xsl/foo3.xsl similarity index 100% rename from samples/trax/xsl/foo3.xsl rename to xalansamples/src/main/java/samples/trax/xsl/foo3.xsl diff --git a/samples/trax/xsl/inc1/inc1.xsl b/xalansamples/src/main/java/samples/trax/xsl/inc1/inc1.xsl similarity index 100% rename from samples/trax/xsl/inc1/inc1.xsl rename to xalansamples/src/main/java/samples/trax/xsl/inc1/inc1.xsl diff --git a/samples/trax/xsl/inc1/inc2/inc2.xsl b/xalansamples/src/main/java/samples/trax/xsl/inc1/inc2/inc2.xsl similarity index 100% rename from samples/trax/xsl/inc1/inc2/inc2.xsl rename to xalansamples/src/main/java/samples/trax/xsl/inc1/inc2/inc2.xsl diff --git a/xalansamples/src/site/xhtml/AppletXMLtoHTML/README.xhtml b/xalansamples/src/site/xhtml/AppletXMLtoHTML/README.xhtml new file mode 100644 index 000000000..77e95cfea --- /dev/null +++ b/xalansamples/src/site/xhtml/AppletXMLtoHTML/README.xhtml @@ -0,0 +1,40 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Sample Applet</title> +</head> +<body bgcolor="#808080" text="#ffffff"> + <table> + <tr> + <td><img border="0" hspace="0" vspace="0" align="left" src="rabbitwhorn.jpg"/></td> + <td><h2> Running the Xalan sample applet</h2></td> + </tr> + </table> + <hr/> + <ul> + <li>appletXMLtoHTML.html transforms XML into HTML, and displays the XML document and XSL stylesheet as well as the HTML transformation result.<br/><br/></li> + <p>The applet looks for xalan.jar, xercesImpl.jar, xml-apis.jar and serializer.jar in the bin directory. If the JAR files are elsewhere, you must move them or adjust the applet archive setting in client.html.</p> +</ul> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/AppletXMLtoHTML/appletXMLtoHTML.xhtml b/xalansamples/src/site/xhtml/AppletXMLtoHTML/appletXMLtoHTML.xhtml new file mode 100644 index 000000000..6944d7249 --- /dev/null +++ b/xalansamples/src/site/xhtml/AppletXMLtoHTML/appletXMLtoHTML.xhtml @@ -0,0 +1,34 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Using an applet to perform XSL transformations</title> +</head> + <frameset ROWS="125,*" > + <frame NAME="processor" SRC="client.html" SCROLLING="auto" > + <frameset cols="33%, 33%, *"> + <frame NAME="targetArea0" SRC="target.html" /> + <frame NAME="targetArea1" SRC="target.html" /> + <frame NAME="targetArea2" SRC="target.html" /> + </frameset> + </frame> + </frameset> + +</html> diff --git a/xalansamples/src/site/xhtml/AppletXMLtoHTML/client.xhtml b/xalansamples/src/site/xhtml/AppletXMLtoHTML/client.xhtml new file mode 100644 index 000000000..a9facfe3a --- /dev/null +++ b/xalansamples/src/site/xhtml/AppletXMLtoHTML/client.xhtml @@ -0,0 +1,137 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<html> + <head> + <title>AppletXMLtoHTML</title> + </head> + <script language="JavaScript"> + <![CDATA[ + function writeSource(sourceString) + { + + var escString=document.xslControl.escapeString(sourceString); + var title="XML Source Doc"; + var doc=top.frames[1].document; + doc.open(); + doc.write("<h3>" + title + "</h3>"); + doc.write("<PRE>"); + doc.write(escString); + doc.write("</PRE>"); + doc.close(); + } + + function writeStylesheet(styleString) + { + var escString=document.xslControl.escapeString(styleString); + var title="XSL Stylesheet"; + var doc=top.frames[2].document; + doc.open(); + doc.write("<h3>" + title + "</h3>"); + doc.write("<PRE>"); + doc.write(escString); + doc.write("</PRE>"); + doc.close(); + } + + function writeTarget(targetString) + { + var doc=top.frames[3].document; + doc.open(); + var title="HTML Output"; + doc.write("<h3>" + title + "</h3>"); + if (document.xmlTransform.displayMode[0].checked) //display HTML + { + doc.write(targetString); + } + else // display source + { + var escString=document.xslControl.escapeString(targetString); + doc.write("<PRE>"); + doc.write(escString); + doc.write("</PRE>"); + } + doc.close(); + } + + function clearFrames() + { + document.xslControl.freeCache(); + for (i=1; i<4; i++) + { + var doc=top.frames[i].document; + doc.open(); + doc.clear(); + doc.close(); + } + } + + function transform() + { + clearFrames(); + var xmlSource=document.xmlTransform.xmlSourceList.options[document.xmlTransform.xmlSourceList.selectedIndex].value; + document.xslControl.setDocumentURL(xmlSource); + var sourceString=document.xslControl.getSourceTreeAsText(); + var styleString=document.xslControl.getStyleTreeAsText(); + var targetString=document.xslControl.getHtmlText(); + writeSource(sourceString); + writeStylesheet(styleString); + writeTarget(targetString); + } + ]]> + </script> + <body onLoad="clearFrames();" bgcolor="#808080" text="#ffffff"> + <form name="xmlTransform" action="" method="POST"> + <h2><img border="0" hspace="0" vspace="0" align="left" src="rabbitwhorn.jpg"/> Transform XML Document</h2> + <table> + <tr> + <td width="50"></td> + <td align="center"><i>Document to transform</i></td> + <td align="center"><i>Display output as</i></td> + </tr> + <tr> + <td></td> + <td align="center"> + <select name="xmlSourceList"> + <option value="xalanApplets.xml" selected="true"> xalanApplets.xml </option> + <option value="foo-s1.xml"> foo-s1.xml </option> + </select> + </td> + <td align="center"> + <input type="radio" name="displayMode" checked="true">HTML </input> + <input type="radio" name="displayMode">HTML Source</input> + </td> + <td> + <input type="button" name="transformButton" value="Transform" + onClick="transform();"/> + </td> + </tr> + </table> + </form> + <!-- Be sure you have applet archive attribute set + so the applet can find xalan.jar,xml-apis.jar, serializer.jar and xercesImpl.jar --> + <applet + name="xslControl" + code="org.apache.xalan.client.XSLTProcessorApplet.class" + archive="../../xalan.jar,../../build/xalan.jar,../../serializer.jar,../../build/serializer.jar,../../lib/xml-apis.jar,../../lib/xercesImpl.jar" + height="0" + width="0"> + <param name="documentURL" value="xalanApplets.xml"/> <!--default setting--> + <param name="styleURL" value="s1ToHTML.xsl"/> <!--doesn't change--> + </applet> + </body> +</html> diff --git a/xalansamples/src/site/xhtml/AppletXMLtoHTML/target.xhtml b/xalansamples/src/site/xhtml/AppletXMLtoHTML/target.xhtml new file mode 100644 index 000000000..f3caa0617 --- /dev/null +++ b/xalansamples/src/site/xhtml/AppletXMLtoHTML/target.xhtml @@ -0,0 +1,24 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> +<html> + <head> + <title>Untitled</title> + </head> + <body> </body> +</html> diff --git a/samples/translets/readme.html b/xalansamples/src/site/xhtml/ApplyXPath/readme.xhtml similarity index 100% rename from samples/translets/readme.html rename to xalansamples/src/site/xhtml/ApplyXPath/readme.xhtml diff --git a/xalansamples/src/site/xhtml/ApplyXPathDOM/readme.xhtml b/xalansamples/src/site/xhtml/ApplyXPathDOM/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalansamples/src/site/xhtml/ApplyXPathDOM/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/DOM2DOM/readme.xhtml b/xalansamples/src/site/xhtml/DOM2DOM/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalansamples/src/site/xhtml/DOM2DOM/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/Pipe/readme.xhtml b/xalansamples/src/site/xhtml/Pipe/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalansamples/src/site/xhtml/Pipe/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/SimpleTransform/readme.xhtml b/xalansamples/src/site/xhtml/SimpleTransform/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalansamples/src/site/xhtml/SimpleTransform/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/UseStylesheetParam/readme.xhtml b/xalansamples/src/site/xhtml/UseStylesheetParam/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalansamples/src/site/xhtml/UseStylesheetParam/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/UseXMLFilters/readme.xhtml b/xalansamples/src/site/xhtml/UseXMLFilters/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalansamples/src/site/xhtml/UseXMLFilters/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/Validate/readme.xhtml b/xalansamples/src/site/xhtml/Validate/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalansamples/src/site/xhtml/Validate/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/extensions/readme.xhtml b/xalansamples/src/site/xhtml/extensions/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalansamples/src/site/xhtml/extensions/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/extensions/sql/basic-connection/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/basic-connection/readme.xhtml new file mode 100644 index 000000000..b7b4fb7b8 --- /dev/null +++ b/xalansamples/src/site/xhtml/extensions/sql/basic-connection/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/extensions/sql/extConnection/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/extConnection/readme.xhtml new file mode 100644 index 000000000..b7b4fb7b8 --- /dev/null +++ b/xalansamples/src/site/xhtml/extensions/sql/extConnection/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/extensions/sql/pquery/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/pquery/readme.xhtml new file mode 100644 index 000000000..b7b4fb7b8 --- /dev/null +++ b/xalansamples/src/site/xhtml/extensions/sql/pquery/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/extensions/sql/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/readme.xhtml new file mode 100644 index 000000000..dff6155a7 --- /dev/null +++ b/xalansamples/src/site/xhtml/extensions/sql/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/extensions/sql/show-error/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/show-error/readme.xhtml new file mode 100644 index 000000000..b7b4fb7b8 --- /dev/null +++ b/xalansamples/src/site/xhtml/extensions/sql/show-error/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/extensions/sql/streamable/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/streamable/readme.xhtml new file mode 100644 index 000000000..b7b4fb7b8 --- /dev/null +++ b/xalansamples/src/site/xhtml/extensions/sql/streamable/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalansamples/src/site/xhtml/translets/readme.xhtml b/xalansamples/src/site/xhtml/translets/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalansamples/src/site/xhtml/translets/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xalanservlet/pom.xml b/xalanservlet/pom.xml new file mode 100644 index 000000000..f6e35e1d8 --- /dev/null +++ b/xalanservlet/pom.xml @@ -0,0 +1,141 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- ISSUE: This is dragging in a bit pile of jarfiles + which this sample did not include when building through Ant: + bcel, commons-lang3, java-cup-runtime, jboss-rmi, regexp, + brazil. + It also adds serializer. + Notably, neither includes XML parser, presumably gotten from JRE. + +NOTE: The directory/WAR tree is not exactly as suggested by the Mavn WAR +Plugin documentation. However, this arrangement mirrors the output produced +by the previous (ant) build, which I am not willing to change right now. +(I'd rather not grovel through the code more than I must.) +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>xalan-j</artifactId> + <groupId>xalan</groupId> + <version>2.7.3</version> + </parent> + + <artifactId>xalanservlet</artifactId> + <name>Apache Xalan-Java Servlet Sample</name> + <packaging>war</packaging> + <!-- FIXME change it to the project's website --> + <url>http://www.example.com</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> + + <!-- NOTE: Currently dragging in transitive dependencies unneeded in + this servlet. Need maven advice on how to avoid that. --> + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </dependency> + <!-- For javadoc generation only, hence 'provided' scope --> + <dependency> + <groupId>xalan</groupId> + <artifactId>${xalan.taglet.artifactId}</artifactId> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> <!-- jakata servlet is at 6.0 --> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.ejb/ejb-api --> + <dependency> + <groupId>javax.ejb</groupId> + <artifactId>ejb-api</artifactId> + <version>3.0</version> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/xerces/xercesImpl --> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.12.2</version> + <scope>provided</scope> + </dependency> + + <!-- https://github.com/dev-aspectj/brazil --> + <dependency> + <groupId>dev.aspectj</groupId> + <artifactId>sunlabs.brazil</artifactId> + <version>2.3.1</version> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec --> + <dependency> + <groupId>org.jboss.spec.javax.rmi</groupId> + <artifactId>jboss-rmi-api_1.0_spec</artifactId> + <version>1.0.6.Final</version> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>create-javadocs</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>create-sources</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/samples/servlet/ApplyXSLT.java b/xalanservlet/src/main/java/servlet/ApplyXSLT.java similarity index 83% rename from samples/servlet/ApplyXSLT.java rename to xalanservlet/src/main/java/servlet/ApplyXSLT.java index 50c4d8070..e326a6758 100644 --- a/samples/servlet/ApplyXSLT.java +++ b/xalanservlet/src/main/java/servlet/ApplyXSLT.java @@ -107,30 +107,30 @@ public void init(ServletConfig config) super.init(config); // If the server.root property --see above-- is null, use current working directory // as default location for media.properties. - if (ROOT != null){ + if (ROOT != null) { CURRENTDIR= getServletContext().getRealPath("/WEB-INF/classes/servlet/") + FS; - System.out.println ( CURRENTDIR);} + System.out.println ( CURRENTDIR); + } else CURRENTDIR = System.getProperty("user.dir")+ FS; - - setDefaultParameters(config); - - setMediaProps(config.getInitParameter("mediaURL")); + + setDefaultParameters(config); + setMediaProps(config.getInitParameter("mediaURL")); } - + /** * Sets the default parameters for the servlet from the configuration. - * Also sets required system properties until we figure out why servlet - * sometimess fails to read properties from properties files. + * Also sets required system properties until we figure out why servlet + * sometimes fails to read properties from properties files. * @param config Configuration */ protected void setDefaultParameters(ServletConfig config) { ourDefaultParameters = new DefaultApplyXSLTProperties(config); } - + /** - * Loads the media properties file specified by the given string. + * Loads the media properties file specified by the given string. * @param mediaURLstring Location of the media properties file. Can be either a full URL or a path relative * to the System's server.root /servlets directory. If this parameter is null, * server.root/servlets/media.properties will be used. @@ -190,7 +190,7 @@ public String getMedia(HttpServletRequest request) { return ourMediaProps.getValue(request.getHeader(HEADER_NAME)); } - + // doPost removed for security reasons due to the possibility of sending // unsecure XML and XSL XSLTInputSources through the request input stream @@ -204,26 +204,30 @@ public String getMedia(HttpServletRequest request) */ public void doGet (HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException + throws ServletException, IOException { try - { + { TransformerFactory tFactory = TransformerFactory.newInstance(); process(tFactory, request, response); } catch (Exception e) { + // discard } } - + /** - * Coordinates applying an XSL stylesheet to XML data using operational parameters. - * <p>If successfully applied, the result tree will be streamed to the response object - * and the content type set according to the XSL stylesheet's <xsl:output> element(s).</p> - * <p>If there is a problem in parsing the XML/XSL or if there is a problem in applying - * the XSL to the XML, an exception will be streamed to the response object. The detail - * of the information returned in the response object will depend on whether we're - * running in debug mode or not.</p> + * Coordinates applying an XSL stylesheet to XML data using + * operational parameters. <p>If successfully applied, the result + * tree will be streamed to the response object and the content type + * set according to the XSL stylesheet's <xsl:output> + * element(s).</p> <p>If there is a problem in parsing the XML/XSL + * or if there is a problem in applying the XSL to the XML, an + * exception will be streamed to the response object. The detail of + * the information returned in the response object will depend on + * whether we're running in debug mode or not.</p> + * @param processor implementation of TRaX processor * @param request May contain information relevant to creating XML and XSL XSLTInputSource's * @param response Where to write the transformation result @@ -235,11 +239,11 @@ public void doGet (HttpServletRequest request, * @exception ServletException Never thrown * @exception IOException Never thrown */ - - public void process(TransformerFactory tFactory, - HttpServletRequest request, + + public void process(TransformerFactory tFactory, + HttpServletRequest request, HttpServletResponse response) - throws ServletException, IOException, SAXException + throws ServletException, IOException, SAXException { boolean debug = ourDefaultParameters.isDebug(request); @@ -249,10 +253,10 @@ public void process(TransformerFactory tFactory, // Listener to be used for all reporting ApplyXSLTListener listener = new ApplyXSLTListener(); - listener.out.println("debug is " + debug); + listener.out.println("debug is " + debug); StreamSource xmlSource = null; - StreamSource xslSource = null; + StreamSource xslSource = null; try { if ((xmlSource = getDocument(request, listener)) == null) @@ -262,7 +266,9 @@ public void process(TransformerFactory tFactory, } catch (ApplyXSLTException axe) { - axe.appendMessage(EOL + "getDocument() resulted in ApplyXSLTException" + EOL + axe.appendMessage(EOL + + "getDocument() resulted in ApplyXSLTException" + + EOL + listener.getMessage()); if (debug) writeLog(axe); displayException(response, axe, debug); @@ -270,93 +276,95 @@ public void process(TransformerFactory tFactory, } // creating XSL Stylesheet if (xmlSource != null) - { + { try { - if ((xslSource = getStylesheet(tFactory, request, xmlSource, listener)) == null) - { + if ((xslSource = getStylesheet(tFactory, request, xmlSource, listener)) == null) + { throw new ApplyXSLTException("getStylesheet() returned null", new NullPointerException(), response.SC_NOT_FOUND); } // For time being, must "reset" xmlSource after extracting stylesheet PI - xmlSource = getDocument(request, listener); + xmlSource = getDocument(request, listener); } catch (ApplyXSLTException axe) { - axe.appendMessage(EOL + "getStylesheet() resulted in ApplyXSLTException" + EOL + axe.appendMessage(EOL + + "getStylesheet() resulted in ApplyXSLTException" + + EOL + listener.getMessage()); if (debug) writeLog(axe); displayException(response, axe, debug); xslSource = null; } - // perform Transformation - - if ((xmlSource != null) && (xslSource != null)) - { - try - { - listener.out.println("Performing transformation..."); - - Templates templates = tFactory.newTemplates(xslSource); - Transformer transformer = templates.newTransformer(); + // perform Transformation + + if ((xmlSource != null) && (xslSource != null)) + { + try { - try + listener.out.println("Performing transformation..."); + + Templates templates = tFactory.newTemplates(xslSource); + Transformer transformer = templates.newTransformer(); { - String contentType = null; - contentType = getContentType(templates); - if (contentType != null); + try + { + String contentType = null; + contentType = getContentType(templates); + if (contentType != null); response.setContentType(contentType); - if (transformer instanceof TransformerImpl) - { - TransformerImpl transformerImpl = (TransformerImpl)transformer; - transformerImpl.setQuietConflictWarnings(ourDefaultParameters.isNoCW(request)); - } - - setStylesheetParams(transformer, request); - transformer.transform(xmlSource, new StreamResult(response.getOutputStream())); - - if (debug) - writeLog(listener.getMessage(), response.SC_OK); + if (transformer instanceof TransformerImpl) + { + TransformerImpl transformerImpl = (TransformerImpl)transformer; + transformerImpl.setQuietConflictWarnings(ourDefaultParameters.isNoCW(request)); + } + + setStylesheetParams(transformer, request); + transformer.transform(xmlSource, new StreamResult(response.getOutputStream())); + + if (debug) + writeLog(listener.getMessage(), response.SC_OK); + } + catch (Exception exc) + { + ApplyXSLTException axe = + new ApplyXSLTException("Exception occurred during Transformation:" + + EOL + listener.getMessage() + EOL + + exc.getMessage(), + exc, + response.SC_INTERNAL_SERVER_ERROR); + if (debug) writeLog(axe); + displayException(response, axe, debug); + } + finally + { + // transformer.reset(); + } // end of try ... catch ... finally } - catch (Exception exc) - { - ApplyXSLTException axe = new ApplyXSLTException - ("Exception occurred during Transformation:" - + EOL + listener.getMessage() + EOL - + exc.getMessage(), - exc, - response.SC_INTERNAL_SERVER_ERROR); + } + catch (/*org.xml.sax.SAX*/Exception saxExc) + { + ApplyXSLTException axe = new ApplyXSLTException( + "Exception occurred during ctor/Transformation:" + + EOL + listener.getMessage() + EOL + + saxExc.getMessage(), + saxExc, + response.SC_INTERNAL_SERVER_ERROR); if (debug) writeLog(axe); displayException(response, axe, debug); - } - finally - { - // transformer.reset(); - } // end of try ... catch ... finally - } - } - catch (/*org.xml.sax.SAX*/Exception saxExc) + } // end of new try ... catch + } // end of if((stylesheetRoot != null) ... + if (debug) { - ApplyXSLTException axe = new ApplyXSLTException - ("Exception occurred during ctor/Transformation:" - + EOL + listener.getMessage() + EOL - + saxExc.getMessage(), - saxExc, - response.SC_INTERNAL_SERVER_ERROR); - if (debug) writeLog(axe); - displayException(response, axe, debug); - } // end of new try ... catch - } // end of if((stylesheetRoot != null) ... - if (debug) - { - time = System.currentTimeMillis() - time; - writeLog(" No Conflict Warnings = " + ourDefaultParameters.isNoCW(request) + - " Transformation time: " + time + " ms", response.SC_OK); + time = System.currentTimeMillis() - time; + writeLog(" No Conflict Warnings = " + ourDefaultParameters.isNoCW(request) + + " Transformation time: " + time + " ms", response.SC_OK); + } } } - } /** * Returns an XML XSLTInputSource DOM. Attempts will be make to create the DOM from the following @@ -385,10 +393,10 @@ protected StreamSource getDocument(HttpServletRequest request, if ((xmlURL = request.getPathInfo()) != null) { listener.out.println("Parsing XML Document from PathInfo: " + xmlURL); - return new StreamSource(new URL("http", ((DefaultApplyXSLTProperties) - ourDefaultParameters).getLocalHost(), + return new StreamSource(new URL("http", + ((DefaultApplyXSLTProperties) ourDefaultParameters).getLocalHost(), request.getServerPort(), - xmlURL.replace('\\', '/')).openStream()); + xmlURL.replace('\\', '/')).openStream()); } // document from Request parameter if ((xmlURL = ourDefaultParameters.getXMLurl(request)) != null) @@ -416,7 +424,7 @@ protected StreamSource getDocument(HttpServletRequest request, } /** - * Returns a Templates (StylesheetRoot) object. Attempts will be make to create the Stylesheet + * Returns a Templates (StylesheetRoot) object. Attempts will be make to create the Stylesheet * from the followingsources: * <ol> * <li>A URL specified in the HTTP request's <code>xslURL=</code> parameter. This capability @@ -441,7 +449,7 @@ protected StreamSource getDocument(HttpServletRequest request, * @exception ApplyXSLTException Thrown if exception occurs while handling request */ protected StreamSource getStylesheet(TransformerFactory tFactory, - HttpServletRequest request, + HttpServletRequest request, StreamSource xmlSource, ApplyXSLTListener listener) throws ApplyXSLTException @@ -490,26 +498,26 @@ protected StreamSource getStylesheet(TransformerFactory tFactory, public String getContentType(Templates templates) { Properties oprops = templates.getOutputProperties(); - String encoding = oprops.getProperty(OutputKeys.ENCODING); - String media = oprops.getProperty(OutputKeys.MEDIA_TYPE); - if (media != null) - { + String encoding = oprops.getProperty(OutputKeys.ENCODING); + String media = oprops.getProperty(OutputKeys.MEDIA_TYPE); + if (media != null) + { if (encoding != null) return media + "; charset=" + encoding; return media; - } - else - { - String method = oprops.getProperty(OutputKeys.METHOD); - if (method.equals("html")) - return "text/html"; - else if (method.equals("text")) - return "text/plain"; - else - return "text/xml"; - } - } - + } + else + { + String method = oprops.getProperty(OutputKeys.METHOD); + if (method.equals("html")) + return "text/html"; + else if (method.equals("text")) + return "text/plain"; + else + return "text/xml"; + } + } + /** * Defines and sets select top-level XSL stylesheet variables from the HTTP request, which @@ -545,8 +553,8 @@ public void setStylesheetParams(Transformer transformer, HttpServletRequest requ { String[] paramVals = request.getParameterValues(paramName); if (paramVals != null) - transformer.setParameter(paramName, new XString(paramVals[0])); - + transformer.setParameter(paramName, new XString(paramVals[0])); + } catch (Exception e) { @@ -555,7 +563,7 @@ public void setStylesheetParams(Transformer transformer, HttpServletRequest requ try { transformer.setParameter("servlet-RemoteAddr", new XString(request.getRemoteAddr())); - + } catch (Exception e) { @@ -563,7 +571,7 @@ public void setStylesheetParams(Transformer transformer, HttpServletRequest requ try { transformer.setParameter("servlet-RemoteHost", new XString(request.getRemoteHost())); - + } catch (Exception e) { @@ -571,7 +579,7 @@ public void setStylesheetParams(Transformer transformer, HttpServletRequest requ try { transformer.setParameter("servlet-RemoteUser", new XString(request.getRemoteUser())); - + } catch (Exception e) { @@ -720,7 +728,7 @@ public static String getXSLURLfromDoc(StreamSource xmlSource, String tempURL = null, returnURL = null; try { - DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); + DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); DocumentBuilder docBuilder = dfactory.newDocumentBuilder(); Node sourceTree = docBuilder.parse(xmlSource.getInputStream()); for(Node child=sourceTree.getFirstChild(); null != child; child=child.getNextSibling()) @@ -748,7 +756,7 @@ public static String getXSLURLfromDoc(StreamSource xmlSource, { } return returnURL; - } + } /** * The attribute name in the <?xml-stylesheet> tag used in stylesheet selection. @@ -756,7 +764,7 @@ public static String getXSLURLfromDoc(StreamSource xmlSource, protected static final String STYLESHEET_ATTRIBUTE = "media"; /** - * The HTTP Header used for matching the Stylesheet attribute via the + * The HTTP Header used for matching the Stylesheet attribute via the * media properties file selected. */ protected static final String HEADER_NAME = "user-Agent"; @@ -825,7 +833,6 @@ String getValue(String s) */ class PIA { - private Hashtable piAttributes = null; /** @@ -850,5 +857,5 @@ class PIA String getAttribute(String name) { return (String) piAttributes.get(name); - } + } } diff --git a/samples/servlet/ApplyXSLTException.java b/xalanservlet/src/main/java/servlet/ApplyXSLTException.java similarity index 100% rename from samples/servlet/ApplyXSLTException.java rename to xalanservlet/src/main/java/servlet/ApplyXSLTException.java diff --git a/samples/servlet/ApplyXSLTListener.java b/xalanservlet/src/main/java/servlet/ApplyXSLTListener.java similarity index 98% rename from samples/servlet/ApplyXSLTListener.java rename to xalanservlet/src/main/java/servlet/ApplyXSLTListener.java index 7e0f95bd3..0fab4b914 100644 --- a/samples/servlet/ApplyXSLTListener.java +++ b/xalanservlet/src/main/java/servlet/ApplyXSLTListener.java @@ -23,6 +23,7 @@ import java.io.*; import org.xml.sax.*; import org.apache.xml.utils.DefaultErrorHandler; +import org.xml.sax.SAXException; /***************************************************************************************************** * ApplyXSLTListener provides a buffered listener essential for capturing, and then subsequently diff --git a/samples/servlet/ApplyXSLTProperties.java b/xalanservlet/src/main/java/servlet/ApplyXSLTProperties.java similarity index 100% rename from samples/servlet/ApplyXSLTProperties.java rename to xalanservlet/src/main/java/servlet/ApplyXSLTProperties.java diff --git a/samples/servlet/DefaultApplyXSLTProperties.java b/xalanservlet/src/main/java/servlet/DefaultApplyXSLTProperties.java similarity index 100% rename from samples/servlet/DefaultApplyXSLTProperties.java rename to xalanservlet/src/main/java/servlet/DefaultApplyXSLTProperties.java diff --git a/samples/servlet/SimpleXSLTServlet.java b/xalanservlet/src/main/java/servlet/SimpleXSLTServlet.java similarity index 100% rename from samples/servlet/SimpleXSLTServlet.java rename to xalanservlet/src/main/java/servlet/SimpleXSLTServlet.java diff --git a/samples/servlet/UseStylesheetParamServlet.java b/xalanservlet/src/main/java/servlet/UseStylesheetParamServlet.java similarity index 100% rename from samples/servlet/UseStylesheetParamServlet.java rename to xalanservlet/src/main/java/servlet/UseStylesheetParamServlet.java diff --git a/samples/servlet/XSLTServletWithParams.java b/xalanservlet/src/main/java/servlet/XSLTServletWithParams.java similarity index 99% rename from samples/servlet/XSLTServletWithParams.java rename to xalanservlet/src/main/java/servlet/XSLTServletWithParams.java index eb60e47d6..e59df6c61 100644 --- a/samples/servlet/XSLTServletWithParams.java +++ b/xalanservlet/src/main/java/servlet/XSLTServletWithParams.java @@ -19,6 +19,7 @@ * $Id$ */ package servlet; + import javax.servlet.*; import javax.servlet.http.*; import java.io.*; diff --git a/samples/servlet/web.xml b/xalanservlet/src/main/webapp/WEB-INF/web.xml similarity index 100% rename from samples/servlet/web.xml rename to xalanservlet/src/main/webapp/WEB-INF/web.xml diff --git a/samples/servlet/birds.xml b/xalanservlet/src/main/webapp/birds.xml similarity index 100% rename from samples/servlet/birds.xml rename to xalanservlet/src/main/webapp/birds.xml diff --git a/samples/servlet/birds.xsl b/xalanservlet/src/main/webapp/birds.xsl similarity index 100% rename from samples/servlet/birds.xsl rename to xalanservlet/src/main/webapp/birds.xsl diff --git a/samples/servlet/booklist1.xsl b/xalanservlet/src/main/webapp/booklist1.xsl similarity index 100% rename from samples/servlet/booklist1.xsl rename to xalanservlet/src/main/webapp/booklist1.xsl diff --git a/samples/servlet/booklist2.xsl b/xalanservlet/src/main/webapp/booklist2.xsl similarity index 100% rename from samples/servlet/booklist2.xsl rename to xalanservlet/src/main/webapp/booklist2.xsl diff --git a/samples/servlet/catalog.xml b/xalanservlet/src/main/webapp/catalog.xml similarity index 100% rename from samples/servlet/catalog.xml rename to xalanservlet/src/main/webapp/catalog.xml diff --git a/samples/servlet/default.xsl b/xalanservlet/src/main/webapp/default.xsl similarity index 99% rename from samples/servlet/default.xsl rename to xalanservlet/src/main/webapp/default.xsl index d8c5b1dad..9a45c4b96 100644 --- a/samples/servlet/default.xsl +++ b/xalanservlet/src/main/webapp/default.xsl @@ -291,4 +291,4 @@ </DIV></DIV> </xsl:template> -</xsl:stylesheet> \ No newline at end of file +</xsl:stylesheet> diff --git a/samples/servlet/default2.xsl b/xalanservlet/src/main/webapp/default2.xsl similarity index 100% rename from samples/servlet/default2.xsl rename to xalanservlet/src/main/webapp/default2.xsl diff --git a/samples/servlet/fooparam.xml b/xalanservlet/src/main/webapp/fooparam.xml similarity index 100% rename from samples/servlet/fooparam.xml rename to xalanservlet/src/main/webapp/fooparam.xml diff --git a/samples/servlet/fooparam.xsl b/xalanservlet/src/main/webapp/fooparam.xsl similarity index 100% rename from samples/servlet/fooparam.xsl rename to xalanservlet/src/main/webapp/fooparam.xsl diff --git a/samples/servlet/jspSample.jsp b/xalanservlet/src/main/webapp/jspSample.jsp similarity index 100% rename from samples/servlet/jspSample.jsp rename to xalanservlet/src/main/webapp/jspSample.jsp diff --git a/xalanservlet/src/site/xhtml/servlet/readme.xhtml b/xalanservlet/src/site/xhtml/servlet/readme.xhtml new file mode 100644 index 000000000..415137e63 --- /dev/null +++ b/xalanservlet/src/site/xhtml/servlet/readme.xhtml @@ -0,0 +1,30 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> + +<html> +<head> + <title>Xalan Samples</title> +</head> +<body> +<h2>Xalan Samples</h2> +<p>For information about the samples (what they illustrate and how to run them), see <a href="../../docs/samples.html">Samples</a>.</p> + + +</body> +</html> diff --git a/xdocs/xml-site-style.tar.gz b/xdocs/xml-site-style.tar.gz deleted file mode 100644 index bc1abffaf..000000000 Binary files a/xdocs/xml-site-style.tar.gz and /dev/null differ diff --git a/xsltcapplet/pom.xml b/xsltcapplet/pom.xml new file mode 100644 index 000000000..529c0bccb --- /dev/null +++ b/xsltcapplet/pom.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>xalan-j</artifactId> + <groupId>xalan</groupId> + <version>2.7.3</version> + </parent> + + <artifactId>xsltcapplet</artifactId> + <name>Apache Xalan-Java Applet Sample</name> + <!-- FIXME change it to the project's website --> + <url>http://www.example.com</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </dependency> + <!-- For javadoc generation only, hence 'provided' scope --> + <dependency> + <groupId>xalan</groupId> + <artifactId>${xalan.taglet.artifactId}</artifactId> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> <!-- jakata servlet is at 6.0 --> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.ejb/ejb-api --> + <dependency> + <groupId>javax.ejb</groupId> + <artifactId>ejb-api</artifactId> + <version>3.0</version> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/xerces/xercesImpl --> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.12.2</version> + <scope>provided</scope> + </dependency> + + <!-- https://github.com/dev-aspectj/brazil --> + <dependency> + <groupId>dev.aspectj</groupId> + <artifactId>sunlabs.brazil</artifactId> + <version>2.3.1</version> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec --> + <dependency> + <groupId>org.jboss.spec.javax.rmi</groupId> + <artifactId>jboss-rmi-api_1.0_spec</artifactId> + <version>1.0.6.Final</version> + </dependency> + + </dependencies> + + <build> + <plugins> + <!-- Copy generated jarfile up to xalan-java/build/, + for backward compatibility with Ant builds. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>create-javadocs</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>create-sources</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/samples/CompiledApplet/README.applet b/xsltcapplet/src/main/java/samples/CompiledApplet/README.applet similarity index 100% rename from samples/CompiledApplet/README.applet rename to xsltcapplet/src/main/java/samples/CompiledApplet/README.applet diff --git a/samples/CompiledApplet/TransformApplet.java b/xsltcapplet/src/main/java/samples/CompiledApplet/TransformApplet.java similarity index 99% rename from samples/CompiledApplet/TransformApplet.java rename to xsltcapplet/src/main/java/samples/CompiledApplet/TransformApplet.java index 52baa1b12..8d2e34ffe 100644 --- a/samples/CompiledApplet/TransformApplet.java +++ b/xsltcapplet/src/main/java/samples/CompiledApplet/TransformApplet.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.CompiledApplet; import java.applet.Applet; diff --git a/samples/CompiledApplet/index.html b/xsltcapplet/src/main/java/samples/CompiledApplet/index.html similarity index 100% rename from samples/CompiledApplet/index.html rename to xsltcapplet/src/main/java/samples/CompiledApplet/index.html diff --git a/samples/CompiledApplet/menu.html b/xsltcapplet/src/main/java/samples/CompiledApplet/menu.html similarity index 100% rename from samples/CompiledApplet/menu.html rename to xsltcapplet/src/main/java/samples/CompiledApplet/menu.html diff --git a/samples/CompiledApplet/singleTransform.html b/xsltcapplet/src/main/java/samples/CompiledApplet/singleTransform.html similarity index 100% rename from samples/CompiledApplet/singleTransform.html rename to xsltcapplet/src/main/java/samples/CompiledApplet/singleTransform.html diff --git a/xsltcapplet/src/site/xhtml/CompiledApplet/index.xhtml b/xsltcapplet/src/site/xhtml/CompiledApplet/index.xhtml new file mode 100644 index 000000000..a55208f03 --- /dev/null +++ b/xsltcapplet/src/site/xhtml/CompiledApplet/index.xhtml @@ -0,0 +1,28 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<html> +<head><title>XSLT Applet Demonstration</title></head> + +<body bgcolor="#ffffff"> + <frameset border="1" cols="25%,*"> + <frame src="menu.html" name="demo_ctrl"/> + <frame src="about:blank" name="demo_output"/> + </frameset> +</body> + +</html> diff --git a/xsltcapplet/src/site/xhtml/CompiledApplet/menu.xhtml b/xsltcapplet/src/site/xhtml/CompiledApplet/menu.xhtml new file mode 100644 index 000000000..59b9f5de6 --- /dev/null +++ b/xsltcapplet/src/site/xhtml/CompiledApplet/menu.xhtml @@ -0,0 +1,68 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<html> +<head></head> +<body bgcolor="#ffffff"> +<hr/> + +<center><h3>Xalan/XSLTC Applet Demo</h3></center> +<p> +Each of these examples illustrate the use of translets +within a Java applet: +</p> + + <script language="JavaScript"> + <![CDATA[ + function run_transform(form) { + /* Get the input document and translet class name from input form */ + var translet = form.translet.value; + var doc = form.doc.value; + + /* Get the frame to output to */ + var output_frame = parent.frames.demo_output.document; + + /* Display the output in this frame */ + output_frame.clear(); + output_frame.writeln(document.TransformApplet.transform(translet, doc)); + output_frame.close(); + return(true); + } + ]]> + </script> + + <form name="xslt_form" onSubmit="run_transform(this.form)"> + <p>Select translet:</p> + <p><input name="translet" width="64"/></p> + <p>Select XML source document:</p> + <p><input name="doc" width="64"/></p> + <p><input type="button" value="Run" onClick="run_transform(this.form)"/></p> + </form> + + <!-- + The xsltc.jar file must contain the XSLTC runtime classes and your + pre-compiled translets, as described in the README.applet file. + --> + <applet archive="mytranslet.jar, xsltcapplet.jar, xalan.jar, xml-apis.jar, xercesImpl.jar" + code="TransformApplet" + name="TransformApplet" + width="10" + height="10" + /> + +</body> +</html> diff --git a/xsltcapplet/src/site/xhtml/CompiledApplet/singleTransform.xhtml b/xsltcapplet/src/site/xhtml/CompiledApplet/singleTransform.xhtml new file mode 100644 index 000000000..4ce8824d2 --- /dev/null +++ b/xsltcapplet/src/site/xhtml/CompiledApplet/singleTransform.xhtml @@ -0,0 +1,26 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<html> +<head></head> +<body bgcolor="#ffffff"> + <applet archive="mytranslet.jar, xalan.jar, xercesImpl.jar, xml-apis.jar, xsltcapplet.jar" code="TransformApplet" width="500" height="500"> + <param name="input-document" value="ns.xml"/> + <param name="stylesheet-name" value="ns.xsl"/> + </applet> +</body> +</html> diff --git a/xsltcbrazil/pom.xml b/xsltcbrazil/pom.xml new file mode 100644 index 000000000..33d6b7780 --- /dev/null +++ b/xsltcbrazil/pom.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>xalan-j</artifactId> + <groupId>xalan</groupId> + <version>2.7.3</version> + </parent> + + <artifactId>xsltcbrazil</artifactId> + <name>Apache Xalan-Java Brazil Sample</name> + <!-- FIXME change it to the project's website --> + <url>http://www.example.com</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </dependency> + <!-- For javadoc generation only, hence 'provided' scope --> + <dependency> + <groupId>xalan</groupId> + <artifactId>${xalan.taglet.artifactId}</artifactId> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> <!-- jakata servlet is at 6.0 --> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.ejb/ejb-api --> + <dependency> + <groupId>javax.ejb</groupId> + <artifactId>ejb-api</artifactId> + <version>3.0</version> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/xerces/xercesImpl --> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.12.2</version> + <scope>provided</scope> + </dependency> + + <!-- https://github.com/dev-aspectj/brazil --> + <dependency> + <groupId>dev.aspectj</groupId> + <artifactId>sunlabs.brazil</artifactId> + <version>2.3.1</version> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec --> + <dependency> + <groupId>org.jboss.spec.javax.rmi</groupId> + <artifactId>jboss-rmi-api_1.0_spec</artifactId> + <version>1.0.6.Final</version> + </dependency> + + </dependencies> + + <build> + <plugins> + <!-- Copy generated jarfile up to xalan-java/build/, + for backward compatibility with Ant builds. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>create-javadocs</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>create-sources</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/xsltcbrazil/src/main/java/samples/CompiledBrazil/README.brazil b/xsltcbrazil/src/main/java/samples/CompiledBrazil/README.brazil new file mode 100644 index 000000000..0dcab658d --- /dev/null +++ b/xsltcbrazil/src/main/java/samples/CompiledBrazil/README.brazil @@ -0,0 +1,108 @@ +============================================================ + +CONTENTS OF THIS DOCUMENT: + + o) HOW TO PROVIDE XSL TRANSFORMATIONS AS A WEB SERVICE + o) HOW TO INVOKE TRANSLETS FROM A BRAZIL HANDLER + +------------------------------------------------------------ + +HOW TO PROVIDE XSL TRANSFORMATIONS AS A WEB SERVICE + +This sample code illustrates how Xalan/XSLTC can be used to +offer XSL transformations as a web service without using a +full web server. We have chosen to use the Brazil prototype +for the web interface, originally available from Sunlabs: + + http://www.sun.com/research/brazil/ + +Both the website and the original downloads no longer exist. +An archived copy of the website (without downloads) is +available at: + + https://web.archive.org/web/20090402221714/http://research.sun.com/brazil/ + +The original code, slightly improved to be compilable on +JDK 17 ('yield' keyword), is available at: + + https://github.com/dev-aspectj/brazil + +Maven Central coordinates: + + dev.aspectj:sunlabs.brazil:2.3.1 + +We could easily have used some other web interface such +as Tomcat. The supplied Java code implements a Brazil +"handler", which very much resembles a servlet. + +The CompiledEJB and CompiledServlet sample code +demonstrate other approaches to providing XSL transformations +as a web service. + +------------------------------------------------------------ + +HOW TO INVOKE TRANSLETS FROM A BRAZIL HANDLER + +The CompiledBrazil directory contains the example source code: + + TransformHandler.java + +This file contains a minimal implementation of an XSL +transformation handler, to be used with Brazil. + +Compile any stylesheets you're interested in into translets. +Set your CLASSPATH to include xalan.jar, xercesImpl.jar, +xml-apis.jar, your translet classes and the Brazil server +jar file. + +You can now set up the Brazil server to service requests by +using the following command: + +java -cp <classpath> \ + -Djavax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl \ + sunlabs.brazil.server.Main -port 8080 \ + -handler samples.CompiledBrazil.TransformHandler + +In a browser, you can enter a URI similar to the following: + + http://localhost:8080/?translet=myTrans&document=myDoc + +where "myTrans" is the URI of a stylesheet that you've +compiled into a translet and "myDoc" is URI of an XML document +you'd like to process using that stylesheet. The result of +the transformation will be displayed in your browser. + +You can test this in the Xalan-Java source code repository +like this (Git Bash on Windows, please adjust shell syntax +Brazil classpath to your needs): + +Console A: + +mvn clean compile +mvn -pl xalan exec:java \ + -Dexec.mainClass=org.apache.xalan.xsltc.cmdline.Compile \ + -Dexec.arguments=samples/src/main/java/samples/SimpleTransform/birds.xsl +java \ + -cp "C:/Users/USER_ID/.m2/repository/dev/aspectj/sunlabs.brazil/2.3.1/sunlabs.brazil-2.3.1.jar;.;xalan/target/classes;serializer/target/classes;samples/target/classes" \ + -Djavax.xml.transform.TransformerFactory=org.apache.xalan.xsltc.trax.TransformerFactoryImpl \ + sunlabs.brazil.server.Main -port 8080 \ + -handler samples.CompiledBrazil.TransformHandler + +Console B (with server running on console A): + +curl "http://localhost:8080/?translet=birds&document=samples/src/main/java/samples/SimpleTransform/birds.xml" + +Console output should be similar to: + +<?xml version="1.0" encoding="UTF-8"?><BirdInfo> +Order is: TINAMIFORMES + Family is: TINAMIDAE + Great Tinamou. Tinamus major + Highland Tinamou. Nothocercus +(...) + Family is: FREGATIDAE + Magnificent Frigatebird. Fregata magnificens + Great Frigatebird. Fregata minor + Lesser Frigatebird. (A) Fregata ariel + +</BirdInfo> diff --git a/samples/CompiledBrazil/TransformHandler.java b/xsltcbrazil/src/main/java/samples/CompiledBrazil/TransformHandler.java similarity index 99% rename from samples/CompiledBrazil/TransformHandler.java rename to xsltcbrazil/src/main/java/samples/CompiledBrazil/TransformHandler.java index 530f6bceb..f594455d1 100644 --- a/samples/CompiledBrazil/TransformHandler.java +++ b/xsltcbrazil/src/main/java/samples/CompiledBrazil/TransformHandler.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.CompiledBrazil; import java.io.IOException; import java.io.PrintWriter; diff --git a/xsltcejb/pom.xml b/xsltcejb/pom.xml new file mode 100644 index 000000000..7744ff4f0 --- /dev/null +++ b/xsltcejb/pom.xml @@ -0,0 +1,129 @@ +<?xml version="1.0" encoding="UTF-8"?> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>xalan-j</artifactId> + <groupId>xalan</groupId> + <version>2.7.3</version> + </parent> + + <artifactId>xsltcejb</artifactId> + <name>Apache Xalan-Java XSLTC EJB sample</name> + <!-- FIXME change it to the project's website --> + <url>http://www.example.com</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </dependency> + <!-- For javadoc generation only, hence 'provided' scope --> + <dependency> + <groupId>xalan</groupId> + <artifactId>${xalan.taglet.artifactId}</artifactId> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> <!-- jakata servlet is at 6.0 --> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.ejb/ejb-api --> + <dependency> + <groupId>javax.ejb</groupId> + <artifactId>ejb-api</artifactId> + <version>3.0</version> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/xerces/xercesImpl --> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.12.2</version> + <scope>provided</scope> + </dependency> + + <!-- https://github.com/dev-aspectj/brazil --> + <dependency> + <groupId>dev.aspectj</groupId> + <artifactId>sunlabs.brazil</artifactId> + <version>2.3.1</version> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec --> + <dependency> + <groupId>org.jboss.spec.javax.rmi</groupId> + <artifactId>jboss-rmi-api_1.0_spec</artifactId> + <version>1.0.6.Final</version> + </dependency> + + </dependencies> + + <build> + <plugins> + <!-- Copy generated jarfile up to xalan-java/build/, + for backward compatibility with Ant builds. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>create-javadocs</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>create-sources</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/samples/CompiledEJB/README.ejb b/xsltcejb/src/main/java/samples/CompiledEJB/README.ejb similarity index 100% rename from samples/CompiledEJB/README.ejb rename to xsltcejb/src/main/java/samples/CompiledEJB/README.ejb diff --git a/samples/CompiledEJB/TransformBean.java b/xsltcejb/src/main/java/samples/CompiledEJB/TransformBean.java similarity index 99% rename from samples/CompiledEJB/TransformBean.java rename to xsltcejb/src/main/java/samples/CompiledEJB/TransformBean.java index 592fc99e7..8e33a94f4 100644 --- a/samples/CompiledEJB/TransformBean.java +++ b/xsltcejb/src/main/java/samples/CompiledEJB/TransformBean.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.CompiledEJB; import java.io.PrintWriter; import java.io.StringWriter; diff --git a/samples/CompiledEJB/TransformHome.java b/xsltcejb/src/main/java/samples/CompiledEJB/TransformHome.java similarity index 97% rename from samples/CompiledEJB/TransformHome.java rename to xsltcejb/src/main/java/samples/CompiledEJB/TransformHome.java index 9451c1c63..71ae04d1c 100644 --- a/samples/CompiledEJB/TransformHome.java +++ b/xsltcejb/src/main/java/samples/CompiledEJB/TransformHome.java @@ -18,6 +18,8 @@ /* * $Id$ */ +package samples.CompiledEJB; + import java.rmi.RemoteException; diff --git a/samples/CompiledEJB/TransformRemote.java b/xsltcejb/src/main/java/samples/CompiledEJB/TransformRemote.java similarity index 97% rename from samples/CompiledEJB/TransformRemote.java rename to xsltcejb/src/main/java/samples/CompiledEJB/TransformRemote.java index 14b29947f..8682c5913 100644 --- a/samples/CompiledEJB/TransformRemote.java +++ b/xsltcejb/src/main/java/samples/CompiledEJB/TransformRemote.java @@ -18,6 +18,8 @@ /* * $Id$ */ +package samples.CompiledEJB; + import java.rmi.RemoteException; diff --git a/samples/CompiledEJB/TransformServlet.java b/xsltcejb/src/main/java/samples/CompiledEJB/TransformServlet.java similarity index 98% rename from samples/CompiledEJB/TransformServlet.java rename to xsltcejb/src/main/java/samples/CompiledEJB/TransformServlet.java index 55391709f..619034975 100644 --- a/samples/CompiledEJB/TransformServlet.java +++ b/xsltcejb/src/main/java/samples/CompiledEJB/TransformServlet.java @@ -18,6 +18,8 @@ /* * $Id$ */ +package samples.CompiledEJB; + import java.io.IOException; import java.io.PrintWriter; diff --git a/samples/CompiledEJB/bottom_frame.html b/xsltcejb/src/main/java/samples/CompiledEJB/bottom_frame.html similarity index 100% rename from samples/CompiledEJB/bottom_frame.html rename to xsltcejb/src/main/java/samples/CompiledEJB/bottom_frame.html diff --git a/samples/CompiledEJB/index.html b/xsltcejb/src/main/java/samples/CompiledEJB/index.html similarity index 100% rename from samples/CompiledEJB/index.html rename to xsltcejb/src/main/java/samples/CompiledEJB/index.html diff --git a/samples/CompiledEJB/top_frame.html b/xsltcejb/src/main/java/samples/CompiledEJB/top_frame.html similarity index 100% rename from samples/CompiledEJB/top_frame.html rename to xsltcejb/src/main/java/samples/CompiledEJB/top_frame.html diff --git a/xsltcejb/src/site/xhtml/CompiledEJB/bottom_frame.xhtml b/xsltcejb/src/site/xhtml/CompiledEJB/bottom_frame.xhtml new file mode 100644 index 000000000..3fdbdf42f --- /dev/null +++ b/xsltcejb/src/site/xhtml/CompiledEJB/bottom_frame.xhtml @@ -0,0 +1,23 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<html> + <head></head> + <body style="backgroundcolor:#ffffff;"> + </body> +</html> + diff --git a/xsltcejb/src/site/xhtml/CompiledEJB/index.xhtml b/xsltcejb/src/site/xhtml/CompiledEJB/index.xhtml new file mode 100644 index 000000000..a8f2d8a77 --- /dev/null +++ b/xsltcejb/src/site/xhtml/CompiledEJB/index.xhtml @@ -0,0 +1,27 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<html> + <head><title>XML Technology Center</title></head> + <frameset border="0" rows="30%,70%" style="backgroundcolor:#ffffff;"> + <frame src="top_frame.html" NAME="top" scrolling="off"/> + <frame src="bottom_frame.html" NAME="bottom" scrolling="on"/> + </frameset> + + <noframes/> +</html> + diff --git a/xsltcejb/src/site/xhtml/CompiledEJB/top_frame.xhtml b/xsltcejb/src/site/xhtml/CompiledEJB/top_frame.xhtml new file mode 100644 index 000000000..b83e7277c --- /dev/null +++ b/xsltcejb/src/site/xhtml/CompiledEJB/top_frame.xhtml @@ -0,0 +1,122 @@ +<!-- + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. +--> +<html> + + <head> + <base target="xtc_menu"/> + </head> + + <body bgcolor="#ffffff"> + + <center><h1>Server-side XSL transformations</h1><p/></center> + + <script language="JavaScript"> + <![CDATA[ + function getURI() { + var root = "http://gobsheen.ireland/morten/Sun/XTC/demo/plays/"; + var menu = document.XMLinput.elements[0]; + var play = menu.options[menu.selectedIndex].value; + return(root+play); + } + + function getTranslet() { + var menu = document.XMLinput.elements[1]; + var translet = menu.options[menu.selectedIndex].value; + return(translet); + } + + function setHTMLlocation(translet) { + var uri = getURI(); + var translet = getTranslet(); + var source = "http://gobsheen:8000/Transform/Transform?"+ + "document="+uri+"&translet="+translet; + open(source,"bottom"); + } + + function setXMLlocation() { + var target = parent.frames.demo_bottom; + var uri = getURI(); + open(uri,"bottom"); + } + ]]> + </script> + + <form name="XMLinput"> + + <table> + <tr> + <td> + <b>Source document:</b> + </td> + <td> + <select name="dropdown"> + <option value="AsYouLikeIt.xml">As You Like It</option> + <option value="Cymbeline.xml">Cymbeline</option> + <option value="Hamlet.xml">The Tragedy of Hamlet</option> + <option value="HenryV.xml">The Life of Henry V</option> + <option value="HenryVIII.xml">The Famous History of the Life of Henry VIII</option> + <option value="KingJohn.xml">The Life and Death of King John</option> + <option value="KingLear.xml">The Tragedy of King Lear</option> + <option value="KingRichardII.xml">The Tragedy of King Richard II</option> + <option value="MeasureForMeasure.xml">Measure for Measure</option> + <option value="MerchantOfVenice.xml">The Merchant of Venice</option> + <option value="MerryWivesOfWindsor.xml">The Merry Wives of Windsor</option> + <option value="MidsummerNightsDream.xml">A Midsummer Night's Dream</option> + <option value="MuchAdoAboutNothing.xml">Much Ado about Nothing</option> + <option value="PericlesPrinceOfTyre.xml">Pericles, Prince of Tyre</option> + <option value="RomeoAndJuliet.xml">The Tragedy of Romeo and Juliet</option> + <option value="TamingOfTheShrew.xml">The Taming of the Shrew</option> + <option value="TheTempest.xml">The Tempest</option> + <option value="TimonOfAthens.xml">The Life of Timon of Athens</option> + <option value="TragedyOfCoriolanus.xml">The Tragedy of Coriolanus</option> + <option value="TragedyOfJuliusCaesar.xml">The Tragedy of Julius Caesar</option> + <option value="TragedyOfOthello.xml">The Tragedy of Othello, the Moor of Venice</option> + <option value="TroilusAndCresida.xml">The History of Troilus and Cressida</option> + <option value="TwelfthNight.xml">Twelfth Night, or What You Will</option> + <option value="TwoGentlementOfVerona.xml">The Two Gentlemen of Verona</option> + <option value="WintersTale.xml">The Winter's Tale</option> + </select> + </td> + </tr> + <tr> + <td> + <b>Transformation:</b> + </td> + <td> + <select name="dropdown"> + <option value="PlayToHTML">Full</option> + <option value="PlayToSpeakers">Speakers</option> + <option value="PlayToIndex">Index</option> + </select> + </td> + </tr> + <tr> + <td> + <b>Method:</b> + </td> + <td> + <input type="button" value="Transform" onClick="setHTMLlocation()"/> + <input type="button" value="XML source" onClick="setXMLlocation()"/> + </td> + </tr> + </table> + </form> + + </body> + +</html> diff --git a/xsltcservlet/pom.xml b/xsltcservlet/pom.xml new file mode 100644 index 000000000..37fea4e74 --- /dev/null +++ b/xsltcservlet/pom.xml @@ -0,0 +1,130 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- See also: xalansamples, xsltcapplet, xsltcbrazil, xsltcejb, xsltcservlet --> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <artifactId>xalan-j</artifactId> + <groupId>xalan</groupId> + <version>2.7.3</version> + </parent> + + <artifactId>xsltcservlet</artifactId> + <name>Apache Xalan-Java Compiled Servlet Sample</name> + <!-- FIXME change it to the project's website --> + <url>http://www.example.com</url> + + <properties> + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> + <maven.compiler.source>1.8</maven.compiler.source> + <maven.compiler.target>1.8</maven.compiler.target> + </properties> + + <dependencies> + <dependency> + <groupId>xalan</groupId> + <artifactId>serializer</artifactId> + </dependency> + <dependency> + <groupId>xalan</groupId> + <artifactId>xalan</artifactId> + </dependency> + <!-- For javadoc generation only, hence 'provided' scope --> + <dependency> + <groupId>xalan</groupId> + <artifactId>${xalan.taglet.artifactId}</artifactId> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.servlet/servlet-api --> + <dependency> + <groupId>javax.servlet</groupId> + <artifactId>servlet-api</artifactId> + <version>2.5</version> <!-- jakata servlet is at 6.0 --> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/javax.ejb/ejb-api --> + <dependency> + <groupId>javax.ejb</groupId> + <artifactId>ejb-api</artifactId> + <version>3.0</version> + <scope>provided</scope> + </dependency> + + <!-- https://mvnrepository.com/artifact/xerces/xercesImpl --> + <dependency> + <groupId>xerces</groupId> + <artifactId>xercesImpl</artifactId> + <version>2.12.2</version> + <scope>provided</scope> + </dependency> + + <!-- https://github.com/dev-aspectj/brazil --> + <dependency> + <groupId>dev.aspectj</groupId> + <artifactId>sunlabs.brazil</artifactId> + <version>2.3.1</version> + </dependency> + + <!-- https://mvnrepository.com/artifact/org.jboss.spec.javax.rmi/jboss-rmi-api_1.0_spec --> + <dependency> + <groupId>org.jboss.spec.javax.rmi</groupId> + <artifactId>jboss-rmi-api_1.0_spec</artifactId> + <version>1.0.6.Final</version> + </dependency> + + </dependencies> + + <build> + <plugins> + <!-- Copy generated jarfile up to xalan-java/build/, + for backward compatibility with Ant builds. --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + </plugin> + </plugins> + </build> + + <profiles> + <profile> + <id>create-javadocs</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + <profile> + <id>create-sources</id> + <activation> + <!-- + Activate by default. Workaround for 'activeByDefault', which is broken + by design, see https://issues.apache.org/jira/browse/MNG-4917. + --> + <jdk>[1,)</jdk> + </activation> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-source-plugin</artifactId> + </plugin> + </plugins> + </build> + </profile> + </profiles> + +</project> diff --git a/samples/CompiledServlet/CompileServlet.java b/xsltcservlet/src/main/java/samples/CompiledServlet/CompileServlet.java similarity index 98% rename from samples/CompiledServlet/CompileServlet.java rename to xsltcservlet/src/main/java/samples/CompiledServlet/CompileServlet.java index 0f2dca8c6..55b76b0ab 100644 --- a/samples/CompiledServlet/CompileServlet.java +++ b/xsltcservlet/src/main/java/samples/CompiledServlet/CompileServlet.java @@ -18,6 +18,8 @@ /* * $Id$ */ +package samples.CompiledServlet; + import java.io.IOException; import java.io.PrintWriter; diff --git a/samples/CompiledServlet/README.servlet b/xsltcservlet/src/main/java/samples/CompiledServlet/README.servlet similarity index 100% rename from samples/CompiledServlet/README.servlet rename to xsltcservlet/src/main/java/samples/CompiledServlet/README.servlet diff --git a/samples/CompiledServlet/TransformServlet.java b/xsltcservlet/src/main/java/samples/CompiledServlet/TransformationServlet.java similarity index 97% rename from samples/CompiledServlet/TransformServlet.java rename to xsltcservlet/src/main/java/samples/CompiledServlet/TransformationServlet.java index 67c13da13..e1e8ef280 100644 --- a/samples/CompiledServlet/TransformServlet.java +++ b/xsltcservlet/src/main/java/samples/CompiledServlet/TransformationServlet.java @@ -18,6 +18,7 @@ /* * $Id$ */ +package samples.CompiledServlet; import java.io.IOException; import java.io.PrintWriter; @@ -48,7 +49,7 @@ * @author Morten Jorgensen * @author Jacek Ambroziak */ -public final class TransformServlet extends HttpServlet { +public final class TransformationServlet extends HttpServlet { /** * Main servlet entry point