diff --git a/.gitattributes b/.gitattributes deleted file mode 100644 index 721d3fe94..000000000 --- a/.gitattributes +++ /dev/null @@ -1,18 +0,0 @@ -# Auto detect text files and perform LF normalization -* text=auto - -# Below types are listed explicitly just in case to avoid unexpected mistakes in git auto above -*.java text -*.html text -*.xml text -*.xsl text -*.css text -*.js text - -# Note: executable is a non-standard attribute, and it is helpful for the release plugin -*.sh text eol=lf executable -*.cgi text eol=lf executable - -# Windows expects CRLF always -*.bat text eol=crlf -*.cmd text eol=crlf diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 5ea42e580..000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,73 +0,0 @@ -name: CI - -on: - push: - branches: - - '*' - pull_request: - branches: - - '*' - -permissions: - contents: read - -# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners -# GitHub Actions does not support Docker, PostgreSQL server on Windows, macOS :( - -concurrency: - # On master/release, we don't want any jobs cancelled so the sha is used to name the group - # On PR branches, we cancel the job if new commits are pushed - # More info: https://stackoverflow.com/a/68422069/253468 - group: ${{ github.ref == 'refs/heads/trunk' && format('ci-main-{0}', github.sha) || format('ci-main-{0}', github.ref) }} - cancel-in-progress: true - -jobs: - build: - name: 'Java 8' - runs-on: ubuntu-latest - steps: - - name: 'Checkout xalan-java' - uses: actions/checkout@v3 - - name: 'Set up JDK 8' - uses: actions/setup-java@v2 - with: - distribution: zulu - java-version: 8 - - name: 'Build Xalan jars' - run: | - 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 -# 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". - -# NOTE: Adjustments made for mvn build leaving things in a slightly different -# place than ant build did (and recreating /lib). - run: | - 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 deleted file mode 100644 index 6c5d53050..000000000 --- a/.gitignore +++ /dev/null @@ -1,41 +0,0 @@ -# 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 - -# MacOS Finder -.DS_Store - -# 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 - -# 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/KEYS b/KEYS deleted file mode 100644 index 5d3013023..000000000 --- a/KEYS +++ /dev/null @@ -1,503 +0,0 @@ -This file contains the PGP keys of xml-commons committers -and are used for signing .zip/.tar.gz distributions. - -To verify the .sig on a distribution: - Using PGP: pgp xalan-j_version.num.zip.sig - Using gpg: gpg -verify xalan-j_version.num.zip.sig xalan-j_version.num.zip - -To import these public keys into your keyring: - Using PGP: pgp < KEYS or pgp -ka KEYS - Using gpg: gpg --import < KEYS - -Committers: to put your key in here: - Using PGP: pgp -kxa and append it to this file. - Using gpg: gpg --export -a >>KEYS should do the trick - - -Shane Curcuru curcuru@apache.org ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGP Personal Privacy 6.5.3 - -mQGiBDghjNIRBADXB4UY4YfZ2DmbSushlzPZCkY00iDPUB+GkW6FQhgnGCLZovgy -FhCnCsKdN1xyHFq/Ns3PV3HPrMGxFKgVOfRuxREbF8CoXAa/u0qR1WoAm+rlyC9l -OVsHdXxyOpZ8e4SPGne8LQYZwr2q+LsHiXOZktkaBo8ua8F4EJYkBMFhZQCg/4Iw -jXmfpt661Essmf8d05cMdAcEAL0r+PrFxCmrU8Ok+r74+eqyclxVbiDbOf7Uef6N -fEJmC5ihX7p8k8eEf2XepeAo6N0gdOxYVXVwcoRCmqPy7SSg1jnXqKOnA87ylv16 -lOiJ5WUkiVX96WOWEsbbYKuggmWeDL+6iFc9hp6oEP2sf/geC8AEAEHTPfneJzpo -3z28A/9iX41r4K0iRx5eIJu2KUrjdpPxhn0JPe9dz2XzWZIciNeki+ThrcarEj9h -lmfvcGLifXbQfXuFid3btMsBRI8dqAbbXmyfvCYYSHDOkXEmoMW66AWfeF4hgfHF -SA5lmcpH4mtHU69uC0+cvYlRROP+HaeOepYbriA+9A9Qq4MAW7QiU2hhbmUgQ3Vy -Y3VydSA8Y3VyY3VydUBhcGFjaGUub3JnPokATgQQEQIADgUCOy5rCAQLAwIBAhkB -AAoJEDLsF1kwoh1V/nkAoMGf6NVxNmMxpMJ9mQW6pzwWDAF2AKCe05LW35bV/px3 -c1a5mBZf0U8exokARgQQEQIABgUCOy5q+gAKCRAZucGLZELD3ErhAJ95upvPEsLB -W+GF/Q27gKwJAJWh5ACg9vPu27CELQPkx5x6fhquWlPZWR6JAEYEEBECAAYFAjsu -bP0ACgkQ1so098tadVyJkACbBhPpRY1usOMqaEoVi8iQvqJTaxMAoJDFZU6+RUTX -dpyd/BhwgKB32d7TiQBGBBARAgAGBQI7LsU+AAoJEL66K4f1/EtCBKMAoMTRzp2x -mzR4TjVuLDS1E4jkOAkWAKC4ONEEtQjIuTuDCVhZPQTtvk+0abQnU2hhbmUgQ3Vy -Y3VydSA8c2hhbmVfY3VyY3VydUBsb3R1cy5jb20+iQBOBBARAgAOBQI7LmsIBAsD -AgECGQAACgkQMuwXWTCiHVUPBACdHm9xrBcNMoEEgR0l+m/8zpgNqWEAn1CbpI+L -0JNmBIyppFM1pCcXp5K6iQBOBBARAgAOBQI4IYzSBAsDAgECGQEACgkQMuwXWTCi -HVXQIQCg1Q1MKkWygIsDGAOhiPaM09pTdlUAniTeCkoOI0+2IgD/NtqnGDaSvNDn -iQBGBBARAgAGBQI4qZk/AAoJEFHrPvFXdlryVbIAoO/egti1esgRI6GErIhICg3I -octfAKDlpw6NWq/WTxk1Aa0pN/1b6fmD5IkARgQQEQIABgUCOxPAFAAKCRAZucGL -ZELD3ElDAJ9dcJ0/3luizN4DiPKeIiMsN4PiAQCfdCDLUWcAs93yj0MfeACJ7F6+ -UcqJAEYEEBECAAYFAjsubTcACgkQ1so098tadVzvZQCfRN3SVna4GEb5IwSm/zRn -0exFr6MAoLSGnZ1wKQT12W/tNR/y2BueOEY2iQBGBBARAgAGBQI6rusTAAoJEBm5 -wYtkQsPcIsIAn0lLDcnoFp5jfpJqV5FnIgIjJ8HkAJ49bCzhw7U5n9G8XEYDQVE2 -eLyMgIkARgQQEQIABgUCOy7FfwAKCRC+uiuH9fxLQhjTAKDDUMomB1wKbVEhcdoy -zpjt13tTMgCgiser+HuJ5boYdvtoEfsn0bHQMFS0J1NoYW5lIEN1cmN1cnUgPHNo -YW5lX2N1cmN1cnVAeWFob28uY29tPokASwQQEQIACwUCPD8X0QQLAwIBAAoJEDLs -F1kwoh1VSusAnAuo93Gu3IphIzuBQSsFu9YRl5HLAKCH3V71nV+Td9udzwT6RIsn -WWIPLIkARgQQEQIABgUCPD8Y0gAKCRAZucGLZELD3KwAAJ45UpvBFaNKOa64ujpg -2dKYVAGIZACg8fNYqXgVuqaB7Xrzyok45ciCfiC5Ag0EOCGM0hAIAPZCV7cIfwgX -cqK61qlC8wXo+VMROU+28W65Szgg2gGnVqMU6Y9AVfPQB8bLQ6mUrfdMZIZJ+AyD -vWXpF9Sh01D49Vlf3HZSTz09jdvOmeFXklnN/biudE/F/Ha8g8VHMGHOfMlm/xX5 -u/2RXscBqtNbno2gpXI61Brwv0YAWCvl9Ij9WE5J280gtJ3kkQc2azNsOA1FHQ98 -iLMcfFstjvbzySPAQ/ClWxiNjrtVjLhdONM0/XwXV0OjHRhs3jMhLLUq/zzhsSlA -GBGNfISnCnLWhsQDGcgHKXrKlQzZlp+r0ApQmwJG0wg9ZqRdQZ+cfL2JSyIZJrqr -ol7DVekyCzsAAgIIAM7v0Dm7spCxsDywqEkBCn3jUhjzq+8Ctl0qfHPA0tQdo61S -+KB/j2G+sFYXDXd/l7ePj/wX5ZXpkVPNBg+rf0R6ExGYSIaf9/HqwSyXyz6hQ2HY -yn99BDDIxViIXnIPUJ2Ul1Nn+xCduC/v756LYwM+oWXyb429W9bV9z0NVtnvpUxY -Us9UWEiseJrBHHs92dMFWpTalpXrd7e/HAmUU+HzzpMjOAuxW7SunLLxVF5CH7t6 -oMeGlZPB1CMF5B2Q9lu14hUj4TLYHD3lAG9wCHmCbP4qj+B+DeKCfAerV8ZqQ5tz -/OT4QuICThVE4Z2ShpC7VsHVGoKPF0igeVVAP1CJAEYEGBECAAYFAjghjNIACgkQ -MuwXWTCiHVV0vgCg4cicMdOPPnOwEyDUhn+iMYl0MmEAoOOqSf33NB1VlLx344qA -0Wi0FCL/ -=QTmn ------END PGP PUBLIC KEY BLOCK----- - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGP 6.5.8 - -mQGiBDnjTUMRBADGzi7y1XiTty/HZ1QhRQxMkyf7JD/E5dGXCVLRoSQV9/hdKPtF -OGzjZQt6DssPnisgrW6hSLEs8GrZKHCZE6z8h5Yekg+WJTs3K0LNJ3X/tStVe/fU -DarLM7u0qwtcsaISWFMRoy1xbrxBkpFBeNkD+FRUk8sXTVXoOGvm3Fw/8wCg/+pg -Y7XD6ZIA0m/CxrxR+xTBri8D/Rk4/5rzsT42AImJwAweJidzlmmvWcDGjZolDxrH -TlVpIXFjGFJBj9tg1Xz+3/w9zKyk900gcwlHU7uz28xPylishgd8DyAb/enSXsEy -NC1EagypAbMpEhTAdBaUNPb6t8yOX3dHUki5yuZ+PryOyKWTaiHyhHLwJ5vZi9xm -o+/ZBACqjUqAL27JOC1qw1zrWCQQzEJIeIIdGFEGoMBiFC425vh/1dJA1LUICHSZ -bZvg7VlvAMErnZb/IcVx4LX4R8Uergh0E/4Xi6krTYZvDuI4RmP5Jn/7IaK2c27I -lCx7I0hj4CQIWVIEVCDAGjJk9E38VahJYHySHzjMdhXSjTbqW7QnTG90dXN4c2wg -VGVhbSA8TG90dXN4c2xfVGVhbUBsb3R1cy5jb20+iQBOBBARAgAOBQI5401DBAsD -AgECGQEACgkQGbnBi2RCw9yVZwCgjxC/ie5/GhPLZyQhMSQvJuDJP8kAn17UNfN/ -tRtFfcJDrNcC7P21ut+VuQINBDnjTUMQCAD2Qle3CH8IF3KiutapQvMF6PlTETlP -tvFuuUs4INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfUodNQ+PVZX9x2 -Uk89PY3bzpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7HAarTW56NoKVy -OtQa8L9GAFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY7288kjwEPw -pVsYjY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy1obEAxnI -Byl6ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpMgs7AAICB/9g -5aR6mWbvaZAwN/IFwIC9cd54cDAW6pvowo6/gkgLfwULI7iGR8jrHHs9rSu968fV -3L7ys3pFLR93/22mJR1InTp+qQdUntcnh5fwbAd9Z8NoM2QEuY4c7cVjobazOgPf -C6XZkS1C3tHcvUedzR8kmf1hiRtILWW2pF7A9JbJB3RHcuBut3cS3eME2+s+dCSl -SugZKyVFuiDoKO59TD7OIn9dwipVhX7UgG0uLDlZzCd9dHLsrlr75LDxIZyiifDB -1oa+xM5smFYEqux+3lf/UNGhpxcaGDJM09UUpOVv8yVz+FZQilZ7Bu0XKvnj1p91 -YFVAiQvQHijya+kMy6MCiQBGBBgRAgAGBQI5401DAAoJEBm5wYtkQsPcPlUAoNkm -fMB0HL71h5QYfB/NRJupWsWUAKCi2UETq9cwA7QtuMyQ1cjvkA1mnQ== -=lNZ2 ------END PGP PUBLIC KEY BLOCK----- - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGPfreeware 6.5.8 for non-commercial use - -mQGiBDtiOuERBADWqtYvR/wqP9H99bmQ1GNpS8NL7YXmOUEdH9X/7KT3nrFBjacO -XTJ2/rjnY1ItW6EwnenuFf0okgnf3ZgUai6Ajr4buxCMhpAzm2htOAaSnc3l/FZF -mcdvpvKkpc4bf2qYC0j4RjKPvXExPdK3DbQnl7Pi5q0qvdaS0JUkYR5X/QCg/7fI -uJKHVBqIveeAmZKpU8xYd60D/RvTll3dwVCWhs21a/AFFYKpA86A5jyq/yXwIeVr -IKtKfxnvcjpmZAYIMddsBtVFjW/CyRm6KQZXRdWpXuLymP7+ppT2VlRLM3TqUxum -4pASJdptk7fj3qzivyfaQ6/fAG3PyJcOe5hS7znLV2a0LX7PQBiPpUwqcjKQ2a2h -LogQBACalpgAIdN1dfUbgOSm9gdsRb8wYIOKTFGpCWF17rMTMuSYTLAsm6mPdxrl -FHn2wlROwiDFnzhEDFbPOHdC5XMD+tYdrWJaffJZKW7ZItOEz6OIh7gnmKpBcDsy -WoJ9J7QRUiETHX3AbKOynSdk5kcgDWymCjSP6rE0M1PAiMVg1LQhU2NvdHQgQm9h -ZyA8c2NvdHRfYm9hZ0Bsb3R1cy5jb20+iQBOBBARAgAOBQI7YjrhBAsDAgECGQEA -CgkQQkPbOcGiXuYuqQCgxnuxkA2wfXf/qrhK9FDdhtG67MQAninm2rZVcTHqorBV -KqUHMeC4VHaEuQINBDtiOuEQCAD2Qle3CH8IF3KiutapQvMF6PlTETlPtvFuuUs4 -INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfUodNQ+PVZX9x2Uk89PY3b -zpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7HAarTW56NoKVyOtQa8L9G -AFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY7288kjwEPwpVsYjY67 -VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6ypUM -2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpMgs7AAICCADj1YHJzpg7 -J0z0zRmpzhmRfDZtzBZB+bjqXh1lkcJO9P6tqwEe9Jnhm+yMWKtfETeiNxyK7C5f -qTATo9USqB2+VTfEr0Y+UivUcITB1UvChj02iPj7zhrW6A7ki5UHYzcK6y29Mw6K -J39nKn7FPaxcqFEzksAGenT+yq0/sSCAydX0GyW6scEkkmdVsUskD5tb83KqNzKK -wXm/iIkQHS5FyzQ7U/WGAKRMcQf14UkGrfPoeRbMfNmlp/B+Jwpfbn3bH47hgowA -gdGcKQSAQhUgy6GDpsxWFTVyjiZNEBI2UxkoB7d8HzMRvme6tw51d59MSNK7X/Go -GtA9P+IqA3UTiQBGBBgRAgAGBQI7YjrhAAoJEEJD2znBol7mw+MAn3pbgcaYV+KZ -TLJszssOCpQLvJwpAKCOBhKSHNUJR8OXI4VhY2Arvmm33g== -=genn ------END PGP PUBLIC KEY BLOCK----- - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGPfreeware 6.5.1 for non-commercial use - -mQGiBDuOlFsRBADT2HtC2QiEuPHzAk6Oa95nupm5zPFdtUasGWnbNhj37JNjhNFA -/iCAvloRHMG8pR9ltlLZA4ae4X2BhPPqk+Us7zjYY/DkF/+G+cTMwPdoakc5JxL5 -ZRoVntAYRH5bcmv9MdSbY4YDf2iqk8gCaFPjP9EQcw3l38kTbfVvGKIjNwCg/7fU -aAHIiOYSH+eLMpF4LtuqQP0D/3DhtpvrALSpiF/rw3VnL1rnxcb2IZs9IL1U6bFK -p0IbqQORSVO2+dYSWo4/Vt7aWBFVPf/yfn/elncVmo12wAzWy7sBnqv8QzfYAvyY -UuOh2WUD4K1ALOy7VHNM1mMyvH4dDIAoOuqXMQBwJx0A+/zUUaUZZLojsWl366pF -GHmlBACa5zXSZ0mUf5ScZqZyda7/kUsV+B5tKjEKuOY1d/hnI5e/9Z11EQIfqqxs -UckzCii+mg8zSpSgWHtsSu5N90teLum98bEuhYNT1tB6Pc7yNWEfq3c3SPw8ZstX -u1kTQrsQeTiPhmfTQ+RyFiv+ZjonEsETNQK8n7CU+N2diiX5d7QjTXlyaWFtIE1p -ZHkgPG15cmlhbV9taWR5QGxvdHVzLmNvbT6JAE4EEBECAA4FAjuOlFsECwMCAQIZ -AQAKCRDeziK2wcV9LzZ/AKCYT4SNAFyQB+tA93nYjRo+NMc12wCaAw6zfJ7j7pI4 -e7L2OA0niSd8vHe5Ag0EO46UWxAIAPZCV7cIfwgXcqK61qlC8wXo+VMROU+28W65 -Szgg2gGnVqMU6Y9AVfPQB8bLQ6mUrfdMZIZJ+AyDvWXpF9Sh01D49Vlf3HZSTz09 -jdvOmeFXklnN/biudE/F/Ha8g8VHMGHOfMlm/xX5u/2RXscBqtNbno2gpXI61Brw -v0YAWCvl9Ij9WE5J280gtJ3kkQc2azNsOA1FHQ98iLMcfFstjvbzySPAQ/ClWxiN -jrtVjLhdONM0/XwXV0OjHRhs3jMhLLUq/zzhsSlAGBGNfISnCnLWhsQDGcgHKXrK -lQzZlp+r0ApQmwJG0wg9ZqRdQZ+cfL2JSyIZJrqrol7DVekyCzsAAgIIANxxFjYo -tUFTQpvEVHu1ZJhyZNySlR5EEDFemG/3AC67Mhv7ygHaeKP/oFzIixKmWllT7iKS -SLjyS75rq7LpTzhasg2+suQPRnV8y2ATTLnlKWQVmZfVKY1RDiO4MWLik9laFTVY -kEyFbKgF9w0LyeobsD7SU1J4D9IUOYmslq0m9rac0l+1ovNetdzIm3WSTB/gm/B2 -Nrz1z8urh4mf+RJwuO0to9fkSjE1KUcrE7nTiSD6A3eUaQC6S+Q5wEeiB3QN5f18 -giQuxna9Aet9J8tnMk+5iuh0QYKjNyXlyYD5B9ZF/4SXnQVDi6jAIC/Zzt/Yqzwo -QX3NAtR8yY0WgASJAEYEGBECAAYFAjuOlFsACgkQ3s4itsHFfS+Q1QCg9ywbxv1n -32glMqfIb9X7icWxYIEAoOGctrkwfA71hEB0S6zhT4UU3zx7 -=eDC+ ------END PGP PUBLIC KEY BLOCK----- - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGP 6.5.8 - -mQGiBDu47OwRBADe/cmSMZz/V8OF9KlVIij1Y66HuKRf9u8ht0JrVZf40BiA6ZF0 -IhXx44ELI1SWU2SqWQOrVR3RRVhHDbCiHGTGGLy8FgL5mhuC8vKRRkKNSzvgJKpD -dCqRScL0UBWogvKj8plzuvz73rHDGJDdd4BYjOD02FW8wmBnWZO2FRQDhwCg/wwW -HvcFM/O9dwoUPjdzc5AOteMEAN7vt3PzYpuhPEA21kGHd/wrn47BKGRiwYXv6b4S -h6OCOWvj/JB9I/BnoeiDpt//1JRte/14JKf8IykuCQgzcZOvA2uuiMi0oWY7kBWe -KDKzz63pFhlqncCzbxnOlIGUq82Y6ZGCrUvKErddOEdeHeCf2smgEvbxfED7lfKR -noVTA/9mjXvtQf5tHlSA6/xErh5WVnvtK1voWQKK5CcRYccqoeD6hbYfwH2wHPte -Rxvh+l8uyF+KTszM2cThA/BfVec01g3qeI1b4F1Izj9iLERxzvczB9QOQ11Ihhn1 -aC6CGDRT8pbrQddWKZy1mGoSJzRDcAGmHleY24+AK371+rKzlrQtSm9zZXBoIEtl -c3NlbG1hbiA8am9zZXBoX2tlc3NlbG1hbkBsb3R1cy5jb20+iQBOBBARAgAOBQI7 -uOztBAsDAgECGQEACgkQss3trL7oYN6+QwCeNNwhvSTvw/OXKOAJ0wzpzUKc//AA -oI+/TdbMVKrBDyEIR3fzS+PDYOq/uQINBDu47O0QCAD2Qle3CH8IF3KiutapQvMF -6PlTETlPtvFuuUs4INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfUodNQ -+PVZX9x2Uk89PY3bzpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7HAarT -W56NoKVyOtQa8L9GAFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY72 -88kjwEPwpVsYjY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy -1obEAxnIByl6ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpMgs7 -AAICB/4usO5A+4Z5Zqdv3IE/Ffaw7XD2+94Jjr9VLWBvlNPb8hwYaCQ8Sn8c+Vwq -lrePG3vHQvwsaTVpLWgk7G/tqasTdecCGrBEc9YlB/9jBqNaUuWdT1RlfxzS96Z1 -ayhNSqHM5gF/6cTBedK95HF0++AdtG4Z+CxhX5COZliPcIeOH1mwYqP/OKcbfOmc -NqsjEpKA81oMpu6RHlzdbvUEyr8JpwqlQnJBPZ6oRi7SUlsTidYvsTA2+ZXJWftr -TXe/R4RdaoXnwhESiDAL1pJy1Hnw3N5RJGCA5RS3RLHa0wvF0YTCwdk7PJut7100 -bdLw57nTr1edcFUKrPrXHQaAI4KiiQBGBBgRAgAGBQI7uOztAAoJELLN7ay+6GDe -6ioAn0mSgIVhoKS1/Umun8Let3+az+SMAJ0aDwtI+TswutMqImiCBg2XsQkOug== -=FVde ------END PGP PUBLIC KEY BLOCK----- - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGP 6.5.8 - -mQGiBDu46/8RBADy0Wm57RXcDu6sd+sza7pFOoYgWslo51LuSxoCVWZiBjgOhas0 -JZeN9pOZlW89yFG4b4U+IfHJ6S0jrl9dcY4jZbwGZOBHF/03Z1viZajIZQ8X13HT -xVASnVFspxj/bvnkpALBaaeI75De9XjDJzJmxWpIMnvXqD6r3jA78h5J2wCg/xbc -xzkV5R1+g5f0YQ5f6LcLK0kD/RWVFuIvrlxzJXZQ+7jduyZmBJat9CQs0U3hHFXq -DIxQPfFsEn9B/kc/qRTFITTeu1JVmq9SYXhJ/YRP+5yza/bJy3HBs4X4xUSeSGR9 -lgMQ7CdI2RwCP2FiCt1yEZT0FG7V452P5u4GFsrUo0hzwPuF853OFbNMVA9lud7Q -pKAdA/wN2J7vDQJzAI/Pnf1ilp3Etq5Mm0jm9F13qXY66a9GtqvcS/lZGwEwYb5J -WHu2kUjDwRwc4rdVbmJS7r4OpuK4n4HSvkA+H7T2fGeAbSlmi2cf0Zj9PQc6nTTX -xs9/mW+ducQoAWWqBsjYb9WTmETFI/v7XODgkFc8+4bGO79ysLQmSm9zZXBoIEtl -c3NlbG1hbiA8amtlc3NlbG1AYXBhY2hlLm9yZz6JAE4EEBECAA4FAju46/8ECwMC -AQIZAQAKCRBM03UrGv/D/h69AJkB04jEwgpZ3U/A3Vo1dfce8zM4/ACfRm4GEOJS -8R/nsuNzZ8YoRD52DpK5Ag0EO7jr/xAIAPZCV7cIfwgXcqK61qlC8wXo+VMROU+2 -8W65Szgg2gGnVqMU6Y9AVfPQB8bLQ6mUrfdMZIZJ+AyDvWXpF9Sh01D49Vlf3HZS -Tz09jdvOmeFXklnN/biudE/F/Ha8g8VHMGHOfMlm/xX5u/2RXscBqtNbno2gpXI6 -1Brwv0YAWCvl9Ij9WE5J280gtJ3kkQc2azNsOA1FHQ98iLMcfFstjvbzySPAQ/Cl -WxiNjrtVjLhdONM0/XwXV0OjHRhs3jMhLLUq/zzhsSlAGBGNfISnCnLWhsQDGcgH -KXrKlQzZlp+r0ApQmwJG0wg9ZqRdQZ+cfL2JSyIZJrqrol7DVekyCzsAAgIIAMhL -pfkBOHvfRhd/Dusekk1af4fMmH82fVhw82Q2+rY9CUNX1N/w0NLZ/AD1wKPugbDK -QoVqgYaAP2rf0xETMFeZKlUhnPl0fXtfZSPWC8qIeiphac97g8Y4q/ZJL9jqZWiu -lqQyArwniUUJ4L6obhZ0EjmSOy4etrWkIEv+1Z8Btw3+hn/XwdWRPzDkicMz7iL4 -scAsSLphu53tUhBdlwBDFdjesaKCRqy8bdR3AQf77Z1czNMLfYA7RS6zuoiblkD6 -GlABJDeQuxnBVJsuYpa+/zxlf4ol7P1rP5WohTN+hZWR9JI+MbqqG8EeyuYjI2Gj -2/jT1kKqjGgVnqjtcb2JAEYEGBECAAYFAju46/8ACgkQTNN1Kxr/w/4tsACgyWj3 -/gI5CMj0KhDDxRXkxzCRP+AAnjY4cIvvgya56KB0IGmFgdgWZxUK -=Ipr4 ------END PGP PUBLIC KEY BLOCK----- - -Type Bits/KeyID Date User ID -pub 2048/1AAC221B 2001/11/09 Joseph Kesselman - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGP 6.5.8 - -mQGhBDvsN+kRBADjapawUAJpEXOp7xNASa4FKdXFx9rLOx45+GP4bdTS9QN/p7Vo -t4v+Xd8PUhJYHkxyfe39rtWfVTj+JPFotldMaPJUCKixnxnTjehbSoyi5sNraRqj -WvZFYFDOOmOEy139eBBFXNTGSH+3D8A0PMg9IhUGHYgGZwqhEgd+2yaBlQCg/94k -idl+3UadWoI4CTOxD+iU0rMD+JUCsUvmFTP1HfJQekMSNN16WSzJF29QOr0JUm9q -ebnJHvtaQ/GaZrVyVv0bbgC1XAXf36pqWJPldkvOOzxCm0z0JkKdbQ6+r4P3hDMF -Ppj1kUfz2XmdbkLTROu0PhUwgE4p7IKQspmxcdYGbT8rPtSSxXVF0yvF/NItXcCJ -KfMEANYbpDzbuzWNtwVTQReFoj5xwYxH1H0CMeXmV+yq0i7DRNU+uAe2DmWOc6om -bl9K5yk/cf8DP93/0yOaJqmZ1EjhHwKkknucHbjcNcMrG5qozU3bUr4in8IK5XO0 -NDZEw6KZTLCyXWCl9kK/H7vr0ogtSeQo+rnMqM9Ggusl2yMCtC1Kb3NlcGggS2Vz -c2VsbWFuIDxqb3NlcGhfa2Vzc2VsbWFuQGxvdHVzLmNvbT6JAE4EEBECAA4FAjvs -N+kECwMCAQIZAQAKCRCVht3BGqwiGxyvAKCOQ+RkwNwxTbrfGj9y3Lm4mYjZ5wCg -npZjPSr5wXU3YU+yi9TluXrMFWC5Ag0EO+w36RAIAPZCV7cIfwgXcqK61qlC8wXo -+VMROU+28W65Szgg2gGnVqMU6Y9AVfPQB8bLQ6mUrfdMZIZJ+AyDvWXpF9Sh01D4 -9Vlf3HZSTz09jdvOmeFXklnN/biudE/F/Ha8g8VHMGHOfMlm/xX5u/2RXscBqtNb -no2gpXI61Brwv0YAWCvl9Ij9WE5J280gtJ3kkQc2azNsOA1FHQ98iLMcfFstjvbz -ySPAQ/ClWxiNjrtVjLhdONM0/XwXV0OjHRhs3jMhLLUq/zzhsSlAGBGNfISnCnLW -hsQDGcgHKXrKlQzZlp+r0ApQmwJG0wg9ZqRdQZ+cfL2JSyIZJrqrol7DVekyCzsA -AgIIAJJnaUDpUG1btIJUVkHLHOeBkm8uIcixAY1BrsoAm+HKW0DfvGZ0OA9RZawL -ZwE0sWCuOuzQjbMVFjt3B76kK7YRiha+hlsAvbm5Ojnz5cmn+4JhT6fvh7Eh4xBR -zCyQTOedNtegy0zkV24ddRqjz/zRDa3KJLagZrQFKU4+LXF5DpaTUVDR5xHxDlWg -Ht2RDbEWVSYALxRjyHobzVZYr9CuhRy6QKRd5pm/fD+qkDtwHbFkrouH8Txegr3y -zVVc+vKC0GNr1xaX8f0lUGSz2KHPRgqyMfEKGRYM+IWfr/gHeZnP2SUzGHsfYzoi -6CJS6hPL/HyrPn+UbOmVo5uKNaqJAEYEGBECAAYFAjvsN+kACgkQlYbdwRqsIhuk -fgCfco+vxnDUpU8cLscpZsPbk6J9p/MAn0VYo0g51AsO36+JJUak7IDWGFwb -=pFGX ------END PGP PUBLIC KEY BLOCK----- - - -Sarah McNamara - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGP 6.5.8 - -mQGiBD0HV44RBADu4H3kzYmSoX2BZOkIio6h+LGD60EjDOGtGkFNh9pqd6aItRK9 -qpFishIK/1/1z+/nLVBfQDc+PSXR8jhZUzj/AGAdjmOtYkBwAWGz1jY08/x98xiV -MzMlVYYdm0dHZAfrNKV7nAfLuFQ4X1Og4Hbmgv5HlnVllXEBcHUYWG7AFwCg/5Wu -q6weARMULjVCQb7B/myiQJMD/itxWrfL0KibEBHzKEmzM3V6pJR7CT18+GO7aLFD -Y0OtTqfcKdBlbvK2Ngyn6MFO/fgctGYsNB20Yg0dJH2oLPrgGAnSVqkgMh2VhUFH -oc/6cyjBkFJMOgHQQAPY5c2MdVlMhBTCJcIMArY5rPQVS7q6D+947hftyHyhDwss -e9b9BACUls7qRcUum7a0eygN6ninot6UlSh9TLEt7OERdIUegu3mbXazdGi5jvCr -lXb1BxZPBIYP2tMve88s1uuRdDP20Ht7k3uG/CzMDlcIUisFrlAqNI7XtzE51jsF -FOTt8NZFFCfqCGaVT/k4FB3wMWniK8HeXEiUuOB7vqdec2e1W7QkU2FyYWggTWNO -YW1hcmEgPG1jbmFtYXJhQGNhLmlibS5jb20+iQBOBBARAgAOBQI9B1eOBAsDAgEC -GQEACgkQDL/HgFBA4ORinwCeM0LEu1iHaSfg3O8W8XUO3soVB/8AoJCsL4P3H2YW -jzcc4jWc0MtufUNTuQINBD0HV44QCAD2Qle3CH8IF3KiutapQvMF6PlTETlPtvFu -uUs4INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfUodNQ+PVZX9x2Uk89 -PY3bzpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7HAarTW56NoKVyOtQa -8L9GAFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY7288kjwEPwpVsY -jY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy1obEAxnIByl6 -ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpMgs7AAICCAC5df43 -MJy9e/SkSdo/Vuu+3cUNcyTuOck0kFivwZKbYKbqJL1nfmT92Flgf4kzJUQTJ5QU -2//sG2dyRtSZwFmb2vhY+68G8d9m4bkbIq799si7sK1LtSdC+6jr5qEnO9w+KcM1 -dxHhUXz5QSOLJgOL+FuF+NcvItUefl0tq5gwiGschyPljp4A2ulaEQn1s7ur6smZ -9QuEyr+95qTqo7I4yAA6NJy9kws2IkYTVXQGsuFlRuXsX30Q9jzlNGZGifLlo6gq -im6cQJgP+WeNHMUb25hV3cVL+wONSklZXIshoDm+zwAcjrbeBVin7g9R38YfhA7p -Gr5ZXzTdnd6GDVWAiQBGBBgRAgAGBQI9B1eOAAoJEAy/x4BQQODk1rYAn34/Xv82 -CElwVpVsZeIkpD68gL1kAKCpGFmpS+W7aXKGVdlNubEulbVlHw== -=+0VJ ------END PGP PUBLIC KEY BLOCK----- - - -Ilene Seelemann (ilene@ca.ibm.com) - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGP 6.5.8 - -mQGiBD14yigRBAD4YG6RAKr364IFqsbD/3B02Nl28bkwVyWFxHA0y9Br5UvjyDGz -sh6ZBQD7mPO2lpNGVj6ln0h5fxur+Nmi79j51LhdZamUGoJtx3GR8bMG3ps7OB+C -FYobHFfBuaR+kvPioboPND0BKYqWktastyGi0Et5OSG2RbvMwBWwv7+ssQCg/y3A -GTvsP70+0FPdsqYMIVbnvPcD/0I7huEjBXsF4/ZFple242zaDHiKcyJxaspiWYpk -kHcHZB2fTUBroJtSvOE6in4LV9cBtr+qScyjYEKo7WXmTuvjPk9hGNg2/7IBhOAY -pxEs/eMSRynPyX4dKsuQ/vbhRnJz5Uh2nG4l01oXIrIu3mLfbf0+njfAySbVZbUR -Bm1fBADOLyw2OuOmVMu1DeFTZ2tyKyJQ+ALD3UtypphHDHcvejHC1Oq7heqxAk9p -Ex/mYlIc3loddWiP6f4tQmdOqmvlhkZ1rGx1rNHMhRohRUPeY5WnRjg452hiaNtt -ri3QnmX/w+3OQi9GcFzKr2GcSZzf429JArhAdMH4xoiK1lJTO7QiSWxlbmUgU2Vl -bGVtYW5uIDxpbGVuZUBjYS5pYm0uY29tPokATgQQEQIADgUCPXjKKAQLAwIBAhkB -AAoJEAaHFk5eFOHSfJsAnRLwJ3B/tgfUSAeXjgImzHITi93JAJ9kyIRfAu431G/0 -chT0OWCp/IqAnIkATAQQEQIADAUCPXjPQgUDDy00gAAKCRAy7BdZMKIdVZ5wAKDf -j9ZVL8158YK7kdwpPsVMqJRldACfcYLyjzQh1rZIuAW/E/ddhwQ+eniJAEYEEBEC -AAYFAj18qXUACgkQDL/HgFBA4ORX1gCg3WrNmHJrAc46PL2MdI1pqqVM+MYAoKFq -cnqo7mczQM80Fvw58092GlFCuQINBD14yigQCAD2Qle3CH8IF3KiutapQvMF6PlT -ETlPtvFuuUs4INoBp1ajFOmPQFXz0AfGy0OplK33TGSGSfgMg71l6RfUodNQ+PVZ -X9x2Uk89PY3bzpnhV5JZzf24rnRPxfx2vIPFRzBhznzJZv8V+bv9kV7HAarTW56N -oKVyOtQa8L9GAFgr5fSI/VhOSdvNILSd5JEHNmszbDgNRR0PfIizHHxbLY7288kj -wEPwpVsYjY67VYy4XTjTNP18F1dDox0YbN4zISy1Kv884bEpQBgRjXyEpwpy1obE -AxnIByl6ypUM2Zafq9AKUJsCRtMIPWakXUGfnHy9iUsiGSa6q6Jew1XpMgs7AAIC -CADSzWYVAO56F2n81OvuEKHEDsWHVTa5F+pB2rJQdSbYsvuB6VzOXO+gttdBgaPp -Kox0wj/z1T3ycr3UyP21sbyP6C4IqUM1sxmDDvtPmi+GP9EnVVWsjt3kAX4NgpG+ -/5RRjdmWvTXYwCyQsGUYmrxj38bTl3slaY2MXuzDrPN7jPLj0LQq2XsucxlBxne7 -VcjMcwWdZy83yrcD4JBACjuzZDYv5rk8562v4i7yIL0OGG42ApLeHTszKgIOnvEz -chBQRtAIbnTZyakWAQbx8yluBQREcWro65iVZngjEMFFBZogCOHRo/ZRea+6Chb0 -GE4SHxWelDm1h29kRKFyNiSSiQBGBBgRAgAGBQI9eMooAAoJEAaHFk5eFOHSYScA -ni92fvDPDNiD0HR5fYQkCcj9+AmCAJ9r2Ic4kOjE7g4LqGU0w/zr3IJ6wA== -=g9hV - ------END PGP PUBLIC KEY BLOCK----- - -Henry Zongaro (zongaro@ca.ibm.com) - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.2.2 (Cygwin) - -mQGiBD8cAJsRBADUrXrA/bCXXan4MTeyaYP/X7Jq2N4m0taDKcCWneTWVoXVISJD -WRm5xI0qfiSMao4VCienFS6aEVDW/CtYy/oVN6faP4cDhfiauOSNVnkuprN5kNT5 -45gXxjfkNZZqQEHzNXeQbd03b2eYVNRqEPIMmbe02VNmYU2ucNoS3tX+wwCg37o6 -lECga3f3HAEbAoBGJWEQDz8D/1cYnr/3K08y5iRbx/fEImoSwDVmS2stl7YSHiFq -y8OkkNv65ctxq1AQKWkd6l/TRLkaTxV6jRSNR9/UUSsKZ1WqYXdWIQlTHOyfyXA4 -9F7BYWVCJ2AorGOCUV2RhL34JOtxD17eWFW7jte9d3yjzwrW6zEgRjL3gn8mF6pm -N0vwA/9/Yhw4xs3kJrd93wpYC6tjwr9OpKX9btjCvmYRs0tIaiHgW+pz4yXcp0be -3JAKmOZLOpYgdXrzqoays2dIXHtPtnJ8xcusnuyafijXnpTugDLd2TTZwTE2PJqa -T6wU6ucrxZoVye7tnCZC9WO4wwT1C34a2Bs8Kb9gdEztDDc64LQiSGVucnkgWm9u -Z2FybyA8em9uZ2Fyb0BjYS5pYm0uY29tPohhBBMRAgAhBQI/HACbBQm6FuqABgsJ -CAcDAgMVAgMDFgIBAh4BAheAAAoJEKtvTqlV3u1VQv0AnRtJiGiwnQ0xRr86VijM -3jpvtRhZAJ42nopVLUX7MLPQAmquJr7vbJ51erkBDQQ/HACeEAQAktEiSKwmijNK -y3LRnBfDcmnsflwaR6vq/hzTU4OaHFlv7TsOF8IEYuVtY6k35r1EKRFDDj3O2yxc -HZ2nJXsfwc2r4vXZ5maLJKrwm/oqdpCQxIhewKty0mNcBmRhYfzH8FwDbJfDj8GQ -3Mb+hoFng5IQz0TMn/+Xufi8hMPNubMAAwUD/1KqOj307Sw/I8xrukzKD28wephI -BaHD0k/JrOE08hLy0AA2hJYtWON2ngFxsAMn+hyCaJ7jIf03lVzeWY/EFUsRiz6W -SK2bgxCqztvFEfk6auQks9o8Qi7wSTdfGRvmgBEv1NIHricYGujpLMYL1/wcUmAb -0cuNiuD+f6I9//mOiEwEGBECAAwFAj8cAJ4FCboW6oAACgkQq29OqVXe7VV5NwCd -GnR3HK9tl6lDNkgg4e/iwX1+TGAAoNAyeTCMkju29VQvP09DXyqF92KN -=+iYb ------END PGP PUBLIC KEY BLOCK----- - -Brian James Minchau - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: PGPfreeware 6.5.8 for non-commercial use - -mQGiBD90tykRBAD8mc8/pJcCYJt7EBGh4M0x6FinAlR0QQsxgpf6sKVUsW01vnce -1Sk2O5DfLCxTuTamstzMPGP9gqpIxL01qQO0ogarlQ8KLHtrb0x3ha2Ea32wnjux -KsbWMYv88w3vyNmcPm4CwXePxWglBJxvuUtBl/8UfWX9tj51Gg1UIFkBMwCg/20T -gSuvFLlcsBQIQ2z/lmyJsC8D/RP4QM4e36GyuMR+MVtamP2oq+kVsTgOWgMwbxBN -pYVY9mtI43GIlQ3Nuj5MmgI2gh5w5KGkPxOUiBsbgGyKBpik2XET6uI+ESwxP/f3 -q4P5SsBg9Cnkfw1PRFp9rPrtsH+qRL0sVbPES7m5wgHFMO+iNFRvlgCj+n+a5wP9 -aZpVBADFiDoHukZKtwHkyeXf1ZAjDddYP0CMEU/+n6r2iQhGxsgB8YYxurCsNmWo -ZHsEbFd9K0hiGW4wd8ehTnWhAOgF9haCg0ej+iXIsU26fSdup7XbhqWDwuBVG+oG -fKrxWKn2M1Gq2/e7Y2uIQuUUZVLFWyfbz4srVKX4X+Usi2ZsWbQoQnJpYW4gSmFt -ZXMgTWluY2hhdSA8bWluY2hhdUBjYS5pYm0uY29tPokATgQQEQIADgUCP3S3KQQL -AwIBAhkBAAoJEEkBfzw7R979puQAoJz8iDTTk2RWVO7u3rTbiQLkKkDUAKDyteJj -OIw78pLkcPnNBX5LsbtVzrkCDQQ/dLcqEAgA9kJXtwh/CBdyorrWqULzBej5UxE5 -T7bxbrlLOCDaAadWoxTpj0BV89AHxstDqZSt90xkhkn4DIO9ZekX1KHTUPj1WV/c -dlJPPT2N286Z4VeSWc39uK50T8X8dryDxUcwYc58yWb/Ffm7/ZFexwGq01uejaCl -cjrUGvC/RgBYK+X0iP1YTknbzSC0neSRBzZrM2w4DUUdD3yIsxx8Wy2O9vPJI8BD -8KVbGI2Ou1WMuF040zT9fBdXQ6MdGGzeMyEstSr/POGxKUAYEY18hKcKctaGxAMZ -yAcpesqVDNmWn6vQClCbAkbTCD1mpF1Bn5x8vYlLIhkmuquiXsNV6TILOwACAggA -17tSplmHTmGaV5C5Up5Imu37MGELNYUmoDtg82Acn3gftwKAl81HSx7Lr5ekJTZ2 -jdxX6k1TiJVvw0926Dm44xERqgbTnxJ0eSkvrzuM3WEdnSC4e34ostHcYSMjtXpI -IwbhrAhCNJz8VHQsMPHbp5DCEESZracxHbOe1HGfV1qfomdM6X8k01fIa5Qmhi1B -UUV8tdhr4yXL4fjzQYzI0PJQAVNxEKGrdPpnKedcEDKqdaGDD/SfFjo0Wp1Lg9wO -pW6KnujtylZ/i2gj+oQtXgNXG1CDB2R4+573NyIWbTGCliDA0vr/MIOON3D0Ir1/ -4vtFBvRhTOefXJ2S7AQFl4kARgQYEQIABgUCP3S3KgAKCRBJAX88O0fe/XhoAKC6 -AUWyj+MEm1Uf+mxMLDI2IXiDZQCdEMKlwjNalb4/NBV3HatUuhOuFho= -=LaXh ------END PGP PUBLIC KEY BLOCK----- - -Michael Glavassevich - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.9 (Cygwin) - -mQINBEsh3ukBEADQTZRcZ+Fzyb4fWqhV5egIC8BTP54fjBcv9HKfC4IJxCaK5n/n -GV9uuxv37LPNtZw9WxI8MLBJh0I3lu4PnrTvbcCVgP3NXlzFvdzY5n5FKQN62i+R -6DbKehdd/QNlW0plxhVr3z6ZC2QH/EKRY0yJDcqT958Qz2BuPhXqYc+qlPtXAyPz -2vE0aWsOZ6/7CJ7inLnh+0oVo1mJdtUYAVtoVwzQ6P7zcwvJDvwUaLUG9U0or46i -46SNk2hTRK0q7KcFpEyv+6b1lbezZVWLN1tZjCITN8FHwf16cOMJF0XO/4fsCBQJ -BCtZ9x5A6eCsDlWFCPd0BMDcPVDsB83AhujZo00g5H12oWVcxNUnlxSJ5ou7zRtq -T4RJ7mpB7IM6g4zASJMgUkkuMnsQ9d+Bv8o9wC5lCDTEjN779ZxcctCmbBs6blgo -4q9hYvAJYSkBOSfx+TRPuAYk9WK4elp8yq/XIrB1k7seKfTesROSf5Td5f988OpA -jdyHhdp+HKstgktOkIvtDHQKgrsaKy5mHKqrWOA/mLL/Yw1p2IJkpBnGz8r/8mPD -ecWrenRiT0E/us+D7tpHi84DrpfTS6niPaM4FgoigbCsdK/0T6IJ6uXVOPHdbpnL -k5JDRYercy57tlaPwEHJITPe0FDP4zKJ+Jq28UYFRbPWDPcZJhPrUKA5IwARAQAB -tD1NaWNoYWVsIEdsYXZhc3NldmljaCAoQ09ERSBTSUdOSU5HIEtFWSkgPG1yZ2xh -dmFzQGFwYWNoZS5vcmc+iQI2BBMBAgAgBQJLId7pAhsDBgsJCAcDAgQVAggDBBYC -AwECHgECF4AACgkQlEOAhCOKWlZifhAAhEkzKFOPkwJ58vy47jwMQa7/iAMs3gNN -zNYcNcn6Vj3n/gTa5IlWrcjx2VnZviSW13lwry7DmudfO/qeU0JsJr4mk8Kwj5mh -GFa5r/gt+dnOW/iFy8lEaJUI4vcXVZa4QK310d+Loat4ac0i0Nkioeiomix5RaQv -A+I4m7qJpo6V112d/0/GCVJADwFm/5sbDhreUV4H8zIIkhH47YZKejEUArO3Teqn -4Ym6ES/25qv/wiDSuuQOwIBymYIHCVam42VUHdbUHEjFZF7v5A1qjvdymZBtMGK2 -nfQCLUHpX6ACq+icwShLG4CDK4+zYdN0bTwI20VbLlFzFScjVga21Dqkdaw1bIvn -cSmAXwrSKbFIdsdnsq9lnTqSszs5AyXQZ2Iq0iGk73L/CJemtgp9gwf3dp03WXQG -5LCuTiRb/MWcgAPoG2KVEHRjE3KYGxEQ/OgIHxwDiDnvyvukjkpV/O/9A9LAga+5 -f7J22ih9g0ILbSbX0N9PWpvESD0fskAT6awlcvvyFacOm4tcYveMRESyT6/ZJWAm -t/DlHcxLshX0RQZCETV/HO1C59twuds6MEbs3rTaFsKryz5Vo4/AQSsz46eDZze3 -XZ8y4FLHAkgrptHfoV39kyjJHmIMOAkx6S1YIvswTU0hF9SrxfrslyF9SwxYNuHt -Q/M+Mf7tVQ4= -=NDBw ------END PGP PUBLIC KEY BLOCK----- - -Gary David Gregory (Code signing key) - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v1.4.11 (MingW32) - -mQENBE2kzuwBCACYV+G9yxNkSjAKSji0B5ipMGM74JAL1Ogtcu+993pLHHYsdXri -WWXi37x9PLjeHxw63mN26SFyrbMJ4A8erLB03PDjw0DEzAwiu9P2vSvL/RFxGBbk -cM0BTNXNR1rk8DpIzvXtejp8IHtD1qcDLTlJ8D0W3USebShDPo6NmMxTNuH0u99B -WHCMAdSa34wsg0ZpffwQmRxeA+ebrf2ydKupGkeZsKjkLlaXNkTVp1ghn5ts/lvg -KeHv1SJivWKCRmFlbPhBK4+mxSUSOPdoBNAfxA51QzZoPizSk0VbRz3YufYRVLFy -9vqPSorDmYJhCvn3f6+A38FS/j8VE+8obQ2rABEBAAG0O0dhcnkgRGF2aWQgR3Jl -Z29yeSAoQ29kZSBzaWduaW5nIGtleSkgPGdncmVnb3J5QGFwYWNoZS5vcmc+iQE4 -BBMBAgAiBQJNpM7sAhsDBgsJCAcDAgYVCAIJCgsEFgIDAQIeAQIXgAAKCRCG/cfi -oRJiy2vXCACU6jW2+XIWuWBKSmeowBMxlUMJFSq7QjLt+o6B1ZYClbzBLDKcxlnS -dF6v0jLhp71LozTde+HFI4/qIv6OO4UaGHin8Z1rNU/i5L07HkhLxcrbDoWhaSGD -buRsWCv9ljm5GCXyK9s6Uj7d4af9mDWaGhNFJJFIs+yqOvTwffoaB7y+2a1YWStZ -ZXDJ0KiHdY7xQ7bbYR/61MgvJslF1uX+u4jLTNmbU0tCXLtUrLd2VbJiAMFezqy6 -hV/ZxQLZoBPpr3FYhR2SIzNhQ30nj9AVcPgCCuLD49nx6Ad5CpcP8sTwb4aWk9GK -+Uu3Bfz4jTAvd9Q7TsRMt3NV+7sOGD4vuQENBE2kzuwBCACzeGpkd6X/xTfKDBWv -XgHOOKIJ2pht9XmtZZKiIj7LIiSwvSds/ZkoZKxAm7AY+KPh8Xjf968FtoUBQJvH -AG4rbowEqT7OOrJae2JcenH5qzaod7TpIPQVv+Ysz8I1wLlC6LzKRj1X99Hng6X+ -obsEasnPbmEEkuiZ/Sgi4vVC8SHkDmYt1Dx8jDgm53oUeWkEJO9LSI2zcrZhSgvg -1xa4Q4gY5UUK7gE4LbmGCjFlATuuW/0sryxu8zxph15gkn4Nqgk0CPMSjesMYEGO -sdDzfQXl2tXbt+Pe6mBoWh67MZ1v5zOq3EDtoSqDpWPxponAeaCuNDDFX44vGjfx -GE0tABEBAAGJAR8EGAECAAkFAk2kzuwCGwwACgkQhv3H4qESYsvEMAf/VGyqIEcw -4T2D3gZZ3ITkeoBevQdxBT/27xNvoWOZyGSzGYlRbRQrlo+uZsjfMc9MNvaSmxyy -4gLVbcdvQr3PF//GxphJ98W8pk9l+M57jfyHnnCumn7MO4o9ed+WuigN5oeuNJ6B -Iq3ff2o1DsrEvDChYOJEOeFuWxv+u7I2ABJJep7NbByM2n9PE8vlGU3zUBgWUBsk -6jT+klKnEyHE76WzegPLz3jtElTuyB7jRhjyQJu1yiJEMbs2zH8aJGObi5f8Jum4 -tILZuEAdoI0M3c3VRq12cz/vLy+9VXa/s//8IsGn88kjyyYqOy8WJEjoOXFh++dp -WiM7nZkgQcNi5A== -=0UFs ------END PGP PUBLIC KEY BLOCK----- - -Mukul Gandhi (Code signing key) mukulg@apache.org - ------BEGIN PGP PUBLIC KEY BLOCK----- -Version: GnuPG v2.2.6 (Windows) - -mQINBFrVrw4BEADaSqFLnW5IvKF7CaJXHpz2K94WTZr5vXg8sGE5r7XTi+91BqrU -VCVanxkKs/dEy7O0QAnkGNaF6nT/deHZVU6FGTUVcj7GtDXd/8Upj5H5Yhkvf8nO -U50U/W427OuLAbtKK06zUXQQq7jNUC5DEQNOA2amqKsSGCzeLticjOB/PIaFSAE7 -vLYPXdVZVA0/+c8tI98vt0LH/dC0FK8Q/YQLGLvDrrnkLqZ8Q/G27BYvJA0uBVvD -7oC7uivXE87Qqy489DWI/zTciVgm8LwwOOgACVc0WzkHI9qX/Dmc27CjowCacW8O -+8VS1QVpq61L7y6vCg8dnL78Y3E+0MbvbVz7MpJKb9f7hxNHg6UwUVHweR+o2oXV -75EMHQDN1vRWJ0gQgGOU479jECp1Iu52T2cL6qr5QDnmwb8G4LZUp3edJmlGQ+DO -kSXJSSG+LtwdmwB/MwwyP6u7PKLKzE5Vn+zXyfJq5IHQmh9QlBatPcRrzFmKg4o1 -vI23xe09edfqSRPEfpLTa3h1CZPSOcu/93SteENslFKQ5SZIOyXK3RTz4jjJ6gMD -W9FKGq5ntUTZHWiXJdxtr1cnt/SKJOsUK2OwTgD13EPYFonckbrPst4OSFFWUkba -zIiENlbgkRKnQC06/bnBAfLC4h3W9AxxseVLVD7COB9fbJzGcLCsyo7mewARAQAB -tDNNdWt1bCBHYW5kaGkgKENPREUgU0lHTklORyBLRVkpIDxtdWt1bGdAYXBhY2hl -Lm9yZz6JAk4EEwEIADgWIQRNj7Vy+2rc/WnL/g17JYamteJcPQUCWtWvDgIbAwUL -CQgHAgYVCgkICwIEFgIDAQIeAQIXgAAKCRB7JYamteJcPelTEAChRbuWaFsbJMs/ -qQNO0ALcqAKZvjnzB2Ne3qjYBT/3ptq86HSOBbuT1T/YAKUPN+ETR9Y7ib05x2qN -pcLOhJJTNApNPcczNXKLokn4fojv70wFykRsm0OPp4/+gvtY9d/c7OPEIv1nLxOP -zV7IJUX6JEXMuuUBAQ8XNFjy9ObRmQ3JTM3dvtsXNMqwpcsF3p4YvTTq7M3wKEJk -J+d6DV48t0YNjDSmboZ1eb8NbBo6xGAUb42RuolJ8PtanDRjSUgCHPqSjn4x5F0H -W/+kdoFybORCMCrVdKh1x4/8MLWLToC3aIaY1Dw51p9Li64NGHsxCBur1wlX/hAZ -99Zy0GJcayuv9BPRG5lHraIwI0MhpYzmWL6xcOTOyWUOl8U5M/uaMkXlCS6WXdjz -SrJx29y+1dH6mykRTjIQTBa+fsH7duJjiXlo9L8AYbXX6BiwImNiLHVdx6XHwEKP -qDnQNuUFWuj4I2sU7Di0NNPpNemyDvGFlLd+472qD1K3M6ck0BMN+qp5n1gMcwUr -X8cW40PBp5N14nghGiMVzA8QwcU62MCgu5Wo5yITKrZS3rf5vncRFNZ0yA49JqyF -ypTWsJRE5iDIWYCvsQd0fICudxU5zRkaMlIUr8Yz+MjDITZ0YeDLrNDtyU+IE20W -NpNXkhMSUHy6Vz772b3ejQt7Dg1Nd7kCDQRa1a8OARAA6tfcOXamaYMCf9bX6w9Q -ggrmLmVJEUYbjMMlqg7jn1uatI1Fl0YPey1SJCKV52fc0OxX6+7iXlJhLc8q+tsx -/9ojgbEetm85qlFBs7A2x1F/G4nXOi1LJbxDvytXonSn0YSKXpV7zLHnFz2/9KuK -gi7YH41RmvYf/enLh2D8cZMApBfdaB+ZfiooMg7Flr9AHpqk5/UrV4vQZ1mkiiT+ -EXar5rygRP4DZKgBow6RWsJnDE2FKCh4UFzcjeQ0IGhh0iIldCT32jwJB8HDPamQ -+1WAiEzzCH0OOZ1yxiyVSXor+KFpmtnaJlWzUJMm/K6W/6aD9sikY1pA8bfOC0gz -BU7/FZ76rGHgfDAL136lqUzQ54BXdmhM/hTv9VBmZ5JHbjm6xdF9Msr/QI7sRbms -mgjqOF6IJk4vD7u4sIRYQlHJSsxJyBCu3sbKlHv4RZ/Pun6Sxj1fxO/NisQX3sdm -pMwtZSCaBnx/Xlm/DRQKHhWhRcZ+4efeIWY1WcBvH/LgZYJhi5p9PxSLYvtjY83H -iFH1k1v+fZk5c06iwYB3WQJkUfjXIWAPbSHuVuQLq2eZN1Slkd1BncSFYEEgtFl8 -I+UwmrqBTdONMRGkLjezrjnFa1uSBiEHnyyD6PMP3PPsFzqSEYh/E1Kna7jtaJky -ZD5SpLdlvFnS4dYOzzGwhY8AEQEAAYkCNgQYAQgAIBYhBE2PtXL7atz9acv+DXsl -hqa14lw9BQJa1a8OAhsMAAoJEHslhqa14lw9hOgQAJXFChQ394HeivVGTP3Lc0fY -WOBceE9+8xWn6gjFf2SOVlSW7TlBrOGBwAzgeGDWKAP5Js/S2i8LlxTzWA0n7t1T -zMEstkIjEEm5rkSdZ6GkSXQuQkEuiD9fVq8wMjdOKcgRzPq5CUYBFoOPm4r1ZMBc -uMg4fFn3nIHLALdi8hjeJENsl7e9cf7pct9ZmMARgF9jFPPcZbpu7THNgheXnxYW -bzYMNHVV9NkmZA1nJcGTLXao8i0dIQwFyg91cyTfc5iI7EQP+SXUACiOWlZ6GO2S -EcY6CR4g4obg9lBzEPs2uiDRdxWLyD66gbP2XDGPiAsg8LM43Wxa4hDPjXHp9Pig -tPfamxqdl13a8JvbS9hX6wvqS5dbrJfRuxejjGG+LI2cAcWSnT1gCQJWEnxXdzkh -Y6E4aiI6xNw7Xek7rL7DJKe3bVcMcUKI7rLQJor6Gq9ESuTbe73eJdkWTK1cWSWs -StTfzMWwq22VjOZCHz7p/h5zQvuj+oeeJb1wdMn65FjRp6VCmZFwUAphV4tS/Ihe -vVJJKMjIMdUrqDwRhUlt2JLIcjQov00nJ6/SC5AAY5m9jB0LhIHNvXHXPrfxeNEH -otQEdxhoQJS4bxa+pEztFxSkOyHLYya53TVZmGDPW1oMnghHKMA9FLvypQU3CsXM -6CMlHiO/MH1/Ktz2a7NW -=hMIE ------END PGP PUBLIC KEY BLOCK----- - diff --git a/LICENSE.txt b/LICENSE.txt deleted file mode 100644 index 994f9b104..000000000 --- a/LICENSE.txt +++ /dev/null @@ -1,1074 +0,0 @@ -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< - - Apache License - Version 2.0, January 2004 - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, - and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by - the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all - other entities that control, are controlled by, or are under common - control with that entity. For the purposes of this definition, - "control" means (i) the power, direct or indirect, to cause the - direction or management of such entity, whether by contract or - otherwise, or (ii) ownership of fifty percent (50%) or more of the - outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity - exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, - including but not limited to software source code, documentation - source, and configuration files. - - "Object" form shall mean any form resulting from mechanical - transformation or translation of a Source form, including but - not limited to compiled object code, generated documentation, - and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or - Object form, made available under the License, as indicated by a - copyright notice that is included in or attached to the work - (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object - form, that is based on (or derived from) the Work and for which the - editorial revisions, annotations, elaborations, or other modifications - represent, as a whole, an original work of authorship. For the purposes - of this License, Derivative Works shall not include works that remain - separable from, or merely link (or bind by name) to the interfaces of, - the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including - the original version of the Work and any modifications or additions - to that Work or Derivative Works thereof, that is intentionally - submitted to Licensor for inclusion in the Work by the copyright owner - or by an individual or Legal Entity authorized to submit on behalf of - the copyright owner. For the purposes of this definition, "submitted" - means any form of electronic, verbal, or written communication sent - to the Licensor or its representatives, including but not limited to - communication on electronic mailing lists, source code control systems, - and issue tracking systems that are managed by, or on behalf of, the - Licensor for the purpose of discussing and improving the Work, but - excluding communication that is conspicuously marked or otherwise - designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity - on behalf of whom a Contribution has been received by Licensor and - subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - copyright license to reproduce, prepare Derivative Works of, - publicly display, publicly perform, sublicense, and distribute the - Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of - this License, each Contributor hereby grants to You a perpetual, - worldwide, non-exclusive, no-charge, royalty-free, irrevocable - (except as stated in this section) patent license to make, have made, - use, offer to sell, sell, import, and otherwise transfer the Work, - where such license applies only to those patent claims licensable - by such Contributor that are necessarily infringed by their - Contribution(s) alone or by combination of their Contribution(s) - with the Work to which such Contribution(s) was submitted. If You - institute patent litigation against any entity (including a - cross-claim or counterclaim in a lawsuit) alleging that the Work - or a Contribution incorporated within the Work constitutes direct - or contributory patent infringement, then any patent licenses - granted to You under this License for that Work shall terminate - as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the - Work or Derivative Works thereof in any medium, with or without - modifications, and in Source or Object form, provided that You - meet the following conditions: - - (a) You must give any other recipients of the Work or - Derivative Works a copy of this License; and - - (b) You must cause any modified files to carry prominent notices - stating that You changed the files; and - - (c) You must retain, in the Source form of any Derivative Works - that You distribute, all copyright, patent, trademark, and - attribution notices from the Source form of the Work, - excluding those notices that do not pertain to any part of - the Derivative Works; and - - (d) If the Work includes a "NOTICE" text file as part of its - distribution, then any Derivative Works that You distribute must - include a readable copy of the attribution notices contained - within such NOTICE file, excluding those notices that do not - pertain to any part of the Derivative Works, in at least one - of the following places: within a NOTICE text file distributed - as part of the Derivative Works; within the Source form or - documentation, if provided along with the Derivative Works; or, - within a display generated by the Derivative Works, if and - wherever such third-party notices normally appear. The contents - of the NOTICE file are for informational purposes only and - do not modify the License. You may add Your own attribution - notices within Derivative Works that You distribute, alongside - or as an addendum to the NOTICE text from the Work, provided - that such additional attribution notices cannot be construed - as modifying the License. - - You may add Your own copyright statement to Your modifications and - may provide additional or different license terms and conditions - for use, reproduction, or distribution of Your modifications, or - for any such Derivative Works as a whole, provided Your use, - reproduction, and distribution of the Work otherwise complies with - the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, - any Contribution intentionally submitted for inclusion in the Work - by You to the Licensor shall be under the terms and conditions of - this License, without any additional terms or conditions. - Notwithstanding the above, nothing herein shall supersede or modify - the terms of any separate license agreement you may have executed - with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade - names, trademarks, service marks, or product names of the Licensor, - except as required for reasonable and customary use in describing the - origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or - agreed to in writing, Licensor provides the Work (and each - Contributor provides its Contributions) on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or - implied, including, without limitation, any warranties or conditions - of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A - PARTICULAR PURPOSE. You are solely responsible for determining the - appropriateness of using or redistributing the Work and assume any - risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, - whether in tort (including negligence), contract, or otherwise, - unless required by applicable law (such as deliberate and grossly - negligent acts) or agreed to in writing, shall any Contributor be - liable to You for damages, including any direct, indirect, special, - incidental, or consequential damages of any character arising as a - result of this License or out of the use or inability to use the - Work (including but not limited to damages for loss of goodwill, - work stoppage, computer failure or malfunction, or any and all - other commercial damages or losses), even if such Contributor - has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing - the Work or Derivative Works thereof, You may choose to offer, - and charge a fee for, acceptance of support, warranty, indemnity, - or other liability obligations and/or rights consistent with this - License. However, in accepting such obligations, You may act only - on Your own behalf and on Your sole responsibility, not on behalf - of any other Contributor, and only if You agree to indemnify, - defend, and hold each Contributor harmless for any liability - incurred by, or claims asserted against, such Contributor by reason - of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - -The license above applies to this Apache Xalan release of: - Xalan-Java 2 - XSLT Processor - Xalan-Java 2 - Serializer - -The license above also applies to the jar files -xalan.jar and xsltc.jar - Xalan-Java 2 - XSLT Processor from -Source: http://xalan.apache.org/ - -The license above also applies to the jar file -serializer.jar - Xalan-Java 2 - Serializer -Source: http://xalan.apache.org/ -Used by: Xalan-Java 2 and Xerces-Java 2 - -The license above also applies to the jar file -xercesImpl.jar - Xerces-Java 2 XML Parser. -Source: http://xerces.apache.org/ -Used by: Xalan-Java 2 - -The license above also applies to the jar file -xml-apis.jar - Xerces-Java 2 XML Parser. -Source: http://xerces.apache.org/ -Used by: Xalan-Java 2 and release copy of Xerces-Java 2 - -The license above also applies to the jar file -bsf.jar - Beans Scripting Framework (BSF) -Source: https://commons.apache.org/proper/commons-bsf/ -Used by: Xalan-Java 2's non Java extensions - -The license above also applies to the jar file -commons-logging-1.2.jar - Apache Commons Logging -Source: https://commons.apache.org/proper/commons-logging/ -Used by: Xalan-Java 2's non Java extensions - - - - -The following license applies to the included files: - tools/ant.jar - tools/antRun - tools/antRun.bat -Source: http://ant.apache.org/ -Used By: Xalan's build process: java/build.xml and test/build.xml - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -/* - * ============================================================================ - * The Apache Software License, Version 1.1 - * ============================================================================ - * - * Copyright (C) 1999 The Apache Software Foundation. All rights reserved. - * - * Redistribution and use in source and binary forms, with or without modifica- - * tion, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * - * 3. The end-user documentation included with the redistribution, if any, must - * include the following acknowledgment: "This product includes software - * developed by the Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, if - * and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Ant" and "Apache Software Foundation" must not be used to - * endorse or promote products derived from this software without prior - * written permission. For written permission, please contact - * apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", nor may - * "Apache" appear in their name, without prior written permission of the - * Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, - * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND - * FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - * APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, - * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU- - * DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS - * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON - * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF - * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - * This software consists of voluntary contributions made by many individuals - * on behalf of the Apache Software Foundation. For more information on the - * Apache Software Foundation, please see . - * - */ ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - - - - - - - -The following license, Apache Software License, Version 1.1, -applies to the included BCEL.jar from Apache Jakarta -(Byte Code Engineering Library). -Source: http://jakarta.apache.org/bcel -Used By: XSLTC component of xml-xalan/java - -The following license, Apache Software License, Version 1.1, -also applies to the included regexp.jar, -jakarta-regexp-1.2.jar from Apache Jakarta. -Source: http://jakarta.apache.org/regexp -Used By: BCEL.jar which is used by XSLTC component of xml-xalan/java - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -/* - * - * Copyright (c) 2001 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Apache" and "Apache Software Foundation" and - * "Apache BCEL" must not be used to endorse or promote products - * derived from this software without prior written permission. For - * written permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * "Apache BCEL", nor may "Apache" appear in their name, without - * prior written permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation. For more - * information on the Apache Software Foundation, please see - * . - */ ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - - - - - - - -The following license applies to the DOM documentation -for the org.w3c.dom.* packages: - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -W3C® DOCUMENT LICENSE -http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231 -Public documents on the W3C site are provided by the copyright holders -under the following license. By using and/or copying this document, -or the W3C document from which this statement is linked, you (the licensee) -agree that you have read, understood, and will comply with the following -terms and conditions: - -Permission to copy, and distribute the contents of this document, or the -W3C document from which this statement is linked, in any medium for any -purpose and without fee or royalty is hereby granted, provided that you include -the following on ALL copies of the document, or portions thereof, that you use: - -1. A link or URL to the original W3C document. -2. The pre-existing copyright notice of the original author, or if it - doesn't exist, a notice (hypertext is preferred, but a textual representation - is permitted) of the form: "Copyright © [$date-of-document] World Wide Web - Consortium, (Massachusetts Institute of Technology, European Research - Consortium for Informatics and Mathematics, Keio University). All Rights - Reserved. http://www.w3.org/Consortium/Legal/2002/copyright-documents-20021231" -3. If it exists, the STATUS of the W3C document. - -When space permits, inclusion of the full text of this NOTICE should be provided. -We request that authorship attribution be provided in any software, documents, -or other items or products that you create pursuant to the implementation of the -contents of this document, or any portion thereof. - -No right to create modifications or derivatives of W3C documents is granted pursuant -to this license. However, if additional requirements (documented in the Copyright FAQ) -are satisfied, the right to create modifications or derivatives is sometimes granted -by the W3C to individuals complying with those requirements. - -THIS DOCUMENT IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE NO REPRESENTATIONS -OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, OR TITLE; -THAT THE CONTENTS OF THE DOCUMENT ARE SUITABLE FOR ANY PURPOSE; NOR THAT THE -IMPLEMENTATION OF SUCH CONTENTS WILL NOT INFRINGE ANY THIRD PARTY PATENTS, -COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. - -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE DOCUMENT OR THE PERFORMANCE -OR IMPLEMENTATION OF THE CONTENTS THEREOF. - -The name and trademarks of copyright holders may NOT be used in advertising -or publicity pertaining to this document or its contents without specific, -written prior permission. Title to copyright in this document will at all -times remain with copyright holders. - - ----------------------------------------------------------------------------- - -This formulation of W3C's notice and license became active on December 31 2002. -This version removes the copyright ownership notice such that this license -can be used with materials other than those owned by the W3C, moves information -on style sheets, DTDs, and schemas to the Copyright FAQ, reflects that ERCIM -is now a host of the W3C, includes references to this specific dated version -of the license, and removes the ambiguous grant of "use". See the older -formulation for the policy prior to this date. Please see our Copyright FAQ for -common questions about using materials from our site, such as the translating -or annotating specifications. Other questions about this notice can be directed -to site-policy@w3.org. - - -Joseph Reagle >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - - - - - - - - -The following license applies to the DOM software, -for the org.w3c.dom.* packages in jar file xml-apis.jar: - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -W3C® SOFTWARE NOTICE AND LICENSE -http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231 -This work (and included software, documentation such as READMEs, -or other related items) is being provided by the copyright holders -under the following license. By obtaining, using and/or copying this -work, you (the licensee) agree that you have read, understood, and will -comply with the following terms and conditions. - -Permission to copy, modify, and distribute this software and its -documentation, with or without modification, for any purpose and -without fee or royalty is hereby granted, provided that you include -the following on ALL copies of the software and documentation or -portions thereof, including modifications: - -1. The full text of this NOTICE in a location viewable to users of the - redistributed or derivative work. -2. Any pre-existing intellectual property disclaimers, notices, - or terms and conditions. If none exist, the W3C Software Short Notice - should be included (hypertext is preferred, text is permitted) within - the body of any redistributed or derivative code. -3. Notice of any changes or modifications to the files, including the - date changes were made. (We recommend you provide URIs to the location - from which the code is derived.) - -THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS -MAKE NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT -NOT LIMITED TO, WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR -PURPOSE OR THAT THE USE OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE -ANY THIRD PARTY PATENTS, COPYRIGHTS, TRADEMARKS OR OTHER RIGHTS. - -COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR -CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE OR DOCUMENTATION. - -The name and trademarks of copyright holders may NOT be used in advertising -or publicity pertaining to the software without specific, written prior -permission. Title to copyright in this software and any associated documentation -will at all times remain with copyright holders. - - -____________________________________ - -This formulation of W3C's notice and license became active on December 31 2002. -This version removes the copyright ownership notice such that this license can -be used with materials other than those owned by the W3C, reflects that ERCIM -is now a host of the W3C, includes references to this specific dated version -of the license, and removes the ambiguous grant of "use". Otherwise, this -version is the same as the previous version and is written so as to preserve -the Free Software Foundation's assessment of GPL compatibility and OSI's -certification under the Open Source Definition. Please see our Copyright FAQ -for common questions about using materials from our site, including specific -terms and conditions for packages like libwww, Amaya, and Jigsaw. Other -questions about this notice can be directed to site-policy@w3.org. - - -Joseph Reagle >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - - - - - - - -The following license applies to the SAX software, -for the org.xml.sax.* packages in jar file xml-apis.jar: - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -This module, both source code and documentation, is in the Public Domain, -and comes with NO WARRANTY. See http://www.saxproject.org for further information. ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - - - - - - - -The following license applies to the jar file -java_cup.jar - LALR Parser Generator for Java(TM). -Source: http://www.cs.princeton.edu/~appel/modern/java/CUP -Used By: XSLTC component of xml-xalan/java - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -CUP Parser Generator Copyright Notice, License, and Disclaimer - -Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that both -the copyright notice and this permission notice and warranty disclaimer -appear in supporting documentation, and that the names of the authors -or their employers not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior permission. - -The authors and their employers disclaim all warranties with regard to -this software, including all implied warranties of merchantability -and fitness. In no event shall the authors or their employers be liable -for any special, indirect or consequential damages or any damages -whatsoever resulting from loss of use, data or profits, whether in an action -of contract, negligence or other tortious action, arising out of or -in connection with the use or performance of this software. ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - - - - - - - -The following license applies to the jar file runtime.jar - Component -of JavaCup: LALR Parser Generator for Java(TM). -Source: http://www.cs.princeton.edu/~appel/modern/java/CUP -Used By: XSLTC component of xml-xalan/java - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -CUP Parser Generator Copyright Notice, License, and Disclaimer -(runtime.jar component) - -Copyright 1996-1999 by Scott Hudson, Frank Flannery, C. Scott Ananian - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, provided -that the above copyright notice appear in all copies and that both -the copyright notice and this permission notice and warranty disclaimer -appear in supporting documentation, and that the names of the authors -or their employers not be used in advertising or publicity pertaining -to distribution of the software without specific, written prior permission. - -The authors and their employers disclaim all warranties with regard to -this software, including all implied warranties of merchantability -and fitness. In no event shall the authors or their employers be liable -for any special, indirect or consequential damages or any damages -whatsoever resulting from loss of use, data or profits, whether in an action -of contract, negligence or other tortious action, arising out of or -in connection with the use or performance of this software. ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - - - - - - - -The following license applies to the JLEX jar file -JLex.jar - A Lexical Analyzer Generator for Java(TM). -Source: http://www.cs.princeton.edu/~appel/modern/java/JLex -Used By: XSLTC component of xml-xalan/java - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -JLEX COPYRIGHT NOTICE, LICENSE AND DISCLAIMER. - -Copyright 1996-2000 by Elliot Joel Berk and C. Scott Ananian - -Permission to use, copy, modify, and distribute this software and its -documentation for any purpose and without fee is hereby granted, -provided that the above copyright notice appear in all copies and -that both the copyright notice and this permission notice and -warranty disclaimer appear in supporting documentation, and that the -name of the authors or their employers not be used in advertising or -publicity pertaining to distribution of the software without specific, -written prior permission. - -The authors and their employers disclaim all warranties with regard -to this software, including all implied warranties of merchantability and -fitness. In no event shall the authors or their employers be liable for any -special, indirect or consequential damages or any damages whatsoever resulting -from loss of use, data or profits, whether in an action of contract, -negligence or other tortious action, arising out of or in connection -with the use or performance of this software. - -Java is a trademark of Sun Microsystems, Inc. References to the Java -programming language in relation to JLex are not meant to imply that -Sun endorses this product. ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - - - - - - - -The following license applies to the jar file -stylebook-1.0-b3_xalan-2.jar - Tool for generating Xalan documentation. -Integrated with Xalan-Java 2 and Xerces 2. -Source: http://svn.apache.org/viewvc/xml/stylebook/ -Used by: Xalan-Java 2, Xalan-C++ - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -/* - * The Apache Software License, Version 1.1 - * - * - * Copyright (c) 1999 The Apache Software Foundation. All rights - * reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in - * the documentation and/or other materials provided with the - * distribution. - * - * 3. The end-user documentation included with the redistribution, - * if any, must include the following acknowledgment: - * "This product includes software developed by the - * Apache Software Foundation (http://www.apache.org/)." - * Alternately, this acknowledgment may appear in the software itself, - * if and wherever such third-party acknowledgments normally appear. - * - * 4. The names "Xalan", "Xerces", and "Apache Software Foundation" must - * not be used to endorse or promote products derived from this - * software without prior written permission. For written - * permission, please contact apache@apache.org. - * - * 5. Products derived from this software may not be called "Apache", - * nor may "Apache" appear in their name, without prior written - * permission of the Apache Software Foundation. - * - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES - * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE - * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR - * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF - * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND - * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, - * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT - * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * ==================================================================== - * - * This software consists of voluntary contributions made by many - * individuals on behalf of the Apache Software Foundation and was - * originally based on software copyright (c) 1999, International - * Business Machines, Inc., http://www.apache.org. For more - * information on the Apache Software Foundation, please see - * . - */ ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> - - -The following license applies to the jar file -rhino-1.7.14.jar - JavaScript implementation in Java -Source: https://github.com/mozilla/rhino -Used by: Xalan-Java 2's non Java extensions - -<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -The majority of Rhino is licensed under the MPL 2.0: - -Mozilla Public License Version 2.0 -================================== - -1. Definitions --------------- - -1.1. "Contributor" - means each individual or legal entity that creates, contributes to - the creation of, or owns Covered Software. - -1.2. "Contributor Version" - means the combination of the Contributions of others (if any) used - by a Contributor and that particular Contributor's Contribution. - -1.3. "Contribution" - means Covered Software of a particular Contributor. - -1.4. "Covered Software" - means Source Code Form to which the initial Contributor has attached - the notice in Exhibit A, the Executable Form of such Source Code - Form, and Modifications of such Source Code Form, in each case - including portions thereof. - -1.5. "Incompatible With Secondary Licenses" - means - - (a) that the initial Contributor has attached the notice described - in Exhibit B to the Covered Software; or - - (b) that the Covered Software was made available under the terms of - version 1.1 or earlier of the License, but not also under the - terms of a Secondary License. - -1.6. "Executable Form" - means any form of the work other than Source Code Form. - -1.7. "Larger Work" - means a work that combines Covered Software with other material, in - a separate file or files, that is not Covered Software. - -1.8. "License" - means this document. - -1.9. "Licensable" - means having the right to grant, to the maximum extent possible, - whether at the time of the initial grant or subsequently, any and - all of the rights conveyed by this License. - -1.10. "Modifications" - means any of the following: - - (a) any file in Source Code Form that results from an addition to, - deletion from, or modification of the contents of Covered - Software; or - - (b) any new file in Source Code Form that contains any Covered - Software. - -1.11. "Patent Claims" of a Contributor - means any patent claim(s), including without limitation, method, - process, and apparatus claims, in any patent Licensable by such - Contributor that would be infringed, but for the grant of the - License, by the making, using, selling, offering for sale, having - made, import, or transfer of either its Contributions or its - Contributor Version. - -1.12. "Secondary License" - means either the GNU General Public License, Version 2.0, the GNU - Lesser General Public License, Version 2.1, the GNU Affero General - Public License, Version 3.0, or any later versions of those - licenses. - -1.13. "Source Code Form" - means the form of the work preferred for making modifications. - -1.14. "You" (or "Your") - means an individual or a legal entity exercising rights under this - License. For legal entities, "You" includes any entity that - controls, is controlled by, or is under common control with You. For - purposes of this definition, "control" means (a) the power, direct - or indirect, to cause the direction or management of such entity, - whether by contract or otherwise, or (b) ownership of more than - fifty percent (50%) of the outstanding shares or beneficial - ownership of such entity. - -2. License Grants and Conditions --------------------------------- - -2.1. Grants - -Each Contributor hereby grants You a world-wide, royalty-free, -non-exclusive license: - -(a) under intellectual property rights (other than patent or trademark) - Licensable by such Contributor to use, reproduce, make available, - modify, display, perform, distribute, and otherwise exploit its - Contributions, either on an unmodified basis, with Modifications, or - as part of a Larger Work; and - -(b) under Patent Claims of such Contributor to make, use, sell, offer - for sale, have made, import, and otherwise transfer either its - Contributions or its Contributor Version. - -2.2. Effective Date - -The licenses granted in Section 2.1 with respect to any Contribution -become effective for each Contribution on the date the Contributor first -distributes such Contribution. - -2.3. Limitations on Grant Scope - -The licenses granted in this Section 2 are the only rights granted under -this License. No additional rights or licenses will be implied from the -distribution or licensing of Covered Software under this License. -Notwithstanding Section 2.1(b) above, no patent license is granted by a -Contributor: - -(a) for any code that a Contributor has removed from Covered Software; - or - -(b) for infringements caused by: (i) Your and any other third party's - modifications of Covered Software, or (ii) the combination of its - Contributions with other software (except as part of its Contributor - Version); or - -(c) under Patent Claims infringed by Covered Software in the absence of - its Contributions. - -This License does not grant any rights in the trademarks, service marks, -or logos of any Contributor (except as may be necessary to comply with -the notice requirements in Section 3.4). - -2.4. Subsequent Licenses - -No Contributor makes additional grants as a result of Your choice to -distribute the Covered Software under a subsequent version of this -License (see Section 10.2) or under the terms of a Secondary License (if -permitted under the terms of Section 3.3). - -2.5. Representation - -Each Contributor represents that the Contributor believes its -Contributions are its original creation(s) or it has sufficient rights -to grant the rights to its Contributions conveyed by this License. - -2.6. Fair Use - -This License is not intended to limit any rights You have under -applicable copyright doctrines of fair use, fair dealing, or other -equivalents. - -2.7. Conditions - -Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted -in Section 2.1. - -3. Responsibilities -------------------- - -3.1. Distribution of Source Form - -All distribution of Covered Software in Source Code Form, including any -Modifications that You create or to which You contribute, must be under -the terms of this License. You must inform recipients that the Source -Code Form of the Covered Software is governed by the terms of this -License, and how they can obtain a copy of this License. You may not -attempt to alter or restrict the recipients' rights in the Source Code -Form. - -3.2. Distribution of Executable Form - -If You distribute Covered Software in Executable Form then: - -(a) such Covered Software must also be made available in Source Code - Form, as described in Section 3.1, and You must inform recipients of - the Executable Form how they can obtain a copy of such Source Code - Form by reasonable means in a timely manner, at a charge no more - than the cost of distribution to the recipient; and - -(b) You may distribute such Executable Form under the terms of this - License, or sublicense it under different terms, provided that the - license for the Executable Form does not attempt to limit or alter - the recipients' rights in the Source Code Form under this License. - -3.3. Distribution of a Larger Work - -You may create and distribute a Larger Work under terms of Your choice, -provided that You also comply with the requirements of this License for -the Covered Software. If the Larger Work is a combination of Covered -Software with a work governed by one or more Secondary Licenses, and the -Covered Software is not Incompatible With Secondary Licenses, this -License permits You to additionally distribute such Covered Software -under the terms of such Secondary License(s), so that the recipient of -the Larger Work may, at their option, further distribute the Covered -Software under the terms of either this License or such Secondary -License(s). - -3.4. Notices - -You may not remove or alter the substance of any license notices -(including copyright notices, patent notices, disclaimers of warranty, -or limitations of liability) contained within the Source Code Form of -the Covered Software, except that You may alter any license notices to -the extent required to remedy known factual inaccuracies. - -3.5. Application of Additional Terms - -You may choose to offer, and to charge a fee for, warranty, support, -indemnity or liability obligations to one or more recipients of Covered -Software. However, You may do so only on Your own behalf, and not on -behalf of any Contributor. You must make it absolutely clear that any -such warranty, support, indemnity, or liability obligation is offered by -You alone, and You hereby agree to indemnify every Contributor for any -liability incurred by such Contributor as a result of warranty, support, -indemnity or liability terms You offer. You may include additional -disclaimers of warranty and limitations of liability specific to any -jurisdiction. - -4. Inability to Comply Due to Statute or Regulation ---------------------------------------------------- - -If it is impossible for You to comply with any of the terms of this -License with respect to some or all of the Covered Software due to -statute, judicial order, or regulation then You must: (a) comply with -the terms of this License to the maximum extent possible; and (b) -describe the limitations and the code they affect. Such description must -be placed in a text file included with all distributions of the Covered -Software under this License. Except to the extent prohibited by statute -or regulation, such description must be sufficiently detailed for a -recipient of ordinary skill to be able to understand it. - -5. Termination --------------- - -5.1. The rights granted under this License will terminate automatically -if You fail to comply with any of its terms. However, if You become -compliant, then the rights granted under this License from a particular -Contributor are reinstated (a) provisionally, unless and until such -Contributor explicitly and finally terminates Your grants, and (b) on an -ongoing basis, if such Contributor fails to notify You of the -non-compliance by some reasonable means prior to 60 days after You have -come back into compliance. Moreover, Your grants from a particular -Contributor are reinstated on an ongoing basis if such Contributor -notifies You of the non-compliance by some reasonable means, this is the -first time You have received notice of non-compliance with this License -from such Contributor, and You become compliant prior to 30 days after -Your receipt of the notice. - -5.2. If You initiate litigation against any entity by asserting a patent -infringement claim (excluding declaratory judgment actions, -counter-claims, and cross-claims) alleging that a Contributor Version -directly or indirectly infringes any patent, then the rights granted to -You by any and all Contributors for the Covered Software under Section -2.1 of this License shall terminate. - -5.3. In the event of termination under Sections 5.1 or 5.2 above, all -end user license agreements (excluding distributors and resellers) which -have been validly granted by You or Your distributors under this License -prior to termination shall survive termination. - -************************************************************************ -* * -* 6. Disclaimer of Warranty * -* ------------------------- * -* * -* Covered Software is provided under this License on an "as is" * -* basis, without warranty of any kind, either expressed, implied, or * -* statutory, including, without limitation, warranties that the * -* Covered Software is free of defects, merchantable, fit for a * -* particular purpose or non-infringing. The entire risk as to the * -* quality and performance of the Covered Software is with You. * -* Should any Covered Software prove defective in any respect, You * -* (not any Contributor) assume the cost of any necessary servicing, * -* repair, or correction. This disclaimer of warranty constitutes an * -* essential part of this License. No use of any Covered Software is * -* authorized under this License except under this disclaimer. * -* * -************************************************************************ - -************************************************************************ -* * -* 7. Limitation of Liability * -* -------------------------- * -* * -* Under no circumstances and under no legal theory, whether tort * -* (including negligence), contract, or otherwise, shall any * -* Contributor, or anyone who distributes Covered Software as * -* permitted above, be liable to You for any direct, indirect, * -* special, incidental, or consequential damages of any character * -* including, without limitation, damages for lost profits, loss of * -* goodwill, work stoppage, computer failure or malfunction, or any * -* and all other commercial damages or losses, even if such party * -* shall have been informed of the possibility of such damages. This * -* limitation of liability shall not apply to liability for death or * -* personal injury resulting from such party's negligence to the * -* extent applicable law prohibits such limitation. Some * -* jurisdictions do not allow the exclusion or limitation of * -* incidental or consequential damages, so this exclusion and * -* limitation may not apply to You. * -* * -************************************************************************ - -8. Litigation -------------- - -Any litigation relating to this License may be brought only in the -courts of a jurisdiction where the defendant maintains its principal -place of business and such litigation shall be governed by laws of that -jurisdiction, without reference to its conflict-of-law provisions. -Nothing in this Section shall prevent a party's ability to bring -cross-claims or counter-claims. - -9. Miscellaneous ----------------- - -This License represents the complete agreement concerning the subject -matter hereof. If any provision of this License is held to be -unenforceable, such provision shall be reformed only to the extent -necessary to make it enforceable. Any law or regulation which provides -that the language of a contract shall be construed against the drafter -shall not be used to construe this License against a Contributor. - -10. Versions of the License ---------------------------- - -10.1. New Versions - -Mozilla Foundation is the license steward. Except as provided in Section -10.3, no one other than the license steward has the right to modify or -publish new versions of this License. Each version will be given a -distinguishing version number. - -10.2. Effect of New Versions - -You may distribute the Covered Software under the terms of the version -of the License under which You originally received the Covered Software, -or under the terms of any subsequent version published by the license -steward. - -10.3. Modified Versions - -If you create software not governed by this License, and you want to -create a new license for such software, you may create and use a -modified version of this License if you rename the license and remove -any references to the name of the license steward (except to note that -such modified license differs from this License). - -10.4. Distributing Source Code Form that is Incompatible With Secondary -Licenses - -If You choose to distribute Source Code Form that is Incompatible With -Secondary Licenses under the terms of this version of the License, the -notice described in Exhibit B of this License must be attached. - -Exhibit A - Source Code Form License Notice -------------------------------------------- - - This Source Code Form is subject to the terms of the Mozilla Public - License, v. 2.0. If a copy of the MPL was not distributed with this - file, You can obtain one at http://mozilla.org/MPL/2.0/. - -If it is not possible or desirable to put the notice in a particular -file, then You may include the notice in a location (such as a LICENSE -file in a relevant directory) where a recipient would be likely to look -for such a notice. - -You may add additional accurate notices of copyright ownership. - -Exhibit B - "Incompatible With Secondary Licenses" Notice ---------------------------------------------------------- - - This Source Code Form is "Incompatible With Secondary Licenses", as - defined by the Mozilla Public License, v. 2.0. ->>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> diff --git a/NOTICE.txt b/NOTICE.txt deleted file mode 100644 index e88972d09..000000000 --- a/NOTICE.txt +++ /dev/null @@ -1,85 +0,0 @@ - ========================================================================= - == NOTICE file corresponding to section 4(d) of the Apache License, == - == Version 2.0, in this case for the Apache Xalan Java distribution. == - ========================================================================= - - Apache Xalan (Xalan XSLT processor) - Copyright 1999-2023 The Apache Software Foundation - - Apache Xalan (Xalan serializer) - Copyright 1999-2012 The Apache Software Foundation - - This product includes software developed at - 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 - - ========================================================================= - The binary distribution package (ie. jars, samples and documentation) of - this product includes software developed by the following: - - - The Apache Software Foundation - - Xerces Java - see LICENSE.txt - - JAXP 1.3 APIs - see LICENSE.txt - - Bytecode Engineering Library - see LICENSE.txt - - Regular Expression - see LICENSE.txt - - - Scott Hudson, Frank Flannery, C. Scott Ananian - - CUP Parser Generator runtime (javacup\runtime) - see LICENSE.txt - - ========================================================================= - The source distribution package (ie. all source and tools required to build - Xalan Java) of this product includes software developed by the following: - - - The Apache Software Foundation - - Xerces Java - see LICENSE.txt - - JAXP 1.3 APIs - see LICENSE.txt - - Bytecode Engineering Library - see LICENSE.txt - - Regular Expression - see LICENSE.txt - - Ant - see LICENSE.txt - - Stylebook doc tool - see LICENSE.txt - - Beans Scripting Framework (BSF) - see LICENSE.txt - - Commons Logging - see LICENSE.txt - - - Elliot Joel Berk and C. Scott Ananian - - Lexical Analyzer Generator (JLex) - see LICENSE.txt - - - Mozilla Foundation - - Rhino: JavaScript implementation in Java - see LICENSE.txt - - ========================================================================= - Apache Xerces Java - Copyright 1999-2022 The Apache Software Foundation - - This product includes software developed at - 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 - - voluntary contributions made by Paul Eng on behalf of the - Apache Software Foundation that were originally developed at iClick, Inc., - 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 - - This product includes software developed at - 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 - diff --git a/README b/README deleted file mode 100644 index 663a47484..000000000 --- a/README +++ /dev/null @@ -1,209 +0,0 @@ - -Apache Xalan-Java Build, Test, and Release Notes -Copyright 1999-2026 The Apache Software Foundation - -Authors: - Gary Gregory - Joe Kesselman - Mukul Gandhi - -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. - - -(1) Steps to build the XalanJ release - -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 - -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. - - -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 - - export ANT_HOME=/usr/share/ant - export JAVA_HOME=$(readlink -f /etc/alternatives/java_sdk_1.8.0) - -On Windows, you will probably need to set these more explicitly, and add them to your PATH: - - 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% - - -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: - - On Linux, run ./mvnbuild.sh - On Windows, run ./mvnbuild.bat - -This will build: - ./target/site/apidocs: Javadoc for the Xalan code base - - ./target/site/design: Architecture documentation for Xalan - (probably outdated) - - ./target/site/xsltc: Architecture documentation for the Xalan bytecode - compilation operations (probably outdated) - - ./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). - - ./lib: Xalan dependencies that xalan-test relies on our - having fetched, copied to where xalan-test can reach them easily. - -(2) Steps to run the XalanJ tests, assuming you have already build -xalan-java as discussed above: - -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. - -BUT: For XalanJ source distribution users, the xalan-test folder was -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. - -2.2) Ensure the JAVA_HOME, ANT_HOME, and (on Windows) PATH environment -variables have been set as discussed above. - -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: - - 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! - - -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! - - -2.4.3) Run the ant target "conf.xsltc", using the following command - - Linux: ./build.sh conf.xsltc - Windows: build conf.xsltc - -At the end of the test run, conf.xsltc should report: - -[echo] [minitest] CONGRATULATIONS! The conf.xsltc tests passed! - -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. - -We use JProfiler (https://www.ej-technologies.com/jprofiler) tool for Java software run-time -analysis and optimization of Xalan-J software. \ No newline at end of file diff --git a/SECURITY.md b/SECURITY.md deleted file mode 100644 index cdf53d2f2..000000000 --- a/SECURITY.md +++ /dev/null @@ -1,23 +0,0 @@ - - -# Reporting a vulnerability - -If you believe you found a vulnerability in Apache XalanJ, -please contact [the Apache Security Team](https://www.apache.org/security/). diff --git a/Xalan2.7.0-REL_PLAN.html b/Xalan2.7.0-REL_PLAN.html deleted file mode 100644 index 9b932aed2..000000000 --- a/Xalan2.7.0-REL_PLAN.html +++ /dev/null @@ -1,180 +0,0 @@ - -Xerces 2.7.0 plan - - - - - -

Xalan 2.7.0 Plan

-

Features: -

    -
  • JAXP 1.3 support
  • -
  • XML 1.1 support for stylesheets that are XML 1.1 documents
  • -
  • XML 1.1 support for XML documents being transformed
  • -
  • Serializer API to set the end of line sequence.
  • -
  • Other misc. features and improvements (time permitting)
  • -
- -

-Target DCUT (code complete) date: July 28th, 2005 -

-

-Target release date: Aug 4th, 2005 -

- -

Development line items

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Line item Volunteer Sizing Timeframe Status
JAXP 1.3 support
DOMResult nextSibling support (XALANJ-2122)Morris Kwan.May 19, 2005 to May 20, 2005Review needed
messages (XALANJ-2123)Morris Kwan.May 19, 2005 to May 31, 2005Review needed
Documentation update (XALANJ-2124)Morris Kwan.May 19, 2005 to June 15, 2005Review needed
XPath API samples (XALANJ-2125)Morris Kwan.May 19, 2005 to May 24, 2005Review needed
XPathFunctionResolver sample (XALANJ-2126)Morris Kwan.May 19, 2005 to May 30, 2005Review needed
ErrorListener behavior (XALANJ-2134)Morris Kwan.May 19, 2005 to June 3, 2005Review needed
new API testcases (XALANJ-2135)Morris Kwan.June 2, 2005 to June 6, 2005Review needed
new secure feature (XALANJ-2136)Morris Kwan.June 2, 2005 to June 8, 2005Review needed
TransformerFactory.setFeature(String, boolean) security supportMorris Kwan...
Proper JDK/JRE build-time and run-time dendanciesMorris Kwan...
XML 1.1 support
XML 1.1 stylesheetsYash Talwar..Complete
XML 1.1 transform input docsYash Talwar..Complete
Serializer API to set the end of line sequence
APIBrian Minchau1 pdMay 30, 2005Complete
DCUT July 28th, 2005
Review and fix severe defects reported in Bugzilla/Jira All1 pwWeek of July 28th, 2005 - Aug 4, 2005 .
Build and publish Xalan 2.7.0 Aug 4th, 2005
-

Candidate features and cleanup items (if time permits)

-
    -
  • ... -
  • ...
  • -
- - diff --git a/ancient_history.commits.xml b/ancient_history.commits.xml deleted file mode 100644 index 918911603..000000000 --- a/ancient_history.commits.xml +++ /dev/null @@ -1,2516 +0,0 @@ - - - - - -zongaro@apache.org -2004/02/27 - xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java NodeSortRecordFactory.java SortSettings.java - -Restored old constructor of NodeSortRecordFactory and _collator field of -NodeSortRecord for binary compatibility. These changes allow translets -compiled with an earlier version of XSLTC to continue to run with the new -version. They should not be used in newly compiled translets or in new code -in XSLTC itself.
- -Also introduced a SortSettings class that is used to bundle sort settings from -NodeSortRecordFactory into instances of NodeSortRecord. That reduces some of -the space overhead in constructing a NodeSortRecord.
- -Reviewed by Igor Hersht (igorh@ca.ibm.com) -
-
- -zongaro@apache.org -2004/02/27 - xml-xalan/java/src/org/apache/xalan/xsltc/dom ForwardPositionIterator.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java - -Revived ForwardPositionIterator class and BasisLibrary.positionF purely to -support backwards compatibility with translets compiled with earlier versions -of XSLTC. New code should not reference either.
- -Reviewed by Christine Li (jycli@ca.ibm.com). -
-
- - -minchau@apache.org -2004/03/04 - xml-xalan/java/src/org/apache/xalan/processor ProcessorImport.java ProcessorInclude.java ProcessorLRE.java -ProcessorStylesheetElement.java StylesheetHandler.java XSLTElementDef.java xml-xalan/java/src/org/apache/xalan/templates -ElemExsltFunction.java - -Submitted by: Brian Minchau
- -Modified code for potential extension of classes with callbacks to the extensions. -
-
- -bhakti@apache.org -2004/03/08 - xml-xalan/java/src/org/apache/xml/serializer Encodings.properties - -Added a newline at the end of Encodings.properties to fix bug 27516 - - - -igorh@apache.org -2004/03/09 - xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeCounter.java - -xsl:number, minor code cleaning and optimization - - - -bhakti@apache.org -2004/03/10 - xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java - -Check if the systemId for the stylesheet is null to avoid getting an NPE. - - - -jycli@apache.org -2004/03/11 - xml-xalan/java/src/org/apache/xalan/extensions ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib/sql ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xslt -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/cmdline ObjectFactory.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/dom ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax ObjectFactory.java xml-xalan/java/src/org/apache/xml/dtm -ObjectFactory.java xml-xalan/java/src/org/apache/xml/dtm/ref ObjectFactory.java xml-xalan/java/src/org/apache/xml/serializer -ObjectFactory.java xml-xalan/java/src/org/apache/xml/utils ObjectFactory.java xml-xalan/java/src/org/apache/xpath/compiler -ObjectFactory.java xml-xalan/java/src/org/apache/xpath/functions ObjectFactory.java - -Fix a bug in the findProviderClass method of ObjectFactory -classes. The argument of SecurityManager.checkPackageAccess should be a string -value of a package name, instead of a class name - - - -santiagopg@apache.org -2004/03/16 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java - -Reverting latest patch by Arun. There are some problems with the new code to invoke functions dynamically (e.g. docbook -reports a compile-time type check error). The approach taken to determine when to invoke methods dynamically needs to be revisted. - - - -santiagopg@apache.org -2004/03/23 - xml-xalan/java/src/org/apache/xpath/compiler Compiler.java FunctionTable.java - -Patch to hide static function table in FunctionTable class. We do not want to expose this table to others. - - - -santiagopg@apache.org -2004/03/23 - xml-xalan/java/src/org/apache/xml/utils DOMBuilder.java - -The xmlns URI should also be used to add NS decls as attributes to a DOM. However, this was only done for attributes that started -with 'xmlns:' and not for 'xmlns' (i.e. not for decls of the default NS). - - - -mkwan@apache.org -2004/03/24 - xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java - -Patch for bug 27417.
- -If an output stream is created by the XSLTC transformer, close -it after the transformation. -
-
- -zongaro@apache.org -2004/04/10 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyImports.java - -Applying patch for bugs 27932 and 15333.
- -Code was incorrectly calculating the set of templates to which an -xsl:apply-imports instruction applies. It should consider all templates that -the current template rule could override, which means that if the template -appeared in a stylesheet that was included in another stylesheet, any templates -imported into the including stylesheet have to be considered as well. The -method Stylesheet.getMinimumDescendantPrecedence is responsible for this -calculation.
- -In addition, when code is generated for an xsl:apply-imports, if any template -has local parameters, an empty stack frame has to be pushed before attempting -to apply-imports. Otherwise, parameters from the template that contains the -apply-imports instruction will be passed into the matching template.
- -Reviewed by Joanne Tong (joannet@ca.ibm.com) -
-
- -zongaro@apache.org -2004/04/10 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Stylesheet.java - -Applying patch for bug 27932.
- -Code was incorrectly calculating the set of templates to which an -xsl:apply-imports instruction applies. It should consider all templates that -the current template rule could override, which means that if the template -appeared in a stylesheet that was included in another stylesheet, any templates -imported into the including stylesheet have to be considered as well. The -method Stylesheet.getMinimumDescendantPrecedence is responsible for this -calculation.
- -Reviewed by Joanne Tong (joannet@ca.ibm.com) -
-
- -igorh@apache.org -2004/04/26 - xml-xalan/java/src/org/apache/xpath XPathContext.java xml-xalan/java/src/org/apache/xpath/objects -DTMXRTreeFrag.java XRTreeFrag.java - -The problem is that about 1800 * Thread_num XRTreeFrag objects were created. -It took too long for finalizer to be executed to release the references.
- -A lot of the objects have the same DTMs (and one XPathContext per thread). -In my fix I am suggesting -a. to have new class DTMXRTreeFrag. The object of the class would -be created only for different DTMs (just 5 objects). -b. release the references to DTM and XPathContext from XPathContext.reset() -(and remove finalize() ). -
-
- -minchau@apache.org -2004/04/27 - xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java xml-xalan/java/src/org/apache/xml/utils Trie.java - -PR: bugzilla 28435
-Submitted by: Brian Minchau
-Reviewed by: Henry Zongaro
-
-
- -igorh@apache.org -2004/04/28 - xml-xalan/java/src/org/apache/xalan/templates AVT.java - -Scaling Problem in org/apache/xalan/templates/AVT.evaluate -The problem is that synchronized calls -StringBufferPool.get() and StringBufferPool.free(buf) -are redundant if (null != m_simpleString). -The bug results in severe performance derogation in multi-thread test. - -The fix is simple just not to the calls when (null != m_simpleString). - - - -mcnamara@apache.org -2004/05/03 - xml-xalan/java/xdocs/style/stylesheets designdoc2html.xsl - -Provide alternative text for images to address accessibility issues. -All images should contain a short alternative text description that represents -the function of the graphic. - - - -mcnamara@apache.org -2004/05/03 - xml-xalan/java/xdocs xml-site-style.tar.gz - -Update document2html.xsl within this tarball to provide alternative text for images to address accessibility issues. -All images should contain a short alternative text description that represents the function of the graphic. - - - -minchau@apache.org -2004/05/03 - xml-xalan/java/samples/SAX2SAX SAX2SAX.java xml-xalan/java/samples/Pipe Pipe.java xml-xalan/java/samples/DOM2DOM DOM2DOM.java -xml-xalan/java/samples/UseStylesheetPI foo.xsl xml-xalan/java/samples/UseStylesheetParam foo.xsl -xml-xalan/java/samples/UseXMLFilters UseXMLFilters.java -xml-xalan/java/samples/Trace foo.xsl - -Clean up related to bugzilla 24304. -There is no longer a space after the XML header. To keep the output -of this sample the same as before properties were set on the -serializer (indent="yes" and standalone="no" ). -Submitted by: Brian Minchau -Reviewed by: Sarah McNamara - - - -igorh@apache.org -2004/05/06 - xml-xalan/java/src/org/apache/xalan/templates AVT.java - -The problem is that we use an object pool (shared between different threads) -to allocate FastStringBuffer objects. The problem results in a serious performance -degradation on Z/OS and seems to be invisible on AIX.
-1 Differences in optimization of object pools for different JVMs and for different -platforms are known(I know it now too). It is not surprising that Z/OS and AIX -have different results.
-2. a. Object pools should be used only for very heavy object which live for a long time -and could be reused in a lot of places. -b. Small local objects which size cannot be changed could be allocated on the -stack => creating them with new in the local scope could be a good idea. -c. Caching middle size objects which can grow in size seems as a good idea, -because such objects usually cannot be allocated on the stack.
-This is actually the case for FastStringBuffer objects.
-Solution
-I am creating FastStringBuffer objects in a local scope. I am going -to use caching whenever possible. -
-
- -minchau@apache.org -2004/05/13 - xml-xalan/java/src/org/apache/xalan/client XSLTProcessorApplet.java - -Submitted by: Brian Minchau
-Reviewed by: Christine Li
-Fixing binary compatibility (serialization/de-serialization) of XSLTProcessorApplet. -
-
- -bhakti@apache.org -2004/05/13 - xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java - -In xsltc currently with the extension redirect the output file is created only if the parent dir exists. -Making the behaviour similar to that of xalan wherein the parent directory is also created. - - - -santiagopg@apache.org -2004/05/20 - xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java - -Fix for Bugzilla 29120. The translet now stores a reference to the DocumentBuilderFactory which is used by -nodeList2Iterator() in the basis library. Note that to reuse that reference you need to use the same transformer -(not just the same template). - - - -santiagopg@apache.org -2004/05/21 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler AttributeValueTemplate.java - -Implemented a new parser for ATVs. The old was buggy: did not handle escaped curly braces in all cases and did -not handled quotes at all. The old parser assumed that braces came in pairs, but it is possible to have an odd -number as in "{{{$foo}}}". The new parser seems to handle all cases correctly. - - - -santiagopg@apache.org -2004/05/21 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler LiteralAttribute.java LiteralElement.java Parser.java -SyntaxTreeNode.java - -Modified code to ensure line number information is propagated from parent to children to ensure we get informative -error messages. This was particularly bad for errors in ATVs. - - - -santiagopg@apache.org -2004/05/25 - xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java - -Improved patch for Bugzilla 29120 based on Matthias' suggestion. A DOMImplementation is now cached for even better performance. - - - -jycli@apache.org -2004/05/26 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Mode.java Stylesheet.java - -If the local is set to Turkish, but the codepage is MS-DOS (US) 437. The BCEL -InstructionFinder.search(String) method can not find any instructions contain -letter I. In Turkish, there are 2 lower case i. Since the search() method is case -insensitive, change the pattern string to use lower case. - - - -minchau@apache.org -2004/06/01 - xml-xalan/java/src/org/apache/xml/serializer ToStream.java - -PR: bugzilla 29234
-Submitted by: Brian Minchau
-Reviewed by: Morris Kwan
-This problem only showed up under XSLTC. When setting the -encoding a related field was not set. Fixed this by over-riding the -set method for the stream serializers. -
-
- -minchau@apache.org -2004/06/07 - xml-xalan/java/src/org/apache/xml/serializer WriterToUTF8Buffered.java - -PR: bugzilla 29372
-Submitted by: J Desrochers (john@ASCnet.COM)
-Reviewed by: Brian Minchau
- -A safe fix for chunking up an array for output. The length was multiplied by the -chunk number (0,1,2... chunks) then divided by "chunks". John's fix uses a -"long" to do the arithemetic because multiplying by the chunk number first -could cause an overflow. -
-
- -santiagopg@apache.org -2004/06/10 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler LiteralElement.java - -Patch for Bugzilla 29411. New algorithm shoudl optimize the way NS decls are reported for nested literal -elements. Note that the algorithm will not work accross non-literal elements. E.g., if there is an -xsl:element between two literal elements, the inner literal element may report unnecessary NS delcs. -This is just a simple way to ensure that any NS decls defined by the xsl:element instruction are re-defined -in the inner literal (see namespace39 in the conf tests). - - - -santiagopg@apache.org -2004/06/11 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Mode.java - -Fixed a problem with peephole optimization patterns. I don't know if something changed in BCEL since the -code was written, but the pattern syntax was not correct. I've also added a new common peephole pattern -which should reduce then inner loop's length in some Translets. - - - -zongaro@apache.org -2004/06/17 - xml-xalan/java/src/org/apache/xpath/axes ChildIterator.java - -Fix for Bugzilla bug 28879. Classes derived from NodeTest need to ensure -that initNodeTest is called to set the filter for the kinds of nodes accepted. -Without this change, ChildIterator will reject all nodes.
- -Patch reviewed by Christine Li (jycli@ca.ibm.com). -
-
- -igorh@apache.org -2004/06/21 - xml-xalan/java/src/org/apache/xalan/xsltc/dom KeyIndex.java xml-xalan/java/src/org/apache/xalan/xsltc/util -IntegerArray.java - -Fix for Bugzilla Bugs 28622. - - - -santiagopg@apache.org -2004/06/24 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler CastExpr.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ObjectType.java StringType.java Type.java - -Patch for Bugzilla 27539 and related problems. The main problem was that hashCode() was not implemented -correctly in ObjectType. To eleminate further problems I also removed Type.ObjectString as this type is the -same as Type.String and the latter can be used in place of the former. - - - -aruny@apache.org -2004/07/15 - xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerHandlerImpl.java TransformerImpl.java - -Description: getNode should return the result DOM tree once TransformerHandler completes the transformation. - - - -aruny@apache.org -2004/07/15 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime -AbstractTranslet.java - -Description: Patch for the support of extension attribute "intent-amount" for xsl:output. Supports the old URI -{http://xml.apache.org/xslt} and new URI{http://xml.apache.org/xalan}. - - - -aruny@apache.org -2004/07/15 - xml-xalan/java/src/org/apache/xalan/xsltc/trax SAX2DOM.java - -Description: Patch for concatenating adjacent text nodes. - - - -aruny@apache.org -2004/07/15 - xml-xalan/java/src/org/apache/xml/serializer ToStream.java - -Description: Improper Serialization of document type declaration in xml document. - - - -mkwan@apache.org -2004/07/21 - xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java - -Patch for bug 30056. Recover the performance degradation for xsl:copy and xsl:copy-of.
-Reviewed by Henry Zongaro (zongaro@ca.ibm.com). -
-
- -minchau@apache.org -2004/07/21 - xml-xalan/java/src/org/apache/xml/serializer SerializerBase.java ToTextStream.java - -PR: bugzilla 29706
-Submitted by: Brian Minchau
-Reviewed by: Christine Li
- -A fix to add a temporary vs. permanent output state to the serializer -(AKA result-tree-handler). In theory the XSLT processor should set the -temporary or permanent output state, but we observer that when the -encoding of a ToTextStream serializer is null, then such a serializer is -in temporary output state.
- -In temorary output state we don't do any escaping or encoding or other -sorts of normalization on output. This will be done by another serializer -later on, and that one will be in permanent output state. -
-
- -minchau@apache.org -2004/07/21 - xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java - -PR: bugzilla 30142
-Submitted by: Bruno Dumon (bruno@outerthought.org)
-Reviewed by: Brian Minchau
- -Thanks to Bruno for this simple one-line, fix where we forgot to put -a space between the PUBLIC and SYSTEM ID's in a DOCTYPE declaration -in serialized HTML output. -
-
- -minchau@apache.org -2004/07/22 - xml-xalan/java/src/org/apache/xml/serializer ToStream.java - -Submitted by: Brian Minchau
-Reviewed by: Henry Zongaro
-Backing out the last code change by Arun because it breaks the smoketest. -The code I am backing out is definately wrong. The old code appears -to be correct to both myself and Henry Zongaro.
- -Waiting for a testcase to see what is wrong with the serialization code -and DOCTYPE. Future changes may be made. -
-
- -minchau@apache.org -2004/07/22 - xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java - -Submitted by: Yash Talwar
-Reviewed by: Brian Minchau
-Fix for bugzilla 28796. -
-
- -minchau@apache.org -2004/07/22 - xml-xalan/java/src/org/apache/xpath/objects XString.java - -Submitted by: Yash Talwar
-Reviewed by: Brian Minchau
-Fix for bugzilla 29655. -
-
- -minchau@apache.org -2004/08/13 - xml-xalan/java/src/org/apache/xalan/lib Redirect.java - -PR: 30658
-Submitted by: Brian Minchau
-Reviewed by: Morris Kwan -
-
- -minchau@apache.org -2004/08/13 - xml-xalan/java/src/org/apache/xalan/trace TraceManager.java - -PR: 30301
-Submitted by: Brian Minchau
-Reviewed by: Morris Kwan -
-
- -minchau@apache.org -2004/08/13 - xml-xalan/java/src/org/apache/xpath/objects XRTreeFragSelectWrapper.java xml-xalan/java/src/org/apache/xpath/res -XPATHErrorResources.java - -PR: 30262
-Submitted by: Yash Talwar
-Reviewed by: Henry Zongaro -
-
- -mcnamara@apache.org -2004/08/17 - xml-xalan/java/src/org/apache/xml/dtm DTMException.java xml-xalan/java/src/org/apache/xpath XPathException.java - -Fix for printStackTrace when using JDK 1.4. - - - -mcnamara@apache.org -2004/08/17 - xml-xalan/java/src/org/apache/xalan/extensions ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib/sql ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xslt -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/cmdline ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/dom -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -ObjectFactory.java xml-xalan/java/src/org/apache/xml/dtm ObjectFactory.java xml-xalan/java/src/org/apache/xml/dtm/ref ObjectFactory.java -xml-xalan/java/src/org/apache/xml/serializer ObjectFactory.java xml-xalan/java/src/org/apache/xml/utils ObjectFactory.java -xml-xalan/java/src/org/apache/xpath/compiler ObjectFactory.java xml-xalan/java/src/org/apache/xpath/functions ObjectFactory.java - -Fixing a potential memory leak. The reader used to read the service provider is never closed if an IOException is thrown while -reading from it. Adding a finally block so that the reader will always be closed. Patch reviewed by Christine Li. - - - -jycli@apache.org -2004/08/17 - xml-xalan/java/src/org/apache/xalan/extensions ObjectFactory.java - -Added serialVersionUID for classes which implement Serializable interface - - - -jycli@apache.org -2004/08/17 - xml-xalan/java/src/org/apache/xalan/lib ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib/sql ObjectFactory.java - -Added serialVersionUID for classes which implement Serializable interface. Was reviewed by Henry Zongaro (zongaro@ca.ibm.com) - - - -jycli@apache.org -2004/08/17 - xml-xalan/java/src/org/apache/xalan/processor ProcessorAttributeSet.java ProcessorCharacters.java ProcessorDecimalFormat.java -ProcessorExsltFuncResult.java ProcessorExsltFunction.java ProcessorGlobalParamDecl.java ProcessorGlobalVariableDecl.java -ProcessorImport.java ProcessorInclude.java ProcessorKey.java ProcessorLRE.java ProcessorNamespaceAlias.java ProcessorOutputElem.java -ProcessorPreserveSpace.java ProcessorStripSpace.java ProcessorStylesheetDoc.java ProcessorStylesheetElement.java ProcessorTemplate.java -ProcessorTemplateElem.java ProcessorText.java ProcessorUnknown.java WhitespaceInfoPaths.java XSLTElementProcessor.java - -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com) - - - -jycli@apache.org -2004/08/17 - xml-xalan/java/src/org/apache/xalan/templates AVT.java AVTPart.java AVTPartSimple.java AVTPartXPath.java -DecimalFormatProperties.java ElemApplyImport.java ElemApplyTemplates.java ElemAttribute.java ElemAttributeSet.java -ElemCallTemplate.java ElemChoose.java ElemComment.java ElemCopy.java ElemCopyOf.java ElemElement.java ElemEmpty.java -ElemExsltFuncResult.java ElemExsltFunction.java ElemExtensionCall.java ElemExtensionDecl.java ElemExtensionScript.java -ElemFallback.java ElemForEach.java ElemIf.java ElemLiteralResult.java ElemMessage.java ElemNumber.java ElemOtherwise.java -ElemParam.java ElemPI.java ElemSort.java ElemTemplate.java ElemTemplateElement.java ElemText.java ElemTextLiteral.java -ElemUnknown.java ElemUse.java ElemValueOf.java ElemVariable.java ElemVariablePsuedo.java ElemWhen.java ElemWithParam.java -FuncDocument.java FuncFormatNumb.java FuncKey.java KeyDeclaration.java NamespaceAlias.java OutputProperties.java Stylesheet.java -StylesheetComposed.java StylesheetRoot.java TemplateList.java TemplateSubPatternAssociation.java WhiteSpaceInfo.java -XMLNSDecl.java XUnresolvedVariable.java XUnresolvedVariableSimple.java xml-xalan/java/src/org/apache/xalan/transformer -CountersTable.java KeyIterator.java KeyRefIterator.java xml-xalan/java/src/org/apache/xalan/xslt ObjectFactory.java - -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com) - - - -jycli@apache.org -2004/08/17 - xml-xalan/java/src/org/apache/xalan/xsltc TransletException.java xml-xalan/java/src/org/apache/xalan/xsltc/cmdline -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/getopt GetOptsException.java IllegalArgumentException.java -MissingOptArgException.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler CompilerException.java IllegalCharException.java -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util MultiHashtable.java ObjectFactory.java StringStack.java -TypeCheckError.java xml-xalan/java/src/org/apache/xalan/xsltc/dom BitArray.java ObjectFactory.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -ObjectFactory.java TemplatesImpl.java - -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com) - - - -jycli@apache.org -2004/08/17 - xml-xalan/java/src/org/apache/xml/dtm DTMConfigurationException.java DTMDOMException.java ObjectFactory.java -xml-xalan/java/src/org/apache/xml/dtm/ref DTMNamedNodeMap.java IncrementalSAXSource_Filter.java ObjectFactory.java -xml-xalan/java/src/org/apache/xml/serializer ObjectFactory.java xml-xalan/java/src/org/apache/xml/utils MutableAttrListImpl.java -NameSpace.java NodeVector.java ObjectFactory.java ObjectPool.java QName.java SAXSourceLocator.java SerializableLocatorImpl.java -StopParseException.java StringVector.java URI.java WrappedRuntimeException.java WrongParserException.java - -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com) - - - -jycli@apache.org -2004/08/17 - xml-xalan/java/src/org/apache/xpath Expression.java FoundIndex.java NodeSetDTM.java XPath.java -XPathProcessorException.java xml-xalan/java/src/org/apache/xpath/axes AttributeIterator.java AxesWalker.java -BasicTestIterator.java ChildIterator.java ChildTestIterator.java DescendantIterator.java FilterExprIterator.java -FilterExprIteratorSimple.java FilterExprWalker.java IteratorPool.java LocPathIterator.java MatchPatternIterator.java -NodeSequence.java OneStepIterator.java OneStepIteratorForward.java PredicatedNodeTest.java ReverseAxesWalker.java -RTFIterator.java SelfIteratorNoPredicate.java UnionChildIterator.java UnionPathIterator.java WalkingIterator.java -WalkingIteratorSorted.java xml-xalan/java/src/org/apache/xpath/compiler ObjectFactory.java -xml-xalan/java/src/org/apache/xpath/functions FuncBoolean.java FuncCeiling.java FuncConcat.java FuncContains.java -FuncCount.java FuncCurrent.java FuncDoclocation.java FuncExtElementAvailable.java FuncExtFunction.java -FuncExtFunctionAvailable.java FuncFalse.java FuncFloor.java FuncGenerateId.java FuncId.java FuncLang.java -FuncLast.java FuncLocalPart.java FuncNamespace.java FuncNormalizeSpace.java FuncNot.java FuncNumber.java -FuncPosition.java FuncQname.java FuncRound.java FuncStartsWith.java FuncString.java FuncStringLength.java -FuncSubstring.java FuncSubstringAfter.java FuncSubstringBefore.java FuncSum.java FuncSystemProperty.java -Function.java Function2Args.java Function3Args.java FunctionDef1Arg.java FunctionMultiArgs.java FunctionOneArg.java -FuncTranslate.java FuncTrue.java FuncUnparsedEntityURI.java ObjectFactory.java WrongNumberArgsException.java -xml-xalan/java/src/org/apache/xpath/objects XBoolean.java XBooleanStatic.java XNodeSet.java XNodeSetForDOM.java -XNull.java XNumber.java XObject.java XRTreeFrag.java XRTreeFragSelectWrapper.java XString.java XStringForChars.java -XStringForFSB.java xml-xalan/java/src/org/apache/xpath/operations And.java Bool.java Div.java Equals.java Gt.java -Gte.java Lt.java Lte.java Minus.java Mod.java Mult.java Neg.java NotEquals.java Number.java Operation.java Or.java -Plus.java Quo.java String.java UnaryOperation.java Variable.java VariableSafeAbsRef.java -xml-xalan/java/src/org/apache/xpath/patterns ContextMatchStepPattern.java FunctionPattern.java NodeTest.java -StepPattern.java UnionPattern.java - -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com) - - - -minchau@apache.org -2004/08/26 - xml-xalan/java/src/org/apache/xml/utils Trie.java - -Submitted by: Brian Minchau
-No external changes to Trie, but some additional APIs to make for a lower case -only search in a Trie (possibly for future XHTML support where the element -names are lower-case only). -
-
- -minchau@apache.org -2004/08/27 - xml-xalan/java/src/org/apache/xml/serializer CharInfo.java ToHTMLStream.java ToStream.java - -Minor changes to CharInfo to map charaters to decorated entities (e.g. "&lt;" ) -rather than just entity names (e.g. "lt"), which is a minor performance improvement. - - - -mkwan@apache.org -2004/08/30 - xml-xalan/java/src/org/apache/xml/utils XMLReaderManager.java - -Fix a memory leak problem described in bugzilla 28082. - - - -minchau@apache.org -2004/09/01 - xml-xalan/java/src/org/apache/xml/serializer SerializerTraceWriter.java ToStream.java -WriterChain.java WriterToASCI.java WriterToUTF8Buffered.java - -Submitted by: Brian Minchau
-Code clean up, to have an explicit interface, WriterChain, for writers that wrap other Writers or OutputStreams, -e.g. WriterToUTF8Buffered. -
-
- -minchau@apache.org -2004/09/01 - xml-xalan/java/src/org/apache/xml/serializer ToXMLStream.java - -Submitted by: Brian Minchau
-Javadoc changes, and added a call in ToXMLStream.processingInstruction() -method to effectively consider that a startDocument() call was made, -if none was yet seen. -
-
- -minchau@apache.org -2004/09/07 - xml-xalan/java/src/org/apache/xml/serializer ToSAXHandler.java - -PR: bugzilla 27522
-Submitted by: Brian Minchau
-committing patch from bugzilla 27522
-
-
- -johng@apache.org -2004/09/16 - xml-xalan/java/src/org/apache/xalan/lib/sql SQLDocument.java - -Fixed bug where JDBC execute was being called instead ofg executeQuery. -executeQuery will always retrurn a result set even if the query does not return any rows -where execute won't. This was causing a compatibility issue. -Added in Record skip code to help with pagination. -PR: http://nagoya.apache.org/jira/browse/XALANJ-1908 -Submitted by: John Gentilin - - - -johng@apache.org -2004/09/16 - xml-xalan/java/src/org/apache/xalan/lib/sql XConnection.java - -Fixed bug where the close document method could not locxate the SQL Document. -see http://nagoya.apache.org/jira/browse/XALANJ-1925
-Obtained from: Moraine Didier mailto://didier.moraine@winterthur.be
-Submitted by: John Gentilin -
-
- -mcnamara@apache.org -2004/09/17 - xml-xalan/java build.xml - -Added new targets to support building the distribution packages (*-bin.tar.gz/.zip and *-src.tar.gz/.zip) -without building the user guide and api docs.
-Reorganized some sections to make the targets more readable.
-Renamed the "*-nojardepends" rules to either "*-compile" or "*-build" to make them more intuitive.
-Reviewed by Christine Li. -
-
- -zongaro@apache.org -2004/09/24 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Variable.java - -Skip translation for any unreferenced variables. -Patch reviewed by Christine Li (jycli@ca.ibm.com). - - - -zongaro@apache.org -2004/10/01 - xml-xalan/java/src/org/apache/xpath/compiler XPathParser.java xml-xalan/java/src/org/apache/xpath/patterns NodeTest.java - -Patch from Yash Talwar (ytalwar@ca.ibm.com) for XALANJ-1186.
-The existing code in the interpretive processor was handling namespace::pre by -resolving the namespace prefix "pre" in the stylesheet, and then looking for -namespace nodes with that same URI in the input document. In fact, it should -look for namespaces nodes in the input document that declare the prefix "pre", -without regard to the associated URI.
-The patch was reviewed by myself (zongaro@ca.ibm.com). -
-
- -minchau@apache.org -2004/10/06 - xml-xalan/java/src/org/apache/xml/serializer ToHTMLSAXHandler.java - -XSL Transformation drops content inside xsl:comment tags.
-PR: XALANJ-1966
-Submitted by: Yash Talwar
-Reviewed by: Brian Minchau
-
-
- -minchau@apache.org -2004/10/06 - xml-xalan/java/src/org/apache/xpath/operations Variable.java - -Null Pointer Exception on sorting using a variable.
-PR: XALANJ-1942
-Submitted by: Yash Talwar
-Reviewed by: Brian Minchau -
-
- -minchau@apache.org -2004/10/06 - xml-xalan/java/src/org/apache/xalan/processor ProcessorNamespaceAlias.java xml-xalan/java/src/org/apache/xalan/res -XSLTErrorResources.java - -Null Pointer Exception when namespace-alias element says to use "#default" namespace but there is no default namespace.
-PR: XALANJ-1967
-Submitted by: Yash Talwar
-Reviewed by: Brian Minchau -
-
- -zongaro@apache.org -2004/10/13 - xml-xalan/java build.xml - -At the suggestion of Joseph Kesselman, dropped contents of the org.apache.xml.utils.synthetic package, as they have never been used. -Patch reviewed by Christine Li (jycli@ca.ibm.com). - - - -jycli@apache.org -2004/10/13 - xml-xalan/java build.xml xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerGeneral.java -xml-xalan/java/xdocs/sources/xalan extensions.xml resources.xml - -Fixed of Bug report XalanJ-1822. Added alternative BSF implementation support for extension functions in languages other than Java -Patch reviewed by Henry Zongaro (zongaro@ca.ibm.com) - - - -minchau@apache.org -2004/10/14 - xml-xalan/java/src/org/apache/xml/serializer/utils AttList.java BoolStack.java DOM2Helper.java Messages.java -SerializerMessages_en.java SerializerMessages.java StringToIntTable.java SystemIDResolver.java URI.java Utils.java -WrappedRuntimeException.java - -PR: XALANJ-1891
-Submitted by: Brian Minchau
-Reviewed by: Yash Talwar -
-
- -minchau@apache.org -2004/10/14 - xml-xalan/java/src/org/apache/xml/serializer/utils Messages.java SerializerMessages.java Utils.java - -Submitted by: Brian Minchau
-Made some fields final or private to make the objects immutable, especially the messages. -
-
- -minchau@apache.org -2004/10/14 - xml-xalan/java/src/org/apache/xml/serializer AttributesImplSerializer.java CharInfo.java DOMSerializer.java ElemDesc.java -EmptySerializer.java EncodingInfo.java Encodings.java ExtendedContentHandler.java ExtendedLexicalHandler.java Method.java -NamespaceMappings.java ObjectFactory.java OutputPropertiesFactory.java OutputPropertyUtils.java SerializationHandler.java -Serializer.java SerializerBase.java SerializerConstants.java SerializerFactory.java SerializerTrace.java SerializerTraceWriter.java -ToHTMLSAXHandler.java ToHTMLStream.java ToSAXHandler.java ToStream.java ToTextSAXHandler.java ToTextStream.java ToUnknownStream.java -ToXMLSAXHandler.java ToXMLStream.java TreeWalker.java Utils.java Version.java WriterToASCI.java ElemContext.java TransformStateSetter.java - -Submitted by: Brian Minchau
-Reviewed by: Yash Talwar
-Source code changes to the serializer to make it independent of Xalan. -Mostly message and utility usage changes. -However multiple classes had their visibility reduced to less than "public". -
-
- -minchau@apache.org -2004/10/14 - xml-xalan/java/src/org/apache/xml/utils CharKey.java Trie.java - -PR: XALANJ-1891
-Submitted by: Brian Minchau
-Reviewed by: Yash Talwar
-Deleting Charkey and Trie which were only used by the serializer. -These classes are migrated to the serializer package, in the case of -CharKey, it is now an inner private class. -
-
- -minchau@apache.org -2004/10/15 - xml-xalan/java/src MANIFEST.SERIALIZER - -PR: XALANJ-1891
-Submitted by: Brian Minchau
-Reviewed by: Sarah McNamara
-Creating MANIFEST.SERIALIZER, a template like MANIFEST.MF but -for an independent serializer.jar that is not part of xalan.jar -
-
- -minchau@apache.org -2004/10/15 - xml-xalan/java build.xml - -PR: XALANJ-1891
-Submitted by: Brian Minchau
-Reviewed by: Sarah McNamara
-Changes to java/build.xml so that the serializer.jar is built -and used by Xalan.
- -The two new build targets are serializer.jar and serializer-dist -
-
- -minchau@apache.org -2004/10/15 - xml-xalan/java/bin serializer.jar - -PR: XALANJ-1891
-Submitted by: Brian Minchau
-Reviewed by: Sarah McNamara, Yash Talwar
-Checking in an initial serializer.jar into java/bin, hopefully this won't change -too often. -
-
- -johng@apache.org -2004/10/19 - xml-xalan/java/src/org/apache/xalan/lib/sql DefaultConnectionPool.java XConnection.java SQLDocument.java - -This patch makes the close() function behave better but still has a -problem when certain iterators are used. This code is at least safe -in all instaces.
-It also fixes a minor bug in the default connection pool.
-Obtained from: John Gentilin
-Submitted by: John Gentilin -
-
- -jycli@apache.org -2004/10/21 - xml-xalan/java/src/org/apache/xpath/objects XStringForFSB.java - -A patch to fix Bug XALANJ-1708.
-Reviewed by Morris Kwan (mkwan@ca.ibm.com) -
-
- -jycli@apache.org -2004/10/21 - xml-xalan/java/src/org/apache/xpath/axes NodeSequence.java UnionPathIterator.java - -a fix for bug XALANJ-1810.
-Reviewed by Morris Kwan (mkwan@ca.ibm.com) -
-
- -mcnamara@apache.org -2004/10/21 - xml-xalan/java build.xml - -Fix the samples build. The samples.class.path needs to include the serializer.jar. - - - -minchau@apache.org -2004/10/26 - xml-xalan/java/src/org/apache/xml/serializer SerializerBase.java - -Submitted by: Brian Minchau
-Restoring the SerializerBase class "public" (what it used to be). -There were strange build problems, I'll open a JIRA issue. -
-
- -mcnamara@apache.org -2004/10/28 - xml-xalan/java build.xml - -One more fix to enable builds with JDK 1.4.x. Need to add the serializer classes to the -xslt.boot.class.path. - - - -jycli@apache.org -2004/11/02 - xml-xalan/java/src/org/apache/xpath/axes DescendantIterator.java - -String comparison should use String.equals(), instead of ==. -Even == works fine for most of the cases, for a serializable object, two variable originally reference to the same string -after deserialization, they no longer reference the same string, although the values are the same. Fix for bug XalanJ-1550 - - - -jycli@apache.org -2004/11/02 - xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerGeneral.java - -The latest Rhino1_5R5 checks for the script language line/column no.>=0 -Fixed for bug XALANJ-1887. - - - -jycli@apache.org -2004/11/03 - xml-xalan/java/src/META-INF/services org.apache.xalan.extensions.bsf.BSFManager - -Added a service provider configuration file to set the Apache BSF as the default implementation for scripting language support - - - -jycli@apache.org -2004/11/03 - xml-xalan/java/bin bsf.jar bsf.LICENSE.txt bsf.README.txt - -remove IBM bsf implementation from the distribution. Xalan is not going to ship any bsf implementation. If users need -IBM bsf, they can download it from Attic - - - -minchau@apache.org -2004/11/12 - xml-xalan/java/src/org/apache/xpath/compiler Lexer.java XPathParser.java xml-xalan/java/src/org/apache/xpath/domapi -XPathEvaluatorImpl.java XPathExpressionImpl.java XPathNamespaceImpl.java XPathNSResolverImpl.java XPathResultImpl.java -XPathStylesheetDOM3Exception.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java - -PR: bug XALANJ-1985
-Submitted by: Yash Talwar
-Reviewed by: Brian Minchau
-Support for DOM 3 API, for use by an XML Parser. -
-
- -zongaro@apache.org -2004/11/16 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler CallTemplate.java - -Patch for bug report XALANJ-1994.
- -The CallTemplate.getCalleeTemplate() method was searching through a Vector of -all templates defined by the logical stylesheet, and picked out the first with -the same name referenced by the current xsl:call-template instruction. However, -that failed to account for import precedence. The SymbolTable.lookupTemplate -method takes into account import precedence, and should be used instead.
- -Patch was reviewed by Christine Li (jycli@ca.ibm.com) -
-
- -zongaro@apache.org -2004/11/19 - xml-xalan/java/src/org/apache/xpath/objects XStringForFSB.java - -Patch for XALANJ-1955. The equals(Object) method contains a list of -instanceof checks, and then casts the Object argument to the tested type in -order to dispatch to a more specific equals method. In the case where the -Object argument was an XMLString, the code was actually casting "this" to -XMLString - thus testing this.equals(this), which will always be true.
- -Reviewd by Joanne Tong (joannet () ca ! ibm ! com). -
-
- -zongaro@apache.org -2004/11/19 - xml-xalan/java/src/org/apache/xalan/transformer KeyTable.java - -Patch for XALANJ-1368.
- -The method getKeyDeclaration was looping through all the xsl:key elements -defined, and returning the first with the required name. However, more than -one xsl:key element can specify the same name, and should be treated -cumulatively. Modified the method so that it returns all elements with the -required name, and the caller so that it tries to match against the patterns -associated with all such elements.
- -Reviewed by Joanne Tong (joannet@ca.ibm.com). -
-
- -mkwan@apache.org -2004/11/22 - xml-xalan/java/src/org/apache/xml/dtm/ref DTMManagerDefault.java - -Fix a memory leak problem in DTMManager (XALANJ-1999). - - - -santiagopg@apache.org -2004/12/06 - xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java Operators.java - -Patch for XALANJ-2003. Problem was unrelated to recursion, but simply a bug in the basis library. Swapping -operands requires swapping operators and the latter was not done. A workaround for this bug would be to -swap the operands (and operator) in the stylesheet (as that would not cause any swapping in the basis library). - - - -santiagopg@apache.org -2004/12/10 - xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2TO.java - -Patch for XALANJ-2015. Namespace declarations are now reported on a first pass to avoid the problem described in the bug report. - - - -santiagopg@apache.org -2004/12/10 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java Parser.java SyntaxTreeNode.java - -Patch for XALANJ-1761. Output properties from multiple xsl:output instructions are now correctly merged (previously, -only cdata-section-elements were handled correctly). - - - -santiagopg@apache.org -2004/12/10 - xml-xalan/java/src/org/apache/xalan/xsltc/runtime Operators.java - -Replaced meaningless numbers by predefined constants in swapArray[] vector. - - - -joannet@apache.org -2004/12/13 - xml-xalan/java/src/org/apache/xalan/templates ElemApplyImport.java xml-xalan/java/src/org/apache/xalan/transformer -TransformerImpl.java - -Fixed XALANJ-1824. Changed current template rule when named template executes an xsl:apply-imports - - - -joannet@apache.org -2004/12/13 - xml-xalan/java/src/org/apache/xalan/lib PipeDocument.java - -Fixed XALANJ-1662. Allow pipeDocument to throw exceptions - - - -joannet@apache.org -2004/12/13 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Import.java - -Fixed XALANJ-1812. Template inlining setting propagated to imported stylesheets - - - -jycli@apache.org -2004/12/15 - xml-xalan/java/src/org/apache/xalan/client XSLTProcessorApplet.java xml-xalan/java/src/org/apache/xalan/extensions -ExtensionHandlerJavaClass.java ExtensionHandlerJavaPackage.java MethodResolver.java xml-xalan/java/src/org/apache/xalan/lib/sql -ConnectionPoolManager.java DTMDocument.java xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java -TransformerFactoryImpl.java XSLTAttributeDef.java xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources_ca.java -XSLTErrorResources_cs.java XSLTErrorResources_de.java XSLTErrorResources_es.java XSLTErrorResources.java XSLTErrorResources_fr.java -XSLTErrorResources_hu.java XSLTErrorResources_it.java XSLTErrorResources_ja.java XSLTErrorResources_ko.java XSLTErrorResources_pl.java -XSLTErrorResources_pt_BR.java XSLTErrorResources_ru.java XSLTErrorResources_sk.java XSLTErrorResources_sv.java XSLTErrorResources_tr.java -XSLTErrorResources_zh_CN.java XSLTErrorResources_zh_TW.java xml-xalan/java/src/org/apache/xalan/templates ElemApplyImport.java -ElemApplyTemplates.java ElemAttributeSet.java ElemCallTemplate.java ElemChoose.java ElemComment.java ElemCopy.java ElemCopyOf.java -ElemElement.java ElemExsltFuncResult.java ElemExsltFunction.java ElemExtensionCall.java ElemFallback.java ElemForEach.java ElemIf.java -ElemLiteralResult.java ElemMessage.java ElemNumber.java ElemParam.java ElemPI.java ElemTemplate.java ElemTextLiteral.java ElemUnknown.java -ElemValueOf.java ElemVariable.java ElemWithParam.java RedundentExprEliminator.java StylesheetRoot.java TemplateList.java -xml-xalan/java/src/org/apache/xalan/trace TraceManager.java xml-xalan/java/src/org/apache/xalan/transformer StackGuard.java -TransformerHandlerImpl.java TransformerImpl.java xml-xalan/java/src/org/apache/xalan/xslt EnvironmentCheck.java Process.java -xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Compile.java Transform.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler -CastExpr.java EqualityExpr.java Key.java LocationPathPattern.java Mode.java ParentLocationPath.java Predicate.java -ProcessingInstructionPattern.java RelationalExpr.java Sort.java Step.java StepPattern.java SyntaxTreeNode.java UnionPathExpr.java -xpath.cup xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ClassGenerator.java ErrorMessages.java ErrorMessages_ca.java -ErrorMessages_cs.java ErrorMessages_de.java ErrorMessages_es.java ErrorMessages_fr.java ErrorMessages_hu.java ErrorMessages_it.java -ErrorMessages_ja.java ErrorMessages_ko.java ErrorMessages_no.java ErrorMessages_pl.java ErrorMessages_pt_BR.java ErrorMessages_ru.java -ErrorMessages_sk.java ErrorMessages_tr.java ErrorMessages_zh_CN.java ErrorMessages_zh_TW.java NamedMethodGenerator.java -xml-xalan/java/src/org/apache/xalan/xsltc/dom Axis.java DocumentCache.java MultiDOM.java MultipleNodeCounter.java NodeCounter.java -SAXImpl.java SimpleResultTreeImpl.java SingleNodeCounter.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java -ErrorMessages_ca.java ErrorMessages_cs.java ErrorMessages_de.java ErrorMessages_es.java ErrorMessages_fr.java ErrorMessages_hu.java -ErrorMessages_it.java ErrorMessages_ja.java ErrorMessages_ko.java ErrorMessages_no.java ErrorMessages.java ErrorMessages_pl.java -ErrorMessages_pt_BR.java ErrorMessages_ru.java ErrorMessages_sk.java ErrorMessages_tr.java ErrorMessages_zh_CN.java ErrorMessages_zh_TW.java -Operators.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/util -avaCupRedirect.java xml-xalan/java/src/org/apache/xml/dtm Axis.java DTMManager.java xml-xalan/java/src/org/apache/xml/dtm/ref -DTMDefaultBase.java DTMDefaultBaseIterators.java DTMDefaultBaseTraversers.java DTMDocumentImpl.java IncrementalSAXSource_Xerces.java -xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java SAX2DTM2.java xml-xalan/java/src/org/apache/xml/res XMLErrorResources_ca.java -XMLErrorResources_cs.java XMLErrorResources_de.java XMLErrorResources_es.java XMLErrorResources_fr.java XMLErrorResources_hu.java -XMLErrorResources_it.java XMLErrorResources_ja.java XMLErrorResources.java XMLErrorResources_ko.java XMLErrorResources_pl.java -XMLErrorResources_pt_BR.java XMLErrorResources_ru.java XMLErrorResources_sk.java XMLErrorResources_sv.java XMLErrorResources_tr.java -XMLErrorResources_zh_CN.java XMLErrorResources_zh_TW.java XMLMessages.java xml-xalan/java/src/org/apache/xml/serializer CharInfo.java -SerializerConstants.java ToHTMLStream.java ToXMLStream.java xml-xalan/java/src/org/apache/xml/utils FastStringBuffer.java -ThreadControllerWrapper.java XMLChar.java xml-xalan/java/src/org/apache/xml/utils/res CharArrayWrapper.java IntArrayWrapper.java -LongArrayWrapper.java StringArrayWrapper.java XResourceBundle.java XResources_cy.java XResources_de.java XResources_el.java -XResources_en.java XResources_es.java XResources_fr.java XResources_he.java XResources_hy.java XResources_it.java XResources_ja_JP_A.java -XResources_ja_JP_HA.java XResources_ja_JP_HI.java XResources_ja_JP_I.java XResources_ka.java XResources_ko.java XResources_sv.java -XResources_zh_CN.java XResources_zh_TW.java xml-xalan/java/src/org/apache/xpath XPath.java xml-xalan/java/src/org/apache/xpath/axes -MatchPatternIterator.java WalkerFactory.java xml-xalan/java/src/org/apache/xpath/compiler Compiler.java FunctionTable.java Keywords.java -Lexer.java XPathParser.java xml-xalan/java/src/org/apache/xpath/functions FuncSystemProperty.java xml-xalan/java/src/org/apache/xpath/objects -XBoolean.java XBooleanStatic.java XNodeSet.java XString.java xml-xalan/java/src/org/apache/xpath/patterns StepPattern.java -xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java XPATHErrorResources_ca.java XPATHErrorResources_cs.java -XPATHErrorResources_de.java XPATHErrorResources_es.java XPATHErrorResources_fr.java XPATHErrorResources_hu.java XPATHErrorResources_it.java -XPATHErrorResources_ja.java XPATHErrorResources_ko.java XPATHErrorResources_pl.java XPATHErrorResources_pt_BR.java XPATHErrorResources_ru.java -XPATHErrorResources_sk.java XPATHErrorResources_sv.java XPATHErrorResources_tr.java XPATHErrorResources_zh_CN.java XPATHErrorResources_zh_TW.java - -Patch for bug report XALANJ-2008
-Based on Sun's Security Code Guidelines, modified the code to improve the security. Major changes includes:
-1. Added final modifier to static variables;
-2. Reduced scope and added public get methods whenever it is appropriate;
-3. Changed some static variable to instance variables;
-4. Changed some interfaces to final classes, if those interfaces are used only to define constants
-5. Removed the usage of System.exit;
-6. For various org.apache.xml.utils.res.XResourceBundle, the getObject() methods return immutable array wrappers instead of arrays
-7. Changed static methods of org.apache.xpath.compiler.FunctionTable to instance methods and the reference of a function table is passed -around the processing to create an XPath object;
-8. Changed the flags of FEATURE_INCREMENTAL, FEATURE_OPTIMIZE and FEATURE_SOURCE_LOCATION to instance variables in TransformerFactorImpl. -So they will not be changed during a processing once a new Templates is created;
-
-
- -mkwan@apache.org -2004/12/15 - xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xpath/functions FuncExtFunction.java - -Patch for bug XALANJ-1592. Submitted by Catya Alone (catyaa@hotmail.com). -Set the parent node for the arguments in extension functions. - - - -minchau@apache.org -2004/12/16 - xml-xalan/java/src/org/apache/xml/serializer/utils Messages.java - -Partial fix for bug XALANJ-2021. - - - -minchau@apache.org -2004/12/16 - xml-xalan/java/src/org/apache/xml/serializer/utils SerializerMessages.java - -Partial fix for bug XALANJ-2021. -just to make key/keyvalue consistent - - - -minchau@apache.org -2004/12/16 - xml-xalan/java/src/org/apache/xml/serializer/utils SerializerMessages_ca.java SerializerMessages_cs.java -SerializerMessages_de.java SerializerMessages_es.java SerializerMessages_fr.java SerializerMessages_hu.java -SerializerMessages_it.java SerializerMessages_ja.java SerializerMessages_ko.java SerializerMessages_pl.java -SerializerMessages_pt_BR.java SerializerMessages_ru.java SerializerMessages_sv.java SerializerMessages_tr.java -SerializerMessages_zh_CN.java SerializerMessages_zh_TW.java - -Other languages, for XALANJ-2021. - - - -minchau@apache.org -2004/12/16 - xml-xalan/java/src/org/apache/xml/serializer/utils MsgKey.java - -A class containing only message keys, to be shared by all language -translations (including English). This is to prevent replication of these -keys during translation. Related to XALANJ-2021 - - - -minchau@apache.org -2004/12/16 - xml-xalan/java/src/org/apache/xml/serializer/utils SerializerMessages_ca.java SerializerMessages_cs.java SerializerMessages_de.java -SerializerMessages_es.java SerializerMessages_fr.java SerializerMessages_hu.java SerializerMessages_it.java SerializerMessages_ja.java -SerializerMessages_ko.java SerializerMessages_pl.java SerializerMessages_pt_BR.java SerializerMessages_ru.java SerializerMessages_sv.java -SerializerMessages_tr.java SerializerMessages_zh_CN.java SerializerMessages_zh_TW.java - -Changes for moving the message keys, to be shared by all language -translations (including English). This is to prevent replication of these -keys during translation. Related to XALANJ-2021 - - - -minchau@apache.org -2004/12/16 - xml-xalan/java/src/org/apache/xml/serializer/utils Messages.java SerializerMessages.java URI.java -xml-xalan/java/src/org/apache/xml/serializer CharInfo.java OutputPropertiesFactory.java SerializerBase.java -SerializerFactory.java ToHTMLStream.java ToStream.java ToTextStream.java ToXMLStream.java - -Changes for moving the message keys, to be shared by all language -translations (including English). This is to prevent replication of these -keys during translation. Related to XALANJ-2021. - - - -minchau@apache.org -2004/12/16 - xml-xalan/java/src/org/apache/xml/res XMLErrorResources.java - -Serializer messages were copied into a message file in the -org.apache.xml.serializer.utils package. -The serializer messages in this file are now "dead", so they are being deleted. -This is part of the cleanup with XALANJ-2021. - - - -zongaro@apache.org -2004/12/22 - xml-xalan/java/src/org/apache/xml/dtm/ref DTMNamedNodeMap.java DTMNodeProxy.java - -Applying patch for Jira bug report XALANJ-1427 on behalf of Yash Talwar (ytalwar@ca.ibm.com).
- -Completing support for DOM Level 2 Core methods that were previously -unimplemented, and fixed some bugs in the implementation. The implementation -continues to be, of necessity, a read-only implementation.
- -In particular, implemented the following:
- - DTMNamedNodeMap.getNamedItem(String)
- DTMNodeProxy.getElementsByTagName(String)
- DTMNodeProxy.getElementsByTagNameNS(String,String)
- DTMNodeProxy.getElementById(String,String)
- DTMNodeProxy.getAttributeNodeNS(String,String)
-
-
- -jycli@apache.org -2005/01/05 - xml-xalan/java/xdocs/sources/xalan faq.xml - -Added a FAQ about how to use XSLTC in applet when using JRE1.4. It is a fix for bug report XALANJ-1705. Patch reviewed and -modified by Sarah McNamara - - - -ilene@apache.org -2005/01/10 - xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java - -Fix for XALANJ-2013. Duplicate time zone string returned from EXSLT time() function. - - - -mcnamara@apache.org -2005/01/10 - xml-xalan/java/src manifest.xalan-interpretive - -New manifest file to resolve Jira bug report XALANJ-1853. - - - -mcnamara@apache.org -2005/01/10 - xml-xalan/java build.xml - -Fix for Jira bug report XALANJ-1853 . Use the new xalan interpretive manifest file -when building the standalone xalan.jar that only contains the interpretive processor. - - - -mcnamara@apache.org -2005/01/10 - xml-xalan/java/src MANIFEST.MF MANIFEST.SERIALIZER manifest.xsltc - -Fix for Jira bug report XALANJ-1852. - - - -zongaro@apache.org -2005/01/20 - xml-xalan/java/src/org/apache/xalan/serialize SerializerUtils.java - -Applying patch for Jira bug report XALANJ-1640.
- -As it's currently written, SerializerUtils.outputResultTreeFragment loops -through the nodes in a result tree fragment, and for each one, it checks -whether the node is in some namespace. If it is not, the code undeclares the -default namespace by calling handler.startPrefixMapping("", ""). The problem -is that if the RTF that's being copied just consists of a text node (or PIs or -comments), that undeclaration of the default namespace hangs around until some -subsequent child element picks it up as one of its attributes, even if that -element is in some namespace - even what should be the default!
- -The fix is to check whether the node that is being output is an element node -prior to issuing the handler.startPrefixMapping call - that ensures the prefix -mapping is not issued unless it's actually going to be used by the node that is -about to be serialized.
- -This patch was reviewed by Brian Minchau (minchau@ca.ibm.com). -
-
- -zongaro@apache.org -2005/01/24 - xml-xalan/java/src/org/apache/xpath CachedXPathAPI.java - -Fix for Jira bug report XALANJ-1811.
- -Updated Javadocs for constructors to make it clear that a single instance of -CachecXPathAPI must not be used by multiple threads without synchronization.
- -Reviewed by Christine Li (jycli@ca.ibm.com) -
-
- -zongaro@apache.org -2005/01/27 - xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java - -Fix for Jira bug report XALANJ-1888.
- -It is possible for the characters SAX event to specify a length of zero. Text -nodes should not be created in such situations. Changed the charactersFlush -method to guard against this case.
- -Reviewed by Morris Kwan (mkwan@ca.ibm.com) -
-
- -zongaro@apache.org -2005/01/27 - xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java - -Two part fix for Jira bug report XALANJ-1888.
- -1) It is possible for the characters SAX event to specify a length of zero. -Text nodes should not be created in such situations. Changed the -charactersFlush method to guard against this case.
- -2) Made a defensive change to references to m_dataOrQName. If the value in -this vector is to be interpreted as an index into m_data, it is stored as a -negative value (via calls to addNode). However, most references to elements of -m_dataOrQName were checking whether the value was non-positive, treating a -value of zero as an index into m_data as well. The zeroth entry into m_data is -an invalid entry. -The fix to charactersFlush described above should ensure that zero is never -stored in m_dataOrQName, but I thought it was just as well to duplicate the -interpretation used in storing values in m_dataOrQName.
- -Reviewed by Morris Kwan (mkwan@ca.ibm.com) -
-
- -jycli@apache.org -2005/02/04 - xml-xalan/java/src/org/apache/xalan/templates ElemNumber.java - - -Implement Errata E24, when the value attribute of xsl:number is NaN, infinite or less than 0.5. -More details please refer to bug report XALANJ-1979. Patch is reviewed by Morris Kwan (mkwan@ca.ibm.com) - - - -jycli@apache.org -2005/02/04 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Number.java xml-xalan/java/src/org/apache/xalan/xsltc/dom -AnyNodeCounter.java MultipleNodeCounter.java NodeCounter.java SingleNodeCounter.java - -Implement Errata E24 for XSLTC, when the value attribute of xsl:number is NaN, infinite or less than 0.5. -More details please refer to bug report XALANJ-1979. Patch is reviewed by Morris Kwan (mkwan@ca.ibm.com) - - - -zongaro@apache.org -2005/02/09 - xml-xalan/java/src/org/apache/xpath/compiler XPathParser.java xml-xalan/java/src/org/apache/xpath/res -XPATHErrorResources.java - -Fix for Jira bug report XALANJ-1478.
- -In the recursive descent parsing of an ill-formed XPath expression like "2+", -when the parser reaches the end of the expression while still looking for an -operand it ultimately ends up trying to see whether what remains can be parsed -as a location path. However, the LocationPath method was silently parsing the -end of an expression as a location path! Added an error for that situation.
- -Reviewed by Brian Minchau (minchau@ca.ibm.com) -
-
- -zongaro@apache.org -2005/02/09 - xml-xalan/java/samples/trax ExampleContentHandler.java - -Fix for Jira bug report XALANJ-2054.
- -The sample ContentHandler code was printing the namespaceURI argument of -startElement and of endElement twice, but never printed the localName argument. -Fixed that typo.
- -Reviewed by Brian Minchau (minchau@ca.ibm.com) -
-
- -ytalwar@apache.org -2005/02/09 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyImports.java -Mode.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ClassGenerator.java - -Fix for XALANJ-1417.
-
-
- -minchau@apache.org -2005/02/11 - xml-xalan/java/src/org/apache/xml/serializer AttributesImplSerializer.java EmptySerializer.java -ExtendedContentHandler.java NamespaceMappings.java SerializerBase.java ToStream.java ToTextSAXHandler.java -ToTextStream.java ToUnknownStream.java ToXMLSAXHandler.java ToXMLStream.java xml-xalan/java/src/org/apache/xalan/serialize -SerializerUtils.java xml-xalan/java/src/org/apache/xalan/templates ElemAttribute.java ElemLiteralResult.java - -Fix for XALANJ-1886. Multiple problems fixed related to collecting xsl:attributes -with over-ridden values and prefix/URI maps. With this fix, internally the -serializer correctly identifies attributes by their expanded QName, which -includes the URI rather than the prefix. - - - -minchau@apache.org -2005/02/11 - xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java xml-xalan/java/src/org/apache/xml/serializer -TreeWalker.java - -Fix for XALANJ-1985, reviewed by Henry Zongaro. -The problem was that a serialized DOM failed to declare a prefix/URI mapping. - - - -minchau@apache.org -2005/02/11 - xml-xalan/java/src/org/apache/xalan/processor ProcessorLRE.java - -Fix for XALANJ-2037. The trace information doesn't have the right location information in this case. - - - -ytalwar@apache.org -2005/02/17 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Mode.java TestSeq.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -MethodGenerator.java - -Fix for XALANJ-2058. -In the code, the problem is that a pattern gets compiled once, -and then this compiled pattern gets re-used whenever the pattern is -needed in any method.
-The fix is that pattern should get compiled once per method. So, pattern get reused only within a given method. -for any new method, a pattern is recompiled.
-This fix has been reviewed by Henry Zongaro. Henry had also provided suggestions about the fix to resolve this issue. -Thanks Henry for his valuable input. -
-
- -minchau@apache.org -2005/02/18 - xml-xalan/java/src/org/apache/xml/serializer EmptySerializer.java ExtendedContentHandler.java SerializerBase.java - -Committing serializer.patch5.txt in JIRA issue XALANJ-1886, -that puts back an old attAttribute() method that takes 5 String arguments. -There is a new one that takes these 5 String arguments and a boolean to indicate if it is from an xsl:attribute -or not. I'm just restoring the old method.
-Patch reviewed by Henry Zongaro. -
-
- -minchau@apache.org -2005/02/21 - xml-xalan/java/src/org/apache/xml/serializer EmptySerializer.java SerializationHandler.java SerializerBase.java -ToStream.java - -Fix for XALANJ-2033 and XALANJ-2051 so that the serializer will serialize DTD -tags if desired. The patch was reviewed by Ilene Seeleman. - - - -ytalwar@apache.org -2005/02/22 - xml-xalan/java/src/org/apache/xml/utils URI.java - -The fix is for XALANJ-2059.
- -The problem is that when href attribute has aboslute uri with jar scheme and -base uri is not null, then base uri is pre-appended to uri specified in href attribute. -The newer patch is according to RFC 2396.
-The newer patch ignores base uri and directly make use of uri specifed href attribute, provided following conditions are met.
-a)If uri specified in href attribute starts with / after the scheme and : - For example, href="file:/myDIR/myXSLFile.xsl.
-b)If scheme specified for uri href attribute is not same as scheme for base uri. -c)If base uri is not hierarchical
- -Henry Zongaro has helped creating this patch. -
-
- -ytalwar@apache.org -2005/03/02 - xml-xalan/java/src/org/apache/xml/serializer SerializerConstants.java ToStream.java ToXMLStream.java -xml-xalan/java/src/org/apache/xml/serializer/utils MsgKey.java SerializerMessages.java - -This patch fix XALANJ-2070.
-This patch add XML 1.1 support in term of following:
-- Output Document can be of Version XML 1.1
-- Control Characters in Range C0 and C1 are output as NCR.
-- Namespaces in XML 1.1 can be IRIs.
-- NCNames and QNames can conform to XML 1.1 specifications.
-- NEL and LSEP characters are treated as new end of line character as per XML 1.1 specifications.
- -Thanks to Brian Minchau for reviewing the patch. Brian Minchau and Henry Zongaro has also helped how XML 1.1 support should be done. -
-
- -jycli@apache.org -2005/03/03 - xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java xml-xalan/java/src/org/apache/xalan/templates -ElemExtensionCall.java ElemLiteralResult.java - -Added implementation for getAttribute, getAttributeNS and -getAttributes for LRE. A fix for bug report XALANJ-1526 - - - -mcnamara@apache.org -2005/03/03 - xml-xalan/java/xdocs/sources/design design2_0_0.xml - -Patch for XALANJ-1990. Fixes broken link to apidocs for Serializer.html. - - - -mcnamara@apache.org -2005/03/03 - xml-xalan/java/xdocs/sources/xalan usagepatterns.xml - -Patch for XALANJ-2026. Fixes typo in Debugger interface code example. - - - -mcnamara@apache.org -2005/03/03 - xml-xalan/java/xdocs/sources/xalan readme.xml resources.xml xsltc_usage.xml xml-xalan/java/xdocs/sources/xsltc -README.xslt README.xsltc - -Patch for XALANJ-1937. Change references in the docs from bugzilla to Apache Jira for reporting new issues and checking the -status of existing issues. - - - -minchau@apache.org -2005/03/07 - xml-xalan/java/src/org/apache/xml/serializer SerializerFactory.java xml-xalan/java/src/org/apache/xml/serializer/utils -MsgKey.java SerializerMessages.java - -Fix for XALANJ-2074, committing patch2 in that issue, which removes two -untranslated messages in SerializerFactory, and uses a new common message -in SerializerMessages. - - - -jycli@apache.org -2005/03/10 - xml-xalan/java/src/org/apache/xml/serializer CharInfo.java - -Marked the code to be privileged, which allows users to load -customized entity files in sandbox. Fixed bug report XALANJ-2068. -Patch was reviewed by Brian Minchau (minchau@ca.ibm.com) - - - -ytalwar@apache.org -2005/03/10 - xml-xalan/java/src/org/apache/xml/serializer ToStream.java - -This patch fixes XALANJ-1431. The patch has been reviewed by Brian. -The problem is that that when an empty attribute value is encountered, a text node is being created -with empty string.
-Henry Zongaro has helped finding the XSLT 1.0 specs. that suggest a text node with empty string should not be created. -URL http://www.w3.org/TR/xslt#value-of has the following information: -"The xsl:value-of element is instantiated to create a text node in the result tree. The required select attribute is an -expression; this expression is evaluated and the resulting object is converted to a string as if by a call to the string -function. The string specifies the string-value of the created text node. If the string is empty, no text node will be -created. The created text node will be merged with any adjacent text nodes." -
-
- -zongaro@apache.org -2005/03/14 - xml-xalan/java/xdocs/sources/xalan builds.xml - -Patch for Jira bug report XALANJ-2079. -Updated links to nightly Gump build. -Reviewed by Brian Minchau. - - - -ytalwar@apache.org -2005/03/16 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Text.java - -This is a fix for XALANJ-2081. -In class org.apache.xalan.xsltc.compiler.Text, a check was being done to find out if a given text string is all whitespaces. -In case, a given text string is all whitespace, a call to serializer is not made. -The code was using trim() method from java.lang.String. trim() method trimmed characters as whitespaces -that are not considered as whitespace in XML. -The code logic is changed to check if a given string is all whitespace accoding to XML specifications. -I would like to thank Michael Glavassevich and Brian Minchau for their input to resolve this issue. - - - -ytalwar@apache.org -2005/03/23 - xml-xalan/java/src/org/apache/xalan/processor XSLTAttributeDef.java xml-xalan/java/src/org/apache/xalan/templates -ElemAttribute.java ElemElement.java ElemPI.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java -AttributeSet.java CallTemplate.java DecimalFormatting.java Key.java Output.java ProcessingInstruction.java Template.java -VariableBase.java WithParam.java xpath.lex XslAttribute.java XslElement.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -Util.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java xml-xalan/java/src/org/apache/xml/serializer -WriterToUTF8Buffered.java xml-xalan/java/src/org/apache/xml/utils QName.java XML11Char.java - -This is resolve UTF-8 Charcater support and QName character support for XML 1.1 support in XALANJ-2070. -Henry Zongaro and Brian Minchau helped in fixing this part of the JIRA issue. -A new class org.apache.xml.utils.XML11Char has been included to support XML 1.1 characters. -Also a reference to org.apache.xml.utils.XMLChar has been replaced with a reference to -org.apache.xml.utils.XML11Char in almost all the places in Xalan. -org.apache.xml.serializer.WriterToUTF8Buffered has been update to support UTF-8 characters that can be represented in four bytes. - - - -ytalwar@apache.org -2005/03/30 - xml-xalan/java/src/org/apache/xpath/domapi package.html - -This resolves XALANJ-2085. -Sarah McNamara has reviewed this change. - - - -ytalwar@apache.org -2005/04/01 - xml-xalan/java/src/org/apache/xalan/templates ElemNumber.java - -This is a fix for XALANJ-2089. -Christine Li has created this patch. -Brian Minchau helped in creating this patch. -Brian Minchau also reviewed this patch. -org.apache.xalan.templates.ElemNumber.java has raised some performance issue as -a static array to hold resources was removed earlier. However, the removal of static array is necessary -to fix a potential bug multithread environment, where a given thread can request different locale than another thread. - -This patch resolves the performance glicth that was found in internal testing. - - - -minchau@apache.org -2005/04/07 - xml-xalan/java/src/org/apache/xml/serializer CharInfo.java - -Commiting patch for XALANJ-2095, that tabs in text nodes in XML documents -are serialized to &#9; but should stay as a tab character. - - - -minchau@apache.org -2005/04/07 - xml-xalan/java/xdocs/sources/xalan usagepatterns.xml - -Patch from XALANJ-1924 applied. The one deprecated API used is replace -by the current one, but multiple typos in other examples are corrected. - - - -minchau@apache.org -2005/04/07 - xml-xalan/java/src/org/apache/xml/serializer Encodings.java - -Committing patch for XALANJ-2077. This performance modification is -estimated to shave 3% of the serialization stage of small documents. -Every little bit counts. - - - -minchau@apache.org -2005/04/07 - xml-xalan/java/src/org/apache/xml/serializer Encodings.java - -Appling fix for XALANJ-2086, which pointed out that findCharToByteConverterMethod() -always returned null. This bug was introduced some time ago during some security -fixes. - - - -santiagopg@apache.org -2005/04/08 - xml-xalan/java/src/org/apache/xalan/xsltc/trax Util.java - -Clear XML reader for the case in which them main stylesheet is passed using a DOMSource. This fixes the problem -of trying to use a DOM2SAX reader for included/imported stylesheets that are resolved by user-defined URI resovers. - - - -minchau@apache.org -2005/04/25 - xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java - -Fix for XALANJ-2109 applied (we won't \n to \r\n in an HTML attribute value on -Windows OS anymore, it will be left as is during serialization). - - - -minchau@apache.org -2005/04/26 - xml-xalan/java/src/org/apache/xml/utils XMLReaderManager.java - -Applying patch in XALANJ-2105. - - - -mkwan@apache.org -2005/05/17 - xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/templates ElemLiteralResult.java -xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -SmartTransformerFactoryImpl.java TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xml/dtm/ref DTMNodeProxy.java -xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTMdefaultNamespaceDeclarationNode.java xml-xalan/java/src/org/apache/xml/utils -UnImplNode.java xml-xalan/java/src/org/apache/xpath/domapi XPathNamespaceImpl.java xml-xalan/java/src/org/apache/xpath/operations -Variable.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java - -JAXP 1.3 integration. Integrate the Sun donated JAXP 1.3 implementation into the head branch. - - - -mkwan@apache.org -2005/05/17 - xml-xalan/java/src/org/apache/xpath/jaxp JAXPExtensionsProvider.java JAXPPrefixResolver.java JAXPVariableStack.java -XPathExpressionImpl.java XPathFactoryImpl.java XPathImpl.java - -JAXP 1.3 integration. Commit the XPath API implementation under org.apache.xpath.jaxp. - - - -mkwan@apache.org -2005/05/17 - xml-xalan/java/bin xml-apis.jar - -New xml-apis.jar containing JAXP 1.3 APIs. - - - -jycli@apache.org -2005/05/17 - xml-xalan/java/src/org/apache/xpath/compiler Compiler.java FuncLoader.java FunctionTable.java Keywords.java -ObjectFactory.java SecuritySupport.java SecuritySupport12.java XPathParser.java xml-xalan/java/src/org/apache/xpath/functions -FuncExtFunctionAvailable.java xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java - -Modified FunctionTable. Although it is not recommanded, but it is doable for users to add a customized function or overwrite -the default implementation of a build-in function. Fixed bug report XALANJ-2116. -Patch is reviewed by Henry Zongaro - - - -mkwan@apache.org -2005/05/19 - xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java - -Put in the missing Transformer.reset() implementation when doing the JAXP 1.3 integration. - - - -mkwan@apache.org -2005/05/20 - xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java TransformerImpl.java -xml-xalan/java/src/org/apache/xml/utils DOMBuilder.java - -Support DOMResult.nextSibling in XalanJ Interpretive. If nextSibling is not null, then result nodes are inserted -before it. - - - -mkwan@apache.org -2005/05/20 - xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax SAX2DOM.java TransformerImpl.java - -Support DOMResult.nextSibling in XSLTC. -The nextSibling information is passed from TransformerImpl to TransletOutputHandlerFactory, -then to SAX2DOM. If nextSibling is not null, SAX2DOM inserts the result nodes before it. -Otherwise the result nodes are appended as the last children of the parent. - - - -mkwan@apache.org -2005/05/20 - xml-xalan/java/samples/XPathAPI ApplyXPathJAXP.java foo.xml XPathResolver.java - -Add two samples to demonstrate how to use the XPath API in JAXP 1.3.
-1. ApplyXPathJAXP. Basic sample like ApplyXPath, but use JAXP 1.3 XPath API instead
-2. XPathResolver. Demonstrate how to use NamespaceContext, XPathFunctionResolver and XPathVariableResolver. -
-
- -mkwan@apache.org -2005/05/30 - xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerJavaClass.java ExtensionHandlerJavaPackage.java -ExtensionNamespaceContext.java XPathFunctionImpl.java XPathFunctionResolverImpl.java - -Patch for XALANJ-2126. This is a sample implementation of XPathFunctionResolver, with support for -Java and EXSLT extension functions. - - - -mkwan@apache.org -2005/05/30 - xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java - -New messages for XALANJ-2126. -Messages for the sample XPathFunctionResolver implementation. - - - -mkwan@apache.org -2005/05/30 - xml-xalan/java/samples/XPathAPI ExtensionFunctionResolver.java - -For XALANJ-2126. New sample to demonstrate how to use the sample -XPathFunctionResolver to evaluate XPath expression containing -Java and EXSLT extension functions. - - - -minchau@apache.org -2005/05/31 - xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java - -Committing patch for issue XALANJ-2121, which is that some empty attributes -of some HTML elements are note serialized as empty. - - - -minchau@apache.org -2005/05/31 - xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java - -Putting static iniitialization of HTML element/attribute information in a static method, -which is invoked from a static { ...} block. -No real difference, but slowly inching this code towards adding a -ToXHTMLStream class that extends ToXMLStream, but uses methods in -ToHTMLStream. - - - -mkwan@apache.org -2005/05/31 - xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java ErrorMsg.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax SmartTransformerFactoryImpl.java TransformerFactoryImpl.java - -Patch for XALANJ-2123. -Move hard-coded messages for JAXP 1.3 into resource bundles. - - - -minchau@apache.org -2005/05/31 - xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java - -Added "nowrap" as an empty attribute for elements <div> <src> and <tr> -as these are either Netscape or Internet-Explorer extensions. -This is patch3 from XALANJ-2121. - - - -minchau@apache.org -2005/06/01 - xml-xalan/java/src/org/apache/xml/serializer OutputPropertiesFactory.java ToStream.java - -Applying patcth for JIRA XALANJ-2093. -Adding a xalan:line-separator extension output attribute. - - - -mkwan@apache.org -2005/06/03 - xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java -TransformerImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xml/utils DefaultErrorHandler.java - -Patch for XALANJ-2134. -Change the error handling behavior to be conformant with the requirement -from JAXP 1.3 that the default ErrorListener will report all warnings and errors -to System.err and does not throw any Exceptions. - - - -mkwan@apache.org -2005/06/07 - xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -ProcessorInclude.java ProcessorLRE.java ProcessorStylesheetElement.java TransformerFactoryImpl.java -xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java xml-xalan/java/src/org/apache/xalan/templates -ElemExtensionCall.java StylesheetRoot.java xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java -TransformerImpl.java TrAXFilter.java xml-xalan/java/src/org/apache/xalan/xslt Process.java xml-xalan/java/src/org/apache/xml/utils -DOMHelper.java xml-xalan/java/src/org/apache/xpath XPathContext.java xml-xalan/java/src/org/apache/xpath/functions -FuncExtFunction.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java - -Patch for XALANJ-2136.
-Support the secure processing feature in Xalan interpretive. When this feature -is set to true, the following XML processing limits are applied:
-1. extension functions and extension elements are disabled.
-2. parsers created by the XSLT processor also have the secure processing feature set -to true.
- -A new option -secure is added to the Process command line to enable the secure -processing feature. -
-
- -mkwan@apache.org -2005/06/08 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java Parser.java TransletOutput.java XSLTC.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java ErrorMessages.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java TemplatesImpl.java TransformerFactoryImpl.java -TransformerImpl.java TrAXFilter.java Util.java - -Patch for XALANJ-2136. -Implement the secure processing feature for XSLTC. Extension functions -and extension elements are disabled when this feature is set to true. - - - -zongaro@apache.org -2005/06/08 - xml-xalan/java/src/org/apache/xalan/xsltc/dom KeyIndex.java - -Fix for XALANJ-1938.
- -A KeyIndex object contains a Hashtable mappings from key values to the -IntegerArray objects that contain the set of nodes selected by those key values. -For a reference to the key function, the lookupKey method finds the nodes -selected by a particular key value, and the merge method merges all the nodes -selected if more than one key value is specified for the one refernce to the key -function.
- -The problem was that the lookupKey and merge methods operated on the "live" -versions of the IntegerArrays stored in the mapping Hashtable, so that one -reference to the key function might affect the result of subsequent references -to the key function. Changed those methods to make clones of the selected -IntegerArray objects, which can be safely modified without affecting the -original IntegerArrays.
- -This patch was reviewed by Joanne Tong (joannet@ca.ibm.com). -
-
- -mkwan@apache.org -2005/06/10 - xml-xalan/java/bin xercesImpl.jar - -The new xercesImpl.jar supports the secure processing feature. - - - -mkwan@apache.org -2005/06/14 - xml-xalan/java/bin xml-apis.jar - -Update with the latest xml-apis.jar built from xml-commons. - - - -mkwan@apache.org -2005/06/15 - xml-xalan/java/xdocs/sources entities.ent xalan-jlocal.xml xalan-jsite.xml xml-xalan/java/xdocs/sources/xalan -features.xml samples.xml xpath_apis.xml - -Patch for XALANJ-2124. -Update the online documentation to include descriptions on the new JAXP 1.3 features:
-1. Add a new "XPath API" page to provide a complete guide on how to use the -XPath API in JAXP 1.3. Details on basic usage patterns, factory plugin mechanism, -how to use NamespaceContext, XPathVariableResolver and XPathFunctionResolver.
-2. Document the secure processing feature in the features page.
-3. Describe three new XPath API related samples in the samples page. -
-
- -zongaro@apache.org -2005/06/15 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java - -Patch for bug XALANJ-2097 from Nick Van den Bleeken. -(Nick.VandenBleeken@pandora.be), reviewed by Henry Zongaro.
- -The code generated for a path expression of the form $var/self::node() was -incorrect. It looked like the following, where "i" refers to the context node.

- - new StepIterator(dtmaxisiterator1.cloneIterator(), new SingletonIterator(i));

- -That's incorrect, because the SingletonIterator will only return the node used -upon its instantiation, rather than the node provided from the parent step -expression by the StepIterator.
- -The SingletonIterator should only be used if the self::node() is not a step -in a path expression. In the case of a path expression, dom.getAxisIterator -should be used to create the axis iterator instead. -
-
- -mkwan@apache.org -2005/06/21 - xml-xalan/java/src/META-INF/services javax.xml.xpath.XPathFactory - -Service provider file for javax.xml.xpath.XPathFactory - - - -mkwan@apache.org -2005/06/21 - xml-xalan/java/samples/XPathAPI ExtensionTest.java numlist.xml - -xml and extension java source for the ExtensionFunctionResolver sample. - - - -mkwan@apache.org -2005/06/21 - xml-xalan/java/src MANIFEST.MF manifest.xalan-interpretive manifest.xsltc - -Update manifest files for jaxp version and remove entry for org.w3c.dom.xpath. - - - -mkwan@apache.org -2005/06/22 - xml-xalan/java build.xml xml-xalan/java/bin xml-apis.jar xml-xalan/java/src -xml-commons-external-1.2.01-src.tar.gz xml-commons-external-1.3.01-src.tar.gz - -Update the source and binary of xml-apis.jar. - - - -mkwan@apache.org -2005/06/22 - xml-xalan/java/src/org/apache/xml/dtm/ref DTMNodeProxy.java - -Java docs cleanup. -Remove the word "Experimental" for DOM Level 3 spec and update the URI link. -Also remove the obsolete methods that are replaced by new ones. - - - -mkwan@apache.org -2005/06/22 - xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -StylesheetHandler.java xml-xalan/java/src/org/apache/xml/utils UnImplNode.java - -Cleanup javadocs on DOM Level 3 spec. Update the uri and remove -obsolete methods. The getVersion() method in org.w3c.dom.Node is replaced by -getXmlVersion(). - - - -mkwan@apache.org -2005/06/23 - xml-xalan/java/bin xercesImpl.jar - -The latest xercesImpl.jar from cvs. - - - -mkwan@apache.org -2005/06/24 - xml-xalan/java build.xml - -Add xml-apis.jar to boot classpath to fix a build problem -with JDK 1.4. - - - -mkwan@apache.org -2005/06/28 - xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java - -Patch for XALANJ-2076. Fix a bug in date:month-in-year. - - - -mkwan@apache.org -2005/06/29 - xml-xalan/java/bin xercesImpl.jar - -New xercesImpl.jar from the official Xerces-J 2.7.0 release. - - - -jycli@apache.org -2005/06/29 - xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java -xml-xalan/java/src/org/apache/xml/res XMLErrorResources.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java - -Cleanup resource files. Remove unused constants and commented out message keys. Fix for bug XALANJ-2161 -Patch is reviewed by Sarah McNamara (mcnamara@ca.ibm.com) - - - -zongaro@apache.org -2005/06/30 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler AbsoluteLocationPath.java FilteredAbsoluteLocationPath.java -FilterExpr.java FilterParentPath.java FunctionCall.java KeyCall.java ParentLocationPath.java Sort.java Step.java StepPattern.java - -Patch for XALANJ-2146. Reviewed by Christine Li (jycli@ca.ibm.com).
- -Section 4.3.4 of the JVM specification prohibits an uninitialized object from -appearing on the stack or in a local variable when a backwards branch is -executed. We need to guard against that in the generated code in XSLTC by -storing arguments to constructors in temporary variables if there's any -possibility that the code used to calculate such arguments might contain a -backwards branch. -
-
- -zongaro@apache.org -2005/07/05 - xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java - -Patch for Jira issue XALANJ-1978. Reviewed by Christine Li -(jycli@ca.ibm.com).
- -Behaviour of StreamResult.getSystemId has changed if the Result object was -created using a File. The URI returned begins with "file:/" where it used to -begin with "file:///". TransformerIdentityImpl had a dependency on the old -behaviour. -
-
- -jycli@apache.org -2005/07/08 - xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -ErrorMessages.java - -Added missing apostrophe for error messages. Fixed bug report XALANJ-2167. Patch is reviewed by Sarah McNamara (mcnamara@ca.ibm.com) - - - -zongaro@apache.org -2005/07/11 - xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java - -Fix for bug report XALANJ-2140.
- -The AbstractTranslet._keyIndexes field is used to record the sets of keys -for a particular transformation by name. This table was not cleared at the -end of a transformation, so the keys from one transformation persisted to -subsequent transformations. Fixed this by adding a try-finally block in -the AbstractTranslet.transform method and setting _keyIndexes to null in the -finally block.
- -Reviewed by Brian Minchau (minchau@ca.ibm.com). -
-
- -minchau@apache.org -2005/07/13 - xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java - -Minor change in the error message, -fix was found by Brian Vargas, patch produced and -reviewed by Brian Minchau. - - - -minchau@apache.org -2005/07/15 - xml-xalan/java/src/org/apache/xml/serializer ToHTMLSAXHandler.java - -Applying patch2 from XALANJ-2023 -Submitted by Ken Weiner, -reviewed, approved, applied by Brian Minchau - - - -minchau@apache.org -2005/07/15 - xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java - -Changing "<!DOCTYPE HTML" to "<!DOCTYPE html" to be more xhtml friendly. -Applying the patch in XALANJ-2103 that was created by Brian Minchau -and reviewed/approved by Joanne Tong. - - - -minchau@apache.org -2005/07/15 - xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java - -Fixing a NPE for when _locator is null in the XSLTC Parser. -Applyin the patch in XALANJ-2154 from Brian Minchau, reiwed and approved by Santiago P.G. - - - -mcnamara@apache.org -2005/07/15 - xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java - -Patch for XALANJ-2099 provided by Morris Kwan and reviewed by me.
- -According to the EXSLT doc the extension date:day-abbreviation() should -output a three-letter English day abbreviation: one of 'Sun', 'Mon', 'Tue', -'Wed', 'Thu' or 'Fri'. -(See http://exslt.org/date/functions/day-abbreviation/index.html) -
-
- -mcnamara@apache.org -2005/07/15 - xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java - -Patch for XALANJ-2143. Javadoc improvement for TransformerImpl.setOutputProperty(name,value). - - - -mcnamara@apache.org -2005/07/15 - xml-xalan/java/xdocs/sources/xalan usagepatterns.xml - -Patch for XALANJ-2142 - correction for the xalan namespace URI. Patch provided by Brian Minchau and -reviewed by Sarah McNamara. - -Patch for XALANJ-2144 - incorrect use of the word "concurrently" when referring to the XPath module. - - - -mcnamara@apache.org -2005/07/19 - xml-xalan/java/licenses BCEL.LICENSE.txt LICENSE.DOM-documentation.html LICENSE.DOM-software.html -LICENSE-SAX.html regexp.LICENSE.txt runtime.LICENSE.txt serializer.LICENSE.txt serializer.NOTICE.txt xalan.LICENSE.txt -xalan.NOTICE.txt xercesImpl.LICENSE.txt xercesImpl.NOTICE.txt xml-apis.LICENSE.txt xml-apis.NOTICE.txt - -Creation of the xml-xalan/java/licenses directory which contains -all licenses required for the Xalan Java (interpretive and compiled) runtime -jars and its dependencies. Most of these files have been moved here -from xml-xalan/java/bin. The serializer files are new for the Xalan Java 2.7 -release (fixes XALANJ-1977). The xercesImpl.LICENSE.txt and xml-apis.LICENSE.txt -now reflect ASL v2.0.
- -This change was reviewed and approved in XALANJ-2170 by Christine Li. -
-
- -mcnamara@apache.org -2005/07/19 - xml-xalan/java/lib xercesImpl.jar xercesImpl.README.txt xml-apis.jar xml-apis.README.txt BCEL.jar BCEL.README.txt -regexp.jar regexp.README.txt runtime.jar runtime.README.txt - -Creation of the xml-xalan/java/lib directory which contains all runtime -library dependencies (jars) required by Xalan Java (interpretive and compiled) runtime -These files have been moved here from xml-xalan/java/bin.
- -This change was reviewed and approved in XALANJ-2170 by Christine Li. -
-
- -mcnamara@apache.org -2005/07/19 - xml-xalan/java/tools ant.jar ant.LICENSE.txt ant.README.txt antRun antRun.bat java_cup.jar java_cup.LICENSE.txt -java_cup.README.txt JLex.jar JLex.LICENSE.txt JLex.README.txt stylebook-1.0-b3_xalan-2.jar stylebook-1.0-b3_xalan-2.LICENSE.txt -stylebook-1.0-b3_xalan-2.README.txt xalan2jdoc.jar xalan2jtaglet.jar - -Creation of the xml-xalan/java/tools directory which contains all build time -tools required by Xalan Java (interpretive and compiled) builds, including -documentation builds. These tools are not required at runtime.
- -These files have been moved here from xml-xalan/java/bin.
- -This change was reviewed and approved in XALANJ-2170 by Christine Li. -
-
- -mcnamara@apache.org -2005/07/19 - xml-xalan/java serializer.README.txt xalan.README.txt - -New readme files for the xalan.jar and serializer.jar. -This change was reviewed and approved in XALANJ-2170 by Christine Li. - - - -mcnamara@apache.org -2005/07/19 - xml-xalan/java build.bat build.sh build.xml - -Updates to the build scripts and Ant build.xml file to accomodate the -restructuring of the tools and runtime libraries in xml-xalan/java/tools and -xml-xalan/java/lib. Also changes to build.xml to reflect upcoming -Xalan Java 2.7.0 (version number) changes.
- -This change was reviewed and approved in XALANJ-2170 by Christine Li. -
-
- -mcnamara@apache.org -2005/07/19 - xml-xalan/java/samples/AppletXMLtoHTML client.html README.html xml-xalan/java/samples/ApplyXPathDOM ApplyXPathDOM.java - -Doc changes for Xalan Java 2.7.0 release. -This change was reviewed and approved in XALANJ-2170 by Christine Li. - - - -mcnamara@apache.org -2005/07/19 - xml-xalan/java/src/org/apache/xalan/processor XSLProcessorVersion.java xml-xalan/java/src/org/apache/xalan/xslt -EnvironmentCheck.java xml-xalan/java/src/org/apache/xpath/domapi XPathEvaluatorImpl.java XPathExpressionImpl.java -XPathNSResolverImpl.java XPathResultImpl.java xml-xalan/java/src/org/apache/xml/serializer Version.src xml-xalan/java/xdocs/sources -entities.src xalan-jlocal.xml xalan-jsite.xml xml-xalan/java/xdocs/sources/xalan commandline_xsltc.xml commandline.xml downloads.xml -extensions.xml extensionslib.xml faq.xml features.xml getstarted.xml index.xml overview.xml public_apis.xml resources.xml samples.xml -trax.xml usagepatterns.xml whatsnew.xml xpath_apis.xml xsltc_usage.xml xml-xalan/java/xdocs/sources/xsltc README.xslt README.xsltc - -Doc changes for Xalan Java 2.7.0 release. -This change was reviewed and approved in XALANJ-2170 by Christine Li. - - - -mcnamara@apache.org -2005/07/19 - xml-xalan/java/src/org/apache/xalan/processor XSLProcessorVersion.java xml-xalan/java/src/org/apache/xalan/xslt -EnvironmentCheck.java xml-xalan/java/src/org/apache/xpath/domapi XPathEvaluatorImpl.java XPathExpressionImpl.java -XPathNSResolverImpl.java XPathResultImpl.java xml-xalan/java/src/org/apache/xml/serializer Version.src xml-xalan/java/xdocs/sources -entities.src xalan-jlocal.xml xalan-jsite.xml xml-xalan/java/xdocs/sources/xalan commandline_xsltc.xml commandline.xml downloads.xml -extensions.xml extensionslib.xml faq.xml features.xml getstarted.xml index.xml overview.xml public_apis.xml resources.xml samples.xml -trax.xml usagepatterns.xml whatsnew.xml xpath_apis.xml xsltc_usage.xml xml-xalan/java/xdocs/sources/xsltc README.xslt README.xsltc - -Doc changes for Xalan Java 2.7.0 release. -This change was reviewed and approved in XALANJ-2170 by Christine Li. - - - -mcnamara@apache.org -2005/07/19 - xml-xalan/java/src/org/apache/xalan/processor XSLProcessorVersion.src xml-xalan/java build.xml - -Doc changes for Xalan Java 2.7.0 release. -This change was reviewed and approved in XALANJ-2170 by Christine Li. - - - -zongaro@apache.org -2005/07/21 - xml-xalan/java/src/org/apache/xml/utils XMLString.java XMLStringDefault.java xml-xalan/java/src/org/apache/xpath/objects -XString.java - -Patch for XALANJ-2176 reviewed by Christine Li (jycli@ca.ibm.com).
- -Replaced characters in Javadoc comments that were encoded in ISO-8859-1 with -HTML character entity references. This avoids any problems with editors, IDEs -or versions of javac that make faulty assumptions about source encodings. -
-
- -johng@apache.org -2005/07/24 - xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java - -PR: XALANJ-2113 -Submitted by: John Gentilin -Reviewed by: Henry Zongaro - - - -johng@apache.org -2005/07/25 - xml-xalan/java/src/org/apache/xpath/objects XString.java -xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - -PR: XALANJ-2114 -Submitted by: John Gentilin -Reviewed by: Henry Zongaro - - - -mcnamara@ca.ibm.com -2005/07/25 - xml-xalan/java/src/org/apache/xpath/functions FuncSystemProperty.java - -Patch for XALANJ-936. Reviewed by Yash Talwar. - - -
diff --git a/distribution/pom.xml b/distribution/pom.xml deleted file mode 100644 index 76b19fe47..000000000 --- a/distribution/pom.xml +++ /dev/null @@ -1,112 +0,0 @@ - - 4.0.0 - - xalan - xalan-j - 2.7.3 - - - distribution - distribution - pom - - - - - xalan - serializer - - - xalan - xalan - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - create-distros - - - [1,) - - - - - maven-assembly-plugin - 3.6.0 - - - distro-assembly - package - - single - - - ${project.parent.build.finalName} - ../build - - src/assembly/bin.xml - - - - - source-release-assembly - package - - single - - - ${project.parent.build.finalName} - ../build - - src/assembly/src.xml - - gnu - - - - - - - - - - diff --git a/distribution/src/assembly/bin.xml b/distribution/src/assembly/bin.xml deleted file mode 100644 index 0d84acd71..000000000 --- a/distribution/src/assembly/bin.xml +++ /dev/null @@ -1,105 +0,0 @@ - - - bin - - zip - tar.gz - - false - - - true - - xalan:serializer - xalan:xalan - - - ${project.parent.name}_${project.parent.version} - false - - - - org.jboss.spec.javax.rmi:jboss-rmi-api_1.0_spec - - - - - - - true - - xalan:xalansamples - xalan:xalanservlet - xalan:xsltcapplet - xalan:xsltcbrazil - xalan:xsltcejb - xalan:xsltcservlet - - - ${project.parent.name}_${project.parent.version}/samples - false - - - - bcel-* - commons-lang3-* - java-cup-runtime** - regexp-* - serializer-* - xalan-* - - - - - - - - - - ${rootlocation}/lib - ${project.parent.name}_${project.parent.version} - - xercesImpl*.jar - xml-apis*.jar - - - - - .. - META-INF - - LICENSE.txt - NOTICE.txt - - - - - ../target/site - ${project.parent.name}_${project.parent.version}/docs - - - - ../samples - ${project.parent.name}_${project.parent.version}/samples - - target/** - src/site/** - - - - - ../samples/target/site/ - ${project.parent.name}_${project.parent.version}/samples - - **/*.html - - - - diff --git a/distribution/src/assembly/src.xml b/distribution/src/assembly/src.xml deleted file mode 100644 index 0bf21fd77..000000000 --- a/distribution/src/assembly/src.xml +++ /dev/null @@ -1,126 +0,0 @@ - - - - - - - src - - zip - tar.gz - - - - - - .. - / - - false - - - **/target/** - lib/** - build/** - - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/).*${project.basedir}.*] - - - - - %regex[\~$] - %regex[/\#.*\#$] - - - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?maven-eclipse\.xml] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.project] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.classpath] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.idea] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?[^/]*\.iws] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?[^/]*\.ipr] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?[^/]*\.iml] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.settings(/.*)?] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.externalToolBuilders(/.*)?] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.deployables(/.*)?] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?\.wtpmodules(/.*)?] - - - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?cobertura\.ser] - - - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?pom\.xml\.releaseBackup] - %regex[(?!((?!${project.basedir}/)[^/]+/)*src/)(.*/)?release\.properties] - - - - - - ../maven-shared-archive-resources/META-INF - / - - - - .. - / - - - KEYS - README - LICENSE.txt - NOTICE.txt - *.bat - *.sh - - **/pom.xml - **/stylebook/** - - - - ../.. - / - - xalan-test/** - - - - - diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml deleted file mode 100644 index b440dfe9e..000000000 --- a/integration-tests/pom.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - 4.0.0 - - - xalan - xalan-j - 2.7.3 - - - integration-tests - pom - - - - - xalan - serializer - - - xalan - xalan - - - xalan - xalansamples - - - - - - - - org.apache.maven.plugins - maven-invoker-plugin - - - integration-test - - install - run - - - - - src/it - ${project.build.directory}/it - verify - ${project.build.directory}/local-repo - - clean - test - - src/it/settings.xml - - ${project.version} - - true - - - - - - - diff --git a/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/invoker.properties b/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/invoker.properties deleted file mode 100644 index 3fe5fc416..000000000 --- a/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/invoker.properties +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index 0cc458029..000000000 --- a/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/pom.xml +++ /dev/null @@ -1,64 +0,0 @@ - - 4.0.0 - - org.apache.xalan.it - versions - 0.0.1-SNAPSHOT - - - UTF-8 - UTF-8 - - - - - xalan - serializer - @project.version@ - - - xalan - xalan - @project.version@ - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - @maven-compiler-plugin.version@ - - 1.8 - 1.8 - - - - org.codehaus.mojo - exec-maven-plugin - @exec-maven-plugin.version@ - - - display-versions - test - - exec - - - Versions - java - - -Xbootclasspath/a:${settings.localRepository}/xalan/serializer/@project.version@/serializer-@project.version@.jar${path.separator}${settings.localRepository}/xalan/xalan/@project.version@/xalan-@project.version@.jar - -classpath - ${project.build.outputDirectory} - Versions - - - - - - - - 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 deleted file mode 100644 index 31c4666eb..000000000 --- a/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/src/main/java/Versions.java +++ /dev/null @@ -1,38 +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. - */ - -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 deleted file mode 100644 index 588068a08..000000000 --- a/integration-tests/src/it/VersionCheck_JarsOnBootClasspath/verify.groovy +++ /dev/null @@ -1,37 +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. - */ - -// 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 deleted file mode 100644 index 3fe5fc416..000000000 --- a/integration-tests/src/it/VersionCheck_JarsOnClasspath/invoker.properties +++ /dev/null @@ -1,4 +0,0 @@ -# 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 deleted file mode 100644 index 3461449ed..000000000 --- a/integration-tests/src/it/VersionCheck_JarsOnClasspath/pom.xml +++ /dev/null @@ -1,57 +0,0 @@ - - 4.0.0 - - org.apache.xalan.it - versions - 0.0.1-SNAPSHOT - - - UTF-8 - UTF-8 - - - - - xalan - serializer - @project.version@ - - - xalan - xalan - @project.version@ - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - @maven-compiler-plugin.version@ - - 1.8 - 1.8 - - - - org.codehaus.mojo - exec-maven-plugin - @exec-maven-plugin.version@ - - - display-versions - test - - java - - - Versions - - - - - - - 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 deleted file mode 100644 index 31c4666eb..000000000 --- a/integration-tests/src/it/VersionCheck_JarsOnClasspath/src/main/java/Versions.java +++ /dev/null @@ -1,38 +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. - */ - -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 deleted file mode 100644 index 2c9cc23d5..000000000 --- a/integration-tests/src/it/VersionCheck_JarsOnClasspath/verify.groovy +++ /dev/null @@ -1,37 +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. - */ - -// 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 deleted file mode 100644 index 2333c022b..000000000 --- a/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/invoker.properties +++ /dev/null @@ -1,4 +0,0 @@ -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 deleted file mode 100644 index f0be644d4..000000000 --- a/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/pom.xml +++ /dev/null @@ -1,87 +0,0 @@ - - 4.0.0 - - org.apache.xalan.it - versions - 0.0.1-SNAPSHOT - - - UTF-8 - UTF-8 - - - - - xalan - serializer - @project.version@ - - - xalan - xalan - @project.version@ - - - - - - - org.apache.maven.plugins - maven-compiler-plugin - @maven-compiler-plugin.version@ - - 1.8 - 1.8 - - - - org.apache.maven.plugins - maven-shade-plugin - @maven-shade-plugin.version@ - - - package - - shade - - - - - org.apache.xalan - shaded.org.apache.xalan - - - org.apache.xml.serializer - shaded.org.apache.xml.serializer - - - - - - - - org.codehaus.mojo - exec-maven-plugin - @exec-maven-plugin.version@ - - - display-versions - verify - - exec - - - Versions - java - - -Xbootclasspath/a:${build.directory}/${build.finalName}.jar - Versions - - - - - - - - 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 deleted file mode 100644 index 31c4666eb..000000000 --- a/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/src/main/java/Versions.java +++ /dev/null @@ -1,38 +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. - */ - -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 deleted file mode 100644 index 6d12efc2d..000000000 --- a/integration-tests/src/it/VersionCheck_ShadedJarOnBootClasspath/verify.groovy +++ /dev/null @@ -1,37 +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. - */ - -// 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 deleted file mode 100644 index 68f4b2ddd..000000000 --- a/integration-tests/src/it/settings.xml +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - it-repo - - true - - - - local.central - @localRepositoryUrl@ - - true - - - true - - - - - - local.central - @localRepositoryUrl@ - - true - - - true - - - - - - diff --git a/mvnbuild.bat b/mvnbuild.bat deleted file mode 100644 index 7fe831aad..000000000 --- a/mvnbuild.bat +++ /dev/null @@ -1 +0,0 @@ -mvn clean package site diff --git a/mvnbuild.sh b/mvnbuild.sh deleted file mode 100755 index 7fe831aad..000000000 --- a/mvnbuild.sh +++ /dev/null @@ -1 +0,0 @@ -mvn clean package site diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 0b6996048..000000000 --- a/pom.xml +++ /dev/null @@ -1,607 +0,0 @@ - - - - pom - - - org.apache - apache - 23 - - - 4.0.0 - xalan - xalan-j - 2.7.3 - - - Apache-2.0 - - - - - UTF-8 - - "stylebook/stylebook-1.0-b3_xalan-2.jar${path.separator}serializer/target/classes${path.separator}xalan/target/classes${path.separator}" - - 3.11.0 - 3.1.0 - 3.5.1 - 5.10.1 - - 4.11.0 - 3.6.0 - 3.3.0 - - - - serializer - xalan - xalansamples - xalanservlet - xsltcapplet - xsltcbrazil - xsltcejb - xsltcservlet - - distribution - - - - - jdk8 - - [,9) - - - xalan2jtaglet - - - xalan2jtaglet - - - - jdk9+ - - [9,) - - - xalan2jtaglet_jdk9 - - -XX:+EnableDynamicAgentLoading - - - xalan2jtaglet_jdk9 - - - - create-docs - - - [1,) - - - - - - org.codehaus.mojo - exec-maven-plugin - ${exec-maven-plugin.version} - false - - - Xalan2 design documentation - package - - exec - - - java - -cp ${stylebook.classpath} org.apache.stylebook.StyleBook - loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/design/ - ./stylebook/sources/xalandesign.xml ./stylebook/style - - - - - Xalan2 compiled (xsltc) documentation - package - - exec - - - java - -cp ${stylebook.classpath} org.apache.stylebook.StyleBook - loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/xsltc/ - ./stylebook/sources/xsltc.xml ./stylebook/style - - - - Xalan2 interpretive documentation - package - - exec - - - java - -cp ${stylebook.classpath} org.apache.stylebook.StyleBook - loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/xalan - ./stylebook/sources/xalan-jsite.xml ./stylebook/style - - - - - - Xalan2 interpretive documentation, local - package - - exec - - - java - -cp ${stylebook.classpath} org.apache.stylebook.StyleBook - loaderConfig=sbk:/style/loaderdesign.xml targetDirectory=./target/site/xalan/local - ./stylebook/sources/xalan-jlocal.xml ./stylebook/style - - - - - - - - - integration-tests - - - [1,) - - - integration-tests - - - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - 3.6.1 - - - copy-artifact - package - - copy - - - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - ${project.packaging} - - - - ${project.groupId} - ${project.artifactId} - ${project.version} - ${project.packaging} - - ${project.artifactId}.${project.packaging} - - - ${rootlocation}/build - - - - copy-dependencies - package - - copy-dependencies - - - ${rootlocation}/lib - false - false - true - - xalan - - - - - - org.apache.maven.plugins - maven-compiler-plugin - ${maven-compiler-plugin.version} - - 1.8 - 1.8 - - - - - org.apache.maven.plugins - maven-surefire-plugin - 3.2.2 - - ${maven-surefire-plugin.argLine} - - - - - org.apache.maven.plugins - maven-invoker-plugin - 3.6.0 - - - org.codehaus.mojo - build-helper-maven-plugin - 3.5.0 - - - root-location - - rootlocation - - - - - - org.apache.maven.plugins - maven-shade-plugin - ${maven-shade-plugin.version} - - - org.apache.maven.plugins - maven-javadoc-plugin - ${maven-javadoc-plugin.version} - - - - none - - true - - 8 - 1.8 - - - - - xalan2jtaglet.XSLUsageTag - - - - xalan - ${xalan.taglet.artifactId} - ${project.version} - - - - - - XPath - org.apache.xpath* - - - Document Table Model (DTM) - org.apache.xml.dtm* - - - Utilities - org.apache.xml.utils* - - - Xalan Other - 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 - - - Xalan Extensions - org.apache.xalan.lib* - - - Serializers - org.apache.xml.serialize*:org.apache.xalan.serialize - - - SAX 2 - org.xml.sax* - - - DOM 2 - org.w3c.dom* - - - XSLTC Core - org.apache.xalan.xsltc* - - - Samples - samples* - - - - - - - javadoc-jar - package - - jar - - - - - - - - org.apache.maven.plugins - maven-source-plugin - ${maven-source-plugin.version} - - - source-jar - package - - jar-no-fork - - - - - - - - - src/main/java - - - META-INF - - LICENSE.txt - NOTICE.txt - - - - resources - - **/*.properties - - - - - - - org.apache.maven.plugins - maven-site-plugin - 3.7.1 - - - - - org.apache.maven.plugins - maven-project-info-reports-plugin - 3.4.5 - - - - - org.apache.maven.plugins - maven-clean-plugin - 3.3.2 - - - - ./build - false - - - ./lib - false - - - - - - - - org.apache.maven.plugins - maven-resources-plugin - 3.0.2 - - - copy-resources - package - - copy-resources - - - ${basedir}/target/site/xsltc - - - stylebook/sources/xsltc - - README.x* - - - - - - - - - - org.codehaus.mojo - build-helper-maven-plugin - - - - - - - - - - - xalan - serializer - ${project.version} - - - xalan - xalan - ${project.version} - - - xalan - xalansamples - ${project.version} - - - - - xalan - xalan2jtaglet - ${project.version} - - - xalan - xalan2jtaglet_jdk9 - ${project.version} - - - - - org.junit.jupiter - junit-jupiter-engine - ${junit-jupiter.version} - test - - - org.junit.jupiter - junit-jupiter-params - ${junit-jupiter.version} - test - - - org.mockito - mockito-inline - ${mockito.version} - test - - - org.mockito - mockito-junit-jupiter - ${mockito.version} - test - - - - - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - xalan2jtaglet - - - - - aggregate - false - - aggregate - - - - default - - javadoc - - - - - - - - diff --git a/serializer/pom.xml b/serializer/pom.xml deleted file mode 100644 index 3713f2edf..000000000 --- a/serializer/pom.xml +++ /dev/null @@ -1,158 +0,0 @@ - - 4.0.0 - - xalan - xalan-j - 2.7.3 - - - serializer - Apache XML Serializer - Apache's XML serialization layer, as used in the Xalan XSLT processor - - - Apache-2.0 - - - - - - - xalan - ${xalan.taglet.artifactId} - provided - - - - - org.apache.bcel - bcel - 6.7.0 - - - - commons-logging - commons-logging - 1.2 - provided - - - - javax - javaee-api - 6.0 - provided - - - - javax.servlet - servlet-api - 2.5 - provided - - - - xerces - xercesImpl - 2.12.2 - provided - - - - xml-apis - xml-apis - 1.4.01 - - provided - - - - - org.junit.jupiter - junit-jupiter-engine - test - - - org.junit.jupiter - junit-jupiter-params - test - - - org.mockito - mockito-inline - test - - - org.mockito - mockito-junit-jupiter - test - - - - - - - - - src/main/resources - true - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - - - - - create-javadocs - - - [1,) - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - - - - create-sources - - - [1,) - - - - - org.apache.maven.plugins - maven-source-plugin - - - - - - - diff --git a/serializer/src/main/java/MANIFEST.SERIALIZER b/serializer/src/main/java/MANIFEST.SERIALIZER deleted file mode 100644 index 16df32ab6..000000000 --- a/serializer/src/main/java/MANIFEST.SERIALIZER +++ /dev/null @@ -1,21 +0,0 @@ -Manifest-Version: 1.0 -Created-By: @java.version@ (@java.vendor@) -Main-Class: org.apache.xml.serializer.Version -Class-Path: xml-apis.jar -Bundle-License: Apache-2.0; link="http://opensource.org/licenses/apache2.0.php" - -Name: org/apache/xml/serializer/ -Comment: Serializer to write out XML, HTML etc. as a stream of characters from an input DOM or from input SAX events. -Specification-Title: XSL Transformations (XSLT), at http://www.w3.org/TR/xslt -Specification-Vendor: W3C Recommendation 16 November 1999 -Specification-Version: 1.0 -Implementation-Title: org.apache.xml.serializer -Implementation-Version: @impl.version@ -Implementation-Vendor: Apache Software Foundation -Implementation-URL: https://xalan.apache.org/xalan-j/usagepatterns.html - -Name: org/apache/xml/serializer/utils/ -Comment: Utilities used internally by the Serializer. Not for external use. -Implementation-Title: org.apache.xml.serializer.utils -Implementation-Version: @impl.version@ -Implementation-Vendor: Apache Software Foundation diff --git a/serializer/src/main/java/org/apache/xml/serializer/AttributesImplSerializer.java b/serializer/src/main/java/org/apache/xml/serializer/AttributesImplSerializer.java deleted file mode 100644 index 04c6895c5..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/AttributesImplSerializer.java +++ /dev/null @@ -1,237 +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; - -import java.util.Hashtable; - -import org.xml.sax.Attributes; -import org.xml.sax.helpers.AttributesImpl; - -/** - * This class extends org.xml.sax.helpers.AttributesImpl which implements org. - * xml.sax.Attributes. But for optimization this class adds a Hashtable for - * faster lookup of an index by qName, which is commonly done in the stream - * serializer. - * - * @see org.xml.sax.Attributes - * - * @xsl.usage internal - */ -public final class AttributesImplSerializer extends AttributesImpl -{ - /** - * Hash table of qName/index values to quickly lookup the index - * of an attributes qName. qNames are in uppercase in the hash table - * to make the search case insensitive. - * - * The keys to the hashtable to find the index are either - * "prefix:localName" or "{uri}localName". - */ - private final Hashtable m_indexFromQName = new Hashtable(); - - private final StringBuffer m_buff = new StringBuffer(); - - /** - * This is the number of attributes before switching to the hash table, - * and can be tuned, but 12 seems good for now - Brian M. - */ - private static final int MAX = 12; - - /** - * One less than the number of attributes before switching to - * the Hashtable. - */ - private static final int MAXMinus1 = MAX - 1; - - /** - * This method gets the index of an attribute given its qName. - * @param qname the qualified name of the attribute, e.g. "prefix1:locName1" - * @return the integer index of the attribute. - * @see org.xml.sax.Attributes#getIndex(String) - */ - public final int getIndex(String qname) - { - int index; - - if (super.getLength() < MAX) - { - // if we haven't got too many attributes let the - // super class look it up - index = super.getIndex(qname); - return index; - } - // we have too many attributes and the super class is slow - // so find it quickly using our Hashtable. - Integer i = (Integer)m_indexFromQName.get(qname); - if (i == null) - index = -1; - else - index = i.intValue(); - return index; - } - /** - * This method adds the attribute, but also records its qName/index pair in - * the hashtable for fast lookup by getIndex(qName). - * @param uri the URI of the attribute - * @param local the local name of the attribute - * @param qname the qualified name of the attribute - * @param type the type of the attribute - * @param val the value of the attribute - * - * @see org.xml.sax.helpers.AttributesImpl#addAttribute(String, String, String, String, String) - * @see #getIndex(String) - */ - public final void addAttribute( - String uri, - String local, - String qname, - String type, - String val) - { - int index = super.getLength(); - super.addAttribute(uri, local, qname, type, val); - // (index + 1) is now the number of attributes - // so either compare (index+1) to MAX, or compare index to (MAX-1) - - if (index < MAXMinus1) - { - return; - } - else if (index == MAXMinus1) - { - switchOverToHash(MAX); - } - else - { - /* add the key with the format of "prefix:localName" */ - /* we have just added the attibute, its index is the old length */ - Integer i = new Integer(index); - m_indexFromQName.put(qname, i); - - /* now add with key of the format "{uri}localName" */ - m_buff.setLength(0); - m_buff.append('{').append(uri).append('}').append(local); - String key = m_buff.toString(); - m_indexFromQName.put(key, i); - } - return; - } - - /** - * We are switching over to having a hash table for quick look - * up of attributes, but up until now we haven't kept any - * information in the Hashtable, so we now update the Hashtable. - * Future additional attributes will update the Hashtable as - * they are added. - * @param numAtts - */ - private void switchOverToHash(int numAtts) - { - for (int index = 0; index < numAtts; index++) - { - String qName = super.getQName(index); - Integer i = new Integer(index); - m_indexFromQName.put(qName, i); - - // Add quick look-up to find with uri/local name pair - String uri = super.getURI(index); - String local = super.getLocalName(index); - m_buff.setLength(0); - m_buff.append('{').append(uri).append('}').append(local); - String key = m_buff.toString(); - m_indexFromQName.put(key, i); - } - } - - /** - * This method clears the accumulated attributes. - * - * @see org.xml.sax.helpers.AttributesImpl#clear() - */ - public final void clear() - { - - int len = super.getLength(); - super.clear(); - if (MAX <= len) - { - // if we have had enough attributes and are - // using the Hashtable, then clear the Hashtable too. - m_indexFromQName.clear(); - } - - } - - /** - * This method sets the attributes, previous attributes are cleared, - * it also keeps the hashtable up to date for quick lookup via - * getIndex(qName). - * @param atts the attributes to copy into these attributes. - * @see org.xml.sax.helpers.AttributesImpl#setAttributes(Attributes) - * @see #getIndex(String) - */ - public final void setAttributes(Attributes atts) - { - - super.setAttributes(atts); - - // we've let the super class add the attributes, but - // we need to keep the hash table up to date ourselves for the - // potentially new qName/index pairs for quick lookup. - int numAtts = atts.getLength(); - if (MAX <= numAtts) - switchOverToHash(numAtts); - - } - - /** - * This method gets the index of an attribute given its uri and locanName. - * @param uri the URI of the attribute name. - * @param localName the local namer (after the ':' ) of the attribute name. - * @return the integer index of the attribute. - * @see org.xml.sax.Attributes#getIndex(String) - */ - public final int getIndex(String uri, String localName) - { - int index; - - if (super.getLength() < MAX) - { - // if we haven't got too many attributes let the - // super class look it up - index = super.getIndex(uri,localName); - return index; - } - // we have too many attributes and the super class is slow - // so find it quickly using our Hashtable. - // Form the key of format "{uri}localName" - m_buff.setLength(0); - m_buff.append('{').append(uri).append('}').append(localName); - String key = m_buff.toString(); - Integer i = (Integer)m_indexFromQName.get(key); - if (i == null) - index = -1; - else - index = i.intValue(); - return index; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/CharInfo.java b/serializer/src/main/java/org/apache/xml/serializer/CharInfo.java deleted file mode 100644 index 0035f0d87..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/CharInfo.java +++ /dev/null @@ -1,807 +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; - -import java.io.BufferedReader; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.UnsupportedEncodingException; -import java.net.URL; -import java.util.Enumeration; -import java.util.HashMap; -import java.util.Hashtable; -import java.util.PropertyResourceBundle; -import java.util.ResourceBundle; -import java.security.AccessController; -import java.security.PrivilegedAction; - -import javax.xml.transform.TransformerException; - -import org.apache.xml.serializer.utils.MsgKey; -import org.apache.xml.serializer.utils.SystemIDResolver; -import org.apache.xml.serializer.utils.Utils; -import org.apache.xml.serializer.utils.WrappedRuntimeException; - -/** - * This class provides services that tell if a character should have - * special treatement, such as entity reference substitution or normalization - * of a newline character. It also provides character to entity reference - * lookup. - * - * DEVELOPERS: See Known Issue in the constructor. - * - * @xsl.usage internal - */ -final class CharInfo -{ - /** Given a character, lookup a String to output (e.g. a decorated entity reference). */ - private HashMap m_charToString; - - /** - * The name of the HTML entities file. - * If specified, the file will be resource loaded with the default class loader. - */ - public static final String HTML_ENTITIES_RESOURCE = - SerializerBase.PKG_NAME+".HTMLEntities"; - - /** - * The name of the XML entities file. - * If specified, the file will be resource loaded with the default class loader. - */ - public static final String XML_ENTITIES_RESOURCE = - SerializerBase.PKG_NAME+".XMLEntities"; - - /** The horizontal tab character, which the parser should always normalize. */ - static final char S_HORIZONAL_TAB = 0x09; - - /** The linefeed character, which the parser should always normalize. */ - static final char S_LINEFEED = 0x0A; - - /** The carriage return character, which the parser should always normalize. */ - static final char S_CARRIAGERETURN = 0x0D; - static final char S_SPACE = 0x20; - static final char S_QUOTE = 0x22; - static final char S_LT = 0x3C; - static final char S_GT = 0x3E; - static final char S_NEL = 0x85; - static final char S_LINE_SEPARATOR = 0x2028; - - /** This flag is an optimization for HTML entities. It false if entities - * other than quot (34), amp (38), lt (60) and gt (62) are defined - * in the range 0 to 127. - * @xsl.usage internal - */ - boolean onlyQuotAmpLtGt; - - /** Copy the first 0,1 ... ASCII_MAX values into an array */ - static final int ASCII_MAX = 128; - - /** Array of values is faster access than a set of bits - * to quickly check ASCII characters in attribute values, - * the value is true if the character in an attribute value - * should be mapped to a String. - */ - private final boolean[] shouldMapAttrChar_ASCII; - - /** Array of values is faster access than a set of bits - * to quickly check ASCII characters in text nodes, - * the value is true if the character in a text node - * should be mapped to a String. - */ - private final boolean[] shouldMapTextChar_ASCII; - - /** An array of bits to record if the character is in the set. - * Although information in this array is complete, the - * isSpecialAttrASCII array is used first because access to its values - * is common and faster. - */ - private final int array_of_bits[]; - - - // 5 for 32 bit words, 6 for 64 bit words ... - /* - * This constant is used to shift an integer to quickly - * calculate which element its bit is stored in. - * 5 for 32 bit words (int) , 6 for 64 bit words (long) - */ - private static final int SHIFT_PER_WORD = 5; - - /* - * A mask to get the low order bits which are used to - * calculate the value of the bit within a given word, - * that will represent the presence of the integer in the - * set. - * - * 0x1F for 32 bit words (int), - * or 0x3F for 64 bit words (long) - */ - private static final int LOW_ORDER_BITMASK = 0x1f; - - /* - * This is used for optimizing the lookup of bits representing - * the integers in the set. It is the index of the first element - * in the array array_of_bits[] that is not used. - */ - private int firstWordNotUsed; - - - /** - * A base constructor just to explicitly create the fields, - * with the exception of m_charToString which is handled - * by the constructor that delegates base construction to this one. - *

- * m_charToString is not created here only for performance reasons, - * to avoid creating a Hashtable that will be replaced when - * making a mutable copy, {@link #mutableCopyOf(CharInfo)}. - * - */ - private CharInfo() - { - this.array_of_bits = createEmptySetOfIntegers(65535); - this.firstWordNotUsed = 0; - this.shouldMapAttrChar_ASCII = new boolean[ASCII_MAX]; - this.shouldMapTextChar_ASCII = new boolean[ASCII_MAX]; - this.m_charKey = new CharKey(); - - // Not set here, but in a constructor that uses this one - // this.m_charToString = new Hashtable(); - - this.onlyQuotAmpLtGt = true; - - - return; - } - - private CharInfo(String entitiesResource, String method, boolean internal) - { - // call the default constructor to create the fields - this(); - m_charToString = new HashMap(); - - ResourceBundle entities = null; - boolean noExtraEntities = true; - - // Make various attempts to interpret the parameter as a properties - // file or resource file, as follows: - // - // 1) attempt to load .properties file using ResourceBundle - // 2) try using the class loader to find the specified file a resource - // file - // 3) try treating the resource a URI - - if (internal) { - try { - // Load entity property files by using PropertyResourceBundle, - // cause of security issure for applets - entities = PropertyResourceBundle.getBundle(entitiesResource); - } catch (Exception e) {} - } - - if (entities != null) { - Enumeration keys = entities.getKeys(); - while (keys.hasMoreElements()){ - String name = (String) keys.nextElement(); - String value = entities.getString(name); - int code = Integer.parseInt(value); - boolean extra = defineEntity(name, (char) code); - if (extra) - noExtraEntities = false; - } - } else { - InputStream is = null; - - // Load user specified resource file by using URL loading, it - // requires a valid URI as parameter - try { - if (internal) { - is = CharInfo.class.getResourceAsStream(entitiesResource); - } else { - ClassLoader cl = ObjectFactory.findClassLoader(); - if (cl == null) { - is = ClassLoader.getSystemResourceAsStream(entitiesResource); - } else { - is = cl.getResourceAsStream(entitiesResource); - } - - if (is == null) { - try { - URL url = new URL(entitiesResource); - is = url.openStream(); - } catch (Exception e) {} - } - } - - if (is == null) { - throw new RuntimeException( - Utils.messages.createMessage( - MsgKey.ER_RESOURCE_COULD_NOT_FIND, - new Object[] {entitiesResource, entitiesResource})); - } - - // Fix Bugzilla#4000: force reading in UTF-8 - // This creates the de facto standard that Xalan's resource - // files must be encoded in UTF-8. This should work in all - // JVMs. - // - // %REVIEW% KNOWN ISSUE: IT FAILS IN MICROSOFT VJ++, which - // didn't implement the UTF-8 encoding. Theoretically, we should - // simply let it fail in that case, since the JVM is obviously - // broken if it doesn't support such a basic standard. But - // since there are still some users attempting to use VJ++ for - // development, we have dropped in a fallback which makes a - // second attempt using the platform's default encoding. In VJ++ - // this is apparently ASCII, which is subset of UTF-8... and - // since the strings we'll be reading here are also primarily - // limited to the 7-bit ASCII range (at least, in English - // versions of Xalan), this should work well enough to keep us - // on the air until we're ready to officially decommit from - // VJ++. - - BufferedReader reader; - try { - reader = new BufferedReader(new InputStreamReader(is, "UTF-8")); - } catch (UnsupportedEncodingException e) { - reader = new BufferedReader(new InputStreamReader(is)); - } - - String line = reader.readLine(); - - while (line != null) { - if (line.length() == 0 || line.charAt(0) == '#') { - line = reader.readLine(); - - continue; - } - - int index = line.indexOf(' '); - - if (index > 1) { - String name = line.substring(0, index); - - ++index; - - if (index < line.length()) { - String value = line.substring(index); - index = value.indexOf(' '); - - if (index > 0) { - value = value.substring(0, index); - } - - int code = Integer.parseInt(value); - - boolean extra = defineEntity(name, (char) code); - if (extra) - noExtraEntities = false; - } - } - - line = reader.readLine(); - } - - is.close(); - } catch (Exception e) { - throw new RuntimeException( - Utils.messages.createMessage( - MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - new Object[] { entitiesResource, - e.toString(), - entitiesResource, - e.toString()})); - } finally { - if (is != null) { - try { - is.close(); - } catch (Exception except) {} - } - } - } - - onlyQuotAmpLtGt = noExtraEntities; - - /* Now that we've used get(ch) just above to initialize the - * two arrays we will change by adding a tab to the set of - * special chars for XML (but not HTML!). - * We do this because a tab is always a - * special character in an XML attribute, - * but only a special character in XML text - * if it has an entity defined for it. - * This is the reason for this delay. - */ - if (Method.XML.equals(method)) - { - // We choose not to escape the quotation mark as " in text nodes - shouldMapTextChar_ASCII[S_QUOTE] = false; - } - - if (Method.HTML.equals(method)) { - // The XSLT 1.0 recommendation says - // "The html output method should not escape < characters occurring in attribute values." - // So we don't escape '<' in an attribute for HTML - shouldMapAttrChar_ASCII['<'] = false; - - // We choose not to escape the quotation mark as " in text nodes. - shouldMapTextChar_ASCII[S_QUOTE] = false; - } - } - - /** - * Defines a new character reference. The reference's name and value are - * supplied. Nothing happens if the character reference is already defined. - *

Unlike internal entities, character references are a string to single - * character mapping. They are used to map non-ASCII characters both on - * parsing and printing, primarily for HTML documents. '&lt;' is an - * example of a character reference.

- * - * @param name The entity's name - * @param value The entity's value - * @return true if the mapping is not one of: - *
    - *
  • '<' to "<" - *
  • '>' to ">" - *
  • '&' to "&" - *
  • '"' to """ - *
- */ - private boolean defineEntity(String name, char value) - { - StringBuffer sb = new StringBuffer("&"); - sb.append(name); - sb.append(';'); - String entityString = sb.toString(); - - boolean extra = defineChar2StringMapping(entityString, value); - return extra; - } - - /** - * A utility object, just used to map characters to output Strings, - * needed because a HashMap needs to map an object as a key, not a - * Java primitive type, like a char, so this object gets around that - * and it is reusable. - */ - private final CharKey m_charKey; - - /** - * Map a character to a String. For example given - * the character '>' this method would return the fully decorated - * entity name "<". - * Strings for entity references are loaded from a properties file, - * but additional mappings defined through calls to defineChar2String() - * are possible. Such entity reference mappings could be over-ridden. - * - * This is reusing a stored key object, in an effort to avoid - * heap activity. Unfortunately, that introduces a threading risk. - * Simplest fix for now is to make it a synchronized method, or to give - * up the reuse; I see very little performance difference between them. - * Long-term solution would be to replace the hashtable with a sparse array - * keyed directly from the character's integer value; see DTM's - * string pool for a related solution. - * - * @param value The character that should be resolved to - * a String, e.g. resolve '>' to "<". - * - * @return The String that the character is mapped to, or null if not found. - * @xsl.usage internal - */ - String getOutputStringForChar(char value) - { - // CharKey m_charKey = new CharKey(); //Alternative to synchronized - m_charKey.setChar(value); - return (String) m_charToString.get(m_charKey); - } - - /** - * Tell if the character argument that is from - * an attribute value has a mapping to a String. - * - * @param value the value of a character that is in an attribute value - * @return true if the character should have any special treatment, - * such as when writing out entity references. - * @xsl.usage internal - */ - final boolean shouldMapAttrChar(int value) - { - // for performance try the values in the boolean array first, - // this is faster access than the BitSet for common ASCII values - - if (value < ASCII_MAX) - return shouldMapAttrChar_ASCII[value]; - - // rather than java.util.BitSet, our private - // implementation is faster (and less general). - return get(value); - } - - /** - * Tell if the character argument that is from a - * text node has a mapping to a String, for example - * to map '<' to "<". - * - * @param value the value of a character that is in a text node - * @return true if the character has a mapping to a String, - * such as when writing out entity references. - * @xsl.usage internal - */ - final boolean shouldMapTextChar(int value) - { - // for performance try the values in the boolean array first, - // this is faster access than the BitSet for common ASCII values - - if (value < ASCII_MAX) - return shouldMapTextChar_ASCII[value]; - - // rather than java.util.BitSet, our private - // implementation is faster (and less general). - return get(value); - } - - - - private static CharInfo getCharInfoBasedOnPrivilege( - final String entitiesFileName, final String method, - final boolean internal){ - return (CharInfo) AccessController.doPrivileged( - new PrivilegedAction() { - public Object run() { - return new CharInfo(entitiesFileName, - method, internal);} - }); - } - - /** - * Factory that reads in a resource file that describes the mapping of - * characters to entity references. - * - * Resource files must be encoded in UTF-8 and have a format like: - *
-     * # First char # is a comment
-     * Entity numericValue
-     * quot 34
-     * amp 38
-     * 
- * (Note: Why don't we just switch to .properties files? Oct-01 -sc) - * - * @param entitiesResource Name of entities resource file that should - * be loaded, which describes that mapping of characters to entity references. - * @param method the output method type, which should be one of "xml", "html", "text"... - * - * @xsl.usage internal - */ - static CharInfo getCharInfo(String entitiesFileName, String method) - { - CharInfo charInfo = (CharInfo) m_getCharInfoCache.get(entitiesFileName); - if (charInfo != null) { - return mutableCopyOf(charInfo); - } - - // try to load it internally - cache - try { - charInfo = getCharInfoBasedOnPrivilege(entitiesFileName, - method, true); - // Put the common copy of charInfo in the cache, but return - // a copy of it. - m_getCharInfoCache.put(entitiesFileName, charInfo); - return mutableCopyOf(charInfo); - } catch (Exception e) {} - - // try to load it externally - do not cache - try { - return getCharInfoBasedOnPrivilege(entitiesFileName, - method, false); - } catch (Exception e) {} - - String absoluteEntitiesFileName; - - if (entitiesFileName.indexOf(':') < 0) { - absoluteEntitiesFileName = - SystemIDResolver.getAbsoluteURIFromRelative(entitiesFileName); - } else { - try { - absoluteEntitiesFileName = - SystemIDResolver.getAbsoluteURI(entitiesFileName, null); - } catch (TransformerException te) { - throw new WrappedRuntimeException(te); - } - } - - return getCharInfoBasedOnPrivilege(entitiesFileName, - method, false); - } - - /** - * Create a mutable copy of the cached one. - * @param charInfo The cached one. - * @return - */ - private static CharInfo mutableCopyOf(CharInfo charInfo) { - CharInfo copy = new CharInfo(); - - int max = charInfo.array_of_bits.length; - System.arraycopy(charInfo.array_of_bits,0,copy.array_of_bits,0,max); - - copy.firstWordNotUsed = charInfo.firstWordNotUsed; - - max = charInfo.shouldMapAttrChar_ASCII.length; - System.arraycopy(charInfo.shouldMapAttrChar_ASCII,0,copy.shouldMapAttrChar_ASCII,0,max); - - max = charInfo.shouldMapTextChar_ASCII.length; - System.arraycopy(charInfo.shouldMapTextChar_ASCII,0,copy.shouldMapTextChar_ASCII,0,max); - - // utility field copy.m_charKey is already created in the default constructor - - copy.m_charToString = (HashMap) charInfo.m_charToString.clone(); - - copy.onlyQuotAmpLtGt = charInfo.onlyQuotAmpLtGt; - - return copy; - } - - /** - * Table of user-specified char infos. - * The table maps entify file names (the name of the - * property file without the .properties extension) - * to CharInfo objects populated with entities defined in - * corresponding property file. - */ - private static Hashtable m_getCharInfoCache = new Hashtable(); - - /** - * Returns the array element holding the bit value for the - * given integer - * @param i the integer that might be in the set of integers - * - */ - private static int arrayIndex(int i) { - return (i >> SHIFT_PER_WORD); - } - - /** - * For a given integer in the set it returns the single bit - * value used within a given word that represents whether - * the integer is in the set or not. - */ - private static int bit(int i) { - int ret = (1 << (i & LOW_ORDER_BITMASK)); - return ret; - } - - /** - * Creates a new empty set of integers (characters) - * @param max the maximum integer to be in the set. - */ - private int[] createEmptySetOfIntegers(int max) { - firstWordNotUsed = 0; // an optimization - - int[] arr = new int[arrayIndex(max - 1) + 1]; - return arr; - - } - - /** - * Adds the integer (character) to the set of integers. - * @param i the integer to add to the set, valid values are - * 0, 1, 2 ... up to the maximum that was specified at - * the creation of the set. - */ - private final void set(int i) { - setASCIItextDirty(i); - setASCIIattrDirty(i); - - int j = (i >> SHIFT_PER_WORD); // this word is used - int k = j + 1; - - if(firstWordNotUsed < k) // for optimization purposes. - firstWordNotUsed = k; - - array_of_bits[j] |= (1 << (i & LOW_ORDER_BITMASK)); - } - - - /** - * Return true if the integer (character)is in the set of integers. - * - * This implementation uses an array of integers with 32 bits per - * integer. If a bit is set to 1 the corresponding integer is - * in the set of integers. - * - * @param i an integer that is tested to see if it is the - * set of integers, or not. - */ - private final boolean get(int i) { - - boolean in_the_set = false; - int j = (i >> SHIFT_PER_WORD); // wordIndex(i) - // an optimization here, ... a quick test to see - // if this integer is beyond any of the words in use - if(j < firstWordNotUsed) - in_the_set = (array_of_bits[j] & - (1 << (i & LOW_ORDER_BITMASK)) - ) != 0; // 0L for 64 bit words - return in_the_set; - } - - /** - * This method returns true if there are some non-standard mappings to - * entities other than quot, amp, lt, gt, and its only purpose is for - * performance. - * @param charToMap The value of the character that is mapped to a String - * @param outputString The String to which the character is mapped, usually - * an entity reference such as "<". - * @return true if the mapping is not one of: - *
    - *
  • '<' to "<" - *
  • '>' to ">" - *
  • '&' to "&" - *
  • '"' to """ - *
- */ - private boolean extraEntity(String outputString, int charToMap) - { - boolean extra = false; - if (charToMap < ASCII_MAX) - { - switch (charToMap) - { - case '"' : // quot - if (!outputString.equals(""")) - extra = true; - break; - case '&' : // amp - if (!outputString.equals("&")) - extra = true; - break; - case '<' : // lt - if (!outputString.equals("<")) - extra = true; - break; - case '>' : // gt - if (!outputString.equals(">")) - extra = true; - break; - default : // other entity in range 0 to 127 - extra = true; - } - } - return extra; - } - - /** - * If the character is in the ASCII range then - * mark it as needing replacement with - * a String on output if it occurs in a text node. - * @param ch - */ - private void setASCIItextDirty(int j) - { - if (0 <= j && j < ASCII_MAX) - { - shouldMapTextChar_ASCII[j] = true; - } - } - - /** - * If the character is in the ASCII range then - * mark it as needing replacement with - * a String on output if it occurs in a attribute value. - * @param ch - */ - private void setASCIIattrDirty(int j) - { - if (0 <= j && j < ASCII_MAX) - { - shouldMapAttrChar_ASCII[j] = true; - } - } - - - /** - * Call this method to register a char to String mapping, for example - * to map '<' to "<". - * @param outputString The String to map to. - * @param inputChar The char to map from. - * @return true if the mapping is not one of: - *
    - *
  • '<' to "<" - *
  • '>' to ">" - *
  • '&' to "&" - *
  • '"' to """ - *
- */ - boolean defineChar2StringMapping(String outputString, char inputChar) - { - CharKey character = new CharKey(inputChar); - m_charToString.put(character, outputString); - set(inputChar); // mark the character has having a mapping to a String - - boolean extraMapping = extraEntity(outputString, inputChar); - return extraMapping; - - } - - /** - * Simple class for fast lookup of char values, when used with - * hashtables. You can set the char, then use it as a key. - * - * @xsl.usage internal - */ - private static class CharKey extends Object - { - - /** String value */ - private char m_char; - - /** - * Constructor CharKey - * - * @param key char value of this object. - */ - public CharKey(char key) - { - m_char = key; - } - - /** - * Default constructor for a CharKey. - * - * @param key char value of this object. - */ - public CharKey() - { - } - - /** - * Get the hash value of the character. - * - * @return hash value of the character. - */ - public final void setChar(char c) - { - m_char = c; - } - - - - /** - * Get the hash value of the character. - * - * @return hash value of the character. - */ - public final int hashCode() - { - return (int)m_char; - } - - /** - * Override of equals() for this object - * - * @param obj to compare to - * - * @return True if this object equals this string value - */ - public final boolean equals(Object obj) - { - return ((CharKey)obj).m_char == m_char; - } - } - - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/DOM3Serializer.java b/serializer/src/main/java/org/apache/xml/serializer/DOM3Serializer.java deleted file mode 100644 index d05c37743..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/DOM3Serializer.java +++ /dev/null @@ -1,171 +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; - -import java.io.IOException; - -import org.w3c.dom.DOMErrorHandler; -import org.w3c.dom.Node; -import org.w3c.dom.ls.LSSerializerFilter; - -/** - * This interface is not intended to be used - * by an end user, but rather by an XML parser that is implementing the DOM - * Level 3 Load and Save APIs. - *

- * - * See the DOM Level 3 Load and Save interface at LSSeializer. - * - * For a list of configuration parameters for DOM Level 3 see DOMConfiguration. - * For additional configuration parameters available with the DOM Level 3 Load and Save API LSSerializer see - * LSerializer config. - *

- * The following example uses a DOM3Serializer indirectly, through an an XML - * parser that uses this class as part of its implementation of the DOM Level 3 - * Load and Save APIs, and is the prefered way to serialize with DOM Level 3 APIs. - *

- * Example: - *

- *    public class TestDOM3 { 
- *
- *    public static void main(String args[]) throws Exception {
- *        // Get document to serialize
- *        TestDOM3 test = new TestDOM3();
- *        
- *        // Serialize using standard DOM Level 3 Load/Save APIs        
- *        System.out.println(test.testDOM3LS());
- *    }
- *
- *    // 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();
- *        javax.xml.parsers.DocumentBuilder builder = factory.newDocumentBuilder();
- *        byte[] bytes = "".getBytes();
- *        java.io.InputStream is = new java.io.ByteArrayInputStream(bytes);
- *        org.w3c.dom.Document doc = builder.parse(is);
- *        return doc;
- *    }
- *    
- *    //
- *    // This method uses standard DOM Level 3 Load Save APIs:
- *    //   org.w3c.dom.bootstrap.DOMImplementationRegistry
- *    //   org.w3c.dom.ls.DOMImplementationLS
- *    //   org.w3c.dom.ls.DOMImplementationLS
- *    //   org.w3c.dom.ls.LSSerializer
- *    //   org.w3c.dom.DOMConfiguration
- *    //   
- *    // The only thing non-standard in this method is the value set for the
- *    // name of the class implementing the DOM Level 3 Load Save APIs,
- *    // which in this case is:
- *    //   org.apache.xerces.dom.DOMImplementationSourceImpl
- *    //
- *
- *    public String testDOM3LS() throws Exception {
- *        
- *        // Get a simple DOM Document that will be serialized.
- *        org.w3c.dom.Document docToSerialize = getDocument();
- *
- *        // Get a factory (DOMImplementationLS) for creating a Load and Save object.
- *        org.w3c.dom.ls.DOMImplementationLS impl = 
- *            (org.w3c.dom.ls.DOMImplementationLS) 
- *            org.w3c.dom.bootstrap.DOMImplementationRegistry.newInstance().getDOMImplementation("LS");
- *
- *        // Use the factory to create an object (LSSerializer) used to 
- *        // write out or save the document.
- *        org.w3c.dom.ls.LSSerializer writer = impl.createLSSerializer();
- *        org.w3c.dom.DOMConfiguration config = writer.getDomConfig();
- *        config.setParameter("format-pretty-print", Boolean.TRUE);
- *        
- *        // Use the LSSerializer to write out or serialize the document to a String.
- *        String serializedXML = writer.writeToString(docToSerialize);
- *        return serializedXML;
- *    }
- *    
- *    }  // end of class TestDOM3
- * 
- * - * @see DOMConfiguration - * @see LSSerializer - * @see org.apache.xml.serializer.Serializer - * @see org.apache.xml.serializer.DOMSerializer - * - * @xsl.usage advanced - * - */ -public interface DOM3Serializer { - /** - * Serializes the Level 3 DOM node. Throws an exception only if an I/O - * exception occured while serializing. - * - * This interface is a public API. - * - * @param node the Level 3 DOM node to serialize - * @throws IOException if an I/O exception occured while serializing - */ - public void serializeDOM3(Node node) throws IOException; - - /** - * Sets a DOMErrorHandler on the DOM Level 3 Serializer. - * - * This interface is a public API. - * - * @param handler the Level 3 DOMErrorHandler - */ - public void setErrorHandler(DOMErrorHandler handler); - - /** - * Returns a DOMErrorHandler set on the DOM Level 3 Serializer. - * - * This interface is a public API. - * - * @return A Level 3 DOMErrorHandler - */ - public DOMErrorHandler getErrorHandler(); - - /** - * Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes - * during serialization. - * - * This interface is a public API. - * - * @param filter the Level 3 LSSerializerFilter - */ - public void setNodeFilter(LSSerializerFilter filter); - - /** - * Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes - * during serialization. - * - * This interface is a public API. - * - * @return The Level 3 LSSerializerFilter - */ - public LSSerializerFilter getNodeFilter(); - - /** - * Sets the end-of-line sequence of characters to be used during serialization - * @param newLine The end-of-line sequence of characters to be used during serialization - */ - public void setNewLine(char[] newLine); -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/DOMSerializer.java b/serializer/src/main/java/org/apache/xml/serializer/DOMSerializer.java deleted file mode 100644 index 7ba011c5f..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/DOMSerializer.java +++ /dev/null @@ -1,74 +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; - -import java.io.IOException; - -import org.w3c.dom.Node; - -/** - * Interface for a DOM serializer implementation. - *

- * The DOMSerializer is a facet of a serializer and is obtained from the - * asDOMSerializer() method of the ({@link Serializer}) interface. - * A serializer may or may not support a DOM serializer, if it does not then the - * return value from asDOMSerializer() is null. - *

- * Example: - *

- * // Create a document to be serialized
- * org.w3c.dom.Document doc = ...;
- * 
- * // Create a Serializer that will be used
- * // to serialize the document  
- * org.apache.xml.serializer.Serializer ser = ...;
- *
- * // Set the Writer to write output to, and 
- * // serialize the DOM using that Serializer
- * java.io.StringWriter sw = new java.io.StringWriter();
- * ser.setWriter(sw);
- * DOMSerialzier dser = ser.asDOMSerializer();
- * dser.serialize(doc);
- * 
- * // Write out the serialized XML in the String.
- * System.out.println(sw.toString());
- * 
- * - * @see OutputPropertiesFactory - * @see SerializerFactory - * @see Serializer - * - * @xsl.usage general - * - */ -public interface DOMSerializer -{ - /** - * Serializes the DOM node. Throws an exception only if an I/O - * exception occured while serializing. - * - * This interface is a public API. - * - * @param node the DOM node to serialize - * @throws IOException if an I/O exception occured while serializing - */ - public void serialize(Node node) throws IOException; -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ElemContext.java b/serializer/src/main/java/org/apache/xml/serializer/ElemContext.java deleted file mode 100644 index d42602e7f..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ElemContext.java +++ /dev/null @@ -1,222 +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; - -/** - * This class is a stack frame that consists of - * information about the element currently being processed - * by a serializer. Consider this example: - *
- *   
- *     
- *     
- *     
- *     
- *   
- * 
- * - * A stack frame will be pushed for "A" at depth 1, - * then another one for "B1" at depth 2. - * Then "B1" stackframe is popped. When the stack frame for "B2" is - * pushed, this implementation re-uses the old stack fram object used - * by "B1" to be efficient at not creating too many of these object. - * - * This is by no means a public class, and neither are its fields or methods, - * they are all helper fields for a serializer. - * - * The purpose of this class is to be more consistent with pushing information - * when a new element is being serialized and more quickly restoring the old - * information about the parent element with a simple pop() when the - * child element is done. Previously there was some redundant and error-prone - * calculations going on to retore information. - * - * @xsl.usage internal - */ -final class ElemContext -{ - // Fields that form the context of the element - - /** - * The nesting depth of the element inside other elements. - */ - final int m_currentElemDepth; - - /** HTML field, the element description of the HTML element */ - ElemDesc m_elementDesc = null; - - /** - * The local name of the element. - */ - String m_elementLocalName = null; - - /** - * The fully qualified name of the element (with prefix, if any). - */ - String m_elementName = null; - - /** - * The URI of the element. - * If this value is null it means that the URI is not yet determined - * for the element. Valid values are the empty string "", meaning - * that it is in no namespace, or a string of non-zero length. - */ - String m_elementURI = null; - - /** If the element is in the cdata-section-names list - * then the value is true. If it is true the text children of the element - * should be output in CDATA section blocks. - */ - boolean m_isCdataSection; - - /** True if the current element has output escaping disabled. - * This is true for SCRIPT and STYLE elements. - */ - boolean m_isRaw = false; - - /** The next element "stack frame". This value will only be - * set once as deeper stack frames are not deleted when popped off, - * but are rather re-used when a push is required. - * - * This makes for very fast pushing and popping of stack frames - * because very few stack frame objects are ever created, they are - * mostly re-used. This re-use saves object creation but it also means - * that connections between the frames via m_next and m_prev - * never changes either. Just the contents of the frames change - * as they are re-used. Only the reference to the current stack frame, which - * is held by the serializer is changed via a quick pop() or push(). - */ - private ElemContext m_next; - - /** The previous element "stack frame". */ - final ElemContext m_prev; - - /** - * Set to true when a start tag is started, or open, but not all the - * attributes or namespace information is yet collected. - */ - boolean m_startTagOpen = false; - - /** - * Constructor to create the root of the element contexts. - * - */ - ElemContext() - { - // this assignment means can never pop this context off - m_prev = this; - // depth 0 because it doesn't correspond to any element - m_currentElemDepth = 0; - } - - /** - * Constructor to create the "stack frame" for a given element depth. - * - * This implementation will re-use the context at each depth. If - * a documents deepest element depth is N then there will be (N+1) - * such objects created, no more than that. - * - * @param previous The "stack frame" corresponding to the new - * elements parent element. - */ - private ElemContext(final ElemContext previous) - { - m_prev = previous; - m_currentElemDepth = previous.m_currentElemDepth + 1; - } - - /** - * Pop the current "stack frame". - * @return Returns the parent "stack frame" of the one popped. - */ - final ElemContext pop() - { - /* a very simple pop. No clean up is done of the deeper - * stack frame. All deeper stack frames are still attached - * but dormant, just waiting to be re-used. - */ - return this.m_prev; - } - - /** - * This method pushes an element "stack frame" - * but with no initialization of values in that frame. - * This method is used for optimization purposes, like when pushing - * a stack frame for an HTML "IMG" tag which has no children and - * the stack frame will almost immediately be popped. - */ - final ElemContext push() - { - ElemContext frame = this.m_next; - if (frame == null) - { - /* We have never been at this depth yet, and there is no - * stack frame to re-use, so we now make a new one. - */ - frame = new ElemContext(this); - this.m_next = frame; - } - /* - * We shouldn't need to set this true because we should just - * be pushing a dummy stack frame that will be instantly popped. - * Yet we need to be ready in case this element does have - * unexpected children. - */ - frame.m_startTagOpen = true; - return frame; - } - - /** - * Push an element context on the stack. This context keeps track of - * information gathered about the element. - * @param uri The URI for the namespace for the element name, - * can be null if it is not yet known. - * @param localName The local name of the element (no prefix), - * can be null. - * @param qName The qualified name (with prefix, if any) - * of the element, this parameter is required. - */ - final ElemContext push( - final String uri, - final String localName, - final String qName) - { - ElemContext frame = this.m_next; - if (frame == null) - { - /* We have never been at this depth yet, and there is no - * stack frame to re-use, so we now make a new one. - */ - frame = new ElemContext(this); - this.m_next = frame; - } - - // Initialize, or reset values in the new or re-used stack frame. - frame.m_elementName = qName; - frame.m_elementLocalName = localName; - frame.m_elementURI = uri; - frame.m_isCdataSection = false; - frame.m_startTagOpen = true; - - // is_Raw is already set in the HTML startElement() method - // frame.m_isRaw = false; - return frame; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ElemDesc.java b/serializer/src/main/java/org/apache/xml/serializer/ElemDesc.java deleted file mode 100644 index 08744f11e..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ElemDesc.java +++ /dev/null @@ -1,179 +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; - -import org.apache.xml.serializer.utils.StringToIntTable; - -/** - * This class has a series of flags (bit values) that describe an HTML element - *

- * This class is not a public API. - * It is public because it is used outside of this package. - * - * @xsl.usage internal - */ -public final class ElemDesc -{ - /** Bit flags to tell about this element type. */ - private int m_flags; - - /** - * Table of attribute names to integers, which contain bit flags telling about - * the attributes. - */ - private StringToIntTable m_attrs = null; - - /** Bit position if this element type is empty. */ - static final int EMPTY = (1 << 1); - - /** Bit position if this element type is a flow. */ - private static final int FLOW = (1 << 2); - - /** Bit position if this element type is a block. */ - static final int BLOCK = (1 << 3); - - /** Bit position if this element type is a block form. */ - static final int BLOCKFORM = (1 << 4); - - /** Bit position if this element type is a block form field set. */ - static final int BLOCKFORMFIELDSET = (1 << 5); - - /** Bit position if this element type is CDATA. */ - private static final int CDATA = (1 << 6); - - /** Bit position if this element type is PCDATA. */ - private static final int PCDATA = (1 << 7); - - /** Bit position if this element type is should be raw characters. */ - static final int RAW = (1 << 8); - - /** Bit position if this element type should be inlined. */ - private static final int INLINE = (1 << 9); - - /** Bit position if this element type is INLINEA. */ - private static final int INLINEA = (1 << 10); - - /** Bit position if this element type is an inline label. */ - static final int INLINELABEL = (1 << 11); - - /** Bit position if this element type is a font style. */ - static final int FONTSTYLE = (1 << 12); - - /** Bit position if this element type is a phrase. */ - static final int PHRASE = (1 << 13); - - /** Bit position if this element type is a form control. */ - static final int FORMCTRL = (1 << 14); - - /** Bit position if this element type is ???. */ - static final int SPECIAL = (1 << 15); - - /** Bit position if this element type is ???. */ - static final int ASPECIAL = (1 << 16); - - /** Bit position if this element type is an odd header element. */ - static final int HEADMISC = (1 << 17); - - /** Bit position if this element type is a head element (i.e. H1, H2, etc.) */ - static final int HEAD = (1 << 18); - - /** Bit position if this element type is a list. */ - static final int LIST = (1 << 19); - - /** Bit position if this element type is a preformatted type. */ - static final int PREFORMATTED = (1 << 20); - - /** Bit position if this element type is whitespace sensitive. */ - static final int WHITESPACESENSITIVE = (1 << 21); - - /** Bit position if this element type is a header element (i.e. HEAD). */ - static final int HEADELEM = (1 << 22); - - /** Bit position if this element is the "HTML" element */ - static final int HTMLELEM = (1 << 23); - - /** Bit position if this attribute type is a URL. */ - public static final int ATTRURL = (1 << 1); - - /** Bit position if this attribute type is an empty type. */ - public static final int ATTREMPTY = (1 << 2); - - /** - * Construct an ElemDesc from a set of bit flags. - * - * - * @param flags Bit flags that describe the basic properties of this element type. - */ - ElemDesc(int flags) - { - m_flags = flags; - } - - /** - * Tell if this element type has the basic bit properties that are passed - * as an argument. - * - * @param flags Bit flags that describe the basic properties of interest. - * - * @return true if any of the flag bits are true. - */ - private boolean is(int flags) - { - - // int which = (m_flags & flags); - return (m_flags & flags) != 0; - } - - int getFlags() { - return m_flags; - } - - /** - * Set an attribute name and it's bit properties. - * - * - * @param name non-null name of attribute, in upper case. - * @param flags flag bits. - */ - void setAttr(String name, int flags) - { - - if (null == m_attrs) - m_attrs = new StringToIntTable(); - - m_attrs.put(name, flags); - } - - /** - * Tell if any of the bits of interest are set for a named attribute type. - * - * @param name non-null reference to attribute name, in any case. - * @param flags flag mask. - * - * @return true if any of the flags are set for the named attribute. - */ - public boolean isAttrFlagSet(String name, int flags) - { - return (null != m_attrs) - ? ((m_attrs.getIgnoreCase(name) & flags) != 0) - : false; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/EmptySerializer.java b/serializer/src/main/java/org/apache/xml/serializer/EmptySerializer.java deleted file mode 100644 index 3bcd49ddd..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/EmptySerializer.java +++ /dev/null @@ -1,822 +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; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; -import java.util.Hashtable; -import java.util.Properties; -import java.util.Vector; - -import javax.xml.transform.SourceLocator; -import javax.xml.transform.Transformer; - -import org.w3c.dom.Node; -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; - -/** - * This class is an adapter class. Its only purpose is to be extended and - * for that extended class to over-ride all methods that are to be used. - * - * This class is not a public API, it is only public because it is used - * across package boundaries. - * - * @xsl.usage internal - */ -public class EmptySerializer implements SerializationHandler -{ - protected static final String ERR = "EmptySerializer method not over-ridden"; - /** - * 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 - { - couldThrowIOException(); - return null; - } - /** - * @see SerializationHandler#setContentHandler(org.xml.sax.ContentHandler) - */ - public void setContentHandler(ContentHandler ch) - { - aMethodIsCalled(); - } - /** - * @see SerializationHandler#close() - */ - public void close() - { - aMethodIsCalled(); - } - /** - * @return Properties object describing the serializer's configuration - * @see SerializationHandler#getOutputFormat() - */ - public Properties getOutputFormat() - { - aMethodIsCalled(); - return null; - } - /** - * @return the OutputStream that this serializer would write to - * @see SerializationHandler#getOutputStream() - */ - public OutputStream getOutputStream() - { - aMethodIsCalled(); - return null; - } - /** - * @return the Writer this serializer uses to write to the OutputStream - * @see SerializationHandler#getWriter() - */ - public Writer getWriter() - { - aMethodIsCalled(); - return null; - } - /** - * return - * @see SerializationHandler#reset() - */ - public boolean reset() - { - aMethodIsCalled(); - return false; - } - /** - * @see SerializationHandler#serialize(org.w3c.dom.Node) - */ - public void serialize(Node node) throws IOException - { - couldThrowIOException(); - } - /** - * @see SerializationHandler#setCdataSectionElements(java.util.Vector) - */ - 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 - { - couldThrowSAXException(); - return false; - } - /** - * @see SerializationHandler#setIndent(boolean) - */ - public void setIndent(boolean indent) - { - aMethodIsCalled(); - } - /** - * @see SerializationHandler#setIndentAmount(int) - */ - public void setIndentAmount(int spaces) - { - aMethodIsCalled(); - } - /** - * @see SerializationHandler#setOutputFormat(java.util.Properties) - */ - public void setOutputFormat(Properties format) - { - aMethodIsCalled(); - } - /** - * @see SerializationHandler#setOutputStream(java.io.OutputStream) - */ - public void setOutputStream(OutputStream output) - { - aMethodIsCalled(); - } - /** - * @see SerializationHandler#setVersion(java.lang.String) - */ - public void setVersion(String version) - { - aMethodIsCalled(); - } - /** - * @see SerializationHandler#setWriter(java.io.Writer) - */ - public void setWriter(Writer writer) - { - aMethodIsCalled(); - } - /** - * @see SerializationHandler#setTransformer(javax.xml.transform.Transformer) - */ - public void setTransformer(Transformer transformer) - { - aMethodIsCalled(); - } - /** - * @see SerializationHandler#getTransformer() - */ - public Transformer getTransformer() - { - aMethodIsCalled(); - return null; - } - /** - * @see SerializationHandler#flushPending() - */ - public void flushPending() throws SAXException - { - couldThrowSAXException(); - } - /** - * @see ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) - */ - public void addAttribute( - String uri, - String localName, - String rawName, - String type, - String value, - boolean XSLAttribute) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see ExtendedContentHandler#addAttributes(org.xml.sax.Attributes) - */ - public void addAttributes(Attributes atts) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String) - */ - public void addAttribute(String name, String value) - { - aMethodIsCalled(); - } - - /** - * @see ExtendedContentHandler#characters(java.lang.String) - */ - public void characters(String chars) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see ExtendedContentHandler#endElement(java.lang.String) - */ - public void endElement(String elemName) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see ExtendedContentHandler#startDocument() - */ - public void startDocument() throws SAXException - { - couldThrowSAXException(); - } - /** - * @see ExtendedContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String) - */ - public void startElement(String uri, String localName, String qName) - throws SAXException - { - couldThrowSAXException(qName); - } - /** - * @see ExtendedContentHandler#startElement(java.lang.String) - */ - public void startElement(String qName) throws SAXException - { - couldThrowSAXException(qName); - } - /** - * @see ExtendedContentHandler#namespaceAfterStartElement(java.lang.String, java.lang.String) - */ - public void namespaceAfterStartElement(String uri, String prefix) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see ExtendedContentHandler#startPrefixMapping(java.lang.String, java.lang.String, boolean) - */ - public boolean startPrefixMapping( - String prefix, - String uri, - boolean shouldFlush) - throws SAXException - { - couldThrowSAXException(); - return false; - } - /** - * @see ExtendedContentHandler#entityReference(java.lang.String) - */ - public void entityReference(String entityName) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see ExtendedContentHandler#getNamespaceMappings() - */ - public NamespaceMappings getNamespaceMappings() - { - aMethodIsCalled(); - return null; - } - /** - * @see ExtendedContentHandler#getPrefix(java.lang.String) - */ - public String getPrefix(String uri) - { - aMethodIsCalled(); - return null; - } - /** - * @see ExtendedContentHandler#getNamespaceURI(java.lang.String, boolean) - */ - public String getNamespaceURI(String name, boolean isElement) - { - aMethodIsCalled(); - return null; - } - /** - * @see ExtendedContentHandler#getNamespaceURIFromPrefix(java.lang.String) - */ - public String getNamespaceURIFromPrefix(String prefix) - { - aMethodIsCalled(); - return null; - } - /** - * @see org.xml.sax.ContentHandler#setDocumentLocator(org.xml.sax.Locator) - */ - public void setDocumentLocator(Locator arg0) - { - aMethodIsCalled(); - } - /** - * @see org.xml.sax.ContentHandler#endDocument() - */ - public void endDocument() throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ContentHandler#startPrefixMapping(java.lang.String, java.lang.String) - */ - public void startPrefixMapping(String arg0, String arg1) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ContentHandler#endPrefixMapping(java.lang.String) - */ - public void endPrefixMapping(String arg0) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ContentHandler#startElement(java.lang.String, java.lang.String, java.lang.String, org.xml.sax.Attributes) - */ - public void startElement( - String arg0, - String arg1, - String arg2, - Attributes arg3) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ContentHandler#endElement(java.lang.String, java.lang.String, java.lang.String) - */ - public void endElement(String arg0, String arg1, String arg2) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ContentHandler#characters(char[], int, int) - */ - public void characters(char[] arg0, int arg1, int arg2) throws SAXException - { - couldThrowSAXException(arg0, arg1, arg2); - } - /** - * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int) - */ - public void ignorableWhitespace(char[] arg0, int arg1, int arg2) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ContentHandler#processingInstruction(java.lang.String, java.lang.String) - */ - public void processingInstruction(String arg0, String arg1) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ContentHandler#skippedEntity(java.lang.String) - */ - public void skippedEntity(String arg0) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see ExtendedLexicalHandler#comment(java.lang.String) - */ - public void comment(String comment) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.LexicalHandler#startDTD(java.lang.String, java.lang.String, java.lang.String) - */ - public void startDTD(String arg0, String arg1, String arg2) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.LexicalHandler#endDTD() - */ - public void endDTD() throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.LexicalHandler#startEntity(java.lang.String) - */ - public void startEntity(String arg0) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.LexicalHandler#endEntity(java.lang.String) - */ - public void endEntity(String arg0) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.LexicalHandler#startCDATA() - */ - public void startCDATA() throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.LexicalHandler#endCDATA() - */ - public void endCDATA() throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int) - */ - public void comment(char[] arg0, int arg1, int arg2) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see XSLOutputAttributes#getDoctypePublic() - */ - public String getDoctypePublic() - { - aMethodIsCalled(); - return null; - } - /** - * @see XSLOutputAttributes#getDoctypeSystem() - */ - public String getDoctypeSystem() - { - aMethodIsCalled(); - return null; - } - /** - * @see XSLOutputAttributes#getEncoding() - */ - public String getEncoding() - { - aMethodIsCalled(); - return null; - } - /** - * @see XSLOutputAttributes#getIndent() - */ - public boolean getIndent() - { - aMethodIsCalled(); - return false; - } - /** - * @see XSLOutputAttributes#getIndentAmount() - */ - public int getIndentAmount() - { - aMethodIsCalled(); - return 0; - } - /** - * @see XSLOutputAttributes#getMediaType() - */ - public String getMediaType() - { - aMethodIsCalled(); - return null; - } - /** - * @see XSLOutputAttributes#getOmitXMLDeclaration() - */ - public boolean getOmitXMLDeclaration() - { - aMethodIsCalled(); - return false; - } - /** - * @see XSLOutputAttributes#getStandalone() - */ - public String getStandalone() - { - aMethodIsCalled(); - return null; - } - /** - * @see XSLOutputAttributes#getVersion() - */ - public String getVersion() - { - aMethodIsCalled(); - return null; - } - /** - /** - * 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 - { - couldThrowException(); - } - /** - * @see XSLOutputAttributes#setDoctype(java.lang.String, java.lang.String) - */ - public void setDoctype(String system, String pub) - { - aMethodIsCalled(); - } - /** - * @see XSLOutputAttributes#setDoctypePublic(java.lang.String) - */ - public void setDoctypePublic(String doctype) - { - aMethodIsCalled(); - } - /** - * @see XSLOutputAttributes#setDoctypeSystem(java.lang.String) - */ - public void setDoctypeSystem(String doctype) - { - aMethodIsCalled(); - } - /** - * @see XSLOutputAttributes#setEncoding(java.lang.String) - */ - public void setEncoding(String encoding) - { - aMethodIsCalled(); - } - /** - * @see XSLOutputAttributes#setMediaType(java.lang.String) - */ - public void setMediaType(String mediatype) - { - aMethodIsCalled(); - } - /** - * @see XSLOutputAttributes#setOmitXMLDeclaration(boolean) - */ - public void setOmitXMLDeclaration(boolean b) - { - aMethodIsCalled(); - } - /** - * @see XSLOutputAttributes#setStandalone(java.lang.String) - */ - public void setStandalone(String standalone) - { - aMethodIsCalled(); - } - /** - * @see org.xml.sax.ext.DeclHandler#elementDecl(java.lang.String, java.lang.String) - */ - public void elementDecl(String arg0, String arg1) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.DeclHandler#attributeDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) - */ - public void attributeDecl( - String arg0, - String arg1, - String arg2, - String arg3, - String arg4) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(java.lang.String, java.lang.String) - */ - public void internalEntityDecl(String arg0, String arg1) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(java.lang.String, java.lang.String, java.lang.String) - */ - public void externalEntityDecl(String arg0, String arg1, String arg2) - throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ErrorHandler#warning(org.xml.sax.SAXParseException) - */ - public void warning(SAXParseException arg0) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ErrorHandler#error(org.xml.sax.SAXParseException) - */ - public void error(SAXParseException arg0) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.ErrorHandler#fatalError(org.xml.sax.SAXParseException) - */ - public void fatalError(SAXParseException arg0) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see Serializer#asDOMSerializer() - */ - public DOMSerializer asDOMSerializer() throws IOException - { - couldThrowIOException(); - return null; - } - - /** - * @see SerializationHandler#setNamespaceMappings(NamespaceMappings) - */ - public void setNamespaceMappings(NamespaceMappings mappings) { - aMethodIsCalled(); - } - - /** - * @see ExtendedContentHandler#setSourceLocator(javax.xml.transform.SourceLocator) - */ - public void setSourceLocator(SourceLocator locator) - { - aMethodIsCalled(); - } - - /** - * @see ExtendedContentHandler#addUniqueAttribute(java.lang.String, java.lang.String, int) - */ - public void addUniqueAttribute(String name, String value, int flags) - throws SAXException - { - couldThrowSAXException(); - } - - /** - * @see ExtendedContentHandler#characters(org.w3c.dom.Node) - */ - public void characters(Node node) throws SAXException - { - couldThrowSAXException(); - } - - /** - * @see ExtendedContentHandler#addXSLAttribute(java.lang.String, java.lang.String, java.lang.String) - */ - public void addXSLAttribute(String qName, String value, String uri) - { - aMethodIsCalled(); - } - - /** - * @see ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) - */ - public void addAttribute(String uri, String localName, String rawName, String type, String value) throws SAXException - { - couldThrowSAXException(); - } - /** - * @see org.xml.sax.DTDHandler#notationDecl(java.lang.String, java.lang.String, java.lang.String) - */ - public void notationDecl(String arg0, String arg1, String arg2) throws SAXException - { - couldThrowSAXException(); - } - - /** - * @see org.xml.sax.DTDHandler#unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String) - */ - public void unparsedEntityDecl( - String arg0, - String arg1, - String arg2, - String arg3) - throws SAXException { - couldThrowSAXException(); - } - - /** - * @see SerializationHandler#setDTDEntityExpansion(boolean) - */ - public void setDTDEntityExpansion(boolean expand) { - aMethodIsCalled(); - - } - - - public String getOutputProperty(String name) { - aMethodIsCalled(); - return null; - } - - public String getOutputPropertyDefault(String name) { - aMethodIsCalled(); - return null; - } - - public void setOutputProperty(String name, String val) { - aMethodIsCalled(); - - } - - public void setOutputPropertyDefault(String name, String val) { - aMethodIsCalled(); - - } - - /** - * @see org.apache.xml.serializer.Serializer#asDOM3Serializer() - */ - public Object asDOM3Serializer() throws IOException - { - couldThrowIOException(); - return null; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/EncodingInfo.java b/serializer/src/main/java/org/apache/xml/serializer/EncodingInfo.java deleted file mode 100644 index e3fc76705..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/EncodingInfo.java +++ /dev/null @@ -1,570 +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; - - -/** - * Holds information about a given encoding, which is the Java name for the - * encoding, the equivalent ISO name. - *

- * An object of this type has two useful methods - *

- * isInEncoding(char ch);
- * 
- * which can be called if the character is not the high one in - * a surrogate pair and: - *
- * isInEncoding(char high, char low);
- * 
- * which can be called if the two characters from a high/low surrogate pair. - *

- * An EncodingInfo object is a node in a binary search tree. Such a node - * will answer if a character is in the encoding, and do so for a given - * range of unicode values (m_first to - * m_last). It will handle a certain range of values - * explicitly (m_explFirst to m_explLast). - * If the unicode point is before that explicit range, that is it - * is in the range m_first <= value < m_explFirst, then it will delegate to another EncodingInfo object for The root - * of such a tree, m_before. Likewise for values in the range - * m_explLast < value <= m_last, but delgating to m_after - *

- * 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 - * entire tree of information at the start, but only build up as much of the - * tree as is used during the transformation. - *

- * This Class is not a public API, and should only be used internally within - * the serializer. - *

- * This class is not a public API. - * @xsl.usage internal - */ -public final class EncodingInfo extends Object -{ - - /** - * Not all characters in an encoding are in on contiguous group, - * however there is a lowest contiguous group starting at '\u0001' - * and working up to m_highCharInContiguousGroup. - *

- * This is the char for which chars at or below this value are - * definately in the encoding, although for chars - * above this point they might be in the encoding. - * This exists for performance, especially for ASCII characters - * because for ASCII all chars in the range '\u0001' to '\u007F' - * are in the encoding. - * - */ - private final char m_highCharInContiguousGroup; - - /** - * The ISO encoding name. - */ - final String name; - - /** - * The name used by the Java convertor. - */ - final String javaName; - - /** - * A helper object that we can ask if a - * single char, or a surrogate UTF-16 pair - * of chars that form a single character, - * is in this encoding. - */ - private InEncoding m_encoding; - - /** - * 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 - *

- * This method is not a public API. - * @xsl.usage internal - */ - public boolean isInEncoding(char ch) { - if (m_encoding == null) { - m_encoding = new EncodingImpl(); - - // One could put alternate logic in here to - // instantiate another object that implements the - // InEncoding interface. For example if the JRE is 1.4 or up - // we could have an object that uses JRE 1.4 methods - } - return m_encoding.isInEncoding(ch); - } - - /** - * This is not a public API. It returns true if the - * 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 - *

- * This method is not a public API. - * @xsl.usage internal - */ - public boolean isInEncoding(char high, char low) { - if (m_encoding == null) { - m_encoding = new EncodingImpl(); - - // One could put alternate logic in here to - // instantiate another object that implements the - // InEncoding interface. For example if the JRE is 1.4 or up - // we could have an object that uses JRE 1.4 methods - } - return m_encoding.isInEncoding(high, low); - } - - /** - * Create an EncodingInfo object based on the ISO name and Java name. - * If both parameters are null any character will be considered to - * be in the encoding. This is useful for when the serializer is in - * temporary output state, and has no assciated encoding. - * - * @param name reference to the ISO name. - * @param javaName reference to the Java encoding name. - * @param highChar The char for which characters at or below this value are - * definately in the - * encoding, although for characters above this point they might be in the encoding. - */ - public EncodingInfo(String name, String javaName, char highChar) - { - - this.name = name; - this.javaName = javaName; - this.m_highCharInContiguousGroup = highChar; - } - - - - /** - * A simple interface to isolate the implementation. - * We could also use some new JRE 1.4 methods in another implementation - * provided we use reflection with them. - *

- * This interface is not a public API, - * and should only be used internally within the serializer. - * @xsl.usage internal - */ - private interface InEncoding { - /** - * @return true if the char is in the encoding - */ - public boolean isInEncoding(char ch); - /** - * @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 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); - if (codePoint < m_explFirst) { - // The unicode value is before the range - // that we explictly manage, so we delegate the answer. - - // If we don't have an m_before object to delegate to, make one. - if (m_before == null) - m_before = - new EncodingImpl( - m_encoding, - m_first, - m_explFirst - 1, - codePoint); - ret = m_before.isInEncoding(ch1); - } else if (m_explLast < codePoint) { - // The unicode value is after the range - // that we explictly manage, so we delegate the answer. - - // If we don't have an m_after object to delegate to, make one. - if (m_after == null) - m_after = - new EncodingImpl( - m_encoding, - m_explLast + 1, - m_last, - codePoint); - ret = m_after.isInEncoding(ch1); - } else { - // The unicode value is in the range we explitly handle - final int idx = codePoint - m_explFirst; - - // If we already know the answer, just return it. - if (m_alreadyKnown[idx]) - ret = m_isInEncoding[idx]; - else { - // We don't know the answer, so find out, - // which may be expensive, then cache the answer - ret = inEncoding(ch1, m_encoding); - m_alreadyKnown[idx] = true; - m_isInEncoding[idx] = ret; - } - } - 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); - if (codePoint < m_explFirst) { - // The unicode value is before the range - // that we explictly manage, so we delegate the answer. - - // If we don't have an m_before object to delegate to, make one. - if (m_before == null) - m_before = - new EncodingImpl( - m_encoding, - m_first, - m_explFirst - 1, - codePoint); - ret = m_before.isInEncoding(high,low); - } else if (m_explLast < codePoint) { - // The unicode value is after the range - // that we explictly manage, so we delegate the answer. - - // If we don't have an m_after object to delegate to, make one. - if (m_after == null) - m_after = - new EncodingImpl( - m_encoding, - m_explLast + 1, - m_last, - codePoint); - ret = m_after.isInEncoding(high,low); - } else { - // The unicode value is in the range we explitly handle - final int idx = codePoint - m_explFirst; - - // If we already know the answer, just return it. - if (m_alreadyKnown[idx]) - ret = m_isInEncoding[idx]; - else { - // We don't know the answer, so find out, - // which may be expensive, then cache the answer - ret = inEncoding(high, low, m_encoding); - m_alreadyKnown[idx] = true; - m_isInEncoding[idx] = ret; - } - } - return ret; - } - - /** - * The encoding. - */ - final private String m_encoding; - /** - * m_first through m_last is the range of unicode - * values that this object will return an answer on. - * It may delegate to a similar object with a different - * range - */ - final private int m_first; - - /** - * m_explFirst through m_explLast is the range of unicode - * value that this object handles explicitly and does not - * delegate to a similar object. - */ - final private int m_explFirst; - final private int m_explLast; - final private int m_last; - - /** - * The object, of the same type as this one, - * that handles unicode values in a range before - * the range explictly handled by this object, and - * to which this object may delegate. - */ - private InEncoding m_before; - /** - * The object, of the same type as this one, - * that handles unicode values in a range after - * the range explictly handled by this object, and - * to which this object may delegate. - */ - private InEncoding m_after; - - /** - * The number of unicode values explicitly handled - * by a single EncodingInfo object. This value is - * tuneable, but is set to 128 because that covers the - * entire low range of ASCII type chars within a single - * object. - */ - private static final int RANGE = 128; - - /** - * A flag to record if we already know the answer - * for the given unicode value. - */ - final private boolean m_alreadyKnown[] = new boolean[RANGE]; - /** - * A table holding the answer on whether the given unicode - * value is in the encoding. - */ - final private boolean m_isInEncoding[] = new boolean[RANGE]; - - private EncodingImpl() { - // This object will answer whether any unicode value - // is in the encoding, it handles values 0 through Integer.MAX_VALUE - this(javaName, 0, Integer.MAX_VALUE, (char) 0); - } - - private EncodingImpl(String encoding, int first, int last, int codePoint) { - // Set the range of unicode values that this object manages - // either explicitly or implicitly. - m_first = first; - m_last = last; - - // Set the range of unicode values that this object - // explicitly manages - m_explFirst = codePoint; - m_explLast = codePoint + (RANGE-1); - - m_encoding = encoding; - - if (javaName != null) - { - // Some optimization. - if (0 <= m_explFirst && m_explFirst <= 127) { - // This particular EncodingImpl explicitly handles - // characters in the low range. - if ("UTF8".equals(javaName) - || "UTF-16".equals(javaName) - || "ASCII".equals(javaName) - || "US-ASCII".equals(javaName) - || "Unicode".equals(javaName) - || "UNICODE".equals(javaName) - || javaName.startsWith("ISO8859")) { - - // Not only does this EncodingImpl object explicitly - // handle chracters in the low range, it is - // also one that we know something about, without - // needing to call inEncoding(char ch, String encoding) - // for this low range - // - // By initializing the table ahead of time - // for these low values, we prevent the expensive - // inEncoding(char ch, String encoding) - // from being called, at least for these common - // encodings. - for (int unicode = 1; unicode < 127; unicode++) { - final int idx = unicode - m_explFirst; - if (0 <= idx && idx < RANGE) { - m_alreadyKnown[idx] = true; - m_isInEncoding[idx] = true; - } - } - } - } - - /* A little bit more than optimization. - * - * We will say that any character is in the encoding if - * we don't have an encoding. - * This is meaningful when the serializer is being used - * in temporary output state, where we are not writing to - * the final output tree. It is when writing to the - * final output tree that we need to worry about the output - * encoding - */ - if (javaName == null) { - for (int idx = 0; idx < m_alreadyKnown.length; idx++) { - m_alreadyKnown[idx] = true; - m_isInEncoding[idx] = true; - } - } - } - } - } - - /** - * This is heart of the code that determines if a given character - * is in the given encoding. This method is probably expensive, - * and the answer should be cached. - *

- * This method is not a public API, - * and should only be used internally within the serializer. - * @param ch the char in question, that is not a high char of - * a high/low surrogate pair. - * @param encoding the Java name of the enocding. - * - * @xsl.usage internal - * - */ - private static boolean inEncoding(char ch, String encoding) { - boolean isInEncoding; - try { - char cArray[] = new char[1]; - cArray[0] = ch; - // Construct a String from the char - String s = new String(cArray); - // Encode the String into a sequence of bytes - // using the given, named charset. - byte[] bArray = s.getBytes(encoding); - isInEncoding = inEncoding(ch, bArray); - - } catch (Exception e) { - isInEncoding = false; - - // If for some reason the encoding is null, e.g. - // for a temporary result tree, we should just - // say that every character is in the encoding. - if (encoding == null) - isInEncoding = true; - } - return isInEncoding; - } - - /** - * This is heart of the code that determines if a given high/low - * surrogate pair forms a character that is in the given encoding. - * This method is probably expensive, and the answer should be cached. - *

- * This method is not a public API, - * and should only be used internally within the serializer. - * @param high the high char of - * a high/low surrogate pair. - * @param low the low char of a high/low surrogate pair. - * @param encoding the Java name of the encoding. - * - * @xsl.usage internal - * - */ - private static boolean inEncoding(char high, char low, String encoding) { - boolean isInEncoding; - try { - char cArray[] = new char[2]; - cArray[0] = high; - cArray[1] = low; - // Construct a String from the char - String s = new String(cArray); - // Encode the String into a sequence of bytes - // using the given, named charset. - byte[] bArray = s.getBytes(encoding); - isInEncoding = inEncoding(high,bArray); - } catch (Exception e) { - isInEncoding = false; - } - - return isInEncoding; - } - - /** - * This method is the core of determining if character - * is in the encoding. The method is not foolproof, because - * s.getBytes(encoding) has specified behavior only if the - * characters are in the specified encoding. However this - * method tries it's best. - * @param ch the char that was converted using getBytes, or - * the first char of a high/low pair that was converted. - * @param data the bytes written out by the call to s.getBytes(encoding); - * @return true if the character is in the encoding. - */ - private static boolean inEncoding(char ch, byte[] data) { - final boolean isInEncoding; - // If the string written out as data is not in the encoding, - // the output is not specified according to the documentation - // on the String.getBytes(encoding) method, - // but we do our best here. - if (data==null || data.length == 0) { - isInEncoding = false; - } - else { - if (data[0] == 0) - isInEncoding = false; - else if (data[0] == '?' && ch != '?') - isInEncoding = false; - /* - * else if (isJapanese) { - * // isJapanese is really - * // ( "EUC-JP".equals(javaName) - * // || "EUC_JP".equals(javaName) - * // || "SJIS".equals(javaName) ) - * - * // Work around some bugs in JRE for Japanese - * if(data[0] == 0x21) - * isInEncoding = false; - * else if (ch == 0xA5) - * isInEncoding = false; - * else - * isInEncoding = true; - * } - */ - - else { - // We don't know for sure, but it looks like it is in the encoding - isInEncoding = true; - } - } - return isInEncoding; - } - - /** - * This method exists for performance reasons. - *

- * Except for '\u0000', if a char is less than or equal to the value - * returned by this method then it in the encoding. - *

- * The characters in an encoding are not contiguous, however - * there is a lowest group of chars starting at '\u0001' upto and - * including the char returned by this method that are all in the encoding. - * So the char returned by this method essentially defines the lowest - * contiguous group. - *

- * chars above the value returned might be in the encoding, but - * chars at or below the value returned are definately in the encoding. - *

- * In any case however, the isInEncoding(char) method can be used - * regardless of the value of the char returned by this method. - *

- * 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 - *

- * This method is not a public API. - * @xsl.usage internal - */ - public final char getHighChar() { - return m_highCharInContiguousGroup; - } - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/Encodings.java b/serializer/src/main/java/org/apache/xml/serializer/Encodings.java deleted file mode 100644 index b57db504c..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/Encodings.java +++ /dev/null @@ -1,501 +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; - -import java.io.InputStream; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; -import java.io.Writer; -import java.util.ArrayList; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.List; -import java.util.Properties; -import java.util.StringTokenizer; - - -/** - * Provides information about encodings. Depends on the Java runtime - * to provides writers for the different encodings. - * - * NOTE: When a Java or MIME names appears more than once in the - * encodings.properties table, priority is given to the first instance - * seen. For example, MIME name ISO-8859-1 will be mapped to Java name - * ISO8859-1, even though the file includes synonyms such as ISO8859_1 - * and 8859-1. - *

- * This class is not a public API. It is only public because it - * is used outside of this package. - * - * @xsl.usage internal - */ - -public final class Encodings extends Object -{ - /** - * Standard filename for properties file with encodings data. - */ - private static final String ENCODINGS_FILE = SerializerBase.PKG_PATH+"/Encodings.properties"; - - /** - * Returns a writer for the specified encoding based on - * an output stream. - *

- * This is not a public API. - * @param output The output stream - * @param encoding The encoding MIME name, not a Java name for the encoding. - * @return A suitable writer - * @throws UnsupportedEncodingException There is no convertor - * to support this encoding - * @xsl.usage internal - */ - static Writer getWriter(OutputStream output, String encoding) - throws UnsupportedEncodingException - { - - for (int i = 0; i < _encodings.length; ++i) - { - if (_encodings[i].name.equalsIgnoreCase(encoding)) - { - try - { - String javaName = _encodings[i].javaName; - OutputStreamWriter osw = new OutputStreamWriter(output,javaName); - return osw; - } - catch (java.lang.IllegalArgumentException iae) // java 1.1.8 - { - // keep trying - } - catch (UnsupportedEncodingException usee) - { - - // keep trying - } - } - } - - try - { - return new OutputStreamWriter(output, encoding); - } - catch (java.lang.IllegalArgumentException iae) // java 1.1.8 - { - throw new UnsupportedEncodingException(encoding); - } - } - - /** - * Returns the EncodingInfo object for the specified - * encoding, never null, although the encoding name - * inside the returned EncodingInfo object will be if - * we can't find a "real" EncodingInfo for the encoding. - *

- * This is not a public API. - * - * @param encoding The encoding - * @return The object that is used to determine if - * characters are in the given encoding. - * @xsl.usage internal - */ - static EncodingInfo getEncodingInfo(String encoding) - { - EncodingInfo ei; - - String normalizedEncoding = toUpperCaseFast(encoding); - ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding); - if (ei == null) - ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedEncoding); - if (ei == null) { - // We shouldn't have to do this, but just in case. - ei = new EncodingInfo(null,null, '\u0000'); - } - - return ei; - } - - /** - * Determines if the encoding specified was recognized by the - * serializer or not. - * - * @param encoding The encoding - * @return boolean - true if the encoding was recognized else false - */ - public static boolean isRecognizedEncoding(String encoding) - { - EncodingInfo ei; - - String normalizedEncoding = encoding.toUpperCase(); - ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding); - if (ei == null) - ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedEncoding); - if (ei != null) - return true; - return false; - } - - /** - * A fast and cheap way to uppercase a String that is - * only made of printable ASCII characters. - *

- * This is not a public API. - * @param s a String of ASCII characters - * @return an uppercased version of the input String, - * possibly the same String. - * @xsl.usage internal - */ - static private String toUpperCaseFast(final String s) { - - boolean different = false; - final int mx = s.length(); - char[] chars = new char[mx]; - for (int i=0; i < mx; i++) { - char ch = s.charAt(i); - // is the character a lower case ASCII one? - if ('a' <= ch && ch <= 'z') { - // a cheap and fast way to uppercase that is good enough - ch = (char) (ch + ('A' - 'a')); - different = true; // the uppercased String is different - } - chars[i] = ch; - } - - // A little optimization, don't call String.valueOf() if - // the uppercased string is the same as the input string. - final String upper; - if (different) - upper = String.valueOf(chars); - else - upper = s; - - return upper; - } - - /** The default encoding, ISO style, ISO style. */ - static final String DEFAULT_MIME_ENCODING = "UTF-8"; - - /** - * Get the proper mime encoding. From the XSLT recommendation: "The encoding - * attribute specifies the preferred encoding to use for outputting the result - * tree. XSLT processors are required to respect values of UTF-8 and UTF-16. - * For other values, if the XSLT processor does not support the specified - * encoding it may signal an error; if it does not signal an error it should - * use UTF-8 or UTF-16 instead. The XSLT processor must not use an encoding - * whose name does not match the EncName production of the XML Recommendation - * [XML]. If no encoding attribute is specified, then the XSLT processor should - * use either UTF-8 or UTF-16." - *

- * This is not a public API. - * - * @param encoding Reference to java-style encoding string, which may be null, - * in which case a default will be found. - * - * @return The ISO-style encoding string, or null if failure. - * @xsl.usage internal - */ - static String getMimeEncoding(String encoding) - { - - if (null == encoding) - { - try - { - - // Get the default system character encoding. This may be - // incorrect if they passed in a writer, but right now there - // seems to be no way to get the encoding from a writer. - encoding = System.getProperty("file.encoding", "UTF8"); - - if (null != encoding) - { - - /* - * See if the mime type is equal to UTF8. If you don't - * do that, then convertJava2MimeEncoding will convert - * 8859_1 to "ISO-8859-1", which is not what we want, - * I think, and I don't think I want to alter the tables - * to convert everything to UTF-8. - */ - String jencoding = - (encoding.equalsIgnoreCase("Cp1252") - || encoding.equalsIgnoreCase("ISO8859_1") - || encoding.equalsIgnoreCase("8859_1") - || encoding.equalsIgnoreCase("UTF8")) - ? DEFAULT_MIME_ENCODING - : convertJava2MimeEncoding(encoding); - - encoding = - (null != jencoding) ? jencoding : DEFAULT_MIME_ENCODING; - } - else - { - encoding = DEFAULT_MIME_ENCODING; - } - } - catch (SecurityException se) - { - encoding = DEFAULT_MIME_ENCODING; - } - } - else - { - encoding = convertJava2MimeEncoding(encoding); - } - - return encoding; - } - - /** - * Try the best we can to convert a Java encoding to a XML-style encoding. - *

- * This is not a public API. - * @param encoding non-null reference to encoding string, java style. - * - * @return ISO-style encoding string. - * @xsl.usage internal - */ - private static String convertJava2MimeEncoding(String encoding) - { - EncodingInfo enc = - (EncodingInfo) _encodingTableKeyJava.get(toUpperCaseFast(encoding)); - if (null != enc) - return enc.name; - return encoding; - } - - /** - * Try the best we can to convert a Java encoding to a XML-style encoding. - *

- * This is not a public API. - * - * @param encoding non-null reference to encoding string, java style. - * - * @return ISO-style encoding string. - *

- * This method is not a public API. - * @xsl.usage internal - */ - public static String convertMime2JavaEncoding(String encoding) - { - - for (int i = 0; i < _encodings.length; ++i) - { - if (_encodings[i].name.equalsIgnoreCase(encoding)) - { - return _encodings[i].javaName; - } - } - - return encoding; - } - - /** - * Load a list of all the supported encodings. - * - * System property "encodings" formatted using URL syntax may define an - * external encodings list. Thanks to Sergey Ushakov for the code - * contribution! - * @xsl.usage internal - */ - private static EncodingInfo[] loadEncodingInfo() - { - try - { - final InputStream is; - is = SecuritySupport.getResourceAsStream(ObjectFactory.findClassLoader(), - ENCODINGS_FILE); - - Properties props = new Properties(); - if (is != null) { - props.load(is); - is.close(); - } else { - // Seems to be no real need to force failure here, let the - // system do its best... The issue is not really very critical, - // and the output will be in any case _correct_ though maybe not - // always human-friendly... :) - // But maybe report/log the resource problem? - // Any standard ways to report/log errors (in static context)? - } - - int totalEntries = props.size(); - - List encodingInfo_list = new ArrayList(); - Enumeration keys = props.keys(); - for (int i = 0; i < totalEntries; ++i) - { - String javaName = (String) keys.nextElement(); - String val = props.getProperty(javaName); - int len = lengthOfMimeNames(val); - - String mimeName; - char highChar; - if (len == 0) - { - // There is no property value, only the javaName, so try and recover - mimeName = javaName; - highChar = '\u0000'; // don't know the high code point, will need to test every character - } - else - { - try { - // Get the substring after the Mime names - final String highVal = val.substring(len).trim(); - highChar = (char) Integer.decode(highVal).intValue(); - } - catch( NumberFormatException e) { - highChar = 0; - } - String mimeNames = val.substring(0, len); - StringTokenizer st = - new StringTokenizer(mimeNames, ","); - for (boolean first = true; - st.hasMoreTokens(); - first = false) - { - mimeName = st.nextToken(); - EncodingInfo ei = new EncodingInfo(mimeName, javaName, highChar); - encodingInfo_list.add(ei); - _encodingTableKeyMime.putIfAbsent(mimeName.toUpperCase(), ei); - if (first) - _encodingTableKeyJava.putIfAbsent(javaName.toUpperCase(), ei); - } - } - } - // Convert the Vector of EncodingInfo objects into an array of them, - // as that is the kind of thing this method returns. - EncodingInfo[] ret_ei = new EncodingInfo[encodingInfo_list.size()]; - encodingInfo_list.toArray(ret_ei); - return ret_ei; - } - catch (java.net.MalformedURLException mue) - { - throw new org.apache.xml.serializer.utils.WrappedRuntimeException(mue); - } - catch (java.io.IOException ioe) - { - throw new org.apache.xml.serializer.utils.WrappedRuntimeException(ioe); - } - } - - /** - * Get the length of the Mime names within the property value - * @param val The value of the property, which should contain a comma - * separated list of Mime names, followed optionally by a space and the - * high char value - * @return - */ - private static int lengthOfMimeNames(String val) { - // look for the space preceding the optional high char - int len = val.indexOf(' '); - // If len is zero it means the optional part is not there, so - // the value must be all Mime names, so set the length appropriately - if (len < 0) - len = val.length(); - - return len; - } - - /** - * Return true if the character is the high member of a surrogate pair. - *

- * This is not a public API. - * @param ch the character to test - * @xsl.usage internal - */ - static boolean isHighUTF16Surrogate(char ch) { - return ('\uD800' <= ch && ch <= '\uDBFF'); - } - /** - * Return true if the character is the low member of a surrogate pair. - *

- * This is not a public API. - * @param ch the character to test - * @xsl.usage internal - */ - static boolean isLowUTF16Surrogate(char ch) { - return ('\uDC00' <= ch && ch <= '\uDFFF'); - } - /** - * Return the unicode code point represented by the high/low surrogate pair. - *

- * This is not a public API. - * @param highSurrogate the high char of the high/low pair - * @param lowSurrogate the low char of the high/low pair - * @xsl.usage internal - */ - static int toCodePoint(char highSurrogate, char lowSurrogate) { - int codePoint = - ((highSurrogate - 0xd800) << 10) - + (lowSurrogate - 0xdc00) - + 0x10000; - return codePoint; - } - /** - * Return the unicode code point represented by the char. - * A bit of a dummy method, since all it does is return the char, - * but as an int value. - *

- * This is not a public API. - * @param ch the char. - * @xsl.usage internal - */ - static int toCodePoint(char ch) { - int codePoint = ch; - return codePoint; - } - - /** - * Characters with values at or below the high code point are - * in the encoding. Code point values above this one may or may - * not be in the encoding, but lower ones certainly are. - *

- * This is for performance. - * - * @param encoding The encoding - * @return The code point for which characters at or below this code point - * are in the encoding. Characters with higher code point may or may not be - * in the encoding. A value of zero is returned if the high code point is unknown. - *

- * This method is not a public API. - * @xsl.usage internal - */ - static public char getHighChar(String encoding) - { - final char highCodePoint; - EncodingInfo ei; - - String normalizedEncoding = toUpperCaseFast(encoding); - ei = (EncodingInfo) _encodingTableKeyJava.get(normalizedEncoding); - if (ei == null) - ei = (EncodingInfo) _encodingTableKeyMime.get(normalizedEncoding); - if (ei != null) - highCodePoint = ei.getHighChar(); - else - highCodePoint = 0; - return highCodePoint; - } - - private static final Hashtable _encodingTableKeyJava = new Hashtable(); - private static final Hashtable _encodingTableKeyMime = new Hashtable(); - private static final EncodingInfo[] _encodings = loadEncodingInfo(); -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ExtendedContentHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ExtendedContentHandler.java deleted file mode 100644 index df3358eb0..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ExtendedContentHandler.java +++ /dev/null @@ -1,272 +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; - -import javax.xml.transform.SourceLocator; - -import org.xml.sax.SAXException; - -/** - * This interface describes extensions to the SAX ContentHandler interface. - * It is intended to be used by a serializer. The methods on this interface will - * implement SAX- like behavior. This allows the gradual collection of - * information rather than having it all up front. For example the call - *

- * startElement(namespaceURI,localName,qName,atts)
- * 
- * could be replaced with the calls - *
- * startElement(namespaceURI,localName,qName)
- * addAttributes(atts)
- * 
- * If there are no attributes the second call can be dropped. If attributes are - * to be added one at a time with calls to - *
- * addAttribute(namespaceURI, localName, qName, type, value)
- * 
- * @xsl.usage internal - */ -public interface ExtendedContentHandler extends org.xml.sax.ContentHandler -{ - /** - * Add at attribute to the current element - * @param uri the namespace URI of the attribute name - * @param localName the local name of the attribute (without prefix) - * @param rawName the qualified name of the attribute - * @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 if attribute could not be written to output - */ - public void addAttribute( - String uri, - String localName, - String rawName, - String type, - String value, - boolean XSLAttribute) - throws SAXException; - /** - * Add attributes to the current element - * @param atts the attributes to add. - * @throws SAXException if attributes could not be written to output - */ - public void addAttributes(org.xml.sax.Attributes atts) - throws org.xml.sax.SAXException; - /** - * 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 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); - - /** - * 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 if characters could not be written to output - */ - public void characters(String chars) throws SAXException; - - /** - * 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 if characters could not be written to output - */ - public void characters(org.w3c.dom.Node node) throws org.xml.sax.SAXException; - /** - * This method is used to notify that an element has ended. Unlike the - * standard SAX method - *
-     * endElement(namespaceURI,localName,qName)
-     * 
- * only the last parameter is passed. If needed the serializer can derive - * the localName from the qualified name and derive the namespaceURI from - * its implementation. - * @param elemName the fully qualified element name. - * @throws SAXException if end tag could not be written to output - */ - public void endElement(String elemName) throws SAXException; - - /** - * This method is used to notify that an element is starting. - * This method is just like the standard SAX method - *
-     * startElement(uri,localName,qname,atts)
-     * 
- * but without the attributes. - * @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 if start tag could not be written to output - */ - public void startElement(String uri, String localName, String qName) - throws org.xml.sax.SAXException; - - /** - * This method is used to notify of the start of an element - * @param qName the fully qualified name of the element - * @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 - *
-     * startPrefixMapping(prefix,uri)
-     * 
- * is used just before an element starts and applies to the element to come, - * not to the current element. This method applies to the current element. - * For example one could make the calls in this order: - *
-     * startElement("prfx8:elem9")
-     * namespaceAfterStartElement("http://namespace8","prfx8")
-     * 
- * - * @param uri the namespace URI being declared - * @param prefix the prefix that maps to the given namespace - * @throws SAXException if namespace declaration could not be processed - */ - public void namespaceAfterStartElement(String uri, String prefix) - throws SAXException; - - /** - * This method is used to notify that a prefix maping is to start, which can - * be for the current element, or for the one to come. - * @param prefix the prefix that maps to the given URI - * @param uri the namespace URI of the given prefix - * @param shouldFlush if true this call is like the SAX - * startPrefixMapping(prefix,uri) call and the mapping applies to the - * element to come. If false the mapping applies to the current element. - * @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 if namespace declaration could not be processed - */ - public boolean startPrefixMapping( - String prefix, - String uri, - boolean shouldFlush) - throws SAXException; - /** - * Notify of an entity reference. - * @param entityName the name of the entity - * @throws SAXException if entity reference could not be written to output - */ - public void entityReference(String entityName) throws SAXException; - - /** - * This method returns an object that has the current namespace mappings in - * effect. - * - * @return NamespaceMappings an object that has the current namespace - * mappings in effect. - */ - public NamespaceMappings getNamespaceMappings(); - /** - * This method returns the prefix that currently maps to the given namespace - * URI. - * @param uri the namespace URI - * @return String the prefix that currently maps to the given URI. - */ - public String getPrefix(String uri); - /** - * This method gets the prefix associated with a current element or - * attribute name. - * @param name the qualified name of an element, or attribute - * @param isElement true if it is an element name, false if it is an - * atttribute name - * @return String the namespace URI associated with the element or - * attribute. - */ - public String getNamespaceURI(String name, boolean isElement); - /** - * This method returns the namespace URI currently associated with the - * prefix. - * @param prefix a prefix of an element or attribute. - * @return String the namespace URI currently associated with the prefix. - */ - public String getNamespaceURIFromPrefix(String prefix); - - /** - * This method is used to set the source locator, which might be used to - * generated an error message. - * @param locator the source locator - */ - public void setSourceLocator(SourceLocator locator); - - // Bit constants for addUniqueAttribute(). - - // The attribute value contains no bad characters. A "bad" character is one which - // is greater than 126 or it is one of '<', '>', '&' or '"'. - public static final int NO_BAD_CHARS = 0x1; - - // An HTML empty attribute (e.g.
- // will remove both mappings in because the - // new mapping is the same as the masked one and we get - // - // So we are only removing xmlns:x="" or - // xmlns:x="abc" from the depth of element - // when going back to if in fact they have - // not been optimized away. - // - prefixStack.pop(); - if (saxHandler != null) - { - try - { - saxHandler.endPrefixMapping(prefix); - } - catch (SAXException e) - { - // not much we can do if they aren't willing to listen - } - } - } - - } - } - - /** - * Generate a new namespace prefix ( ns0, ns1 ...) not used before - * @return String a new namespace prefix ( ns0, ns1, ns2 ...) - */ - public String generateNextPrefix() - { - return "ns" + (count++); - } - - - /** - * This method makes a clone of this object. - * - */ - public Object clone() throws CloneNotSupportedException { - NamespaceMappings clone = new NamespaceMappings(); - clone.m_nodeStack = (NamespaceMappings.Stack) m_nodeStack.clone(); - clone.count = this.count; - clone.m_namespaces = (Hashtable) m_namespaces.clone(); - - clone.count = count; - return clone; - - } - - final void reset() - { - this.count = 0; - this.m_namespaces.clear(); - this.m_nodeStack.clear(); - - initNamespaces(); - } - - /** - * Just a little class that ties the 3 fields together - * into one object, and this simplifies the pushing - * and popping of namespaces to one push or one pop on - * one stack rather than on 3 separate stacks. - */ - static class MappingRecord { - final String m_prefix; // the prefix - final String m_uri; // the uri, possibly "" but never null - // the depth of the element where declartion was made - final int m_declarationDepth; - MappingRecord(String prefix, String uri, int depth) { - m_prefix = prefix; - m_uri = (uri==null)? EMPTYSTRING : uri; - m_declarationDepth = depth; - } - } - - /** - * Rather than using java.util.Stack, this private class - * provides a minimal subset of methods and is faster - * because it is not thread-safe. - */ - private class Stack { - private int top = -1; - private int max = 20; - Object[] m_stack = new Object[max]; - - public Object clone() throws CloneNotSupportedException { - NamespaceMappings.Stack clone = new NamespaceMappings.Stack(); - clone.max = this.max; - clone.top = this.top; - clone.m_stack = new Object[clone.max]; - for (int i=0; i <= top; i++) { - // We are just copying references to immutable MappingRecord objects here - // so it is OK if the clone has references to these. - clone.m_stack[i] = this.m_stack[i]; - } - return clone; - } - - public Stack() - { - } - - public Object push(Object o) { - top++; - if (max <= top) { - int newMax = 2*max + 1; - Object[] newArray = new Object[newMax]; - System.arraycopy(m_stack,0, newArray, 0, max); - max = newMax; - m_stack = newArray; - } - m_stack[top] = o; - return o; - } - - public Object pop() { - Object o; - if (0 <= top) { - o = m_stack[top]; - // m_stack[top] = null; do we really care? - top--; - } - else - o = null; - return o; - } - - public Object peek() { - Object o; - if (0 <= top) { - o = m_stack[top]; - } - else - o = null; - return o; - } - - public Object peek(int idx) { - return m_stack[idx]; - } - - public boolean isEmpty() { - return (top < 0); - } - public boolean empty() { - return (top < 0); - } - - public void clear() { - for (int i=0; i<= top; i++) - m_stack[i] = null; - top = -1; - } - - public Object getElement(int index) { - return m_stack[index]; - } - } - /** - * A more type-safe way to get a stack of prefix mappings - * from the Hashtable m_namespaces - * (this is the only method that does the type cast). - */ - - private Stack getPrefixStack(String prefix) { - Stack fs = (Stack) m_namespaces.get(prefix); - return fs; - } - - /** - * A more type-safe way of saving stacks under the - * m_namespaces Hashtable. - */ - private Stack createPrefixStack(String prefix) - { - Stack fs = new Stack(); - m_namespaces.put(prefix, fs); - return fs; - } - - /** - * Given a namespace uri, get all prefixes bound to the Namespace URI in the current scope. - * - * @param uri the namespace URI to be search for - * @return An array of Strings which are - * all prefixes bound to the namespace URI in the current scope. - * An array of zero elements is returned if no prefixes map to the given - * namespace URI. - */ - public String[] lookupAllPrefixes(String uri) - { - java.util.ArrayList foundPrefixes = new java.util.ArrayList(); - Enumeration prefixes = m_namespaces.keys(); - while (prefixes.hasMoreElements()) - { - String prefix = (String) prefixes.nextElement(); - String uri2 = lookupNamespace(prefix); - if (uri2 != null && uri2.equals(uri)) - { - foundPrefixes.add(prefix); - } - } - String[] prefixArray = new String[foundPrefixes.size()]; - foundPrefixes.toArray(prefixArray); - return prefixArray; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ObjectFactory.java b/serializer/src/main/java/org/apache/xml/serializer/ObjectFactory.java deleted file mode 100644 index ab7524848..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ObjectFactory.java +++ /dev/null @@ -1,655 +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; - -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.util.Properties; - -/** - * This class is duplicated for each JAXP subpackage so keep it in sync. - * It is package private and therefore is not exposed as part of the JAXP - * API. - *

- * This code is designed to implement the JAXP 1.1 spec pluggability - * feature and is designed to run on JDK version 1.1 and - * later, and to compile on JDK 1.2 and onward. - * The code also runs both as part of an unbundled jar file and - * when bundled as part of the JDK. - *

- * This class was moved from the javax.xml.parsers.ObjectFactory - * class and modified to be used as a general utility for creating objects - * dynamically. - * - * @xsl.usage internal - */ -final class ObjectFactory { - - // - // Constants - // - - // name of default properties file to look for in JDK's jre/lib directory - private static final String DEFAULT_PROPERTIES_FILENAME = - "xalan.properties"; - - private static final String SERVICES_PATH = "META-INF/services/"; - - /** Set to true for debugging */ - private static final boolean DEBUG = false; - - /** cache the contents of the xalan.properties file. - * Until an attempt has been made to read this file, this will - * be null; if the file does not exist or we encounter some other error - * during the read, this will be empty. - */ - private static Properties fXalanProperties = null; - - /*** - * Cache the time stamp of the xalan.properties file so - * that we know if it's been modified and can invalidate - * the cache when necessary. - */ - private static long fLastModified = -1; - - // - // Public static methods - // - - /** - * Finds the implementation Class object in the specified order. The - * specified order is the following: - *

    - *
  1. query the system property using System.getProperty - *
  2. read META-INF/services/factoryId file - *
  3. use fallback classname - *
- * - * @return instance of factory, never null - * - * @param factoryId Name of the factory to find, same as - * a property name - * @param fallbackClassName Implementation class name, if nothing else - * is found. Use null to mean no fallback. - * - * @exception ObjectFactory.ConfigurationError - */ - static Object createObject(String factoryId, String fallbackClassName) - throws ConfigurationError { - return createObject(factoryId, null, fallbackClassName); - } // createObject(String,String):Object - - /** - * Finds the implementation Class object in the specified order. The - * specified order is the following: - *
    - *
  1. query the system property using System.getProperty - *
  2. read $java.home/lib/propertiesFilename file - *
  3. read META-INF/services/factoryId file - *
  4. use fallback classname - *
- * - * @return instance of factory, never null - * - * @param factoryId Name of the factory to find, same as - * a property name - * @param propertiesFilename The filename in the $java.home/lib directory - * of the properties file. If none specified, - * ${java.home}/lib/xalan.properties will be used. - * @param fallbackClassName Implementation class name, if nothing else - * is found. Use null to mean no fallback. - * - * @exception ObjectFactory.ConfigurationError - */ - static Object createObject(String factoryId, - String propertiesFilename, - String fallbackClassName) - throws ConfigurationError - { - Class factoryClass = lookUpFactoryClass(factoryId, - propertiesFilename, - fallbackClassName); - - if (factoryClass == null) { - throw new ConfigurationError( - "Provider for " + factoryId + " cannot be found", null); - } - - try{ - Object instance = factoryClass.newInstance(); - debugPrintln("created new instance of factory " + factoryId); - return instance; - } catch (Exception x) { - throw new ConfigurationError( - "Provider for factory " + factoryId - + " could not be instantiated: " + x, x); - } - } // createObject(String,String,String):Object - - /** - * Finds the implementation Class object in the specified order. The - * specified order is the following: - *
    - *
  1. query the system property using System.getProperty - *
  2. read $java.home/lib/propertiesFilename file - *
  3. read META-INF/services/factoryId file - *
  4. use fallback classname - *
- * - * @return Class object of factory, never null - * - * @param factoryId Name of the factory to find, same as - * a property name - * @param propertiesFilename The filename in the $java.home/lib directory - * of the properties file. If none specified, - * ${java.home}/lib/xalan.properties will be used. - * @param fallbackClassName Implementation class name, if nothing else - * is found. Use null to mean no fallback. - * - * @exception ObjectFactory.ConfigurationError - */ - static Class lookUpFactoryClass(String factoryId) - throws ConfigurationError - { - return lookUpFactoryClass(factoryId, null, null); - } // lookUpFactoryClass(String):Class - - /** - * Finds the implementation Class object in the specified order. The - * specified order is the following: - *
    - *
  1. query the system property using System.getProperty - *
  2. read $java.home/lib/propertiesFilename file - *
  3. read META-INF/services/factoryId file - *
  4. use fallback classname - *
- * - * @return Class object that provides factory service, never null - * - * @param factoryId Name of the factory to find, same as - * a property name - * @param propertiesFilename The filename in the $java.home/lib directory - * of the properties file. If none specified, - * ${java.home}/lib/xalan.properties will be used. - * @param fallbackClassName Implementation class name, if nothing else - * is found. Use null to mean no fallback. - * - * @exception ObjectFactory.ConfigurationError - */ - static Class lookUpFactoryClass(String factoryId, - String propertiesFilename, - String fallbackClassName) - throws ConfigurationError - { - String factoryClassName = lookUpFactoryClassName(factoryId, - propertiesFilename, - fallbackClassName); - ClassLoader cl = findClassLoader(); - - if (factoryClassName == null) { - factoryClassName = fallbackClassName; - } - - // assert(className != null); - try{ - Class providerClass = findProviderClass(factoryClassName, - cl, - true); - debugPrintln("created new instance of " + providerClass + - " using ClassLoader: " + cl); - return providerClass; - } catch (ClassNotFoundException x) { - throw new ConfigurationError( - "Provider " + factoryClassName + " not found", x); - } catch (Exception x) { - throw new ConfigurationError( - "Provider "+factoryClassName+" could not be instantiated: "+x, - x); - } - } // lookUpFactoryClass(String,String,String):Class - - /** - * Finds the name of the required implementation class in the specified - * order. The specified order is the following: - *
    - *
  1. query the system property using System.getProperty - *
  2. read $java.home/lib/propertiesFilename file - *
  3. read META-INF/services/factoryId file - *
  4. use fallback classname - *
- * - * @return name of class that provides factory service, never null - * - * @param factoryId Name of the factory to find, same as - * a property name - * @param propertiesFilename The filename in the $java.home/lib directory - * of the properties file. If none specified, - * ${java.home}/lib/xalan.properties will be used. - * @param fallbackClassName Implementation class name, if nothing else - * is found. Use null to mean no fallback. - * - * @exception ObjectFactory.ConfigurationError - */ - static String lookUpFactoryClassName(String factoryId, - String propertiesFilename, - String fallbackClassName) - { - // Use the system property first - try { - String systemProp = SecuritySupport.getSystemProperty(factoryId); - if (systemProp != null) { - debugPrintln("found system property, value=" + systemProp); - return systemProp; - } - } catch (SecurityException se) { - // Ignore and continue w/ next location - } - - // Try to read from propertiesFilename, or - // $java.home/lib/xalan.properties - String factoryClassName = null; - // no properties file name specified; use - // $JAVA_HOME/lib/xalan.properties: - if (propertiesFilename == null) { - File propertiesFile = null; - boolean propertiesFileExists = false; - try { - String javah = SecuritySupport.getSystemProperty("java.home"); - propertiesFilename = javah + File.separator + - "lib" + File.separator + DEFAULT_PROPERTIES_FILENAME; - propertiesFile = new File(propertiesFilename); - propertiesFileExists = SecuritySupport.getFileExists(propertiesFile); - } catch (SecurityException e) { - // try again... - fLastModified = -1; - fXalanProperties = null; - } - - synchronized (ObjectFactory.class) { - boolean loadProperties = false; - FileInputStream fis = null; - try { - // file existed last time - if(fLastModified >= 0) { - if(propertiesFileExists && - (fLastModified < (fLastModified = SecuritySupport.getLastModified(propertiesFile)))) { - loadProperties = true; - } else { - // file has stopped existing... - if(!propertiesFileExists) { - fLastModified = -1; - fXalanProperties = null; - } // else, file wasn't modified! - } - } else { - // file has started to exist: - if(propertiesFileExists) { - loadProperties = true; - fLastModified = SecuritySupport.getLastModified(propertiesFile); - } // else, nothing's changed - } - if(loadProperties) { - // must never have attempted to read xalan.properties - // before (or it's outdeated) - fXalanProperties = new Properties(); - fis = SecuritySupport.getFileInputStream(propertiesFile); - fXalanProperties.load(fis); - } - } catch (Exception x) { - fXalanProperties = null; - fLastModified = -1; - // assert(x instanceof FileNotFoundException - // || x instanceof SecurityException) - // In both cases, ignore and continue w/ next location - } - finally { - // try to close the input stream if one was opened. - if (fis != null) { - try { - fis.close(); - } - // Ignore the exception. - catch (IOException exc) {} - } - } - } - if(fXalanProperties != null) { - factoryClassName = fXalanProperties.getProperty(factoryId); - } - } else { - FileInputStream fis = null; - try { - fis = SecuritySupport.getFileInputStream(new File(propertiesFilename)); - Properties props = new Properties(); - props.load(fis); - factoryClassName = props.getProperty(factoryId); - } catch (Exception x) { - // assert(x instanceof FileNotFoundException - // || x instanceof SecurityException) - // In both cases, ignore and continue w/ next location - } - finally { - // try to close the input stream if one was opened. - if (fis != null) { - try { - fis.close(); - } - // Ignore the exception. - catch (IOException exc) {} - } - } - } - if (factoryClassName != null) { - debugPrintln("found in " + propertiesFilename + ", value=" - + factoryClassName); - return factoryClassName; - } - - // Try Jar Service Provider Mechanism - return findJarServiceProviderName(factoryId); - } // lookUpFactoryClass(String,String):String - - // - // Private static methods - // - - /** Prints a message to standard error if debugging is enabled. */ - private static void debugPrintln(String msg) { - if (DEBUG) { - System.err.println("JAXP: " + msg); - } - } // debugPrintln(String) - - /** - * Figure out which ClassLoader to use. For JDK 1.2 and later use - * the context ClassLoader. - */ - static ClassLoader findClassLoader() - throws ConfigurationError - { - // Figure out which ClassLoader to use for loading the provider - // class. If there is a Context ClassLoader then use it. - ClassLoader context = SecuritySupport.getContextClassLoader(); - ClassLoader system = SecuritySupport.getSystemClassLoader(); - - ClassLoader chain = system; - while (true) { - if (context == chain) { - // Assert: we are on JDK 1.1 or we have no Context ClassLoader - // or any Context ClassLoader in chain of system classloader - // (including extension ClassLoader) so extend to widest - // ClassLoader (always look in system ClassLoader if Xalan - // is in boot/extension/system classpath and in current - // ClassLoader otherwise); normal classloaders delegate - // back to system ClassLoader first so this widening doesn't - // change the fact that context ClassLoader will be consulted - ClassLoader current = ObjectFactory.class.getClassLoader(); - - chain = system; - while (true) { - if (current == chain) { - // Assert: Current ClassLoader in chain of - // boot/extension/system ClassLoaders - return system; - } - if (chain == null) { - break; - } - chain = SecuritySupport.getParentClassLoader(chain); - } - - // Assert: Current ClassLoader not in chain of - // boot/extension/system ClassLoaders - return current; - } - - if (chain == null) { - // boot ClassLoader reached - break; - } - - // Check for any extension ClassLoaders in chain up to - // boot ClassLoader - chain = SecuritySupport.getParentClassLoader(chain); - }; - - // Assert: Context ClassLoader not in chain of - // boot/extension/system ClassLoaders - return context; - } // findClassLoader():ClassLoader - - /** - * Create an instance of a class using the specified ClassLoader - */ - static Object newInstance(String className, ClassLoader cl, - boolean doFallback) - throws ConfigurationError - { - // assert(className != null); - try{ - Class providerClass = findProviderClass(className, cl, doFallback); - Object instance = providerClass.newInstance(); - debugPrintln("created new instance of " + providerClass + - " using ClassLoader: " + cl); - return instance; - } catch (ClassNotFoundException x) { - throw new ConfigurationError( - "Provider " + className + " not found", x); - } catch (Exception x) { - throw new ConfigurationError( - "Provider " + className + " could not be instantiated: " + x, - x); - } - } - - /** - * Find a Class using the specified ClassLoader - */ - static Class findProviderClass(String className, ClassLoader cl, - boolean doFallback) - throws ClassNotFoundException, ConfigurationError - { - //throw security exception if the calling thread is not allowed to access the - //class. Restrict the access to the package classes as specified in java.security policy. - SecurityManager security = System.getSecurityManager(); - try{ - if (security != null){ - final int lastDot = className.lastIndexOf('.'); - String packageName = className; - if (lastDot != -1) packageName = className.substring(0, lastDot); - security.checkPackageAccess(packageName); - } - }catch(SecurityException e){ - throw e; - } - - Class providerClass; - if (cl == null) { - // XXX Use the bootstrap ClassLoader. There is no way to - // load a class using the bootstrap ClassLoader that works - // in both JDK 1.1 and Java 2. However, this should still - // work b/c the following should be true: - // - // (cl == null) iff current ClassLoader == null - // - // Thus Class.forName(String) will use the current - // ClassLoader which will be the bootstrap ClassLoader. - providerClass = Class.forName(className); - } else { - try { - providerClass = cl.loadClass(className); - } catch (ClassNotFoundException x) { - if (doFallback) { - // Fall back to current classloader - ClassLoader current = ObjectFactory.class.getClassLoader(); - if (current == null) { - providerClass = Class.forName(className); - } else if (cl != current) { - cl = current; - providerClass = cl.loadClass(className); - } else { - throw x; - } - } else { - throw x; - } - } - } - - return providerClass; - } - - /** - * Find the name of service provider using Jar Service Provider Mechanism - * - * @return instance of provider class if found or null - */ - private static String findJarServiceProviderName(String factoryId) - { - String serviceId = SERVICES_PATH + factoryId; - InputStream is = null; - - // First try the Context ClassLoader - ClassLoader cl = findClassLoader(); - - is = SecuritySupport.getResourceAsStream(cl, serviceId); - - // If no provider found then try the current ClassLoader - if (is == null) { - ClassLoader current = ObjectFactory.class.getClassLoader(); - if (cl != current) { - cl = current; - is = SecuritySupport.getResourceAsStream(cl, serviceId); - } - } - - if (is == null) { - // No provider found - return null; - } - - debugPrintln("found jar resource=" + serviceId + - " using ClassLoader: " + cl); - - // Read the service provider name in UTF-8 as specified in - // the jar spec. Unfortunately this fails in Microsoft - // VJ++, which does not implement the UTF-8 - // encoding. Theoretically, we should simply let it fail in - // that case, since the JVM is obviously broken if it - // doesn't support such a basic standard. But since there - // are still some users attempting to use VJ++ for - // development, we have dropped in a fallback which makes a - // second attempt using the platform's default encoding. In - // VJ++ this is apparently ASCII, which is a subset of - // UTF-8... and since the strings we'll be reading here are - // also primarily limited to the 7-bit ASCII range (at - // least, in English versions), this should work well - // enough to keep us on the air until we're ready to - // officially decommit from VJ++. [Edited comment from - // jkesselm] - BufferedReader rd; - try { - rd = new BufferedReader(new InputStreamReader(is, "UTF-8")); - } catch (java.io.UnsupportedEncodingException e) { - rd = new BufferedReader(new InputStreamReader(is)); - } - - String factoryClassName = null; - try { - // XXX Does not handle all possible input as specified by the - // Jar Service Provider specification - factoryClassName = rd.readLine(); - } catch (IOException x) { - // No provider found - return null; - } - finally { - try { - // try to close the reader. - rd.close(); - } - // Ignore the exception. - catch (IOException exc) {} - } - - if (factoryClassName != null && - ! "".equals(factoryClassName)) { - debugPrintln("found in resource, value=" - + factoryClassName); - - // Note: here we do not want to fall back to the current - // ClassLoader because we want to avoid the case where the - // resource file was found using one ClassLoader and the - // provider class was instantiated using a different one. - return factoryClassName; - } - - // No provider found - return null; - } - - // - // Classes - // - - /** - * A configuration error. - */ - static class ConfigurationError - extends Error { - static final long serialVersionUID = 8859254254255146542L; - // - // Data - // - - /** Exception. */ - private Exception exception; - - // - // Constructors - // - - /** - * Construct a new instance with the specified detail string and - * exception. - */ - ConfigurationError(String msg, Exception x) { - super(msg); - this.exception = x; - } // (String,Exception) - - // - // Public methods - // - - /** Returns the exception associated to this error. */ - Exception getException() { - return exception; - } // getException():Exception - - } // class ConfigurationError - -} // class ObjectFactory diff --git a/serializer/src/main/java/org/apache/xml/serializer/OutputPropertiesFactory.java b/serializer/src/main/java/org/apache/xml/serializer/OutputPropertiesFactory.java deleted file mode 100644 index 65ef5a5b0..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/OutputPropertiesFactory.java +++ /dev/null @@ -1,516 +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; - -import java.io.BufferedInputStream; -import java.io.IOException; -import java.io.InputStream; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Enumeration; -import java.util.Properties; - -import javax.xml.transform.OutputKeys; - -import org.apache.xml.serializer.utils.MsgKey; -import org.apache.xml.serializer.utils.Utils; -import org.apache.xml.serializer.utils.WrappedRuntimeException; - -/** - * This class is a factory to generate a set of default properties - * of key/value pairs that are used to create a serializer through the - * factory {@link SerializerFactory SerilizerFactory}. - * The properties generated by this factory - * may be modified to non-default values before the SerializerFactory is used to - * create a Serializer. - *

- * The given output types supported are "xml", "text", and "html". - * These type strings can be obtained from the - * {@link Method Method} class in this package. - *

- * Other constants defined in this class are the non-standard property keys - * that can be used to set non-standard property values on a java.util.Properties object - * that is used to create or configure a serializer. Here are the non-standard keys: - *

    - *
  • S_KEY_INDENT_AMOUNT - - * The non-standard property key to use to set the indentation amount. - * The "indent" key needs to have a value of "yes", and this - * properties value is a the number of whitespaces to indent by per - * indentation level. - * - *
  • S_KEY_CONTENT_HANDLER - - * This non-standard property key is used to set the name of the fully qualified - * Java class that implements the ContentHandler interface. - * The output of the serializer will be SAX events sent to this an - * object of this class. - * - *
  • S_KEY_ENTITIES - - * This non-standard property key is used to specify the name of the property file - * that specifies character to entity reference mappings. A line in such a - * file is has the name of the entity and the numeric (base 10) value - * of the corresponding character, like this one:
    quot=34
    - * - *
  • S_USE_URL_ESCAPING - - * This non-standard property key is used to set a value of "yes" if the href values for HTML serialization should - * use %xx escaping. - * - *
  • S_OMIT_META_TAG - - * This non-standard property key is used to set a value of "yes" if the META tag should be omitted where it would - * otherwise be supplied. - *
- * - * @see SerializerFactory - * @see Method - * @see Serializer - */ -public final class OutputPropertiesFactory -{ - /** S_BUILTIN_EXTENSIONS_URL is a mnemonic for the XML Namespace - *(http://xml.apache.org/xalan) predefined to signify Xalan's - * built-in XSLT Extensions. When used in stylesheets, this is often - * bound to the "xalan:" prefix. - */ - private static final String - S_BUILTIN_EXTENSIONS_URL = "http://xml.apache.org/xalan"; - - /** - * The old built-in extension url. It is still supported for - * backward compatibility. - */ - private static final String - S_BUILTIN_OLD_EXTENSIONS_URL = "http://xml.apache.org/xslt"; - - //************************************************************ - //* PUBLIC CONSTANTS - //************************************************************ - /** - * This is not a public API. - * This is the built-in extensions namespace, - * reexpressed in {namespaceURI} syntax - * suitable for prepending to a localname to produce a "universal - * name". - */ - public static final String S_BUILTIN_EXTENSIONS_UNIVERSAL = - "{" + S_BUILTIN_EXTENSIONS_URL + "}"; - - // Some special Xalan keys. - - /** - * The non-standard property key to use to set the - * number of whitepaces to indent by, per indentation level, - * if indent="yes". - */ - public static final String S_KEY_INDENT_AMOUNT = - S_BUILTIN_EXTENSIONS_UNIVERSAL + "indent-amount"; - - /** - * The non-standard property key to use to set the - * characters to write out as at the end of a line, - * rather than the default ones from the runtime. - */ - public static final String S_KEY_LINE_SEPARATOR = - S_BUILTIN_EXTENSIONS_UNIVERSAL + "line-separator"; - - /** This non-standard property key is used to set the name of the fully qualified - * Java class that implements the ContentHandler interface. - * Fully qualified name of class with a default constructor that - * implements the ContentHandler interface, where the result tree events - * will be sent to. - */ - - public static final String S_KEY_CONTENT_HANDLER = - S_BUILTIN_EXTENSIONS_UNIVERSAL + "content-handler"; - - /** - * This non-standard property key is used to specify the name of the property file - * that specifies character to entity reference mappings. - */ - public static final String S_KEY_ENTITIES = - S_BUILTIN_EXTENSIONS_UNIVERSAL + "entities"; - - /** - * This non-standard property key is used to set a value of "yes" if the href values for HTML serialization should - * use %xx escaping. */ - public static final String S_USE_URL_ESCAPING = - S_BUILTIN_EXTENSIONS_UNIVERSAL + "use-url-escaping"; - - /** - * This non-standard property key is used to set a value of "yes" if the META tag should be omitted where it would - * otherwise be supplied. - */ - public static final String S_OMIT_META_TAG = - S_BUILTIN_EXTENSIONS_UNIVERSAL + "omit-meta-tag"; - - /** - * The old built-in extension namespace, this is not a public API. - */ - public static final String S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL = - "{" + S_BUILTIN_OLD_EXTENSIONS_URL + "}"; - - /** - * This is not a public API, it is only public because it is used - * by outside of this package, - * it is the length of the old built-in extension namespace. - */ - public static final int S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL_LEN = - S_BUILTIN_OLD_EXTENSIONS_UNIVERSAL.length(); - - //************************************************************ - //* PRIVATE CONSTANTS - //************************************************************ - - private static final String S_XSLT_PREFIX = "xslt.output."; - private static final int S_XSLT_PREFIX_LEN = S_XSLT_PREFIX.length(); - private static final String S_XALAN_PREFIX = "org.apache.xslt."; - private static final int S_XALAN_PREFIX_LEN = S_XALAN_PREFIX.length(); - - /** Synchronization object for lazy initialization of the above tables. */ - private static Integer m_synch_object = new Integer(1); - - /** the directory in which the various method property files are located */ - private static final String PROP_DIR = SerializerBase.PKG_PATH+'/'; - /** property file for default XML properties */ - private static final String PROP_FILE_XML = "output_xml.properties"; - /** property file for default TEXT properties */ - private static final String PROP_FILE_TEXT = "output_text.properties"; - /** property file for default HTML properties */ - private static final String PROP_FILE_HTML = "output_html.properties"; - /** property file for default UNKNOWN (Either XML or HTML, to be determined later) properties */ - private static final String PROP_FILE_UNKNOWN = "output_unknown.properties"; - - //************************************************************ - //* PRIVATE STATIC FIELDS - //************************************************************ - - /** The default properties of all output files. */ - private static Properties m_xml_properties = null; - - /** The default properties when method="html". */ - private static Properties m_html_properties = null; - - /** The default properties when method="text". */ - private static Properties m_text_properties = null; - - /** The properties when method="" for the "unknown" wrapper */ - private static Properties m_unknown_properties = null; - - private static final Class - ACCESS_CONTROLLER_CLASS = findAccessControllerClass(); - - private static Class findAccessControllerClass() { - try - { - // This Class was introduced in JDK 1.2. With the re-architecture of - // security mechanism ( starting in JDK 1.2 ), we have option of - // giving privileges to certain part of code using doPrivileged block. - // In JDK1.1.X applications won't be having security manager and if - // there is security manager ( in applets ), code need to be signed - // and trusted for having access to resources. - - return Class.forName("java.security.AccessController"); - } - catch (Exception e) - { - //User may be using older JDK ( JDK <1.2 ). Allow him/her to use it. - // But don't try to use doPrivileged - } - - return null; - } - - /** - * Creates an empty OutputProperties with the property key/value defaults specified by - * a property file. The method argument is used to construct a string of - * the form output_[method].properties (for instance, output_html.properties). - * The output_xml.properties file is always used as the base. - * - *

Anything other than 'text', 'xml', and 'html', will - * use the output_xml.properties file.

- * - * @param method non-null reference to method name. - * - * @return Properties object that holds the defaults for the given method. - */ - static public final Properties getDefaultMethodProperties(String method) - { - String fileName = null; - Properties defaultProperties = null; - // According to this article : Double-check locking does not work - // http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-toolbox.html - try - { - synchronized (m_synch_object) - { - if (null == m_xml_properties) // double check - { - fileName = PROP_FILE_XML; - m_xml_properties = loadPropertiesFile(fileName, null); - } - } - - if (method.equals(Method.XML)) - { - defaultProperties = m_xml_properties; - } - else if (method.equals(Method.HTML)) - { - if (null == m_html_properties) // double check - { - fileName = PROP_FILE_HTML; - m_html_properties = - loadPropertiesFile(fileName, m_xml_properties); - } - - defaultProperties = m_html_properties; - } - else if (method.equals(Method.TEXT)) - { - if (null == m_text_properties) // double check - { - fileName = PROP_FILE_TEXT; - m_text_properties = - loadPropertiesFile(fileName, m_xml_properties); - if (null - == m_text_properties.getProperty(OutputKeys.ENCODING)) - { - String mimeEncoding = Encodings.getMimeEncoding(null); - m_text_properties.put( - OutputKeys.ENCODING, - mimeEncoding); - } - } - - defaultProperties = m_text_properties; - } - else if (method.equals(Method.UNKNOWN)) - { - if (null == m_unknown_properties) // double check - { - fileName = PROP_FILE_UNKNOWN; - m_unknown_properties = - loadPropertiesFile(fileName, m_xml_properties); - } - - defaultProperties = m_unknown_properties; - } - else - { - // TODO: Calculate res file from name. - defaultProperties = m_xml_properties; - } - } - catch (IOException ioe) - { - throw new WrappedRuntimeException( - Utils.messages.createMessage( - MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - new Object[] { fileName, method }), - ioe); - } - // wrap these cached defaultProperties in a new Property object just so - // that the caller of this method can't modify the default values - return new Properties(defaultProperties); - } - - /** - * Load the properties file from a resource stream. If a - * key name such as "org.apache.xslt.xxx", fix up the start of - * string to be a curly namespace. If a key name starts with - * "xslt.output.xxx", clip off "xslt.output.". If a key name *or* a - * key value is discovered, check for \u003a in the text, and - * fix it up to be ":", since earlier versions of the JDK do not - * handle the escape sequence (at least in key names). - * - * @param resourceName non-null reference to resource name. - * @param defaults Default properties, which may be null. - */ - static private Properties loadPropertiesFile( - final String resourceName, - Properties defaults) - throws IOException - { - - // This static method should eventually be moved to a thread-specific class - // so that we can cache the ContextClassLoader and bottleneck all properties file - // loading throughout Xalan. - - Properties props = new Properties(defaults); - - InputStream is = null; - BufferedInputStream bis = null; - - try - { - if (ACCESS_CONTROLLER_CLASS != null) - { - is = (InputStream) AccessController - .doPrivileged(new PrivilegedAction() { - public Object run() - { - return OutputPropertiesFactory.class - .getResourceAsStream(resourceName); - } - }); - } - else - { - // User may be using older JDK ( JDK < 1.2 ) - is = OutputPropertiesFactory.class - .getResourceAsStream(resourceName); - } - - bis = new BufferedInputStream(is); - props.load(bis); - } - catch (IOException ioe) - { - if (defaults == null) - { - throw ioe; - } - else - { - throw new WrappedRuntimeException( - Utils.messages.createMessage( - MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - new Object[] { resourceName }), - ioe); - //"Could not load '"+resourceName+"' (check CLASSPATH), now using just the defaults ", ioe); - } - } - catch (SecurityException se) - { - // Repeat IOException handling for sandbox/applet case -sc - if (defaults == null) - { - throw se; - } - else - { - throw new WrappedRuntimeException( - Utils.messages.createMessage( - MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - new Object[] { resourceName }), - se); - //"Could not load '"+resourceName+"' (check CLASSPATH, applet security), now using just the defaults ", se); - } - } - finally - { - if (bis != null) - { - bis.close(); - } - if (is != null) - { - is.close(); - } - } - - // Note that we're working at the HashTable level here, - // and not at the Properties level! This is important - // because we don't want to modify the default properties. - // NB: If fixupPropertyString ends up changing the property - // name or value, we need to remove the old key and re-add - // with the new key and value. However, then our Enumeration - // could lose its place in the HashTable. So, we first - // clone the HashTable and enumerate over that since the - // clone will not change. When we migrate to Collections, - // this code should be revisited and cleaned up to use - // an Iterator which may (or may not) alleviate the need for - // the clone. Many thanks to Padraig O'hIceadha - // for finding this problem. Bugzilla 2000. - - Enumeration keys = ((Properties) props.clone()).keys(); - while (keys.hasMoreElements()) - { - String key = (String) keys.nextElement(); - // Now check if the given key was specified as a - // System property. If so, the system property - // overides the default value in the propery file. - String value = null; - try - { - value = System.getProperty(key); - } - catch (SecurityException se) - { - // No-op for sandbox/applet case, leave null -sc - } - if (value == null) - value = (String) props.get(key); - - String newKey = fixupPropertyString(key, true); - String newValue = null; - try - { - newValue = System.getProperty(newKey); - } - catch (SecurityException se) - { - // No-op for sandbox/applet case, leave null -sc - } - if (newValue == null) - newValue = fixupPropertyString(value, false); - else - newValue = fixupPropertyString(newValue, false); - - if (key != newKey || value != newValue) - { - props.remove(key); - props.put(newKey, newValue); - } - - } - - return props; - } - - /** - * Fix up a string in an output properties file according to - * the rules of {@link #loadPropertiesFile}. - * - * @param s non-null reference to string that may need to be fixed up. - * @return A new string if fixup occured, otherwise the s argument. - */ - static private String fixupPropertyString(String s, boolean doClipping) - { - int index; - if (doClipping && s.startsWith(S_XSLT_PREFIX)) - { - s = s.substring(S_XSLT_PREFIX_LEN); - } - if (s.startsWith(S_XALAN_PREFIX)) - { - s = - S_BUILTIN_EXTENSIONS_UNIVERSAL - + s.substring(S_XALAN_PREFIX_LEN); - } - if ((index = s.indexOf("\\u003a")) > 0) - { - String temp = s.substring(index + 6); - s = s.substring(0, index) + ":" + temp; - - } - return s; - } - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/OutputPropertyUtils.java b/serializer/src/main/java/org/apache/xml/serializer/OutputPropertyUtils.java deleted file mode 100644 index a1e3c38ac..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/OutputPropertyUtils.java +++ /dev/null @@ -1,83 +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; - -import java.util.Properties; - -/** - * This class contains some static methods that act as helpers when parsing a - * Java Property object. - * - * This class is not a public API. - * It is only public because it is used outside of this package. - * - * @see java.util.Properties - * @xsl.usage internal - */ -public final class OutputPropertyUtils -{ - /** - * Searches for the boolean property with the specified key in the property list. - * If the key is not found in this property list, the default property list, - * and its defaults, recursively, are then checked. The method returns - * false if the property is not found, or if the value is other - * than "yes". - * - * @param key the property key. - * @param props the list of properties that will be searched. - * @return the value in this property list as a boolean value, or false - * if null or not "yes". - */ - public static boolean getBooleanProperty(String key, Properties props) - { - - String s = props.getProperty(key); - - if (null == s || !s.equals("yes")) - return false; - else - return true; - } - - /** - * Searches for the int property with the specified key in the property list. - * If the key is not found in this property list, the default property list, - * and its defaults, recursively, are then checked. The method returns - * false if the property is not found, or if the value is other - * than "yes". - * - * @param key the property key. - * @param props the list of properties that will be searched. - * @return the value in this property list as a int value, or 0 - * if null or not a number. - */ - public static int getIntProperty(String key, Properties props) - { - - String s = props.getProperty(key); - - if (null == s) - return 0; - else - return Integer.parseInt(s); - } - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/SecuritySupport.java b/serializer/src/main/java/org/apache/xml/serializer/SecuritySupport.java deleted file mode 100644 index 37e6e70f0..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/SecuritySupport.java +++ /dev/null @@ -1,144 +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; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.InputStream; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.security.PrivilegedActionException; -import java.security.PrivilegedExceptionAction; - -/** - * This class is duplicated for each Xalan-Java subpackage so keep it in sync. - * It is package private and therefore is not exposed as part of the Xalan-Java - * API. - * - * Security related methods that only work on J2SE 1.2 and newer. - */ -final class SecuritySupport { - - static ClassLoader getContextClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = Thread.currentThread().getContextClassLoader(); - } catch (SecurityException ex) { } - return cl; - } - }); - } - - static ClassLoader getSystemClassLoader() { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader cl = null; - try { - cl = ClassLoader.getSystemClassLoader(); - } catch (SecurityException ex) {} - return cl; - } - }); - } - - static ClassLoader getParentClassLoader(final ClassLoader cl) { - return (ClassLoader) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - ClassLoader parent = null; - try { - parent = cl.getParent(); - } catch (SecurityException ex) {} - - // eliminate loops in case of the boot - // ClassLoader returning itself as a parent - return (parent == cl) ? null : parent; - } - }); - } - - static String getSystemProperty(final String propName) { - return (String) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - return System.getProperty(propName); - } - }); - } - - static FileInputStream getFileInputStream(final File file) - throws FileNotFoundException - { - try { - return (FileInputStream) - AccessController.doPrivileged(new PrivilegedExceptionAction() { - public Object run() throws FileNotFoundException { - return new FileInputStream(file); - } - }); - } catch (PrivilegedActionException e) { - throw (FileNotFoundException)e.getException(); - } - } - - static InputStream getResourceAsStream(final ClassLoader cl, - final String name) - { - return (InputStream) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - InputStream ris; - if (cl == null) { - ris = ClassLoader.getSystemResourceAsStream(name); - } else { - ris = cl.getResourceAsStream(name); - } - return ris; - } - }); - } - - static boolean getFileExists(final File f) { - return ((Boolean) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - return f.exists() ? Boolean.TRUE : Boolean.FALSE; - } - })).booleanValue(); - } - - static long getLastModified(final File f) { - return ((Long) - AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - return new Long(f.lastModified()); - } - })).longValue(); - } - - private SecuritySupport () {} -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/SerializationHandler.java b/serializer/src/main/java/org/apache/xml/serializer/SerializationHandler.java deleted file mode 100644 index 6e0c8fd09..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/SerializationHandler.java +++ /dev/null @@ -1,152 +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; - -import java.io.IOException; - -import javax.xml.transform.Transformer; - -import org.w3c.dom.Node; -import org.xml.sax.ContentHandler; -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; -import org.xml.sax.ext.DeclHandler; - -/** - * This interface is the one that a serializer implements. It is a group of - * other interfaces, such as ExtendedContentHandler, ExtendedLexicalHandler etc. - * In addition there are other methods, such as reset(). - * - * This class is public only because it is used in another package, - * it is not a public API. - * - * @xsl.usage internal - */ -public interface SerializationHandler - extends - ExtendedContentHandler, - ExtendedLexicalHandler, - XSLOutputAttributes, - DeclHandler, - org.xml.sax.DTDHandler, - ErrorHandler, - DOMSerializer, - Serializer -{ - /** - * 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 - */ - public void setContentHandler(ContentHandler ch); - - public void close(); - - /** - * Notify that the serializer should take this DOM node as input to be - * serialized. - * - * @param node the DOM node to be serialized. - * @throws IOException if the serializer encounters IO problems. - */ - public void serialize(Node node) throws IOException; - /** - * Turns special character escaping on/off. - * - * Note that characters will - * never, even if this option is set to 'true', be escaped within - * 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; - - /** - * Set the number of spaces to indent for each indentation level. - * @param spaces the number of spaces to indent for each indentation level. - */ - public void setIndentAmount(int spaces); - - /** - * Set the transformer associated with the serializer. - * @param transformer the transformer associated with the serializer. - */ - public void setTransformer(Transformer transformer); - - /** - * Get the transformer associated with the serializer. - * @return Transformer the transformer associated with the serializer. - */ - public Transformer getTransformer(); - - /** - * Used only by TransformerSnapshotImpl to restore the serialization - * to a previous state. - * - * @param mappings NamespaceMappings - */ - public void setNamespaceMappings(NamespaceMappings mappings); - - /** - * A SerializationHandler accepts SAX-like events, so - * it can accumulate attributes or namespace nodes after - * a startElement(). - *

- * If the SerializationHandler has a Writer or OutputStream, - * a call to this method will flush such accumulated - * events as a closed start tag for an element. - *

- * If the SerializationHandler wraps a ContentHandler, - * a call to this method will flush such accumulated - * events as a SAX (not SAX-like) calls to - * startPrefixMapping() and startElement(). - *

- * If one calls endDocument() then one need not call - * this method since a call to endDocument() will - * do what this method does. However, in some - * circumstances, such as with document fragments, - * endDocument() is not called and it may be - * necessary to call this method to flush - * any pending events. - *

- * 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; - - /** - * Default behavior is to expand DTD entities, - * that is the initall default value is true. - * @param expand true if DTD entities are to be expanded, - * false if they are to be left as DTD entity references. - */ - public void setDTDEntityExpansion(boolean expand); - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/Serializer.java b/serializer/src/main/java/org/apache/xml/serializer/Serializer.java deleted file mode 100644 index 19b249158..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/Serializer.java +++ /dev/null @@ -1,238 +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; -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; -import java.util.Properties; - -import org.xml.sax.ContentHandler; - -/** - * The Serializer interface is implemented by a serializer to enable users to: - *

    - *
  • get and set streams or writers - *
  • configure the serializer with key/value properties - *
  • get an org.xml.sax.ContentHandler or a DOMSerializer to provide input to - *
- * - *

- * Here is an example using the asContentHandler() method: - *

- * java.util.Properties props = 
- *   OutputPropertiesFactory.getDefaultMethodProperties(Method.TEXT);
- * Serializer ser = SerializerFactory.getSerializer(props);
- * java.io.PrintStream ostream = System.out; 
- * ser.setOutputStream(ostream);
- * 
- * // Provide the SAX input events
- * ContentHandler handler = ser.asContentHandler();
- * handler.startDocument();
- * char[] chars = { 'a', 'b', 'c' };
- * handler.characters(chars, 0, chars.length);
- * handler.endDocument();
- * 
- * ser.reset(); // get ready to use the serializer for another document
- *              // of the same output method (TEXT).
- * 
- * - *

- * As an alternate to supplying a series of SAX events as input through the - * ContentHandler interface, the input to serialize may be given as a DOM. - *

- * For example: - *

- * org.w3c.dom.Document     inputDoc;
- * org.apache.xml.serializer.Serializer   ser;
- * java.io.Writer owriter;
- * 
- * java.util.Properties props = 
- *   OutputPropertiesFactory.getDefaultMethodProperties(Method.XML);
- * Serializer ser = SerializerFactory.getSerializer(props);
- * owriter = ...;  // create a writer to serialize the document to
- * ser.setWriter( owriter );
- * 
- * inputDoc = ...; // create the DOM document to be serialized
- * DOMSerializer dser = ser.asDOMSerializer(); // a DOM will be serialized
- * dser.serialize(inputDoc); // serialize the DOM, sending output to owriter
- * 
- * ser.reset(); // get ready to use the serializer for another document
- *              // of the same output method.
- * 
- * - * This interface is a public API. - * - * @see Method - * @see OutputPropertiesFactory - * @see SerializerFactory - * @see DOMSerializer - * @see ContentHandler - * - * @xsl.usage general - */ -public interface Serializer { - - /** - * Specifies an output stream to which the document should be - * serialized. This method should not be called while the - * serializer is in the process of serializing a document. - *

- * The encoding specified in the output {@link Properties} is used, or - * if no encoding was specified, the default for the selected - * output method. - *

- * Only one of setWriter() or setOutputStream() should be called. - * - * @param output The output stream - */ - public void setOutputStream(OutputStream output); - - /** - * Get the output stream where the events will be serialized to. - * - * @return reference to the result stream, or null if only a writer was - * set. - */ - public OutputStream getOutputStream(); - - /** - * Specifies a writer to which the document should be serialized. - * This method should not be called while the serializer is in - * the process of serializing a document. - *

- * The encoding specified for the output {@link Properties} must be - * identical to the output format used with the writer. - * - *

- * Only one of setWriter() or setOutputStream() should be called. - * - * @param writer The output writer stream - */ - public void setWriter(Writer writer); - - /** - * Get the character stream where the events will be serialized to. - * - * @return Reference to the result Writer, or null. - */ - public Writer getWriter(); - - /** - * Specifies an output format for this serializer. It the - * serializer has already been associated with an output format, - * it will switch to the new format. This method should not be - * called while the serializer is in the process of serializing - * a document. - *

- * 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, - * <a href="http://www.w3.org/TR/1999/REC-xslt-19991116"> XSLT 1.0 recommendation</a> - *

- * The non-standard property keys supported are defined in {@link OutputPropertiesFactory}. - * - *

- * This method can be called multiple times before a document is serialized. Each - * time it is called more, or over-riding property values, can be specified. One - * property value that can not be changed is that of the "method" property key. - *

- * The value of the "cdata-section-elements" property key is a whitespace - * separated list of elements. If the element is in a namespace then - * value is passed in this format: {uri}localName - *

- * If the "cdata-section-elements" key is specified on multiple calls - * to this method the set of elements specified in the value - * is not replaced from one call to the - * next, but it is cumulative across the calls. - * - * @param format The output format to use, as a set of key/value pairs. - */ - public void setOutputFormat(Properties format); - - /** - * Returns the output format properties for this serializer. - * - * @return The output format key/value pairs in use. - */ - public Properties getOutputFormat(); - - /** - * Return a {@link ContentHandler} interface to provide SAX input to. - * Through the returned object the document to be serailized, - * as a series of SAX events, can be provided to the serialzier. - * If the serializer does not support the {@link ContentHandler} - * interface, it will return null. - *

- * In principle only one of asDOMSerializer() or asContentHander() - * should be called. - * - * @return A {@link ContentHandler} interface into this serializer, - * or null if the serializer is not SAX 2 capable - * @throws IOException An I/O exception occured - */ - public ContentHandler asContentHandler() throws IOException; - - /** - * Return a {@link DOMSerializer} interface into this serializer. - * Through the returned object the document to be serialized, - * a DOM, can be provided to the serializer. - * If the serializer does not support the {@link DOMSerializer} - * interface, it should return null. - *

- * In principle only one of asDOMSerializer() or asContentHander() - * should be called. - * - * @return A {@link DOMSerializer} interface into this serializer, - * or null if the serializer is not DOM capable - * @throws IOException An I/O exception occured - */ - public DOMSerializer asDOMSerializer() throws IOException; - - /** - * This method resets the serializer. - * If this method returns true, the - * serializer may be used for subsequent serialization of new - * documents. It is possible to change the output format and - * output stream prior to serializing, or to reuse the existing - * output format and output stream or writer. - * - * @return True if serializer has been reset and can be reused - */ - public boolean reset(); - - /** - * Return an Object into this serializer to be cast to a DOM3Serializer. - * Through the returned object the document to be serialized, - * a DOM (Level 3), can be provided to the serializer. - * If the serializer does not support casting to a {@link DOM3Serializer} - * interface, it should return null. - *

- * In principle only one of asDOM3Serializer() or asContentHander() - * should be called. - * - * @return An Object to be cast to a DOM3Serializer interface into this serializer, - * or null if the serializer is not DOM capable - * @throws IOException An I/O exception occured - */ - public Object asDOM3Serializer() throws IOException; -} - diff --git a/serializer/src/main/java/org/apache/xml/serializer/SerializerBase.java b/serializer/src/main/java/org/apache/xml/serializer/SerializerBase.java deleted file mode 100644 index c0c3585c0..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/SerializerBase.java +++ /dev/null @@ -1,1698 +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; - -import java.io.IOException; -import java.util.HashMap; -import java.util.Set; - -import javax.xml.transform.OutputKeys; -import javax.xml.transform.SourceLocator; -import javax.xml.transform.Transformer; - -import org.apache.xml.serializer.utils.MsgKey; -import org.apache.xml.serializer.utils.Utils; -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; - - -/** - * This class acts as a base class for the XML "serializers" - * and the stream serializers. - * It contains a number of common fields and methods. - * - * @xsl.usage internal - */ -public abstract class SerializerBase - implements SerializationHandler, SerializerConstants -{ - SerializerBase() { - return; - } - - /** - * The name of the package that this class is in. - *

- * Not a public API. - */ - public static final String PKG_NAME; - - /** - * The same as the name of the package that this class is in - * except that '.' are replaced with '/'. - *

- * Not a public API. - */ - public static final String PKG_PATH; - - static { - String fullyQualifiedName = SerializerBase.class.getName(); - int lastDot = fullyQualifiedName.lastIndexOf('.'); - if (lastDot < 0) { - PKG_NAME = ""; - } else { - PKG_NAME = fullyQualifiedName.substring(0, lastDot); - } - - StringBuffer sb = new StringBuffer(); - for (int i = 0; i < PKG_NAME.length(); i++) { - char ch = PKG_NAME.charAt(i); - if (ch == '.') - sb.append('/'); - else - sb.append(ch); - } - PKG_PATH = sb.toString(); - } - - - - /** - * 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 - { - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDELEMENT,name, (Attributes)null); - } - } - - /** - * Report the characters trace event - * @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 - { - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_CHARACTERS, chars, start,length); - } - } - - /** - * true if we still need to call startDocumentInternal() - */ - protected boolean m_needToCallStartDocument = true; - - /** True if a trailing "]]>" still needs to be written to be - * written out. Used to merge adjacent CDATA sections - */ - protected boolean m_cdataTagOpen = false; - - /** - * All the attributes of the current element, collected from - * startPrefixMapping() calls, or addAddtribute() calls, or - * from the SAX attributes in a startElement() call. - */ - protected AttributesImplSerializer m_attributes = new AttributesImplSerializer(); - - /** - * Tells if we're in an EntityRef event. - */ - protected boolean m_inEntityRef = false; - - /** This flag is set while receiving events from the external DTD */ - protected boolean m_inExternalDTD = false; - - /** - * The System ID for the doc type. - */ - protected String m_doctypeSystem; - - /** - * The public ID for the doc type. - */ - protected String m_doctypePublic; - - /** - * Flag to tell that we need to add the doctype decl, which we can't do - * until the first element is encountered. - */ - boolean m_needToOutputDocTypeDecl = true; - - /** - * Tells if we should write the XML declaration. - */ - protected boolean m_shouldNotWriteXMLHeader = false; - - /** - * The standalone value for the doctype. - */ - private String m_standalone; - - /** - * True if standalone was specified. - */ - protected boolean m_standaloneWasSpecified = false; - - /** - * Flag to tell if indenting (pretty-printing) is on. - */ - protected boolean m_doIndent = false; - /** - * Amount to indent. - */ - protected int m_indentAmount = 0; - - /** - * Tells the XML version, for writing out to the XML decl. - */ - protected String m_version = null; - - /** - * The mediatype. Not used right now. - */ - protected String m_mediatype; - - /** - * The transformer that was around when this output handler was created (if - * any). - */ - private Transformer m_transformer; - - /** - * Namespace support, that keeps track of currently defined - * prefix/uri mappings. As processed elements come and go, so do - * the associated mappings for that element. - */ - protected NamespaceMappings m_prefixMap; - - /** - * Handle for firing generate events. This interface may be implemented - * by the referenced transformer object. - */ - protected SerializerTrace m_tracer; - - protected SourceLocator m_sourceLocator; - - - /** - * The writer to send output to. This field is only used in the ToStream - * serializers, but exists here just so that the fireStartDoc() and - * other fire... methods can flush this writer when tracing. - */ - protected java.io.Writer m_writer = null; - - /** - * A reference to "stack frame" corresponding to - * the current element. Such a frame is pushed at a startElement() - * and popped at an endElement(). This frame contains information about - * the element, such as its namespace URI. - */ - protected ElemContext m_elemContext = new ElemContext(); - - /** - * A utility buffer for converting Strings passed to - * character() methods to character arrays. - * Reusing this buffer means not creating a new character array - * everytime and it runs faster. - */ - protected char[] m_charsBuff = new char[60]; - - /** - * A utility buffer for converting Strings passed to - * attribute methods to character arrays. - * Reusing this buffer means not creating a new character array - * everytime and it runs faster. - */ - protected char[] m_attrBuff = new char[30]; - - /** - * Receive notification of a comment. - * - * @see ExtendedLexicalHandler#comment(String) - */ - public void comment(String data) throws SAXException - { - m_docIsEmpty = false; - - final int length = data.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length * 2 + 1]; - } - data.getChars(0, length, m_charsBuff, 0); - comment(m_charsBuff, 0, length); - } - - /** - * If at runtime, when the qname of the attribute is - * known, another prefix is specified for the attribute, then we can - * patch or hack the name with this method. For - * a qname of the form "ns?:otherprefix:name", this function patches the - * qname by simply ignoring "otherprefix". - * 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) - { - - - final int lastColon = qname.lastIndexOf(':'); - - if (lastColon > 0) { - final int firstColon = qname.indexOf(':'); - final String prefix = qname.substring(0, firstColon); - final String localName = qname.substring(lastColon + 1); - - // If uri is "" then ignore prefix - final String uri = m_prefixMap.lookupNamespace(prefix); - if (uri != null && uri.length() == 0) { - return localName; - } - else if (firstColon != lastColon) { - return prefix + ':' + localName; - } - } - return qname; - } - - /** - * Returns the local name of a qualified name. If the name has no prefix, - * then it works as the identity (SAX2). - * @param qname the qualified name - * @return the name, but excluding any prefix and colon. - */ - protected static String getLocalName(String qname) - { - final int col = qname.lastIndexOf(':'); - return (col > 0) ? qname.substring(col + 1) : qname; - } - - /** - * Receive an object for locating the origin of SAX document events. - * - * @param locator An object that can return the location of any SAX document - * event. - * - * Receive an object for locating the origin of SAX document events. - * - *

SAX parsers are strongly encouraged (though not absolutely - * required) to supply a locator: if it does so, it must supply - * the locator to the application by invoking this method before - * invoking any of the other methods in the DocumentHandler - * interface.

- * - *

The locator allows the application to determine the end - * position of any document-related event, even if the parser is - * not reporting an error. Typically, the application will - * use this information for reporting its own errors (such as - * character content that does not match an application's - * business rules). The information returned by the locator - * is probably not sufficient for use with a search engine.

- * - *

Note that the locator will return correct information only - * during the invocation of the events in this interface. The - * application should not attempt to use it at any other time.

- */ - public void setDocumentLocator(Locator locator) - { - return; - - // I don't do anything with this yet. - } - - /** - * Adds the given attribute to the set of collected attributes , but only if - * there is a currently open element. - * - * An element is currently open if a startElement() notification has - * occured but the start of the element has not yet been written to the - * output. In the stream case this means that we have not yet been forced - * to close the elements opening tag by another notification, such as a - * character notification. - * - * @param uri the URI of the attribute - * @param localName the local name of the attribute - * @param rawName the qualified name of the attribute - * @param type the type of the attribute (probably CDATA) - * @param value the value of the attribute - * @param XSLAttribute true if this attribute is coming from an xsl:attriute element - * @see ExtendedContentHandler#addAttribute(String, String, String, String, String) - */ - public void addAttribute( - String uri, - String localName, - String rawName, - String type, - String value, - boolean XSLAttribute) - throws SAXException - { - if (m_elemContext.m_startTagOpen) - { - addAttributeAlways(uri, localName, rawName, type, value, XSLAttribute); - } - - } - - /** - * Adds the given attribute to the set of attributes, even if there is - * no currently open element. This is useful if a SAX startPrefixMapping() - * should need to add an attribute before the element name is seen. - * - * @param uri the URI of the attribute - * @param localName the local name of the attribute - * @param rawName the qualified name of the attribute - * @param type the type of the attribute (probably CDATA) - * @param value the value of the attribute - * @param XSLAttribute true if this attribute is coming from an xsl:attribute element - * @return true if the attribute was added, - * false if an existing value was replaced. - */ - public boolean addAttributeAlways( - String uri, - String localName, - String rawName, - String type, - String value, - boolean XSLAttribute) - { - boolean was_added; -// final int index = -// (localName == null || uri == null) ? -// m_attributes.getIndex(rawName):m_attributes.getIndex(uri, localName); - int index; -// if (localName == null || uri == null){ -// index = m_attributes.getIndex(rawName); -// } -// else { -// index = m_attributes.getIndex(uri, localName); -// } - if (localName == null || uri == null || uri.length() == 0) - index = m_attributes.getIndex(rawName); - else { - index = m_attributes.getIndex(uri,localName); - } - if (index >= 0) - { - /* We've seen the attribute before. - * We may have a null uri or localName, but all - * we really want to re-set is the value anyway. - */ - m_attributes.setValue(index,value); - was_added = false; - } - else - { - // the attribute doesn't exist yet, create it - m_attributes.addAttribute(uri, localName, rawName, type, value); - was_added = true; - } - return was_added; - - } - - - /** - * Adds the given attribute to the set of collected attributes, - * but only if there is a currently open element. - * - * @param name the attribute's qualified name - * @param value the value of the attribute - */ - public void addAttribute(String name, final String value) - { - if (m_elemContext.m_startTagOpen) - { - final String patchedName = patchName(name); - final String localName = getLocalName(patchedName); - final String uri = getNamespaceURI(patchedName, false); - - addAttributeAlways(uri,localName, patchedName, "CDATA", value, false); - } - } - - /** - * Adds the given xsl:attribute to the set of collected attributes, - * but only if there is a currently open element. - * - * @param name the attribute's qualified name (prefix:localName) - * @param value the value of the attribute - * @param uri the URI that the prefix of the name points to - */ - public void addXSLAttribute(String name, final String value, final String uri) - { - if (m_elemContext.m_startTagOpen) - { - final String patchedName = patchName(name); - final String localName = getLocalName(patchedName); - - addAttributeAlways(uri,localName, patchedName, "CDATA", value, true); - } - } - - /** - * Add the given attributes to the currently collected ones. These - * attributes are always added, regardless of whether on not an element - * is currently open. - * @param atts List of attributes to add to this list - */ - public void addAttributes(Attributes atts) throws SAXException - { - - int nAtts = atts.getLength(); - - for (int i = 0; i < nAtts; i++) - { - String uri = atts.getURI(i); - - if (null == uri) - uri = ""; - - addAttributeAlways( - uri, - atts.getLocalName(i), - atts.getQName(i), - atts.getType(i), - atts.getValue(i), - false); - - } - } - - /** - * Return a {@link ContentHandler} interface into this serializer. - * If the serializer does not support the {@link ContentHandler} - * interface, it should return null. - * - * @return A {@link ContentHandler} interface into this serializer, - * or null if the serializer is not SAX 2 capable - * @throws IOException An I/O exception occured - */ - public ContentHandler asContentHandler() throws IOException - { - return this; - } - - /** - * Report the end of an entity. - * - * @param name The name of the entity that is ending. - * @throws org.xml.sax.SAXException The application may raise an exception. - * @see #startEntity - */ - public void endEntity(String name) throws org.xml.sax.SAXException - { - if (name.equals("[dtd]")) - m_inExternalDTD = false; - m_inEntityRef = false; - - if (m_tracer != null) - this.fireEndEntity(name); - } - - /** - * Flush and close the underlying java.io.Writer. This method applies to - * ToStream serializers, not ToSAXHandler serializers. - * @see ToStream - */ - public void close() - { - // do nothing (base behavior) - } - - /** - * Initialize global variables - */ - protected void initCDATA() - { - // CDATA stack - // _cdataStack = new Stack(); - // _cdataStack.push(new Integer(-1)); // push dummy value - } - - /** - * Returns the character encoding to be used in the output document. - * @return the character encoding to be used in the output document. - */ - public String getEncoding() - { - return getOutputProperty(OutputKeys.ENCODING); - } - - /** - * Sets the character encoding coming from the xsl:output encoding stylesheet attribute. - * @param encoding the character encoding - */ - public void setEncoding(String encoding) - { - setOutputProperty(OutputKeys.ENCODING,encoding); - } - - /** - * Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute - * @param b true if the XML declaration is to be omitted from the output - * document. - */ - public void setOmitXMLDeclaration(boolean b) - { - String val = b ? "yes":"no"; - setOutputProperty(OutputKeys.OMIT_XML_DECLARATION,val); - } - - - /** - * @return true if the XML declaration is to be omitted from the output - * document. - */ - public boolean getOmitXMLDeclaration() - { - return m_shouldNotWriteXMLHeader; - } - - /** - * Returns the previously set value of the value to be used as the public - * identifier in the document type declaration (DTD). - * - *@return the public identifier to be used in the DOCTYPE declaration in the - * output document. - */ - public String getDoctypePublic() - { - return m_doctypePublic; - } - - /** Set the value coming from the xsl:output doctype-public stylesheet attribute. - * @param doctypePublic the public identifier to be used in the DOCTYPE - * declaration in the output document. - */ - public void setDoctypePublic(String doctypePublic) - { - setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, doctypePublic); - } - - - /** - * Returns the previously set value of the value to be used - * as the system identifier in the document type declaration (DTD). - * @return the system identifier to be used in the DOCTYPE declaration in - * the output document. - * - */ - public String getDoctypeSystem() - { - return m_doctypeSystem; - } - - /** Set the value coming from the xsl:output doctype-system stylesheet attribute. - * @param doctypeSystem the system identifier to be used in the DOCTYPE - * declaration in the output document. - */ - public void setDoctypeSystem(String doctypeSystem) - { - setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctypeSystem); - } - - /** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties - * @param doctypeSystem the system identifier to be used in the DOCTYPE - * declaration in the output document. - * @param doctypePublic the public identifier to be used in the DOCTYPE - * declaration in the output document. - */ - public void setDoctype(String doctypeSystem, String doctypePublic) - { - setOutputProperty(OutputKeys.DOCTYPE_SYSTEM, doctypeSystem); - setOutputProperty(OutputKeys.DOCTYPE_PUBLIC, doctypePublic); - } - - /** - * Sets the value coming from the xsl:output standalone stylesheet attribute. - * @param standalone a value of "yes" indicates that the - * standalone delaration is to be included in the output - * document. This method remembers if the value was explicitly set using - * this method, verses if the value is the default value. - */ - public void setStandalone(String standalone) - { - setOutputProperty(OutputKeys.STANDALONE, standalone); - } - /** - * Sets the XSL standalone attribute, but does not remember if this is a - * default or explicite setting. - * @param standalone "yes" | "no" - */ - protected void setStandaloneInternal(String standalone) - { - if ("yes".equals(standalone)) - m_standalone = "yes"; - else - m_standalone = "no"; - - } - - /** - * Gets the XSL standalone attribute - * @return a value of "yes" if the standalone delaration is to - * be included in the output document. - * @see XSLOutputAttributes#getStandalone() - */ - public String getStandalone() - { - return m_standalone; - } - - /** - * @return true if the output document should be indented to visually - * indicate its structure. - */ - public boolean getIndent() - { - return m_doIndent; - } - /** - * Gets the mediatype the media-type or MIME type associated with the output - * document. - * @return the mediatype the media-type or MIME type associated with the - * output document. - */ - public String getMediaType() - { - return m_mediatype; - } - - /** - * Gets the version of the output format. - * @return the version of the output format. - */ - public String getVersion() - { - return m_version; - } - - /** - * Sets the value coming from the xsl:output version attribute. - * @param version the version of the output format. - * @see SerializationHandler#setVersion(String) - */ - public void setVersion(String version) - { - setOutputProperty(OutputKeys.VERSION, version); - } - - /** - * Sets the value coming from the xsl:output media-type stylesheet attribute. - * @param mediaType the non-null media-type or MIME type associated with the - * output document. - * @see javax.xml.transform.OutputKeys#MEDIA_TYPE - * @see SerializationHandler#setMediaType(String) - */ - public void setMediaType(String mediaType) - { - setOutputProperty(OutputKeys.MEDIA_TYPE,mediaType); - } - - /** - * @return the number of spaces to indent for each indentation level. - */ - public int getIndentAmount() - { - return m_indentAmount; - } - - /** - * Sets the indentation amount. - * @param m_indentAmount The m_indentAmount to set - */ - public void setIndentAmount(int m_indentAmount) - { - this.m_indentAmount = m_indentAmount; - } - - /** - * Sets the value coming from the xsl:output indent stylesheet - * attribute. - * @param doIndent true if the output document should be indented to - * visually indicate its structure. - * @see XSLOutputAttributes#setIndent(boolean) - */ - public void setIndent(boolean doIndent) - { - String val = doIndent ? "yes":"no"; - setOutputProperty(OutputKeys.INDENT,val); - } - - /** - * This method is used when a prefix/uri namespace mapping - * is indicated after the element was started with a - * startElement() and before and endElement(). - * startPrefixMapping(prefix,uri) would be used before the - * startElement() call. - * @param uri the URI of the namespace - * @param prefix the prefix associated with the given URI. - * - * @see ExtendedContentHandler#namespaceAfterStartElement(String, String) - */ - public void namespaceAfterStartElement(String uri, String prefix) - throws SAXException - { - // default behavior is to do nothing - } - - /** - * Return a {@link DOMSerializer} interface into this serializer. If the - * serializer does not support the {@link DOMSerializer} interface, it should - * return null. - * - * @return A {@link DOMSerializer} interface into this serializer, or null - * if the serializer is not DOM capable - * @throws IOException An I/O exception occured - * @see Serializer#asDOMSerializer() - */ - public DOMSerializer asDOMSerializer() throws IOException - { - return this; - } - - /** - * Tell if two strings are equal, without worry if the first string is null. - * - * @param p String reference, which may be null. - * @param t String reference, which may be null. - * - * @return true if strings are equal. - */ - private static final boolean subPartMatch(String p, String t) - { - return (p == t) || ((null != p) && (p.equals(t))); - } - - /** - * Returns the local name of a qualified name. - * If the name has no prefix, - * then it works as the identity (SAX2). - * - * @param qname a qualified name - * @return returns the prefix of the qualified name, - * or null if there is no prefix. - */ - protected static final String getPrefixPart(String qname) - { - final int col = qname.indexOf(':'); - return (col > 0) ? qname.substring(0, col) : null; - //return (col > 0) ? qname.substring(0,col) : ""; - } - - /** - * Some users of the serializer may need the current namespace mappings - * @return the current namespace mappings (prefix/uri) - * @see ExtendedContentHandler#getNamespaceMappings() - */ - public NamespaceMappings getNamespaceMappings() - { - return m_prefixMap; - } - - /** - * Returns the prefix currently pointing to the given URI (if any). - * @param namespaceURI the uri of the namespace in question - * @return a prefix pointing to the given URI (if any). - * @see ExtendedContentHandler#getPrefix(String) - */ - public String getPrefix(String namespaceURI) - { - String prefix = m_prefixMap.lookupPrefix(namespaceURI); - return prefix; - } - - /** - * Returns the URI of an element or attribute. Note that default namespaces - * do not apply directly to attributes. - * @param qname a qualified name - * @param isElement true if the qualified name is the name of - * an element. - * @return returns the namespace URI associated with the qualified name. - */ - public String getNamespaceURI(String qname, boolean isElement) - { - String uri = EMPTYSTRING; - int col = qname.lastIndexOf(':'); - final String prefix = (col > 0) ? qname.substring(0, col) : EMPTYSTRING; - - if (!EMPTYSTRING.equals(prefix) || isElement) - { - if (m_prefixMap != null) - { - uri = m_prefixMap.lookupNamespace(prefix); - if (uri == null && !prefix.equals(XMLNS_PREFIX)) - { - throw new RuntimeException( - Utils.messages.createMessage( - MsgKey.ER_NAMESPACE_PREFIX, - new Object[] { qname.substring(0, col) } )); - } - } - } - return uri; - } - - /** - * Returns the URI of prefix (if any) - * - * @param prefix the prefix whose URI is searched for - * @return the namespace URI currently associated with the - * prefix, null if the prefix is undefined. - */ - public String getNamespaceURIFromPrefix(String prefix) - { - String uri = null; - if (m_prefixMap != null) - uri = m_prefixMap.lookupNamespace(prefix); - return uri; - } - - /** - * Entity reference event. - * - * @param name Name of entity - * @throws org.xml.sax.SAXException if the serializer or tracer encounters an error. - */ - public void entityReference(String name) throws org.xml.sax.SAXException - { - - flushPending(); - - startEntity(name); - endEntity(name); - - if (m_tracer != null) - fireEntityReference(name); - } - - /** - * Sets the transformer associated with this serializer - * @param t the transformer associated with this serializer. - * @see SerializationHandler#setTransformer(Transformer) - */ - public void setTransformer(Transformer t) - { - m_transformer = t; - - // If this transformer object implements the SerializerTrace interface - // then assign m_tracer to the transformer object so it can be used - // to fire trace events. - if ((m_transformer instanceof SerializerTrace) && - (((SerializerTrace) m_transformer).hasTraceListeners())) { - m_tracer = (SerializerTrace) m_transformer; - } else { - m_tracer = null; - } - } - /** - * Gets the transformer associated with this serializer - * @return returns the transformer associated with this serializer. - * @see SerializationHandler#getTransformer() - */ - public Transformer getTransformer() - { - return m_transformer; - } - - /** - * 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 if the serializer or tracer encounters an error. - */ - public void characters(org.w3c.dom.Node node) - throws org.xml.sax.SAXException - { - flushPending(); - String data = node.getNodeValue(); - if (data != null) - { - final int length = data.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length * 2 + 1]; - } - data.getChars(0, length, m_charsBuff, 0); - characters(m_charsBuff, 0, length); - } - } - - - /** - * @see org.xml.sax.ErrorHandler#error(SAXParseException) - */ - public void error(SAXParseException exc) throws SAXException { - } - - /** - * @see org.xml.sax.ErrorHandler#fatalError(SAXParseException) - */ - public void fatalError(SAXParseException exc) throws SAXException { - - m_elemContext.m_startTagOpen = false; - - } - - /** - * @see org.xml.sax.ErrorHandler#warning(SAXParseException) - */ - 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 - { - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENTITYREF, name); - } - } - - /** - * Report the characters event - * @param chars content of characters - * @param start starting index of characters to output - * @param length number of characters to output - */ -// protected void fireCharEvent(char[] chars, int start, int length) -// throws org.xml.sax.SAXException -// { -// if (m_tracer != null) -// m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_CHARACTERS, chars, start,length); -// } -// - - /** - * This method is only used internally when flushing the writer from the - * various fire...() trace events. Due to the writer being wrapped with - * SerializerTraceWriter it may cause the flush of these trace events: - * EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS - * EVENTTYPE_OUTPUT_CHARACTERS - * which trace the output written to the output stream. - * - */ - private void flushMyWriter() - { - if (m_writer != null) - { - try - { - m_writer.flush(); - } - catch(IOException ioe) - { - - } - } - } - /** - * Report the CDATA trace event - * @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 - { - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_CDATA, chars, start,length); - } - } - - /** - * Report the comment trace event - * @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 - { - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_COMMENT, new String(chars, start, 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 - { - if (m_tracer != null) - flushMyWriter(); - // we do not need to handle this. - } - - /** - * 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 - { - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTDOCUMENT); - } - } - - - /** - * 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 - { - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENDDOCUMENT); - } - } - - /** - * Report the start element trace event. This trace method needs to be - * 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) - throws org.xml.sax.SAXException - { - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_STARTELEMENT, - elemName, m_attributes); - } - } - - - /** - * 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 - { - - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_PI,name, 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 - { - if (m_tracer != null) - { - flushMyWriter(); - m_tracer.fireGenerateEvent(SerializerTrace.EVENTTYPE_ENTITYREF,name, (Attributes)null); - } - } - - /** - * Receive notification of the beginning of a document. - * This method is never a self generated call, - * but only called externally. - * - *

The SAX parser will invoke this method only once, before any - * other methods in this interface or in DTDHandler (except for - * setDocumentLocator).

- * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void startDocument() throws org.xml.sax.SAXException - { - - // if we do get called with startDocument(), handle it right away - startDocumentInternal(); - m_needToCallStartDocument = false; - return; - } - - /** - * This method handles what needs to be done at a startDocument() call, - * whether from an external caller, or internally called in the - * serializer. For historical reasons the serializer is flexible to - * startDocument() not always being called. - * Even if no external call is - * made into startDocument() this method will always be called as a self - * generated internal startDocument, it handles what needs to be done at a - * startDocument() call. - * - * This method exists just to make sure that startDocument() is only ever - * called from an external caller, which in principle is just a matter of - * style. - * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - protected void startDocumentInternal() throws org.xml.sax.SAXException - { - if (m_tracer != null) - this.fireStartDoc(); - } - /** - * This method is used to set the source locator, which might be used to - * generated an error message. - * @param locator the source locator - * - * @see ExtendedContentHandler#setSourceLocator(javax.xml.transform.SourceLocator) - */ - public void setSourceLocator(SourceLocator locator) - { - m_sourceLocator = locator; - } - - - /** - * Used only by TransformerSnapshotImpl to restore the serialization - * to a previous state. - * - * @param mappings NamespaceMappings - */ - public void setNamespaceMappings(NamespaceMappings mappings) { - m_prefixMap = mappings; - } - - public boolean reset() - { - resetSerializerBase(); - return true; - } - - /** - * Reset all of the fields owned by SerializerBase - * - */ - private void resetSerializerBase() - { - this.m_attributes.clear(); - this.m_CdataElems = null; - this.m_cdataTagOpen = false; - this.m_docIsEmpty = true; - this.m_doctypePublic = null; - this.m_doctypeSystem = null; - this.m_doIndent = false; - this.m_elemContext = new ElemContext(); - this.m_indentAmount = 0; - this.m_inEntityRef = false; - this.m_inExternalDTD = false; - this.m_mediatype = null; - this.m_needToCallStartDocument = true; - this.m_needToOutputDocTypeDecl = false; - if (m_OutputProps != null) - this.m_OutputProps.clear(); - if (m_OutputPropsDefault != null) - this.m_OutputPropsDefault.clear(); - if (this.m_prefixMap != null) - this.m_prefixMap.reset(); - this.m_shouldNotWriteXMLHeader = false; - this.m_sourceLocator = null; - this.m_standalone = null; - this.m_standaloneWasSpecified = false; - this.m_StringOfCDATASections = null; - this.m_tracer = null; - this.m_transformer = null; - this.m_version = null; - // don't set writer to null, so that it might be re-used - //this.m_writer = null; - } - - /** - * Returns true if the serializer is used for temporary output rather than - * final output. - * - * This concept is made clear in the XSLT 2.0 draft. - */ - final boolean inTemporaryOutputState() - { - /* This is a hack. We should really be letting the serializer know - * that it is in temporary output state with an explicit call, but - * from a pragmatic point of view (for now anyways) having no output - * encoding at all, not even the default UTF-8 indicates that the serializer - * is being used for temporary RTF. - */ - return (getEncoding() == null); - - } - - /** - * This method adds an attribute the the current element, - * but should not be used for an xsl:attribute child. - * @see ExtendedContentHandler#addAttribute(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.lang.String) - */ - public void addAttribute(String uri, String localName, String rawName, String type, String value) throws SAXException - { - if (m_elemContext.m_startTagOpen) - { - addAttributeAlways(uri, localName, rawName, type, value, false); - } - } - - /** - * @see org.xml.sax.DTDHandler#notationDecl(java.lang.String, java.lang.String, java.lang.String) - */ - public void notationDecl(String arg0, String arg1, String arg2) - throws SAXException { - // This method just provides a definition to satisfy the interface - // A particular sub-class of SerializerBase provides the implementation (if desired) - } - - /** - * @see org.xml.sax.DTDHandler#unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String) - */ - public void unparsedEntityDecl( - String arg0, - String arg1, - String arg2, - String arg3) - throws SAXException { - // This method just provides a definition to satisfy the interface - // A particular sub-class of SerializerBase provides the implementation (if desired) - } - - /** - * If set to false the serializer does not expand DTD entities, - * but leaves them as is, the default value is true. - */ - public void setDTDEntityExpansion(boolean expand) { - // This method just provides a definition to satisfy the interface - // A particular sub-class of SerializerBase provides the implementation (if desired) - } - - - /** - * The CDATA section names stored in a whitespace separateed list with - * each element being a word of the form "{uri}localName" This list - * comes from the cdata-section-elements attribute. - * - * This field replaces m_cdataSectionElements Vector. - */ - protected String m_StringOfCDATASections = null; - - boolean m_docIsEmpty = true; - void initCdataElems(String s) - { - if (s != null) - { - int max = s.length(); - - // true if we are in the middle of a pair of curly braces that delimit a URI - boolean inCurly = false; - - // true if we found a URI but haven't yet processed the local name - boolean foundURI = false; - - StringBuffer buf = new StringBuffer(); - String uri = null; - String localName = null; - - // parse through string, breaking on whitespaces. I do this instead - // of a tokenizer so I can track whitespace inside of curly brackets, - // which theoretically shouldn't happen if they contain legal URLs. - - - for (int i = 0; i < max; i++) - { - - char c = s.charAt(i); - - if (Character.isWhitespace(c)) - { - if (!inCurly) - { - if (buf.length() > 0) - { - localName = buf.toString(); - if (!foundURI) - uri = ""; - addCDATAElement(uri,localName); - buf.setLength(0); - foundURI = false; - } - continue; - } - else - buf.append(c); // add whitespace to the URI - } - else if ('{' == c) // starting a URI - inCurly = true; - else if ('}' == c) - { - // we just ended a URI, add the URI to the vector - foundURI = true; - uri = buf.toString(); - buf.setLength(0); - inCurly = false; - } - else - { - // append non-whitespace, non-curly to current URI or localName being gathered. - buf.append(c); - } - - } - - if (buf.length() > 0) - { - // We have one last localName to process. - localName = buf.toString(); - if (!foundURI) - uri = ""; - addCDATAElement(uri,localName); - } - } - } - protected java.util.Hashtable m_CdataElems = null; - private void addCDATAElement(String uri, String localName) - { - if (m_CdataElems == null) { - m_CdataElems = new java.util.Hashtable(); - } - - java.util.Hashtable h = (java.util.Hashtable) m_CdataElems.get(localName); - if (h == null) { - h = new java.util.Hashtable(); - m_CdataElems.put(localName,h); - } - h.put(uri,uri); - - } - - - /** - * @return true if nothing has been sent to this result tree yet. - *

- * This is not a public API. - * @xsl.usage internal - */ - public boolean documentIsEmpty() { - // If we haven't called startDocument() yet, then this document is empty - return m_docIsEmpty && (m_elemContext.m_currentElemDepth == 0); - } - - /** - * @return true if the current element in m_elemContext - * is a CDATA section. - * 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: - *

-     * "{uri1}localName1 {uri2}localName2 . . . "
-     * 
- * - *

- * This method is not a public API, but is only used internally by the serializer. - */ - protected boolean isCdataSection() - { - - boolean b = false; - - if (null != m_StringOfCDATASections) - { - if (m_elemContext.m_elementLocalName == null) - { - String localName = getLocalName(m_elemContext.m_elementName); - m_elemContext.m_elementLocalName = localName; - } - - if ( m_elemContext.m_elementURI == null) { - - m_elemContext.m_elementURI = getElementURI(); - } - else if ( m_elemContext.m_elementURI.length() == 0) { - if ( m_elemContext.m_elementName == null) { - m_elemContext.m_elementName = m_elemContext.m_elementLocalName; - // leave URI as "", meaning in no namespace - } - else if (m_elemContext.m_elementLocalName.length() < m_elemContext.m_elementName.length()){ - // We were told the URI was "", yet the name has a prefix since the name is longer than the localname. - // So we will fix that incorrect information here. - m_elemContext.m_elementURI = getElementURI(); - } - } - - java.util.Hashtable h = (java.util.Hashtable) m_CdataElems.get(m_elemContext.m_elementLocalName); - if (h != null) - { - Object obj = h.get(m_elemContext.m_elementURI); - if (obj != null) - b = true; - } - - } - return b; - } - - /** - * Before this call m_elementContext.m_elementURI is null, - * which means it is not yet known. After this call it - * is non-null, but possibly "" meaning that it is in the - * default namespace. - * - * @return The URI of the element, never null, but possibly "". - */ - private String getElementURI() { - String uri = null; - // At this point in processing we have received all the - // namespace mappings - // As we still don't know the elements namespace, - // we now figure it out. - - String prefix = getPrefixPart(m_elemContext.m_elementName); - - if (prefix == null) { - // no prefix so lookup the URI of the default namespace - uri = m_prefixMap.lookupNamespace(""); - } else { - uri = m_prefixMap.lookupNamespace(prefix); - } - if (uri == null) { - // We didn't find the namespace for the - // prefix ... ouch, that shouldn't happen. - // This is a hack, we really don't know - // the namespace - uri = EMPTYSTRING; - } - - return uri; - } - - - /** - * Get the value of an output property, - * the explicit value, if any, otherwise the - * default value, if any, otherwise null. - */ - public String getOutputProperty(String name) { - String val = getOutputPropertyNonDefault(name); - // If no explicit value, try to get the default value - if (val == null) - val = getOutputPropertyDefault(name); - return val; - - } - /** - * Get the value of an output property, - * not the default value. If there is a default - * value, but no non-default value this method - * will return null. - * @param name Property name to be queried - * @return default value, or null if no default is defined - */ - public String getOutputPropertyNonDefault(String name ) - { - return getProp(name,false); - } - - /** - * Return a {@link DOM3Serializer} interface into this serializer. If the - * serializer does not support the {@link DOM3Serializer} interface, it should - * return null. - * - * @return A {@link DOM3Serializer} interface into this serializer, or null - * if the serializer is not DOM capable - * @throws IOException An I/O exception occured - * @see org.apache.xml.serializer.Serializer#asDOM3Serializer() - */ - public Object asDOM3Serializer() throws IOException - { - return new org.apache.xml.serializer.dom3.DOM3SerializerImpl(this); - } - /** - * Get the default value of an xsl:output property, - * which would be null only if no default value exists - * for the property. - */ - public String getOutputPropertyDefault(String name) { - return getProp(name, true); - } - - /** - * Set the value for the output property, typically from - * an xsl:output element, but this does not change what - * the default value is. - */ - public void setOutputProperty(String name, String val) { - setProp(name,val,false); - - } - - /** - * Set the default value for an output property, but this does - * not impact any explicitly set value. - */ - public void setOutputPropertyDefault(String name, String val) { - setProp(name,val,true); - - } - - /** - * A mapping of keys to explicitly set values, for example if - * and has an "encoding" attribute, this - * map will have what that attribute maps to. - */ - private HashMap m_OutputProps; - /** - * A mapping of keys to default values, for example if - * the default value of the encoding is "UTF-8" then this - * map will have that "encoding" maps to "UTF-8". - */ - private HashMap m_OutputPropsDefault; - - Set getOutputPropDefaultKeys() { - return m_OutputPropsDefault.keySet(); - } - Set getOutputPropKeys() { - return m_OutputProps.keySet(); - } - - private String getProp(String name, boolean defaultVal) { - if (m_OutputProps == null) { - m_OutputProps = new HashMap(); - m_OutputPropsDefault = new HashMap(); - } - - String val; - if (defaultVal) - val = (String) m_OutputPropsDefault.get(name); - else - val = (String) m_OutputProps.get(name); - - return val; - - } - /** - * - * @param name The name of the property, e.g. "{http://myprop}indent-tabs" or "indent". - * @param val The value of the property, e.g. "4" - * @param defaultVal true if this is a default value being set for the property as - * opposed to a user define on, set say explicitly in the stylesheet or via JAXP - */ - void setProp(String name, String val, boolean defaultVal) { - if (m_OutputProps == null) { - m_OutputProps = new HashMap(); - m_OutputPropsDefault = new HashMap(); - } - - if (defaultVal) - m_OutputPropsDefault.put(name,val); - else { - if (OutputKeys.CDATA_SECTION_ELEMENTS.equals(name) && val != null) { - initCdataElems(val); - String oldVal = (String) m_OutputProps.get(name); - String newVal; - if (oldVal == null) - newVal = oldVal + ' ' + val; - else - newVal = val; - m_OutputProps.put(name,newVal); - } - else { - m_OutputProps.put(name,val); - } - } - - - } - - /** - * Get the first char of the local name - * @param name Either a local name, or a local name - * preceeded by a uri enclosed in curly braces. - */ - static char getFirstCharLocName(String name) { - final char first; - int i = name.indexOf('}'); - if (i < 0) - first = name.charAt(0); - else - first = name.charAt(i+1); - return first; - } -} - - diff --git a/serializer/src/main/java/org/apache/xml/serializer/SerializerConstants.java b/serializer/src/main/java/org/apache/xml/serializer/SerializerConstants.java deleted file mode 100644 index 49a06dbd5..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/SerializerConstants.java +++ /dev/null @@ -1,57 +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; - -/** - * Constants used in serialization, such as the string "xmlns" - * @xsl.usage internal - */ -interface SerializerConstants -{ - - /** 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 = "]]]]>"; - static final String CDATA_DELIMITER_CLOSE = "]]>"; - static final String CDATA_DELIMITER_OPEN = " 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 1.0 - * recommendation - * - *

- * The value of the "cdata-section-elements" property key is a whitespace - * separated list of elements. If the element is in a namespace then - * value is passed in this format: {uri}localName - * - *

- * The non-standard property keys supported are defined in {@link OutputPropertiesFactory}. - * - * @see OutputPropertiesFactory - * @see Method - * @see Serializer - */ -public final class SerializerFactory -{ - /** - * This constructor is private just to prevent the creation of such an object. - */ - - private SerializerFactory() { - - } - /** - * Associates output methods to default output formats. - */ - private static Hashtable m_formats = new Hashtable(); - - /** - * Returns a serializer for the specified output method. The output method - * is specified by the value of the property associated with the "method" key. - * If no implementation exists that supports the specified output method - * 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 - */ - public static Serializer getSerializer(Properties format) - { - Serializer ser; - - try - { - String method = format.getProperty(OutputKeys.METHOD); - - if (method == null) { - String msg = Utils.messages.createMessage( - MsgKey.ER_FACTORY_PROPERTY_MISSING, - new Object[] { OutputKeys.METHOD}); - throw new IllegalArgumentException(msg); - } - - String className = - format.getProperty(OutputPropertiesFactory.S_KEY_CONTENT_HANDLER); - - - if (null == className) - { - // Missing Content Handler property, load default using OutputPropertiesFactory - Properties methodDefaults = - OutputPropertiesFactory.getDefaultMethodProperties(method); - className = - methodDefaults.getProperty(OutputPropertiesFactory.S_KEY_CONTENT_HANDLER); - if (null == className) { - String msg = Utils.messages.createMessage( - MsgKey.ER_FACTORY_PROPERTY_MISSING, - new Object[] { OutputPropertiesFactory.S_KEY_CONTENT_HANDLER}); - throw new IllegalArgumentException(msg); - } - - } - - - - ClassLoader loader = ObjectFactory.findClassLoader(); - - Class cls = ObjectFactory.findProviderClass(className, loader, true); - - // _serializers.put(method, cls); - - Object obj = cls.newInstance(); - - if (obj instanceof SerializationHandler) - { - // this is one of the supplied serializers - ser = (Serializer) cls.newInstance(); - ser.setOutputFormat(format); - } - else - { - /* - * This must be a user defined Serializer. - * It had better implement ContentHandler. - */ - if (obj instanceof ContentHandler) - { - - /* - * The user defined serializer defines ContentHandler, - * but we need to wrap it with ToXMLSAXHandler which - * will collect SAX-like events and emit true - * SAX ContentHandler events to the users handler. - */ - className = SerializerConstants.DEFAULT_SAX_SERIALIZER; - cls = ObjectFactory.findProviderClass(className, loader, true); - SerializationHandler sh = - (SerializationHandler) cls.newInstance(); - sh.setContentHandler( (ContentHandler) obj); - sh.setOutputFormat(format); - - ser = sh; - } - else - { - // user defined serializer does not implement - // ContentHandler, ... very bad - throw new Exception( - Utils.messages.createMessage( - MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - new Object[] { className})); - } - - } - } - catch (Exception e) - { - throw new org.apache.xml.serializer.utils.WrappedRuntimeException(e); - } - - // If we make it to here ser is not null. - return ser; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/SerializerTrace.java b/serializer/src/main/java/org/apache/xml/serializer/SerializerTrace.java deleted file mode 100644 index 0c0f30c4f..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/SerializerTrace.java +++ /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.xml.serializer; - -import org.xml.sax.Attributes; - -/** - * This interface defines a set of integer constants that identify trace event - * types. - * - * @xsl.usage internal - */ - -public interface SerializerTrace { - - /** - * Event type generated when a document begins. - * - */ - public static final int EVENTTYPE_STARTDOCUMENT = 1; - - /** - * Event type generated when a document ends. - */ - public static final int EVENTTYPE_ENDDOCUMENT = 2; - - /** - * Event type generated when an element begins (after the attributes have been processed but before the children have been added). - */ - public static final int EVENTTYPE_STARTELEMENT = 3; - - /** - * Event type generated when an element ends, after it's children have been added. - */ - public static final int EVENTTYPE_ENDELEMENT = 4; - - /** - * Event type generated for character data (CDATA and Ignorable Whitespace have their own events). - */ - public static final int EVENTTYPE_CHARACTERS = 5; - - /** - * Event type generated for ignorable whitespace (I'm not sure how much this is actually called. - */ - public static final int EVENTTYPE_IGNORABLEWHITESPACE = 6; - - /** - * Event type generated for processing instructions. - */ - public static final int EVENTTYPE_PI = 7; - - /** - * Event type generated after a comment has been added. - */ - public static final int EVENTTYPE_COMMENT = 8; - - /** - * Event type generate after an entity ref is created. - */ - public static final int EVENTTYPE_ENTITYREF = 9; - - /** - * Event type generated after CDATA is generated. - */ - public static final int EVENTTYPE_CDATA = 10; - - /** - * Event type generated when characters might be written to an output stream, - * but these characters never are. They will ultimately be written out via - * EVENTTYPE_OUTPUT_CHARACTERS. This type is used as attributes are collected. - * Whenever the attributes change this event type is fired. At the very end - * however, when the attributes do not change anymore and are going to be - * ouput to the document the real characters will be written out using the - * EVENTTYPE_OUTPUT_CHARACTERS. - */ - public static final int EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS = 11; - - /** - * Event type generated when characters are written to an output stream. - */ - public static final int EVENTTYPE_OUTPUT_CHARACTERS = 12; - - - /** - * Tell if trace listeners are present. - * - * @return True if there are trace listeners - */ - public boolean hasTraceListeners(); - - /** - * Fire startDocument, endDocument events. - * - * @param eventType One of the EVENTTYPE_XXX constants. - */ - public void fireGenerateEvent(int eventType); - - /** - * Fire startElement, endElement events. - * - * @param eventType One of the EVENTTYPE_XXX constants. - * @param name The name of the element. - * @param atts The SAX attribute list. - */ - public void fireGenerateEvent(int eventType, String name, Attributes atts); - - /** - * Fire characters, cdata events. - * - * @param eventType One of the EVENTTYPE_XXX constants. - * @param ch The char array from the SAX event. - * @param start The start offset to be used in the char array. - * @param length The end offset to be used in the chara array. - */ - public void fireGenerateEvent(int eventType, char ch[], int start, int length); - - /** - * Fire processingInstruction events. - * - * @param eventType One of the EVENTTYPE_XXX constants. - * @param name The name of the processing instruction. - * @param data The processing instruction data. - */ - public void fireGenerateEvent(int eventType, String name, String data); - - - /** - * Fire comment and entity ref events. - * - * @param eventType One of the EVENTTYPE_XXX constants. - * @param data The comment or entity ref data. - */ - public void fireGenerateEvent(int eventType, String data); - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java b/serializer/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java deleted file mode 100644 index 9de45349e..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/SerializerTraceWriter.java +++ /dev/null @@ -1,341 +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; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; - -/** - * This class wraps the real writer, it only purpose is to send - * CHARACTERTOSTREAM events to the trace listener. - * Each method immediately sends the call to the wrapped writer unchanged, but - * in addition it collects characters to be issued to a trace listener. - * - * In this way the trace - * listener knows what characters have been written to the output Writer. - * - * There may still be differences in what the trace events say is going to the - * output writer and what is really going there. These differences will be due - * to the fact that this class is UTF-8 encoding before emiting the trace event - * and the underlying writer may not be UTF-8 encoding. There may also be - * encoding differences. So the main pupose of this class is to provide a - * resonable facsimile of the true output. - * - * @xsl.usage internal - */ -final class SerializerTraceWriter extends Writer implements WriterChain -{ - - /** The real writer to immediately write to. - * This reference may be null, in which case nothing is written out, but - * only the trace events are fired for output. - */ - private final java.io.Writer m_writer; - - /** The tracer to send events to */ - private final SerializerTrace m_tracer; - - /** The size of the internal buffer, just to keep too many - * events from being sent to the tracer - */ - private int buf_length; - - /** - * Internal buffer to collect the characters to go to the trace listener. - * - */ - private byte buf[]; - - /** - * How many bytes have been collected and still need to go to trace - * listener. - */ - private int count; - - /** - * Creates or replaces the internal buffer, and makes sure it has a few - * extra bytes slight overflow of the last UTF8 encoded character. - * @param size - */ - private void setBufferSize(int size) - { - buf = new byte[size + 3]; - buf_length = size; - count = 0; - } - - /** - * Constructor. - * If the writer passed in is null, then this SerializerTraceWriter will - * only signal trace events of what would have been written to that writer. - * If the writer passed in is not null then the trace events will mirror - * what is going to that writer. In this way tools, such as a debugger, can - * gather information on what is being written out. - * - * @param out the Writer to write to (possibly null) - * @param tracer the tracer to inform that characters are being written - */ - public SerializerTraceWriter(Writer out, SerializerTrace tracer) - { - m_writer = out; - m_tracer = tracer; - setBufferSize(1024); - } - - /** - * Flush out the collected characters by sending them to the trace - * listener. These characters are never written to the real writer - * (m_writer) because that has already happened with every method - * call. This method simple informs the listener of what has already - * happened. - * @throws IOException - */ - private void flushBuffer() throws IOException - { - - // Just for tracing purposes - if (count > 0) - { - char[] chars = new char[count]; - for(int i=0; i Subclasses that intend to support efficient single-character output - * should override this method. - * - * @param c int specifying a character to be written. - * @exception IOException If an I/O error occurs - */ - public void write(final int c) throws IOException - { - // send to the real writer - if (m_writer != null) - m_writer.write(c); - - // ---------- from here on just collect for tracing purposes - - /* If we are close to the end of the buffer then flush it. - * Remember the buffer can hold a few more characters than buf_length - */ - if (count >= buf_length) - flushBuffer(); - - if (c < 0x80) - { - buf[count++] = (byte) (c); - } - else if (c < 0x800) - { - buf[count++] = (byte) (0xc0 + (c >> 6)); - buf[count++] = (byte) (0x80 + (c & 0x3f)); - } - else - { - buf[count++] = (byte) (0xe0 + (c >> 12)); - buf[count++] = (byte) (0x80 + ((c >> 6) & 0x3f)); - buf[count++] = (byte) (0x80 + (c & 0x3f)); - } - } - - /** - * Write a portion of an array of characters. - * - * @param chars Array of characters - * @param start Offset from which to start writing characters - * @param length Number of characters to write - * - * @exception IOException If an I/O error occurs - * - * @throws java.io.IOException - */ - public void write(final char chars[], final int start, final int length) - throws java.io.IOException - { - // send to the real writer - if (m_writer != null) - m_writer.write(chars, start, length); - - // from here on just collect for tracing purposes - int lengthx3 = (length << 1) + length; - - if (lengthx3 >= buf_length) - { - - /* If the request length exceeds the size of the output buffer, - * flush the output buffer and make the buffer bigger to handle. - */ - - flushBuffer(); - setBufferSize(2 * lengthx3); - - } - - if (lengthx3 > buf_length - count) - { - flushBuffer(); - } - - final int n = length + start; - for (int i = start; i < n; i++) - { - final char c = chars[i]; - - if (c < 0x80) - buf[count++] = (byte) (c); - else if (c < 0x800) - { - buf[count++] = (byte) (0xc0 + (c >> 6)); - buf[count++] = (byte) (0x80 + (c & 0x3f)); - } - else - { - buf[count++] = (byte) (0xe0 + (c >> 12)); - buf[count++] = (byte) (0x80 + ((c >> 6) & 0x3f)); - buf[count++] = (byte) (0x80 + (c & 0x3f)); - } - } - - } - - /** - * Write a string. - * - * @param s String to be written - * - * @exception IOException If an I/O error occurs - */ - public void write(final String s) throws IOException - { - // send to the real writer - if (m_writer != null) - m_writer.write(s); - - // from here on just collect for tracing purposes - final int length = s.length(); - - // We multiply the length by three since this is the maximum length - // of the characters that we can put into the buffer. It is possible - // for each Unicode character to expand to three bytes. - - int lengthx3 = (length << 1) + length; - - if (lengthx3 >= buf_length) - { - - /* If the request length exceeds the size of the output buffer, - * flush the output buffer and make the buffer bigger to handle. - */ - - flushBuffer(); - setBufferSize(2 * lengthx3); - } - - if (lengthx3 > buf_length - count) - { - flushBuffer(); - } - - for (int i = 0; i < length; i++) - { - final char c = s.charAt(i); - - if (c < 0x80) - buf[count++] = (byte) (c); - else if (c < 0x800) - { - buf[count++] = (byte) (0xc0 + (c >> 6)); - buf[count++] = (byte) (0x80 + (c & 0x3f)); - } - else - { - buf[count++] = (byte) (0xe0 + (c >> 12)); - buf[count++] = (byte) (0x80 + ((c >> 6) & 0x3f)); - buf[count++] = (byte) (0x80 + (c & 0x3f)); - } - } - } - - /** - * Get the writer that this one directly wraps. - */ - public Writer getWriter() - { - return m_writer; - } - - /** - * Get the OutputStream that is the at the end of the - * chain of writers. - */ - public OutputStream getOutputStream() - { - OutputStream retval = null; - if (m_writer instanceof WriterChain) - retval = ((WriterChain) m_writer).getOutputStream(); - return retval; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ToHTMLSAXHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ToHTMLSAXHandler.java deleted file mode 100644 index 46017c97c..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ToHTMLSAXHandler.java +++ /dev/null @@ -1,740 +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; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; -import java.util.Properties; - -import javax.xml.transform.Result; - -import org.w3c.dom.Node; -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.ext.LexicalHandler; - -/** - * This class accepts SAX-like calls, then sends true SAX calls to a - * wrapped SAX handler. There is optimization done knowing that the ultimate - * output is HTML. - * - * This class is not a public API. - * - * @deprecated As of Xalan 2.7.1, replaced by the use of {@link ToXMLSAXHandler}. - * - * @xsl.usage internal - */ -public final class ToHTMLSAXHandler extends ToSAXHandler -{ - /** - * Handle document type declaration (for first element only) - */ - private boolean m_dtdHandled = false; - - /** - * Keeps track of whether output escaping is currently enabled - */ - protected boolean m_escapeSetting = true; - - /** - * Returns null. - * @return null - * @see Serializer#getOutputFormat() - */ - public Properties getOutputFormat() - { - return null; - } - - /** - * Returns null - * @return null - * @see Serializer#getOutputStream() - */ - public OutputStream getOutputStream() - { - return null; - } - - /** - * @return null - * @see Serializer#getWriter() - */ - public Writer getWriter() - { - return null; - } - - /** - * 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. 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 - { - return; - } - - /** - * 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 - { - boolean oldEscapeSetting = m_escapeSetting; - m_escapeSetting = escape; - - if (escape) { - processingInstruction(Result.PI_ENABLE_OUTPUT_ESCAPING, ""); - } else { - processingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, ""); - } - - return oldEscapeSetting; - } - - /** - * Does nothing - * @param indent the number of spaces to indent per indentation level - * (ignored) - * @see SerializationHandler#setIndent(boolean) - */ - public void setIndent(boolean indent) - { - } - - /** - * Does nothing. - * @param format this parameter is not used - * @see Serializer#setOutputFormat(Properties) - */ - public void setOutputFormat(Properties format) - { - } - - /** - * Does nothing. - * @param output this parameter is ignored - * @see Serializer#setOutputStream(OutputStream) - */ - public void setOutputStream(OutputStream output) - { - } - - - /** - * Does nothing. - * @param writer this parameter is ignored. - * @see Serializer#setWriter(Writer) - */ - public void setWriter(Writer writer) - { - } - - /** - * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String, String, String) - */ - /** - * Does nothing. - * - * @param eName this parameter is ignored - * @param aName this parameter is ignored - * @param type this parameter is ignored - * @param valueDefault this parameter is ignored - * @param value this parameter is ignored - * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String,String,String) - */ - public void attributeDecl( - String eName, - String aName, - String type, - String valueDefault, - String value) - throws SAXException - { - } - - - /** - * Does nothing. - * @see org.xml.sax.ext.DeclHandler#elementDecl(String, String) - */ - public void elementDecl(String name, String model) throws SAXException - { - return; - } - - /** - * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String) - */ - public void externalEntityDecl(String arg0, String arg1, String arg2) - throws SAXException - { - } - - /** - * Does nothing. - * - * @see org.xml.sax.DTDHandler#unparsedEntityDecl - */ - public void internalEntityDecl(String name, String value) - throws SAXException - { - } - - /** - * Receive notification of the end of an element. - * - *

The SAX parser will invoke this method at the end of every - * element in the XML document; there will be a corresponding - * startElement() event for every endElement() event (even when the - * element is empty).

- * - *

If the element name has a namespace prefix, the prefix will - * still be attached to the name.

- * - * - * @param uri The Namespace URI, or the empty string if the - * element has no Namespace URI or if Namespace - * processing is not being performed. - * @param localName The local name (without prefix), or the - * empty string if Namespace processing is not being - * performed. - * @param qName The qualified name (with prefix), or the - * empty string if qualified names are not available. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see org.xml.sax.ContentHandler#endElement(String, String, String) - */ - public void endElement(String uri, String localName, String qName) - throws SAXException - { - flushPending(); - m_saxHandler.endElement(uri, localName, qName); - - // time to fire off endElement event - if (m_tracer != null) - super.fireEndElem(qName); - } - - /** - * Does nothing. - */ - public void endPrefixMapping(String prefix) throws SAXException - { - } - - /** - * Does nothing. - * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int) - */ - public void ignorableWhitespace(char[] ch, int start, int length) - throws SAXException - { - } - - /** - * Receive notification of a processing instruction. - * - *

The Parser will invoke this method once for each processing - * instruction found: note that processing instructions may occur - * before or after the main document element.

- * - *

A SAX parser should never report an XML declaration (XML 1.0, - * section 2.8) or a text declaration (XML 1.0, section 4.3.1) - * using this method.

- * - * @param target The processing instruction target. - * @param data The processing instruction data, or null if - * none was supplied. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see org.xml.sax.ContentHandler#processingInstruction(String, String) - */ - public void processingInstruction(String target, String data) - throws SAXException - { - flushPending(); - m_saxHandler.processingInstruction(target,data); - - // time to fire off processing instruction event - - if (m_tracer != null) - super.fireEscapingEvent(target,data); - } - - /** - * Does nothing. - * @see org.xml.sax.ContentHandler#setDocumentLocator(Locator) - */ - public void setDocumentLocator(Locator arg0) - { - // do nothing - } - - /** - * Does nothing. - * @see org.xml.sax.ContentHandler#skippedEntity(String) - */ - public void skippedEntity(String arg0) throws SAXException - { - } - - /** - * Receive notification of the beginning of an element, although this is a - * SAX method additional namespace or attribute information can occur before - * or after this call, that is associated with this element. - * - * - * @param namespaceURI The Namespace URI, or the empty string if the - * element has no Namespace URI or if Namespace - * processing is not being performed. - * @param localName The local name (without prefix), or the - * empty string if Namespace processing is not being - * performed. - * @param qName The elements name. - * @param atts The attributes attached to the element, if any. - * @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 - * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes) - */ - public void startElement( - String namespaceURI, - String localName, - String qName, - Attributes atts) - throws SAXException - { - flushPending(); - super.startElement(namespaceURI, localName, qName, atts); - m_saxHandler.startElement(namespaceURI, localName, qName, atts); - m_elemContext.m_startTagOpen = false; - } - - /** - * Receive notification of a comment anywhere in the document. This callback - * will be used for comments inside or outside the document element. - * @param ch An array holding the characters in the comment. - * @param start The starting position in the array. - * @param length The number of characters to use from the array. - * @throws org.xml.sax.SAXException The application may raise an exception. - * - * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int) - */ - public void comment(char[] ch, int start, int length) throws SAXException - { - flushPending(); - if (m_lexHandler != null) - m_lexHandler.comment(ch, start, length); - - // time to fire off comment event - if (m_tracer != null) - super.fireCommentEvent(ch, start, length); - return; - } - - /** - * Does nothing. - * @see org.xml.sax.ext.LexicalHandler#endCDATA() - */ - public void endCDATA() throws SAXException - { - return; - } - - /** - * Does nothing. - * @see org.xml.sax.ext.LexicalHandler#endDTD() - */ - public void endDTD() throws SAXException - { - } - - /** - * Does nothing. - * @see org.xml.sax.ext.LexicalHandler#startCDATA() - */ - public void startCDATA() throws SAXException - { - } - - /** - * Does nothing. - * @see org.xml.sax.ext.LexicalHandler#startEntity(String) - */ - public void startEntity(String arg0) throws SAXException - { - } - - /** - * Receive notification of the end of a document. - * - *

The SAX parser will invoke this method only once, and it will - * be the last method invoked during the parse. The parser shall - * not invoke this method until it has either abandoned parsing - * (because of an unrecoverable error) or reached the end of - * input.

- * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void endDocument() throws SAXException - { - flushPending(); - - // Close output document - m_saxHandler.endDocument(); - - if (m_tracer != null) - super.fireEndDoc(); - } - - /** - * This method is called when all the data needed for a call to the - * SAX handler's startElement() method has been gathered. - */ - protected void closeStartTag() throws SAXException - { - - m_elemContext.m_startTagOpen = false; - - // Now is time to send the startElement event - m_saxHandler.startElement( - EMPTYSTRING, - m_elemContext.m_elementName, - m_elemContext.m_elementName, - m_attributes); - m_attributes.clear(); - - } - - /** - * Do nothing. - * @see SerializationHandler#close() - */ - public void close() - { - return; - } - - /** - * Receive notification of character data. - * - * @param chars The string of characters to process. - * @throws org.xml.sax.SAXException if buffering fails - * @see ExtendedContentHandler#characters(String) - */ - public void characters(final String chars) throws SAXException - { - final int length = chars.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length * 2 + 1]; - } - chars.getChars(0, length, m_charsBuff, 0); - this.characters(m_charsBuff, 0, length); - } - - - /** - * A constructor - * @param handler the wrapped SAX content handler - * @param encoding the encoding of the output HTML document - */ - public ToHTMLSAXHandler(ContentHandler handler, String encoding) - { - super(handler,encoding); - } - /** - * A constructor. - * @param handler the wrapped SAX content handler - * @param lex the wrapped lexical handler - * @param encoding the encoding of the output HTML document - */ - public ToHTMLSAXHandler( - ContentHandler handler, - LexicalHandler lex, - String encoding) - { - super(handler,lex,encoding); - } - - /** - * An element starts, but attributes are not fully known yet. - * - * @param elementNamespaceURI the URI of the namespace of the element - * (optional) - * @param elementLocalName the element name, but without prefix - * (optional) - * @param elementName the element name, with prefix, if any (required) - * - * @see ExtendedContentHandler#startElement(String) - */ - public void startElement( - String elementNamespaceURI, - String elementLocalName, - String elementName) throws SAXException - { - - super.startElement(elementNamespaceURI, elementLocalName, elementName); - - flushPending(); - - // Handle document type declaration (for first element only) - if (!m_dtdHandled) - { - String doctypeSystem = getDoctypeSystem(); - String doctypePublic = getDoctypePublic(); - if ((doctypeSystem != null) || (doctypePublic != null)) { - if (m_lexHandler != null) - m_lexHandler.startDTD( - elementName, - doctypePublic, - doctypeSystem); - } - m_dtdHandled = true; - } - m_elemContext = m_elemContext.push(elementNamespaceURI, elementLocalName, elementName); - } - /** - * An element starts, but attributes are not fully known yet. - * - * @param elementName the element name, with prefix, if any - * - * @see ExtendedContentHandler#startElement(String) - */ - public void startElement(String elementName) throws SAXException - { - this.startElement(null,null, elementName); - } - - /** - * Receive notification of the end of an element. - * @param elementName The element type name - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * - * @see ExtendedContentHandler#endElement(String) - */ - public void endElement(String elementName) throws SAXException - { - flushPending(); - m_saxHandler.endElement(EMPTYSTRING, elementName, elementName); - - // time to fire off endElement event - if (m_tracer != null) - super.fireEndElem(elementName); - } - - /** - * Receive notification of character data. - * - *

The Parser will call this method to report each chunk of - * character data. SAX parsers may return all contiguous character - * data in a single chunk, or they may split it into several - * chunks; however, all of the characters in any single event - * must come from the same external entity, so that the Locator - * provides useful information.

- * - *

The application must not attempt to read from the array - * outside of the specified range.

- * - *

Note that some parsers will report whitespace using the - * ignorableWhitespace() method rather than this one (validating - * parsers must do so).

- * - * @param ch The characters from the XML document. - * @param off The start position in the array. - * @param len The number of characters to read from the array. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #ignorableWhitespace - * @see org.xml.sax.Locator - * - * @throws org.xml.sax.SAXException if the underlying saxHandler objects - * - * @see org.xml.sax.ContentHandler#characters(char[], int, int) - */ - public void characters(char[] ch, int off, int len) throws SAXException - { - - flushPending(); - m_saxHandler.characters(ch, off, len); - - // time to fire off characters event - if (m_tracer != null) - super.fireCharEvent(ch, off, len); - } - - /** - * This method flushes any pending events, which can be startDocument() - * closing the opening tag of an element, or closing an open CDATA section. - */ - public void flushPending() throws SAXException - { - if (m_needToCallStartDocument) - { - startDocumentInternal(); - m_needToCallStartDocument = false; - } - // Close any open element - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - } - /** - * Handle a prefix/uri mapping, which is associated with a startElement() - * that is soon to follow. Need to close any open start tag to make - * sure than any name space attributes due to this event are associated wih - * the up comming element, not the current one. - * @see ExtendedContentHandler#startPrefixMapping - * - * @param prefix The Namespace prefix being declared. - * @param uri The Namespace URI the prefix is mapped to. - * @param shouldFlush true if any open tags need to be closed first, this - * will impact which element the mapping applies to (open parent, or its up - * comming child) - * @return returns true if the call made a change to the current - * namespace information, false if it did not change anything, e.g. if the - * prefix/namespace mapping was already in scope from before. - * - * @throws org.xml.sax.SAXException The client may throw - * an exception during processing. - */ - public boolean startPrefixMapping( - String prefix, - String uri, - boolean shouldFlush) - throws SAXException - { - // no namespace support for HTML - if (shouldFlush) - flushPending(); - m_saxHandler.startPrefixMapping(prefix,uri); - return false; - } - - /** - * Begin the scope of a prefix-URI Namespace mapping - * just before another element is about to start. - * This call will close any open tags so that the prefix mapping - * will not apply to the current element, but the up comming child. - * - * @see org.xml.sax.ContentHandler#startPrefixMapping - * - * @param prefix The Namespace prefix being declared. - * @param uri The Namespace URI the prefix is mapped to. - * - * @throws org.xml.sax.SAXException The client may throw - * an exception during processing. - * - */ - public void startPrefixMapping(String prefix, String uri) - throws org.xml.sax.SAXException - { - startPrefixMapping(prefix,uri,true); - } - - /** - * This method is used when a prefix/uri namespace mapping - * is indicated after the element was started with a - * startElement() and before and endElement(). - * startPrefixMapping(prefix,uri) would be used before the - * startElement() call. - * @param prefix the prefix associated with the given URI. - * @param uri the URI of the namespace - * - * @see ExtendedContentHandler#namespaceAfterStartElement(String, String) - */ - public void namespaceAfterStartElement( - final String prefix, - final String uri) - throws SAXException - { - // hack for XSLTC with finding URI for default namespace - if (m_elemContext.m_elementURI == null) - { - String prefix1 = getPrefixPart(m_elemContext.m_elementName); - if (prefix1 == null && EMPTYSTRING.equals(prefix)) - { - // the elements URI is not known yet, and it - // doesn't have a prefix, and we are currently - // setting the uri for prefix "", so we have - // the uri for the element... lets remember it - m_elemContext.m_elementURI = uri; - } - } - startPrefixMapping(prefix,uri,false); - } - - /** - * Try's to reset the super class and reset this class for - * re-use, so that you don't need to create a new serializer - * (mostly for performance reasons). - * - * @return true if the class was successfuly reset. - * @see Serializer#reset() - */ - public boolean reset() - { - boolean wasReset = false; - if (super.reset()) - { - resetToHTMLSAXHandler(); - wasReset = true; - } - return wasReset; - } - - /** - * Reset all of the fields owned by ToHTMLSAXHandler class - * - */ - private void resetToHTMLSAXHandler() - { - this.m_dtdHandled = false; - this.m_escapeSetting = true; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ToHTMLStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToHTMLStream.java deleted file mode 100644 index d80839f14..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ToHTMLStream.java +++ /dev/null @@ -1,2343 +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; - -import java.io.IOException; -import java.util.Properties; - -import javax.xml.transform.Result; - -import org.apache.xml.serializer.utils.MsgKey; -import org.apache.xml.serializer.utils.Utils; -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; - -/** - * This serializer takes a series of SAX or - * SAX-like events and writes its output - * to the given stream. - * - * This class is not a public API, it is public - * because it is used from another package. - * - * @xsl.usage internal - */ -public class ToHTMLStream extends ToStream -{ - - /** This flag is set while receiving events from the DTD */ - protected boolean m_inDTD = false; - - /** True if the current element is a block element. (seems like - * this needs to be a stack. -sb). */ - private boolean m_inBlockElem = false; - - /** - * Map that tells which XML characters should have special treatment, and it - * provides character to entity name lookup. - */ - private final CharInfo m_htmlcharInfo = -// new CharInfo(CharInfo.HTML_ENTITIES_RESOURCE); - CharInfo.getCharInfo(CharInfo.HTML_ENTITIES_RESOURCE, Method.HTML); - - /** A digital search trie for fast, case insensitive lookup of ElemDesc objects. */ - static final Trie m_elementFlags = new Trie(); - - static { - initTagReference(m_elementFlags); - } - static void initTagReference(Trie m_elementFlags) { - - // HTML 4.0 loose DTD - m_elementFlags.put("BASEFONT", new ElemDesc(0 | ElemDesc.EMPTY)); - m_elementFlags.put( - "FRAME", - new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK)); - m_elementFlags.put("FRAMESET", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("NOFRAMES", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put( - "ISINDEX", - new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK)); - m_elementFlags.put( - "APPLET", - new ElemDesc(0 | ElemDesc.WHITESPACESENSITIVE)); - m_elementFlags.put("CENTER", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("DIR", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("MENU", new ElemDesc(0 | ElemDesc.BLOCK)); - - // HTML 4.0 strict DTD - m_elementFlags.put("TT", new ElemDesc(0 | ElemDesc.FONTSTYLE)); - m_elementFlags.put("I", new ElemDesc(0 | ElemDesc.FONTSTYLE)); - m_elementFlags.put("B", new ElemDesc(0 | ElemDesc.FONTSTYLE)); - m_elementFlags.put("BIG", new ElemDesc(0 | ElemDesc.FONTSTYLE)); - m_elementFlags.put("SMALL", new ElemDesc(0 | ElemDesc.FONTSTYLE)); - m_elementFlags.put("EM", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put("STRONG", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put("DFN", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put("CODE", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put("SAMP", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put("KBD", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put("VAR", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put("CITE", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put("ABBR", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put("ACRONYM", new ElemDesc(0 | ElemDesc.PHRASE)); - m_elementFlags.put( - "SUP", - new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL)); - m_elementFlags.put( - "SUB", - new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL)); - m_elementFlags.put( - "SPAN", - new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL)); - m_elementFlags.put( - "BDO", - new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL)); - m_elementFlags.put( - "BR", - new ElemDesc( - 0 - | ElemDesc.SPECIAL - | ElemDesc.ASPECIAL - | ElemDesc.EMPTY - | ElemDesc.BLOCK)); - m_elementFlags.put("BODY", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put( - "ADDRESS", - new ElemDesc( - 0 - | ElemDesc.BLOCK - | ElemDesc.BLOCKFORM - | ElemDesc.BLOCKFORMFIELDSET)); - m_elementFlags.put( - "DIV", - new ElemDesc( - 0 - | ElemDesc.BLOCK - | ElemDesc.BLOCKFORM - | ElemDesc.BLOCKFORMFIELDSET)); - m_elementFlags.put("A", new ElemDesc(0 | ElemDesc.SPECIAL)); - m_elementFlags.put( - "MAP", - new ElemDesc( - 0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL | ElemDesc.BLOCK)); - m_elementFlags.put( - "AREA", - new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK)); - m_elementFlags.put( - "LINK", - new ElemDesc( - 0 | ElemDesc.HEADMISC | ElemDesc.EMPTY | ElemDesc.BLOCK)); - m_elementFlags.put( - "IMG", - new ElemDesc( - 0 - | ElemDesc.SPECIAL - | ElemDesc.ASPECIAL - | ElemDesc.EMPTY - | ElemDesc.WHITESPACESENSITIVE)); - m_elementFlags.put( - "OBJECT", - new ElemDesc( - 0 - | ElemDesc.SPECIAL - | ElemDesc.ASPECIAL - | ElemDesc.HEADMISC - | ElemDesc.WHITESPACESENSITIVE)); - m_elementFlags.put("PARAM", new ElemDesc(0 | ElemDesc.EMPTY)); - m_elementFlags.put( - "HR", - new ElemDesc( - 0 - | ElemDesc.BLOCK - | ElemDesc.BLOCKFORM - | ElemDesc.BLOCKFORMFIELDSET - | ElemDesc.EMPTY)); - m_elementFlags.put( - "P", - new ElemDesc( - 0 - | ElemDesc.BLOCK - | ElemDesc.BLOCKFORM - | ElemDesc.BLOCKFORMFIELDSET)); - m_elementFlags.put( - "H1", - new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK)); - m_elementFlags.put( - "H2", - new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK)); - m_elementFlags.put( - "H3", - new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK)); - m_elementFlags.put( - "H4", - new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK)); - m_elementFlags.put( - "H5", - new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK)); - m_elementFlags.put( - "H6", - new ElemDesc(0 | ElemDesc.HEAD | ElemDesc.BLOCK)); - m_elementFlags.put( - "PRE", - new ElemDesc(0 | ElemDesc.PREFORMATTED | ElemDesc.BLOCK)); - m_elementFlags.put( - "Q", - new ElemDesc(0 | ElemDesc.SPECIAL | ElemDesc.ASPECIAL)); - m_elementFlags.put( - "BLOCKQUOTE", - new ElemDesc( - 0 - | ElemDesc.BLOCK - | ElemDesc.BLOCKFORM - | ElemDesc.BLOCKFORMFIELDSET)); - m_elementFlags.put("INS", new ElemDesc(0)); - m_elementFlags.put("DEL", new ElemDesc(0)); - m_elementFlags.put( - "DL", - new ElemDesc( - 0 - | ElemDesc.BLOCK - | ElemDesc.BLOCKFORM - | ElemDesc.BLOCKFORMFIELDSET)); - m_elementFlags.put("DT", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("DD", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put( - "OL", - new ElemDesc(0 | ElemDesc.LIST | ElemDesc.BLOCK)); - m_elementFlags.put( - "UL", - new ElemDesc(0 | ElemDesc.LIST | ElemDesc.BLOCK)); - m_elementFlags.put("LI", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("FORM", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("LABEL", new ElemDesc(0 | ElemDesc.FORMCTRL)); - m_elementFlags.put( - "INPUT", - new ElemDesc( - 0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL | ElemDesc.EMPTY)); - m_elementFlags.put( - "SELECT", - new ElemDesc(0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL)); - m_elementFlags.put("OPTGROUP", new ElemDesc(0)); - m_elementFlags.put("OPTION", new ElemDesc(0)); - m_elementFlags.put( - "TEXTAREA", - new ElemDesc(0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL)); - m_elementFlags.put( - "FIELDSET", - new ElemDesc(0 | ElemDesc.BLOCK | ElemDesc.BLOCKFORM)); - m_elementFlags.put("LEGEND", new ElemDesc(0)); - m_elementFlags.put( - "BUTTON", - new ElemDesc(0 | ElemDesc.FORMCTRL | ElemDesc.INLINELABEL)); - m_elementFlags.put( - "TABLE", - new ElemDesc( - 0 - | ElemDesc.BLOCK - | ElemDesc.BLOCKFORM - | ElemDesc.BLOCKFORMFIELDSET)); - m_elementFlags.put("CAPTION", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("THEAD", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("TFOOT", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("TBODY", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("COLGROUP", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put( - "COL", - new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK)); - m_elementFlags.put("TR", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put("TH", new ElemDesc(0)); - m_elementFlags.put("TD", new ElemDesc(0)); - m_elementFlags.put( - "HEAD", - new ElemDesc(0 | ElemDesc.BLOCK | ElemDesc.HEADELEM)); - m_elementFlags.put("TITLE", new ElemDesc(0 | ElemDesc.BLOCK)); - m_elementFlags.put( - "BASE", - new ElemDesc(0 | ElemDesc.EMPTY | ElemDesc.BLOCK)); - m_elementFlags.put( - "META", - new ElemDesc( - 0 | ElemDesc.HEADMISC | ElemDesc.EMPTY | ElemDesc.BLOCK)); - m_elementFlags.put( - "STYLE", - new ElemDesc( - 0 | ElemDesc.HEADMISC | ElemDesc.RAW | ElemDesc.BLOCK)); - m_elementFlags.put( - "SCRIPT", - new ElemDesc( - 0 - | ElemDesc.SPECIAL - | ElemDesc.ASPECIAL - | ElemDesc.HEADMISC - | ElemDesc.RAW)); - m_elementFlags.put( - "NOSCRIPT", - new ElemDesc( - 0 - | ElemDesc.BLOCK - | ElemDesc.BLOCKFORM - | ElemDesc.BLOCKFORMFIELDSET)); - m_elementFlags.put("HTML", new ElemDesc(0 | ElemDesc.BLOCK | ElemDesc.HTMLELEM)); - - // From "John Ky" - elemDesc = (ElemDesc) m_elementFlags.get("frame"); - elemDesc.setAttr("SRC", ElemDesc.ATTRURL); - elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL); - elemDesc.setAttr("NORESIZE",ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("head"); - elemDesc.setAttr("PROFILE", ElemDesc.ATTRURL); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("hr"); - elemDesc.setAttr("NOSHADE", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - // HTML 4.0, section 16.5 - elemDesc = (ElemDesc) m_elementFlags.get("iframe"); - elemDesc.setAttr("SRC", ElemDesc.ATTRURL); - elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL); - - // ---------------------------------------------- - // Netscape 4 extension - elemDesc = (ElemDesc) m_elementFlags.get("ilayer"); - elemDesc.setAttr("SRC", ElemDesc.ATTRURL); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("img"); - elemDesc.setAttr("SRC", ElemDesc.ATTRURL); - elemDesc.setAttr("LONGDESC", ElemDesc.ATTRURL); - elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL); - elemDesc.setAttr("ISMAP", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("input"); - - elemDesc.setAttr("SRC", ElemDesc.ATTRURL); - elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL); - elemDesc.setAttr("CHECKED", ElemDesc.ATTREMPTY); - elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); - elemDesc.setAttr("ISMAP", ElemDesc.ATTREMPTY); - elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("ins"); - elemDesc.setAttr("CITE", ElemDesc.ATTRURL); - - // ---------------------------------------------- - // Netscape 4 extension - elemDesc = (ElemDesc) m_elementFlags.get("layer"); - elemDesc.setAttr("SRC", ElemDesc.ATTRURL); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("link"); - elemDesc.setAttr("HREF", ElemDesc.ATTRURL); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("menu"); - elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("object"); - - elemDesc.setAttr("CLASSID", ElemDesc.ATTRURL); - elemDesc.setAttr("CODEBASE", ElemDesc.ATTRURL); - elemDesc.setAttr("DATA", ElemDesc.ATTRURL); - elemDesc.setAttr("ARCHIVE", ElemDesc.ATTRURL); - elemDesc.setAttr("USEMAP", ElemDesc.ATTRURL); - elemDesc.setAttr("DECLARE", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("ol"); - elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("optgroup"); - elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("option"); - elemDesc.setAttr("SELECTED", ElemDesc.ATTREMPTY); - elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("q"); - elemDesc.setAttr("CITE", ElemDesc.ATTRURL); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("script"); - elemDesc.setAttr("SRC", ElemDesc.ATTRURL); - elemDesc.setAttr("FOR", ElemDesc.ATTRURL); - elemDesc.setAttr("DEFER", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("select"); - elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); - elemDesc.setAttr("MULTIPLE", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("table"); - elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); // Internet-Explorer extension - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("td"); - elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("textarea"); - elemDesc.setAttr("DISABLED", ElemDesc.ATTREMPTY); - elemDesc.setAttr("READONLY", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("th"); - elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - // The nowrap attribute of a tr element is both - // a Netscape and Internet-Explorer extension - elemDesc = (ElemDesc) m_elementFlags.get("tr"); - elemDesc.setAttr("NOWRAP", ElemDesc.ATTREMPTY); - - // ---------------------------------------------- - elemDesc = (ElemDesc) m_elementFlags.get("ul"); - elemDesc.setAttr("COMPACT", ElemDesc.ATTREMPTY); - } - - /** - * Dummy element for elements not found. - */ - static private final ElemDesc m_dummy = new ElemDesc(0 | ElemDesc.BLOCK); - - /** True if URLs should be specially escaped with the %xx form. */ - private boolean m_specialEscapeURLs = true; - - /** True if the META tag should be omitted. */ - private boolean m_omitMetaTag = false; - - /** - * Tells if the formatter should use special URL escaping. - * - * @param bool True if URLs should be specially escaped with the %xx form. - */ - public void setSpecialEscapeURLs(boolean bool) - { - m_specialEscapeURLs = bool; - } - - /** - * Tells if the formatter should omit the META tag. - * - * @param bool True if the META tag should be omitted. - */ - public void setOmitMetaTag(boolean bool) - { - m_omitMetaTag = bool; - } - - /** - * Specifies an output format for this serializer. It the - * serializer has already been associated with an output format, - * it will switch to the new format. This method should not be - * called while the serializer is in the process of serializing - * a document. - * - * This method can be called multiple times before starting - * the serialization of a particular result-tree. In principle - * all serialization parameters can be changed, with the exception - * of method="html" (it must be method="html" otherwise we - * shouldn't even have a ToHTMLStream object here!) - * - * @param format The output format or serialzation parameters - * to use. - */ - public void setOutputFormat(Properties format) - { - /* - * If "format" does not contain the property - * S_USE_URL_ESCAPING, then don't set this value at all, - * just leave as-is rather than explicitly setting it. - */ - String value; - value = format.getProperty(OutputPropertiesFactory.S_USE_URL_ESCAPING); - if (value != null) { - m_specialEscapeURLs = - OutputPropertyUtils.getBooleanProperty( - OutputPropertiesFactory.S_USE_URL_ESCAPING, - format); - } - - /* - * If "format" does not contain the property - * S_OMIT_META_TAG, then don't set this value at all, - * just leave as-is rather than explicitly setting it. - */ - value = format.getProperty(OutputPropertiesFactory.S_OMIT_META_TAG); - if (value != null) { - m_omitMetaTag = - OutputPropertyUtils.getBooleanProperty( - OutputPropertiesFactory.S_OMIT_META_TAG, - format); - } - - super.setOutputFormat(format); - } - - /** - * Tells if the formatter should use special URL escaping. - * - * @return True if URLs should be specially escaped with the %xx form. - */ - private final boolean getSpecialEscapeURLs() - { - return m_specialEscapeURLs; - } - - /** - * Tells if the formatter should omit the META tag. - * - * @return True if the META tag should be omitted. - */ - private final boolean getOmitMetaTag() - { - return m_omitMetaTag; - } - - /** - * Get a description of the given element. - * - * @param name non-null name of element, case insensitive. - * - * @return non-null reference to ElemDesc, which may be m_dummy if no - * element description matches the given name. - */ - public static final ElemDesc getElemDesc(String name) - { - /* this method used to return m_dummy when name was null - * but now it doesn't check and and requires non-null name. - */ - Object obj = m_elementFlags.get(name); - if (null != obj) - return (ElemDesc)obj; - return m_dummy; - } - - - /** - * A Trie that is just a copy of the "static" one. - * We need this one to be able to use the faster, but not thread-safe - * method Trie.get2(name) - */ - private Trie m_htmlInfo = new Trie(m_elementFlags); - /** - * Calls to this method could be replaced with calls to - * getElemDesc(name), but this one should be faster. - */ - private ElemDesc getElemDesc2(String name) - { - Object obj = m_htmlInfo.get2(name); - if (null != obj) - return (ElemDesc)obj; - return m_dummy; - } - - /** - * Default constructor. - */ - public ToHTMLStream() - { - - super(); - // we are just constructing this thing, no output properties - // have been used, so we will set the right default for - // indenting anyways - m_doIndent = true; - m_charInfo = m_htmlcharInfo; - // initialize namespaces - m_prefixMap = new NamespaceMappings(); - - } - - /** The name of the current element. */ -// private String m_currentElementName = null; - - /** - * Receive notification of the beginning of a document. - * - * @throws SAXException if underlying handler reports an error - */ - protected void startDocumentInternal() throws org.xml.sax.SAXException - { - super.startDocumentInternal(); - - m_needToCallStartDocument = false; - m_needToOutputDocTypeDecl = true; - m_startNewLine = false; - setOmitXMLDeclaration(true); - } - - /** - * This method should only get called once. - * If a DOCTYPE declaration needs to get written out, it will - * be written out. If it doesn't need to be written out, then - * the call to this method has no effect. - */ - private void outputDocTypeDecl(String name) throws SAXException { - if (true == m_needToOutputDocTypeDecl) - { - String doctypeSystem = getDoctypeSystem(); - String doctypePublic = getDoctypePublic(); - if ((null != doctypeSystem) || (null != doctypePublic)) - { - final java.io.Writer writer = m_writer; - try - { - writer.write("'); - outputLineSep(); - } - catch(IOException e) - { - throw new SAXException(e); - } - } - } - - m_needToOutputDocTypeDecl = false; - } - - /** - * Receive notification of the end of a document. - * - * @throws SAXException if underlying handler reports an error - */ - public final void endDocument() throws org.xml.sax.SAXException - { - - flushPending(); - if (m_doIndent && !m_isprevtext) - { - try - { - outputLineSep(); - } - catch(IOException e) - { - throw new SAXException(e); - } - } - - flushWriter(); - if (m_tracer != null) - super.fireEndDoc(); - } - - /** - * Receive notification of the beginning of an element. - * - * @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 - * wrapping another exception. - * @see #endElement - * @see org.xml.sax.AttributeList - */ - public void startElement( - String namespaceURI, - String localName, - String name, - Attributes atts) - throws org.xml.sax.SAXException - { - - ElemContext elemContext = m_elemContext; - - // clean up any pending things first - if (elemContext.m_startTagOpen) - { - closeStartTag(); - elemContext.m_startTagOpen = false; - } - else if (m_cdataTagOpen) - { - closeCDATA(); - m_cdataTagOpen = false; - } - else if (m_needToCallStartDocument) - { - startDocumentInternal(); - m_needToCallStartDocument = false; - } - - if (m_needToOutputDocTypeDecl) { - String n = name; - if (n == null || n.length() == 0) { - // If the lexical QName is not given - // use the localName in the DOCTYPE - n = localName; - } - outputDocTypeDecl(n); - } - - - // if this element has a namespace then treat it like XML - if (null != namespaceURI && namespaceURI.length() > 0) - { - super.startElement(namespaceURI, localName, name, atts); - - return; - } - - try - { - // getElemDesc2(name) is faster than getElemDesc(name) - ElemDesc elemDesc = getElemDesc2(name); - int elemFlags = elemDesc.getFlags(); - - // deal with indentation issues first - if (m_doIndent) - { - - boolean isBlockElement = (elemFlags & ElemDesc.BLOCK) != 0; - if (m_ispreserve) - m_ispreserve = false; - else if ( - (null != elemContext.m_elementName) - && (!m_inBlockElem - || isBlockElement) /* && !isWhiteSpaceSensitive */ - ) - { - m_startNewLine = true; - - indent(); - - } - m_inBlockElem = !isBlockElement; - } - - // save any attributes for later processing - if (atts != null) - addAttributes(atts); - - m_isprevtext = false; - final java.io.Writer writer = m_writer; - writer.write('<'); - writer.write(name); - - - - if (m_tracer != null) - firePseudoAttributes(); - - if ((elemFlags & ElemDesc.EMPTY) != 0) - { - // an optimization for elements which are expected - // to be empty. - m_elemContext = elemContext.push(); - /* XSLTC sometimes calls namespaceAfterStartElement() - * so we need to remember the name - */ - m_elemContext.m_elementName = name; - m_elemContext.m_elementDesc = elemDesc; - return; - } - else - { - elemContext = elemContext.push(namespaceURI,localName,name); - m_elemContext = elemContext; - elemContext.m_elementDesc = elemDesc; - elemContext.m_isRaw = (elemFlags & ElemDesc.RAW) != 0; - } - - - if ((elemFlags & ElemDesc.HEADELEM) != 0) - { - // This is the element, do some special processing - closeStartTag(); - elemContext.m_startTagOpen = false; - if (!m_omitMetaTag) - { - if (m_doIndent) - indent(); - writer.write( - ""); - } - } - } - catch (IOException e) - { - throw new SAXException(e); - } - } - - /** - * Receive notification of the end of an element. - * @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. - */ - public final void endElement( - final String namespaceURI, - final String localName, - final String name) - throws org.xml.sax.SAXException - { - // deal with any pending issues - if (m_cdataTagOpen) - closeCDATA(); - - // if the element has a namespace, treat it like XML, not HTML - if (null != namespaceURI && namespaceURI.length() > 0) - { - super.endElement(namespaceURI, localName, name); - - return; - } - - try - { - - ElemContext elemContext = m_elemContext; - final ElemDesc elemDesc = elemContext.m_elementDesc; - final int elemFlags = elemDesc.getFlags(); - final boolean elemEmpty = (elemFlags & ElemDesc.EMPTY) != 0; - - // deal with any indentation issues - if (m_doIndent) - { - final boolean isBlockElement = (elemFlags&ElemDesc.BLOCK) != 0; - boolean shouldIndent = false; - - if (m_ispreserve) - { - m_ispreserve = false; - } - else if (m_doIndent && (!m_inBlockElem || isBlockElement)) - { - m_startNewLine = true; - shouldIndent = true; - } - if (!elemContext.m_startTagOpen && shouldIndent) - indent(elemContext.m_currentElemDepth - 1); - m_inBlockElem = !isBlockElement; - } - - final java.io.Writer writer = m_writer; - if (!elemContext.m_startTagOpen) - { - writer.write("'); - } - else - { - // the start-tag open when this method was called, - // so we need to process it now. - - if (m_tracer != null) - super.fireStartElem(name); - - // the starting tag was still open when we received this endElement() call - // so we need to process any gathered attributes NOW, before they go away. - int nAttrs = m_attributes.getLength(); - if (nAttrs > 0) - { - processAttributes(m_writer, nAttrs); - // clear attributes object for re-use with next element - m_attributes.clear(); - } - if (!elemEmpty) - { - // As per Dave/Paul recommendation 12/06/2000 - // if (shouldIndent) - // writer.write('>'); - // indent(m_currentIndent); - - writer.write(">'); - } - else - { - writer.write('>'); - } - } - - // clean up because the element has ended - if ((elemFlags & ElemDesc.WHITESPACESENSITIVE) != 0) - m_ispreserve = true; - m_isprevtext = false; - - // fire off the end element event - if (m_tracer != null) - super.fireEndElem(name); - - // OPTIMIZE-EMPTY - if (elemEmpty) - { - // a quick exit if the HTML element had no children. - // This block of code can be removed if the corresponding block of code - // in startElement() also labeled with "OPTIMIZE-EMPTY" is also removed - m_elemContext = elemContext.m_prev; - return; - } - - // some more clean because the element has ended. - if (!elemContext.m_startTagOpen) - { - if (m_doIndent && !m_preserves.isEmpty()) - m_preserves.pop(); - } - m_elemContext = elemContext.m_prev; -// m_isRawStack.pop(); - } - catch (IOException e) - { - throw new SAXException(e); - } - } - - /** - * Process an attribute. - * @param writer The writer to write the processed output to. - * @param name The name of the attribute. - * @param value The value of the attribute. - * @param elemDesc The description of the HTML element - * that has this attribute. - * - * @throws IOException if output fails - */ - protected void processAttribute( - java.io.Writer writer, - String name, - String value, - ElemDesc elemDesc) - throws IOException - { - writer.write(' '); - - if ( ((value.length() == 0) || value.equalsIgnoreCase(name)) - && elemDesc != null - && elemDesc.isAttrFlagSet(name, ElemDesc.ATTREMPTY)) - { - writer.write(name); - } - else - { - // %REVIEW% %OPT% - // Two calls to single-char write may NOT - // be more efficient than one to string-write... - writer.write(name); - writer.write("=\""); - if ( elemDesc != null - && elemDesc.isAttrFlagSet(name, ElemDesc.ATTRURL)) - writeAttrURI(writer, value, m_specialEscapeURLs); - else - writeAttrString(writer, value, this.getEncoding()); - writer.write('"'); - - } - } - - /** - * Tell if a character is an ASCII digit. - */ - private boolean isASCIIDigit(char c) - { - return (c >= '0' && c <= '9'); - } - - /** - * Make an integer into an HH hex value. - * Does no checking on the size of the input, since this - * is only meant to be used locally by writeAttrURI. - * - * @param i must be a value less than 255. - * - * @return should be a two character string. - */ - private static String makeHHString(int i) - { - String s = Integer.toHexString(i).toUpperCase(); - if (s.length() == 1) - { - s = "0" + s; - } - return s; - } - - /** - * Dmitri Ilyin: Makes sure if the String is HH encoded sign. - * @param str must be 2 characters long - * - * @return true or false - */ - private boolean isHHSign(String str) - { - boolean sign = true; - try - { - char r = (char) Integer.parseInt(str, 16); - } - catch (NumberFormatException e) - { - sign = false; - } - return sign; - } - - /** - * Write the specified string after substituting non ASCII characters, - * with %HH, 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 IOException (SAXException) if a bad surrogate pair is detected. - */ - public void writeAttrURI( - final java.io.Writer writer, String string, boolean doURLEscaping) - throws IOException - { - // http://www.ietf.org/rfc/rfc2396.txt says: - // A URI is always in an "escaped" form, since escaping or unescaping a - // completed URI might change its semantics. Normally, the only time - // escape encodings can safely be made is when the URI is being created - // from its component parts; each component may have its own set of - // characters that are reserved, so only the mechanism responsible for - // generating or interpreting that component can determine whether or - // not escaping a character will change its semantics. Likewise, a URI - // must be separated into its components before the escaped characters - // within those components can be safely decoded. - // - // ...So we do our best to do limited escaping of the URL, without - // causing damage. If the URL is already properly escaped, in theory, this - // function should not change the string value. - - final int end = string.length(); - if (end > m_attrBuff.length) - { - m_attrBuff = new char[end*2 + 1]; - } - string.getChars(0,end, m_attrBuff, 0); - final char[] chars = m_attrBuff; - - int cleanStart = 0; - int cleanLength = 0; - - - char ch = 0; - for (int i = 0; i < end; i++) - { - ch = chars[i]; - - if ((ch < 32) || (ch > 126)) - { - if (cleanLength > 0) - { - writer.write(chars, cleanStart, cleanLength); - cleanLength = 0; - } - if (doURLEscaping) - { - // Encode UTF16 to UTF8. - // Reference is Unicode, A Primer, by Tony Graham. - // Page 92. - - // Note that Kay doesn't escape 0x20... - // if(ch == 0x20) // Not sure about this... -sb - // { - // writer.write(ch); - // } - // else - if (ch <= 0x7F) - { - writer.write('%'); - writer.write(makeHHString(ch)); - } - else if (ch <= 0x7FF) - { - // Clear low 6 bits before rotate, put high 4 bits in low byte, - // and set two high bits. - int high = (ch >> 6) | 0xC0; - int low = (ch & 0x3F) | 0x80; - // First 6 bits, + high bit - writer.write('%'); - writer.write(makeHHString(high)); - writer.write('%'); - writer.write(makeHHString(low)); - } - else if (Encodings.isHighUTF16Surrogate(ch)) // high surrogate - { - // I'm sure this can be done in 3 instructions, but I choose - // to try and do it exactly like it is done in the book, at least - // until we are sure this is totally clean. I don't think performance - // is a big issue with this particular function, though I could be - // wrong. Also, the stuff below clearly does more masking than - // it needs to do. - - // Clear high 6 bits. - int highSurrogate = ((int) ch) & 0x03FF; - - // Middle 4 bits (wwww) + 1 - // "Note that the value of wwww from the high surrogate bit pattern - // is incremented to make the uuuuu bit pattern in the scalar value - // so the surrogate pair don't address the BMP." - int wwww = ((highSurrogate & 0x03C0) >> 6); - int uuuuu = wwww + 1; - - // next 4 bits - int zzzz = (highSurrogate & 0x003C) >> 2; - - // low 2 bits - int yyyyyy = ((highSurrogate & 0x0003) << 4) & 0x30; - - // Get low surrogate character. - ch = chars[++i]; - - // Clear high 6 bits. - int lowSurrogate = ((int) ch) & 0x03FF; - - // put the middle 4 bits into the bottom of yyyyyy (byte 3) - yyyyyy = yyyyyy | ((lowSurrogate & 0x03C0) >> 6); - - // bottom 6 bits. - int xxxxxx = (lowSurrogate & 0x003F); - - int byte1 = 0xF0 | (uuuuu >> 2); // top 3 bits of uuuuu - int byte2 = - 0x80 | (((uuuuu & 0x03) << 4) & 0x30) | zzzz; - int byte3 = 0x80 | yyyyyy; - int byte4 = 0x80 | xxxxxx; - - writer.write('%'); - writer.write(makeHHString(byte1)); - writer.write('%'); - writer.write(makeHHString(byte2)); - writer.write('%'); - writer.write(makeHHString(byte3)); - writer.write('%'); - writer.write(makeHHString(byte4)); - } - else - { - int high = (ch >> 12) | 0xE0; // top 4 bits - int middle = ((ch & 0x0FC0) >> 6) | 0x80; - // middle 6 bits - int low = (ch & 0x3F) | 0x80; - // First 6 bits, + high bit - writer.write('%'); - writer.write(makeHHString(high)); - writer.write('%'); - writer.write(makeHHString(middle)); - writer.write('%'); - writer.write(makeHHString(low)); - } - - } - else if (escapingNotNeeded(ch)) - { - writer.write(ch); - } - else if (Encodings.isHighUTF16Surrogate(ch)) - { - writeUTF16Surrogate(ch, chars, i, end); - i++; // two input characters processed - // this increments by one and the for() - // loop itself increments by another one. - } - else - { - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - } - // In this character range we have first written out any previously accumulated - // "clean" characters, then processed the current more complicated character, - // which may have incremented "i". - // We now we reset the next possible clean character. - cleanStart = i + 1; - } - // Since http://www.ietf.org/rfc/rfc2396.txt refers to the URI grammar as - // not allowing quotes in the URI proper syntax, nor in the fragment - // identifier, we believe that it's OK to double escape quotes. - else if (ch == '"') - { - // If the character is a '%' number number, try to avoid double-escaping. - // There is a question if this is legal behavior. - - // Dmitri Ilyin: to check if '%' number number is invalid. It must be checked if %xx is a sign, that would be encoded - // The encoded signes are in Hex form. So %xx my be in form %3C that is "<" sign. I will try to change here a little. - - // if( ((i+2) < len) && isASCIIDigit(stringArray[i+1]) && isASCIIDigit(stringArray[i+2]) ) - - // We are no longer escaping '%' - - if (cleanLength > 0) - { - writer.write(chars, cleanStart, cleanLength); - cleanLength = 0; - } - - - // Mike Kay encodes this as ", so he may know something I don't? - if (doURLEscaping) - writer.write("%22"); - else - writer.write("""); // we have to escape this, I guess. - - // We have written out any clean characters, then the escaped '%' and now we - // We now we reset the next possible clean character. - cleanStart = i + 1; - } - else if (ch == '&') - { - // HTML 4.01 reads, "Authors should use "&" (ASCII decimal 38) - // instead of "&" to avoid confusion with the beginning of a character - // reference (entity reference open delimiter). - if (cleanLength > 0) - { - writer.write(chars, cleanStart, cleanLength); - cleanLength = 0; - } - writer.write("&"); - cleanStart = i + 1; - } - else - { - // no processing for this character, just count how - // many characters in a row that we have that need no processing - cleanLength++; - } - } - - // are there any clean characters at the end of the array - // that we haven't processed yet? - if (cleanLength > 1) - { - // if the whole string can be written out as-is do so - // otherwise write out the clean chars at the end of the - // array - if (cleanStart == 0) - writer.write(string); - else - writer.write(chars, cleanStart, cleanLength); - } - else if (cleanLength == 1) - { - // a little optimization for 1 clean character - // (we could have let the previous if(...) handle them all) - writer.write(ch); - } - } - - /** - * Writes the specified string after substituting specials, - * and UTF-16 surrogates for character references &#xnn. - * - * @param string String to convert to XML format. - * @param encoding CURRENTLY NOT IMPLEMENTED. - * - * @throws IOException (org.xml.sax.SAXException) - */ - public void writeAttrString( - final java.io.Writer writer, String string, String encoding) - throws IOException - { - final int end = string.length(); - if (end > m_attrBuff.length) - { - m_attrBuff = new char[end * 2 + 1]; - } - string.getChars(0, end, m_attrBuff, 0); - final char[] chars = m_attrBuff; - - - - int cleanStart = 0; - int cleanLength = 0; - - char ch = 0; - for (int i = 0; i < end; i++) - { - ch = chars[i]; - - // System.out.println("SPECIALSSIZE: "+SPECIALSSIZE); - // System.out.println("ch: "+(int)ch); - // System.out.println("m_maxCharacter: "+(int)m_maxCharacter); - // System.out.println("m_attrCharsMap[ch]: "+(int)m_attrCharsMap[ch]); - if (escapingNotNeeded(ch) && (!m_charInfo.shouldMapAttrChar(ch))) - { - cleanLength++; - } - else if ('<' == ch || '>' == ch) - { - cleanLength++; // no escaping in this case, as specified in 15.2 - } - else if ( - ('&' == ch) && ((i + 1) < end) && ('{' == chars[i + 1])) - { - cleanLength++; // no escaping in this case, as specified in 15.2 - } - else - { - if (cleanLength > 0) - { - writer.write(chars,cleanStart,cleanLength); - cleanLength = 0; - } - int pos = accumDefaultEntity(writer, ch, i, chars, end, false, true); - - if (i != pos) - { - i = pos - 1; - } - else if (Encodings.isHighUTF16Surrogate(ch)) - { - - writeUTF16Surrogate(ch, chars, i, end); - i++; // two input characters processed - // this increments by one and the for() - // loop itself increments by another one. - } else { - - // The next is kind of a hack to keep from escaping in the case - // of Shift_JIS and the like. - - /* - else if ((ch < m_maxCharacter) && (m_maxCharacter == 0xFFFF) - && (ch != 160)) - { - writer.write(ch); // no escaping in this case - } - else - */ - String outputStringForChar = m_charInfo.getOutputStringForChar(ch); - if (null != outputStringForChar) - { - writer.write(outputStringForChar); - } - else if (escapingNotNeeded(ch)) - { - writer.write(ch); // no escaping in this case - } - else - { - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - } - } - cleanStart = i + 1; - } - } // end of for() - - // are there any clean characters at the end of the array - // that we haven't processed yet? - if (cleanLength > 1) - { - // if the whole string can be written out as-is do so - // otherwise write out the clean chars at the end of the - // array - if (cleanStart == 0) - writer.write(string); - else - writer.write(chars, cleanStart, cleanLength); - } - else if (cleanLength == 1) - { - // a little optimization for 1 clean character - // (we could have let the previous if(...) handle them all) - writer.write(ch); - } - } - - - - /** - * Receive notification of character data. - * - *

The Parser will call this method to report each chunk of - * character data. SAX parsers may return all contiguous character - * data in a single chunk, or they may split it into several - * chunks; however, all of the characters in any single event - * must come from the same external entity, so that the Locator - * provides useful information.

- * - *

The application must not attempt to read from the array - * outside of the specified range.

- * - *

Note that some parsers will report whitespace using the - * ignorableWhitespace() method rather than this one (validating - * parsers must do so).

- * - * @param chars The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #ignorableWhitespace - * @see org.xml.sax.Locator - */ - public final void characters(char chars[], int start, int length) - throws org.xml.sax.SAXException - { - - if (m_elemContext.m_isRaw) - { - try - { - // Clean up some pending issues. - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - - m_ispreserve = true; - - writeNormalizedChars(chars, start, length, false, m_lineSepUse); - - // time to generate characters event - if (m_tracer != null) - super.fireCharEvent(chars, start, length); - - return; - } - catch (IOException ioe) - { - throw new org.xml.sax.SAXException( - Utils.messages.createMessage(MsgKey.ER_OIERROR,null),ioe); - } - } - else - { - super.characters(chars, start, length); - } - } - - /** - * Receive notification of cdata. - * - *

The Parser will call this method to report each chunk of - * character data. SAX parsers may return all contiguous character - * data in a single chunk, or they may split it into several - * chunks; however, all of the characters in any single event - * must come from the same external entity, so that the Locator - * provides useful information.

- * - *

The application must not attempt to read from the array - * outside of the specified range.

- * - *

Note that some parsers will report whitespace using the - * ignorableWhitespace() method rather than this one (validating - * parsers must do so).

- * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #ignorableWhitespace - * @see org.xml.sax.Locator - */ - public final void cdata(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - - if ((null != m_elemContext.m_elementName) - && (m_elemContext.m_elementName.equalsIgnoreCase("SCRIPT") - || m_elemContext.m_elementName.equalsIgnoreCase("STYLE"))) - { - try - { - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - - m_ispreserve = true; - - if (shouldIndent()) - indent(); - - // writer.write(ch, start, length); - writeNormalizedChars(ch, start, length, true, m_lineSepUse); - } - catch (IOException ioe) - { - throw new org.xml.sax.SAXException( - Utils.messages.createMessage( - MsgKey.ER_OIERROR, - null), - ioe); - //"IO error", ioe); - } - } - else - { - super.cdata(ch, start, length); - } - } - - /** - * Receive notification of a processing instruction. - * - * @param target The processing instruction target. - * @param data The processing instruction data, or null if - * none was supplied. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void processingInstruction(String target, String data) - throws org.xml.sax.SAXException - { - - // Process any pending starDocument and startElement first. - flushPending(); - - // Use a fairly nasty hack to tell if the next node is supposed to be - // unescaped text. - if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING)) - { - startNonEscaping(); - } - else if (target.equals(Result.PI_ENABLE_OUTPUT_ESCAPING)) - { - endNonEscaping(); - } - else - { - try - { - // clean up any pending things first - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - else if (m_cdataTagOpen) - { - closeCDATA(); - } - else if (m_needToCallStartDocument) - { - startDocumentInternal(); - } - - - /* - * Perhaps processing instructions can be written out in HTML before - * the DOCTYPE, in which case this could be emitted with the - * startElement call, that knows the name of the document element - * doing it right. - */ - if (true == m_needToOutputDocTypeDecl) - outputDocTypeDecl("html"); // best guess for the upcoming element - - - if (shouldIndent()) - indent(); - - final java.io.Writer writer = m_writer; - //writer.write(" 0 && !Character.isSpaceChar(data.charAt(0))) - writer.write(' '); - - //writer.write(data + ">"); // different from XML - writer.write(data); // different from XML - writer.write('>'); // different from XML - - // Always output a newline char if not inside of an - // element. The whitespace is not significant in that - // case. - if (m_elemContext.m_currentElemDepth <= 0) - outputLineSep(); - - m_startNewLine = true; - } - catch(IOException e) - { - throw new SAXException(e); - } - } - - // now generate the PI event - if (m_tracer != null) - super.fireEscapingEvent(target, data); - } - - /** - * Receive notivication of a entityReference. - * - * @param name non-null reference to entity name string. - * - * @throws SAXException if underlying handler reports an error - */ - public final void entityReference(String name) - throws org.xml.sax.SAXException - { - try - { - - final java.io.Writer writer = m_writer; - writer.write('&'); - writer.write(name); - writer.write(';'); - - } catch(IOException e) - { - throw new SAXException(e); - } - } - /** - * @see ExtendedContentHandler#endElement(String) - */ - public final void endElement(String elemName) throws SAXException - { - endElement(null, null, elemName); - } - - /** - * Process the attributes, which means to write out the currently - * collected attributes to the writer. The attributes are not - * cleared by this method - * - * @param writer the writer to write processed attributes to. - * @param nAttrs the number of attributes in m_attributes - * to be processed - * - * @throws SAXException if underlying handler reports an error - */ - public void processAttributes(java.io.Writer writer, int nAttrs) - throws IOException,SAXException - { - /* - * process the collected attributes - */ - for (int i = 0; i < nAttrs; i++) - { - processAttribute( - writer, - m_attributes.getQName(i), - m_attributes.getValue(i), - m_elemContext.m_elementDesc); - } - } - - /** - * 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 SAXException if underlying handler reports an error - */ - protected void closeStartTag() throws SAXException - { - try - { - - // finish processing attributes, time to fire off the start element event - if (m_tracer != null) - super.fireStartElem(m_elemContext.m_elementName); - - int nAttrs = m_attributes.getLength(); - if (nAttrs>0) - { - processAttributes(m_writer, nAttrs); - // clear attributes object for re-use with next element - m_attributes.clear(); - } - - m_writer.write('>'); - - /* At this point we have the prefix mappings now, so - * lets determine if the current element is specified in the cdata- - * section-elements list. - */ - if (m_CdataElems != null) // if there are any cdata sections - m_elemContext.m_isCdataSection = isCdataSection(); - if (m_doIndent) - { - m_isprevtext = false; - m_preserves.push(m_ispreserve); - } - - } - catch(IOException e) - { - throw new SAXException(e); - } - } - - - - /** - * This method is used when a prefix/uri namespace mapping - * is indicated after the element was started with a - * startElement() and before and endElement(). - * startPrefixMapping(prefix,uri) would be used before the - * startElement() call. - * @param uri the URI of the namespace - * @param prefix the prefix associated with the given URI. - * - * @see ExtendedContentHandler#namespaceAfterStartElement(String, String) - */ - public void namespaceAfterStartElement(String prefix, String uri) - throws SAXException - { - // hack for XSLTC with finding URI for default namespace - if (m_elemContext.m_elementURI == null) - { - String prefix1 = getPrefixPart(m_elemContext.m_elementName); - if (prefix1 == null && EMPTYSTRING.equals(prefix)) - { - // the elements URI is not known yet, and it - // doesn't have a prefix, and we are currently - // setting the uri for prefix "", so we have - // the uri for the element... lets remember it - m_elemContext.m_elementURI = uri; - } - } - startPrefixMapping(prefix,uri,false); - } - - public void startDTD(String name, String publicId, String systemId) - throws SAXException - { - m_inDTD = true; - super.startDTD(name, publicId, systemId); - } - - /** - * Report the end of DTD declarations. - * @throws SAXException if underlying handler reports an error - * @see #startDTD - */ - public void endDTD() throws org.xml.sax.SAXException - { - m_inDTD = false; - /* for ToHTMLStream the DOCTYPE is entirely output in the - * startDocumentInternal() method, so don't do anything here - */ - } - /** - * This method does nothing. - */ - public void attributeDecl( - String eName, - String aName, - String type, - String valueDefault, - String value) - throws SAXException - { - // The internal DTD subset is not serialized by the ToHTMLStream serializer - } - - /** - * This method does nothing. - */ - public void elementDecl(String name, String model) throws SAXException - { - // The internal DTD subset is not serialized by the ToHTMLStream serializer - } - /** - * This method does nothing. - */ - public void internalEntityDecl(String name, String value) - throws SAXException - { - // The internal DTD subset is not serialized by the ToHTMLStream serializer - } - /** - * This method does nothing. - */ - public void externalEntityDecl( - String name, - String publicId, - String systemId) - throws SAXException - { - // The internal DTD subset is not serialized by the ToHTMLStream serializer - } - - /** - * This method is used to add an attribute to the currently open element. - * The caller has guaranted that this attribute is unique, which means that it - * not been seen before and will not be seen again. - * - * @param name the qualified name of the attribute - * @param value the value of the attribute which can contain only - * ASCII printable characters characters in the range 32 to 127 inclusive. - * @param flags the bit values of this integer give optimization information. - */ - public void addUniqueAttribute(String name, String value, int flags) - throws SAXException - { - try - { - final java.io.Writer writer = m_writer; - if ((flags & NO_BAD_CHARS) > 0 && m_htmlcharInfo.onlyQuotAmpLtGt) - { - // "flags" has indicated that the characters - // '>' '<' '&' and '"' are not in the value and - // m_htmlcharInfo has recorded that there are no other - // entities in the range 0 to 127 so we write out the - // value directly - writer.write(' '); - writer.write(name); - writer.write("=\""); - writer.write(value); - writer.write('"'); - } - else if ( - (flags & HTML_ATTREMPTY) > 0 - && (value.length() == 0 || value.equalsIgnoreCase(name))) - { - writer.write(' '); - writer.write(name); - } - else - { - writer.write(' '); - writer.write(name); - writer.write("=\""); - if ((flags & HTML_ATTRURL) > 0) - { - writeAttrURI(writer, value, m_specialEscapeURLs); - } - else - { - writeAttrString(writer, value, this.getEncoding()); - } - writer.write('"'); - } - } catch (IOException e) { - throw new SAXException(e); - } - } - - public void comment(char ch[], int start, int length) - throws SAXException - { - // The internal DTD subset is not serialized by the ToHTMLStream serializer - if (m_inDTD) - return; - - // Clean up some pending issues, just in case - // this call is coming right after a startElement() - // or we are in the middle of writing out CDATA - // or if a startDocument() call was not received - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - else if (m_cdataTagOpen) - { - closeCDATA(); - } - else if (m_needToCallStartDocument) - { - startDocumentInternal(); - } - - /* - * Perhaps comments can be written out in HTML before the DOCTYPE. - * In this case we might delete this call to writeOutDOCTYPE, and - * it would be handled within the startElement() call. - */ - if (m_needToOutputDocTypeDecl) - outputDocTypeDecl("html"); // best guess for the upcoming element - - super.comment(ch, start, length); - } - - public boolean reset() - { - boolean ret = super.reset(); - if (!ret) - return false; - resetToHTMLStream(); - return true; - } - - private void resetToHTMLStream() - { - // m_htmlcharInfo remains unchanged - // m_htmlInfo = null; // Don't reset - m_inBlockElem = false; - m_inDTD = false; - m_omitMetaTag = false; - m_specialEscapeURLs = true; - } - - static class Trie - { - /** - * A digital search trie for 7-bit ASCII text - * The API is a subset of java.util.Hashtable - * The key must be a 7-bit ASCII string - * The value may be any Java Object - * One can get an object stored in a trie from its key, - * but the search is either case sensitive or case - * insensitive to the characters in the key, and this - * choice of sensitivity or insensitivity is made when - * the Trie is created, before any objects are put in it. - * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * - * @xsl.usage internal - */ - - /** Size of the m_nextChar array. */ - public static final int ALPHA_SIZE = 128; - - /** The root node of the tree. */ - final Node m_Root; - - /** helper buffer to convert Strings to char arrays */ - private char[] m_charBuffer = new char[0]; - - /** true if the search for an object is lower case only with the key */ - private final boolean m_lowerCaseOnly; - - /** - * Construct the trie that has a case insensitive search. - */ - public Trie() - { - m_Root = new Node(); - m_lowerCaseOnly = false; - } - - /** - * Construct the trie given the desired case sensitivity with the key. - * @param lowerCaseOnly true if the search keys are to be loser case only, - * not case insensitive. - */ - public Trie(boolean lowerCaseOnly) - { - m_Root = new Node(); - m_lowerCaseOnly = lowerCaseOnly; - } - - /** - * Put an object into the trie for lookup. - * - * @param key must be a 7-bit ASCII string - * @param value any java object. - * - * @return The old object that matched key, or null. - */ - public Object put(String key, Object value) - { - - final int len = key.length(); - if (len > m_charBuffer.length) - { - // make the biggest buffer ever needed in get(String) - m_charBuffer = new char[len]; - } - - Node node = m_Root; - - for (int i = 0; i < len; i++) - { - Node nextNode = - node.m_nextChar[Character.toLowerCase(key.charAt(i))]; - - if (nextNode != null) - { - node = nextNode; - } - else - { - for (; i < len; i++) - { - Node newNode = new Node(); - if (m_lowerCaseOnly) - { - // put this value into the tree only with a lower case key - node.m_nextChar[Character.toLowerCase( - key.charAt(i))] = - newNode; - } - else - { - // put this value into the tree with a case insensitive key - node.m_nextChar[Character.toUpperCase( - key.charAt(i))] = - newNode; - node.m_nextChar[Character.toLowerCase( - key.charAt(i))] = - newNode; - } - node = newNode; - } - break; - } - } - - Object ret = node.m_Value; - - node.m_Value = value; - - return ret; - } - - /** - * Get an object that matches the key. - * - * @param key must be a 7-bit ASCII string - * - * @return The object that matches the key, or null. - */ - public Object get(final String key) - { - - final int len = key.length(); - - /* If the name is too long, we won't find it, this also keeps us - * from overflowing m_charBuffer - */ - if (m_charBuffer.length < len) - return null; - - Node node = m_Root; - switch (len) // optimize the look up based on the number of chars - { - // case 0 looks silly, but the generated bytecode runs - // faster for lookup of elements of length 2 with this in - // and a fair bit faster. Don't know why. - case 0 : - { - return null; - } - - case 1 : - { - final char ch = key.charAt(0); - if (ch < ALPHA_SIZE) - { - node = node.m_nextChar[ch]; - if (node != null) - return node.m_Value; - } - return null; - } - // comment out case 2 because the default is faster - // case 2 : - // { - // final char ch0 = key.charAt(0); - // final char ch1 = key.charAt(1); - // if (ch0 < ALPHA_SIZE && ch1 < ALPHA_SIZE) - // { - // node = node.m_nextChar[ch0]; - // if (node != null) - // { - // - // if (ch1 < ALPHA_SIZE) - // { - // node = node.m_nextChar[ch1]; - // if (node != null) - // return node.m_Value; - // } - // } - // } - // return null; - // } - default : - { - for (int i = 0; i < len; i++) - { - // A thread-safe way to loop over the characters - final char ch = key.charAt(i); - if (ALPHA_SIZE <= ch) - { - // the key is not 7-bit ASCII so we won't find it here - return null; - } - - node = node.m_nextChar[ch]; - if (node == null) - return null; - } - - return node.m_Value; - } - } - } - - /** - * The node representation for the trie. - * @xsl.usage internal - */ - private static class Node - { - - /** - * Constructor, creates a Node[ALPHA_SIZE]. - */ - Node() - { - m_nextChar = new Node[ALPHA_SIZE]; - m_Value = null; - } - - /** The next nodes. */ - final Node m_nextChar[]; - - /** The value. */ - Object m_Value; - } - /** - * Construct the trie from another Trie. - * Both the existing Trie and this new one share the same table for - * lookup, and it is assumed that the table is fully populated and - * not changing anymore. - * - * @param existingTrie the Trie that this one is a copy of. - */ - public Trie(Trie existingTrie) - { - // copy some fields from the existing Trie into this one. - m_Root = existingTrie.m_Root; - m_lowerCaseOnly = existingTrie.m_lowerCaseOnly; - - // get a buffer just big enough to hold the longest key in the table. - int max = existingTrie.getLongestKeyLength(); - m_charBuffer = new char[max]; - } - - /** - * Get an object that matches the key. - * This method is faster than get(), but is not thread-safe. - * - * @param key must be a 7-bit ASCII string - * - * @return The object that matches the key, or null. - */ - public Object get2(final String key) - { - - final int len = key.length(); - - /* If the name is too long, we won't find it, this also keeps us - * from overflowing m_charBuffer - */ - if (m_charBuffer.length < len) - return null; - - Node node = m_Root; - switch (len) // optimize the look up based on the number of chars - { - // case 0 looks silly, but the generated bytecode runs - // faster for lookup of elements of length 2 with this in - // and a fair bit faster. Don't know why. - case 0 : - { - return null; - } - - case 1 : - { - final char ch = key.charAt(0); - if (ch < ALPHA_SIZE) - { - node = node.m_nextChar[ch]; - if (node != null) - return node.m_Value; - } - return null; - } - default : - { - /* Copy string into array. This is not thread-safe because - * it modifies the contents of m_charBuffer. If multiple - * threads were to use this Trie they all would be - * using this same array (not good). So this - * method is not thread-safe, but it is faster because - * converting to a char[] and looping over elements of - * the array is faster than a String's charAt(i). - */ - key.getChars(0, len, m_charBuffer, 0); - - for (int i = 0; i < len; i++) - { - final char ch = m_charBuffer[i]; - if (ALPHA_SIZE <= ch) - { - // the key is not 7-bit ASCII so we won't find it here - return null; - } - - node = node.m_nextChar[ch]; - if (node == null) - return null; - } - - return node.m_Value; - } - } - } - - /** - * Get the length of the longest key used in the table. - */ - public int getLongestKeyLength() - { - return m_charBuffer.length; - } - } - - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ToSAXHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ToSAXHandler.java deleted file mode 100644 index 75d423de7..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ToSAXHandler.java +++ /dev/null @@ -1,436 +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; - -import java.util.Vector; - -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.ErrorHandler; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.ext.LexicalHandler; - -/** - * This class is used to provide a base behavior to be inherited - * by other To...SAXHandler serializers. - * - * This class is not a public API. - * - * @xsl.usage internal - */ -public abstract class ToSAXHandler extends SerializerBase -{ - public ToSAXHandler() - { - } - - public ToSAXHandler( - ContentHandler hdlr, - LexicalHandler lex, - String encoding) - { - setContentHandler(hdlr); - setLexHandler(lex); - setEncoding(encoding); - } - public ToSAXHandler(ContentHandler handler, String encoding) - { - setContentHandler(handler); - setEncoding(encoding); - } - - /** - * Underlying SAX handler. Taken from XSLTC - */ - protected ContentHandler m_saxHandler; - - /** - * Underlying LexicalHandler. Taken from XSLTC - */ - protected LexicalHandler m_lexHandler; - - /** - * A startPrefixMapping() call on a ToSAXHandler will pass that call - * on to the wrapped ContentHandler, but should we also mirror these calls - * with matching attributes, if so this field is true. - * For example if this field is true then a call such as - * startPrefixMapping("prefix1","uri1") will also cause the additional - * internally generated attribute xmlns:prefix1="uri1" to be effectively added - * to the attributes passed to the wrapped ContentHandler. - */ - private boolean m_shouldGenerateNSAttribute = true; - - /** If this is true, then the content handler wrapped by this - * serializer implements the TransformState interface which - * will give the content handler access to the state of - * the transform. */ - protected TransformStateSetter m_state = null; - - /** - * Pass callback to the SAX Handler - */ - protected void startDocumentInternal() throws SAXException - { - if (m_needToCallStartDocument) - { - super.startDocumentInternal(); - - m_saxHandler.startDocument(); - m_needToCallStartDocument = false; - } - } - /** - * Do nothing. - * @see org.xml.sax.ext.LexicalHandler#startDTD(String, String, String) - */ - public void startDTD(String arg0, String arg1, String arg2) - throws SAXException - { - // do nothing for now - } - - /** - * Receive notification of character data. - * - * @param characters The string of characters to process. - * - * @throws SAXException if underlying handler reports an error - * - * @see ExtendedContentHandler#characters(String) - */ - public void characters(String characters) throws SAXException - { - final int len = characters.length(); - if (len > m_charsBuff.length) - { - m_charsBuff = new char[len*2 + 1]; - } - characters.getChars(0,len, m_charsBuff, 0); - characters(m_charsBuff, 0, len); - } - - /** - * Receive notification of a comment. - * - * @see ExtendedLexicalHandler#comment(String) - */ - public void comment(String comment) throws SAXException - { - flushPending(); - - // Ignore if a lexical handler has not been set - if (m_lexHandler != null) - { - final int len = comment.length(); - if (len > m_charsBuff.length) - { - m_charsBuff = new char[len*2 + 1]; - } - comment.getChars(0,len, m_charsBuff, 0); - m_lexHandler.comment(m_charsBuff, 0, len); - // time to fire off comment event - if (m_tracer != null) - super.fireCommentEvent(m_charsBuff, 0, len); - } - - } - - /** - * Do nothing as this is an abstract class. All subclasses will need to - * define their behavior if it is different. - * @see org.xml.sax.ContentHandler#processingInstruction(String, String) - */ - public void processingInstruction(String target, String data) - throws SAXException - { - // Redefined in SAXXMLOutput - } - - protected void closeStartTag() throws SAXException - { - } - - protected void closeCDATA() throws SAXException - { - // Redefined in SAXXMLOutput - } - - /** - * Receive notification of the beginning of an element, although this is a - * SAX method additional namespace or attribute information can occur before - * or after this call, that is associated with this element. - * - * @see org.xml.sax.ContentHandler#startElement - * @see org.xml.sax.ContentHandler#endElement - * @see org.xml.sax.AttributeList - * - * @throws SAXException if underlying handler reports an error - * - * @see org.xml.sax.ContentHandler#startElement(String,String,String,Attributes) - */ - public void startElement( - String arg0, - String arg1, - String arg2, - Attributes arg3) - throws SAXException - { - if (m_state != null) { - m_state.resetState(getTransformer()); - } - - // fire off the start element event - if (m_tracer != null) - super.fireStartElem(arg2); - } - - /** - * Sets the LexicalHandler. - * @param _lexHandler The LexicalHandler to set - */ - public void setLexHandler(LexicalHandler _lexHandler) - { - this.m_lexHandler = _lexHandler; - } - - /** - * Sets the SAX ContentHandler. - * @param _saxHandler The ContentHandler to set - */ - public void setContentHandler(ContentHandler _saxHandler) - { - this.m_saxHandler = _saxHandler; - if (m_lexHandler == null && _saxHandler instanceof LexicalHandler) - { - // we are not overwriting an existing LexicalHandler, and _saxHandler - // is also implements LexicalHandler, so lets use it - m_lexHandler = (LexicalHandler) _saxHandler; - } - } - - /** - * Does nothing. The setting of CDATA section elements has an impact on - * stream serializers. - * @see SerializationHandler#setCdataSectionElements(java.util.Vector) - */ - public void setCdataSectionElements(Vector URI_and_localNames) - { - // do nothing - } - - /** Set whether or not namespace declarations (e.g. - * xmlns:foo) should appear as attributes of - * elements - * @param doOutputNSAttr whether or not namespace declarations - * should appear as attributes - */ - public void setShouldOutputNSAttr(boolean doOutputNSAttr) - { - m_shouldGenerateNSAttribute = doOutputNSAttr; - } - - /** - * Returns true if namespace declarations from calls such as - * startPrefixMapping("prefix1","uri1") should - * also be mirrored with self generated additional attributes of elements - * that declare the namespace, for example the attribute xmlns:prefix1="uri1" - */ - boolean getShouldOutputNSAttr() - { - return m_shouldGenerateNSAttribute; - } - - /** - * This method flushes any pending events, which can be startDocument() - * closing the opening tag of an element, or closing an open CDATA section. - */ - public void flushPending() throws SAXException - { - - if (m_needToCallStartDocument) - { - startDocumentInternal(); - m_needToCallStartDocument = false; - } - - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - - if (m_cdataTagOpen) - { - closeCDATA(); - m_cdataTagOpen = false; - } - - } - - /** - * Pass in a reference to a TransformState object, which - * can be used during SAX ContentHandler events to obtain - * information about he state of the transformation. This - * method will be called before each startDocument event. - * - * @param ts A reference to a TransformState object - */ - public void setTransformState(TransformStateSetter ts) { - this.m_state = ts; - } - - /** - * Receives notification that an element starts, but attributes are not - * fully known yet. - * - * @param uri the URI of the namespace of the element (optional) - * @param localName the element name, but without prefix (optional) - * @param qName the element name, with prefix, if any (required) - * - * @see ExtendedContentHandler#startElement(String, String, String) - */ - public void startElement(String uri, String localName, String qName) - throws SAXException { - - if (m_state != null) { - m_state.resetState(getTransformer()); - } - - // fire off the start element event - if (m_tracer != null) - super.fireStartElem(qName); - } - - /** - * An element starts, but attributes are not fully known yet. - * - * @param qName the element name, with prefix (if any). - - * @see ExtendedContentHandler#startElement(String) - */ - public void startElement(String qName) throws SAXException { - if (m_state != null) { - m_state.resetState(getTransformer()); - } - // fire off the start element event - if (m_tracer != null) - super.fireStartElem(qName); - } - - /** - * 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 SAXException if underlying handler reports an error - */ - public void characters(org.w3c.dom.Node node) - throws org.xml.sax.SAXException - { - // remember the current node - if (m_state != null) - { - m_state.setCurrentNode(node); - } - - // Get the node's value as a String and use that String as if - // it were an input character notification. - String data = node.getNodeValue(); - if (data != null) { - this.characters(data); - } - } - - /** - * @see org.xml.sax.ErrorHandler#fatalError(SAXParseException) - */ - public void fatalError(SAXParseException exc) throws SAXException { - super.fatalError(exc); - - m_needToCallStartDocument = false; - - if (m_saxHandler instanceof ErrorHandler) { - ((ErrorHandler)m_saxHandler).fatalError(exc); - } - } - - /** - * @see org.xml.sax.ErrorHandler#error(SAXParseException) - */ - public void error(SAXParseException exc) throws SAXException { - super.error(exc); - - if (m_saxHandler instanceof ErrorHandler) - ((ErrorHandler)m_saxHandler).error(exc); - - } - - /** - * @see org.xml.sax.ErrorHandler#warning(SAXParseException) - */ - public void warning(SAXParseException exc) throws SAXException { - super.warning(exc); - - if (m_saxHandler instanceof ErrorHandler) - ((ErrorHandler)m_saxHandler).warning(exc); - } - - - /** - * Try's to reset the super class and reset this class for - * re-use, so that you don't need to create a new serializer - * (mostly for performance reasons). - * - * @return true if the class was successfuly reset. - * @see Serializer#reset() - */ - public boolean reset() - { - boolean wasReset = false; - if (super.reset()) - { - resetToSAXHandler(); - wasReset = true; - } - return wasReset; - } - - /** - * Reset all of the fields owned by ToSAXHandler class - * - */ - private void resetToSAXHandler() - { - this.m_lexHandler = null; - this.m_saxHandler = null; - this.m_state = null; - this.m_shouldGenerateNSAttribute = false; - } - - /** - * Add a unique attribute - */ - public void addUniqueAttribute(String qName, String value, int flags) - throws SAXException - { - addAttribute(qName, value); - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ToStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToStream.java deleted file mode 100644 index b30a3ac6a..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ToStream.java +++ /dev/null @@ -1,3671 +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; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.OutputStreamWriter; -import java.io.UnsupportedEncodingException; -import java.io.Writer; -import java.util.EmptyStackException; -import java.util.Enumeration; -import java.util.Iterator; -import java.util.Properties; -import java.util.Set; -import java.util.StringTokenizer; -import java.util.Vector; - -import javax.xml.transform.ErrorListener; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; - -import org.apache.xml.serializer.utils.MsgKey; -import org.apache.xml.serializer.utils.Utils; -import org.apache.xml.serializer.utils.WrappedRuntimeException; -import org.w3c.dom.Node; -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.SAXException; - -/** - * This abstract class is a base class for other stream - * serializers (xml, html, text ...) that write output to a stream. - * - * @xsl.usage internal - */ -abstract public class ToStream extends SerializerBase -{ - - private static final String COMMENT_BEGIN = ""; - - /** Stack to keep track of disabling output escaping. */ - protected BoolStack m_disableOutputEscapingStates = new BoolStack(); - - - /** - * The encoding information associated with this serializer. - * Although initially there is no encoding, - * there is a dummy EncodingInfo object that will say - * that every character is in the encoding. This is useful - * for a serializer that is in temporary output state and has - * no associated encoding. A serializer in final output state - * will have an encoding, and will worry about whether - * single chars or surrogate pairs of high/low chars form - * characters in the output encoding. - */ - EncodingInfo m_encodingInfo = new EncodingInfo(null,null, '\u0000'); - - /** - * Stack to keep track of whether or not we need to - * preserve whitespace. - * - * Used to push/pop values used for the field m_ispreserve, but - * m_ispreserve is only relevant if m_doIndent is true. - * If m_doIndent is false this field has no impact. - * - */ - protected BoolStack m_preserves = new BoolStack(); - - /** - * State flag to tell if preservation of whitespace - * is important. - * - * Used only in shouldIndent() but only if m_doIndent is true. - * If m_doIndent is false this flag has no impact. - * - */ - protected boolean m_ispreserve = false; - - /** - * State flag that tells if the previous node processed - * was text, so we can tell if we should preserve whitespace. - * - * Used in endDocument() and shouldIndent() but - * only if m_doIndent is true. - * If m_doIndent is false this flag has no impact. - */ - protected boolean m_isprevtext = false; - - /** - * When non-zero, high UTF16 Surrogate Character parsed - * from the input; next input should be the Low Surrogate. - * Zero when not in that state. - * (Replaces lookahead, which had buffer edge problems, with state.) - */ - protected char m_pendingHighUTF16Surrogate = 0; - - private static final char[] s_systemLineSep; - static { - s_systemLineSep = SecuritySupport.getSystemProperty("line.separator").toCharArray(); - } - - /** - * The system line separator for writing out line breaks. - * The default value is from the system property, - * but this value can be set through the xsl:output - * extension attribute xalan:line-separator. - */ - protected char[] m_lineSep = s_systemLineSep; - - - /** - * True if the the system line separator is to be used. - */ - protected boolean m_lineSepUse = true; - - /** - * The length of the line seperator, since the write is done - * one character at a time. - */ - protected int m_lineSepLen = m_lineSep.length; - - /** - * Map that tells which characters should have special treatment, and it - * provides character to entity name lookup. - */ - protected CharInfo m_charInfo; - - /** True if we control the buffer, and we should flush the output on endDocument. */ - boolean m_shouldFlush = true; - - /** - * Add space before self-closing '/>' syntax for XHTML. - */ - protected boolean m_spaceBeforeClose = false; - - /** - * Flag to signal that a newline should be added. - * - * Used only in indent() which is called only if m_doIndent is true. - * If m_doIndent is false this flag has no impact. - */ - boolean m_startNewLine; - - /** - * Tells if we're in an internal document type subset. - */ - protected boolean m_inDoctype = false; - - /** - * Flag to quickly tell if the encoding is UTF8. - */ - boolean m_isUTF8 = false; - - - /** - * remembers if we are in between the startCDATA() and endCDATA() callbacks - */ - protected boolean m_cdataStartCalled = false; - - /** - * If this flag is true DTD entity references are not left as-is, - * which is exiting older behavior. - */ - private boolean m_expandDTDEntities = true; - - - /** - * Default constructor - */ - public ToStream() - { - } - - /** - * This helper method writes the syntax for closing a CDATA section. - * - * @throws org.xml.sax.SAXException if write fails - */ - protected void closeCDATA() throws org.xml.sax.SAXException - { - try - { - m_writer.write(CDATA_DELIMITER_CLOSE); - // write out a CDATA section closing "]]>" - m_cdataTagOpen = false; // Remember that we have done so. - } - catch (IOException e) - { - throw new SAXException(e); - } - } - - /** - * Serializes the DOM node. Throws an exception only if an I/O - * exception occured while serializing. - * - * @param node Node to serialize. - * @throws IOException An I/O exception occured while serializing - */ - public void serialize(Node node) throws IOException - { - - try - { - TreeWalker walker = - new TreeWalker(this); - - walker.traverse(node); - } - catch (org.xml.sax.SAXException se) - { - throw new WrappedRuntimeException(se); - } - } - - /** - * Taken from XSLTC - */ - protected boolean m_escaping = true; - - /** - * Flush the formatter's result stream. - * - * @throws org.xml.sax.SAXException if write fails - */ - protected final void flushWriter() throws org.xml.sax.SAXException - { - final java.io.Writer writer = m_writer; - if (null != writer) - { - try - { - if (writer instanceof WriterToUTF8Buffered) - { - if (m_shouldFlush) - ((WriterToUTF8Buffered) writer).flush(); - else - ((WriterToUTF8Buffered) writer).flushBuffer(); - } - if (writer instanceof WriterToASCI) - { - if (m_shouldFlush) - writer.flush(); - } - else - { - // Flush always. - // Not a great thing if the writer was created - // by this class, but don't have a choice. - writer.flush(); - } - } - catch (IOException ioe) - { - throw new org.xml.sax.SAXException(ioe); - } - } - } - - OutputStream m_outputStream; - /** - * Get the output stream where the events will be serialized to. - * - * @return reference to the result stream, or null of only a writer was - * set. - */ - public OutputStream getOutputStream() - { - return m_outputStream; - } - - // Implement DeclHandler - - /** - * Report an element type declaration. - * - *

The content model will consist of the string "EMPTY", the - * string "ANY", or a parenthesised group, optionally followed - * by an occurrence indicator. The model will be normalized so - * that all whitespace is removed,and will include the enclosing - * parentheses.

- * - * @param name The element type name. - * @param model The content model as a normalized string. - * @exception SAXException The application may raise an exception. - */ - public void elementDecl(String name, String model) throws SAXException - { - // Do not inline external DTD - if (m_inExternalDTD) - return; - try - { - final java.io.Writer writer = m_writer; - DTDprolog(); - - writer.write("'); - writer.write(m_lineSep, 0, m_lineSepLen); - } - catch (IOException e) - { - throw new SAXException(e); - } - - } - - /** - * Report an internal entity declaration. - * - *

Only the effective (first) declaration for each entity - * will be reported.

- * - * @param name The name of the entity. If it is a parameter - * entity, the name will begin with '%'. - * @param value The replacement text of the entity. - * @exception SAXException The application may raise an exception. - * @see #externalEntityDecl - * @see org.xml.sax.DTDHandler#unparsedEntityDecl - */ - public void internalEntityDecl(String name, String value) - throws SAXException - { - // Do not inline external DTD - if (m_inExternalDTD) - return; - try - { - DTDprolog(); - outputEntityDecl(name, value); - } - catch (IOException e) - { - throw new SAXException(e); - } - - } - - /** - * Output the doc type declaration. - * - * @param name non-null reference to document type name. - * NEEDSDOC @param value - * - * @throws IOException if an error occurs during writing. - */ - void outputEntityDecl(String name, String value) throws IOException - { - final java.io.Writer writer = m_writer; - writer.write(""); - writer.write(m_lineSep, 0, m_lineSepLen); - } - - /** - * Output a system-dependent line break. - * - * @throws IOException if an error occurs during writing. - - */ - protected final void outputLineSep() throws IOException - { - m_writer.write(m_lineSep, 0, m_lineSepLen); - } - - void setProp(String name, String val, boolean defaultVal) { - if (val != null) { - - - char first = getFirstCharLocName(name); - switch (first) { - case 'c': - if (OutputKeys.CDATA_SECTION_ELEMENTS.equals(name)) { - String cdataSectionNames = val; - addCdataSectionElements(cdataSectionNames); - } - break; - case 'd': - if (OutputKeys.DOCTYPE_SYSTEM.equals(name)) { - this.m_doctypeSystem = val; - } else if (OutputKeys.DOCTYPE_PUBLIC.equals(name)) { - this.m_doctypePublic = val; - if (val.startsWith("-//W3C//DTD XHTML")) - m_spaceBeforeClose = true; - } - break; - case 'e': - String newEncoding = val; - if (OutputKeys.ENCODING.equals(name)) { - String possible_encoding = Encodings.getMimeEncoding(val); - if (possible_encoding != null) { - // if the encoding is being set, try to get the - // preferred - // mime-name and set it too. - super.setProp("mime-name", possible_encoding, - defaultVal); - } - final String oldExplicitEncoding = getOutputPropertyNonDefault(OutputKeys.ENCODING); - final String oldDefaultEncoding = getOutputPropertyDefault(OutputKeys.ENCODING); - if ( (defaultVal && ( oldDefaultEncoding == null || !oldDefaultEncoding.equalsIgnoreCase(newEncoding))) - || ( !defaultVal && (oldExplicitEncoding == null || !oldExplicitEncoding.equalsIgnoreCase(newEncoding) ))) { - // We are trying to change the default or the non-default setting of the encoding to a different value - // from what it was - - EncodingInfo encodingInfo = Encodings.getEncodingInfo(newEncoding); - if (newEncoding != null && encodingInfo.name == null) { - // We tried to get an EncodingInfo for Object for the given - // encoding, but it came back with an internall null name - // so the encoding is not supported by the JDK, issue a message. - final String msg = Utils.messages.createMessage( - MsgKey.ER_ENCODING_NOT_SUPPORTED,new Object[]{ newEncoding }); - - final String msg2 = - "Warning: encoding \"" + newEncoding + "\" not supported, using " - + Encodings.DEFAULT_MIME_ENCODING; - try { - // Prepare to issue the warning message - final Transformer tran = super.getTransformer(); - if (tran != null) { - final ErrorListener errHandler = tran - .getErrorListener(); - // Issue the warning message - if (null != errHandler - && m_sourceLocator != null) { - errHandler - .warning(new TransformerException( - msg, m_sourceLocator)); - errHandler - .warning(new TransformerException( - msg2, m_sourceLocator)); - } else { - System.out.println(msg); - System.out.println(msg2); - } - } else { - System.out.println(msg); - System.out.println(msg2); - } - } catch (Exception e) { - } - - // We said we are using UTF-8, so use it - newEncoding = Encodings.DEFAULT_MIME_ENCODING; - val = Encodings.DEFAULT_MIME_ENCODING; // to store the modified value into the properties a little later - encodingInfo = Encodings.getEncodingInfo(newEncoding); - - } - // The encoding was good, or was forced to UTF-8 above - - - // If there is already a non-default set encoding and we - // are trying to set the default encoding, skip the this block - // as the non-default value is already the one to use. - if (defaultVal == false || oldExplicitEncoding == null) { - m_encodingInfo = encodingInfo; - if (newEncoding != null) - m_isUTF8 = newEncoding.equals(Encodings.DEFAULT_MIME_ENCODING); - - // if there was a previously set OutputStream - OutputStream os = getOutputStream(); - if (os != null) { - Writer w = getWriter(); - - // If the writer was previously set, but - // set by the user, or if the new encoding is the same - // as the old encoding, skip this block - String oldEncoding = getOutputProperty(OutputKeys.ENCODING); - if ((w == null || !m_writer_set_by_user) - && !newEncoding.equalsIgnoreCase(oldEncoding)) { - // Make the change of encoding in our internal - // table, then call setOutputStreamInternal - // which will stomp on the old Writer (if any) - // with a new Writer with the new encoding. - super.setProp(name, val, defaultVal); - setOutputStreamInternal(os,false); - } - } - } - } - } - break; - case 'i': - if (OutputPropertiesFactory.S_KEY_INDENT_AMOUNT.equals(name)) { - setIndentAmount(Integer.parseInt(val)); - } else if (OutputKeys.INDENT.equals(name)) { - boolean b = "yes".equals(val) ? true : false; - m_doIndent = b; - } - - break; - case 'l': - if (OutputPropertiesFactory.S_KEY_LINE_SEPARATOR.equals(name)) { - m_lineSep = val.toCharArray(); - m_lineSepLen = m_lineSep.length; - } - - break; - case 'm': - if (OutputKeys.MEDIA_TYPE.equals(name)) { - m_mediatype = val; - } - break; - case 'o': - if (OutputKeys.OMIT_XML_DECLARATION.equals(name)) { - boolean b = "yes".equals(val) ? true : false; - this.m_shouldNotWriteXMLHeader = b; - } - break; - case 's': - // if standalone was explicitly specified - if (OutputKeys.STANDALONE.equals(name)) { - if (defaultVal) { - setStandaloneInternal(val); - } else { - m_standaloneWasSpecified = true; - setStandaloneInternal(val); - } - } - - break; - case 'v': - if (OutputKeys.VERSION.equals(name)) { - m_version = val; - } - break; - default: - break; - - } - super.setProp(name, val, defaultVal); - } - } - /** - * Specifies an output format for this serializer. It the - * serializer has already been associated with an output format, - * it will switch to the new format. This method should not be - * called while the serializer is in the process of serializing - * a document. - * - * @param format The output format to use - */ - public void setOutputFormat(Properties format) - { - - boolean shouldFlush = m_shouldFlush; - - if (format != null) - { - // Set the default values first, - // and the non-default values after that, - // just in case there is some unexpected - // residual values left over from over-ridden default values - Enumeration propNames; - propNames = format.propertyNames(); - while (propNames.hasMoreElements()) - { - String key = (String) propNames.nextElement(); - // Get the value, possibly a default value - String value = format.getProperty(key); - // Get the non-default value (if any). - String explicitValue = (String) format.get(key); - if (explicitValue == null && value != null) { - // This is a default value - this.setOutputPropertyDefault(key,value); - } - if (explicitValue != null) { - // This is an explicit non-default value - this.setOutputProperty(key,explicitValue); - } - } - } - - // Access this only from the Hashtable level... we don't want to - // get default properties. - String entitiesFileName = - (String) format.get(OutputPropertiesFactory.S_KEY_ENTITIES); - - if (null != entitiesFileName) - { - - String method = - (String) format.get(OutputKeys.METHOD); - - m_charInfo = CharInfo.getCharInfo(entitiesFileName, method); - } - - - - - m_shouldFlush = shouldFlush; - } - - /** - * Returns the output format for this serializer. - * - * @return The output format in use - */ - public Properties getOutputFormat() { - Properties def = new Properties(); - { - Set s = getOutputPropDefaultKeys(); - Iterator i = s.iterator(); - while (i.hasNext()) { - String key = (String) i.next(); - String val = getOutputPropertyDefault(key); - def.put(key, val); - } - } - - Properties props = new Properties(def); - { - Set s = getOutputPropKeys(); - Iterator i = s.iterator(); - while (i.hasNext()) { - String key = (String) i.next(); - String val = getOutputPropertyNonDefault(key); - if (val != null) - props.put(key, val); - } - } - return props; - } - - /** - * Specifies a writer to which the document should be serialized. - * This method should not be called while the serializer is in - * the process of serializing a document. - * - * @param writer The output writer stream - */ - public void setWriter(Writer writer) - { - setWriterInternal(writer, true); - } - - private boolean m_writer_set_by_user; - private void setWriterInternal(Writer writer, boolean setByUser) { - - m_writer_set_by_user = setByUser; - m_writer = writer; - // if we are tracing events we need to trace what - // characters are written to the output writer. - if (m_tracer != null) { - boolean noTracerYet = true; - Writer w2 = m_writer; - while (w2 instanceof WriterChain) { - if (w2 instanceof SerializerTraceWriter) { - noTracerYet = false; - break; - } - w2 = ((WriterChain)w2).getWriter(); - } - if (noTracerYet) - m_writer = new SerializerTraceWriter(m_writer, m_tracer); - } - } - - /** - * Set if the operating systems end-of-line line separator should - * be used when serializing. If set false NL character - * (decimal 10) is left alone, otherwise the new-line will be replaced on - * output with the systems line separator. For example on UNIX this is - * NL, while on Windows it is two characters, CR NL, where CR is the - * carriage-return (decimal 13). - * - * @param use_sytem_line_break True if an input NL is replaced with the - * operating systems end-of-line separator. - * @return The previously set value of the serializer. - */ - public boolean setLineSepUse(boolean use_sytem_line_break) - { - boolean oldValue = m_lineSepUse; - m_lineSepUse = use_sytem_line_break; - return oldValue; - } - - /** - * Specifies an output stream to which the document should be - * serialized. This method should not be called while the - * serializer is in the process of serializing a document. - *

- * The encoding specified in the output properties is used, or - * if no encoding was specified, the default for the selected - * output method. - * - * @param output The output stream - */ - public void setOutputStream(OutputStream output) - { - setOutputStreamInternal(output, true); - } - - private void setOutputStreamInternal(OutputStream output, boolean setByUser) - { - m_outputStream = output; - String encoding = getOutputProperty(OutputKeys.ENCODING); - if (Encodings.DEFAULT_MIME_ENCODING.equalsIgnoreCase(encoding)) - { - // We wrap the OutputStream with a writer, but - // not one set by the user - setWriterInternal(new WriterToUTF8Buffered(output), false); - } else if ( - "WINDOWS-1250".equals(encoding) - || "US-ASCII".equals(encoding) - || "ASCII".equals(encoding)) - { - setWriterInternal(new WriterToASCI(output), false); - } else if (encoding != null) { - Writer osw = null; - try - { - osw = Encodings.getWriter(output, encoding); - } - catch (UnsupportedEncodingException uee) - { - osw = null; - } - - - if (osw == null) { - System.out.println( - "Warning: encoding \"" - + encoding - + "\" not supported" - + ", using " - + Encodings.DEFAULT_MIME_ENCODING); - - encoding = Encodings.DEFAULT_MIME_ENCODING; - setEncoding(encoding); - try { - osw = Encodings.getWriter(output, encoding); - } catch (UnsupportedEncodingException e) { - // We can't really get here, UTF-8 is always supported - // This try-catch exists to make the compiler happy - e.printStackTrace(); - } - } - setWriterInternal(osw,false); - } - else { - // don't have any encoding, but we have an OutputStream - Writer osw = new OutputStreamWriter(output); - setWriterInternal(osw,false); - } - } - - /** - * @see SerializationHandler#setEscaping(boolean) - */ - public boolean setEscaping(boolean escape) - { - final boolean temp = m_escaping; - m_escaping = escape; - return temp; - - } - - - /** - * Might print a newline character and the indentation amount - * of the given depth. - * - * @param depth the indentation depth (element nesting depth) - * - * @throws IOException if an error occurs during writing. - */ - protected void indent(int depth) throws IOException - { - - if (m_startNewLine) - outputLineSep(); - /* For m_indentAmount > 0 this extra test might be slower - * but Xalan's default value is 0, so this extra test - * will run faster in that situation. - */ - if (m_indentAmount > 0) - printSpace(depth * m_indentAmount); - - } - - /** - * Indent at the current element nesting depth. - * @throws IOException if an error occurs while writing - */ - protected void indent() throws IOException - { - indent(m_elemContext.m_currentElemDepth); - } - /** - * Prints n spaces. - * @param n Number of spaces to print. - * - * @throws IOException if an error occurs while writing - */ - private void printSpace(int n) throws IOException - { - final java.io.Writer writer = m_writer; - for (int i = 0; i < n; i++) - { - writer.write(' '); - } - - } - - /** - * Report an attribute type declaration. - * - *

Only the effective (first) declaration for an attribute will - * be reported. The type will be one of the strings "CDATA", - * "ID", "IDREF", "IDREFS", "NMTOKEN", "NMTOKENS", "ENTITY", - * "ENTITIES", or "NOTATION", or a parenthesized token group with - * the separator "|" and all whitespace removed.

- * - * @param eName The name of the associated element. - * @param aName The name of the attribute. - * @param type A string representing the attribute type. - * @param valueDefault A string representing the attribute default - * ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if - * none of these applies. - * @param value A string representing the attribute's default value, - * or null if there is none. - * @exception SAXException The application may raise an exception. - */ - public void attributeDecl( - String eName, - String aName, - String type, - String valueDefault, - String value) - throws SAXException - { - // Do not inline external DTD - if (m_inExternalDTD) - return; - try - { - final java.io.Writer writer = m_writer; - DTDprolog(); - - writer.write("'); - writer.write(m_lineSep, 0, m_lineSepLen); - } - catch (IOException e) - { - throw new SAXException(e); - } - } - - /** - * Get the character stream where the events will be serialized to. - * - * @return Reference to the result Writer, or null. - */ - public Writer getWriter() - { - return m_writer; - } - - /** - * Report a parsed external entity declaration. - * - *

Only the effective (first) declaration for each entity - * will be reported.

- * - * @param name The name of the entity. If it is a parameter - * entity, the name will begin with '%'. - * @param publicId The declared public identifier of the entity, or - * null if none was declared. - * @param systemId The declared system identifier of the entity. - * @exception SAXException The application may raise an exception. - * @see #internalEntityDecl - * @see org.xml.sax.DTDHandler#unparsedEntityDecl - */ - public void externalEntityDecl( - String name, - String publicId, - String systemId) - throws SAXException - { - try { - DTDprolog(); - - m_writer.write(""); - m_writer.write(m_lineSep, 0, m_lineSepLen); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } - - /** - * @return true iff this character can be written without escaping. - * @param ch character to be tested - */ - protected boolean escapingNotNeeded(char ch) - { - final boolean ret; - if (ch < 127) - { - // This is the old/fast code here, but is this - // correct for all encodings? - if (ch >= CharInfo.S_SPACE || (CharInfo.S_LINEFEED == ch || - CharInfo.S_CARRIAGERETURN == ch || CharInfo.S_HORIZONAL_TAB == ch)) - ret= true; - else - ret = false; - } - else { - ret = m_encodingInfo.isInEncoding(ch); - } - return ret; - } - - /** - * Once a surrogate has been detected, write out the pair of - * characters if it is in the encoding, or if there is no - * encoding, otherwise write out an entity reference - * of the value of the unicode code point of the character - * represented by the high/low surrogate pair. - *

- * An exception is thrown if there is no low surrogate in the pair, - * because the array ends unexpectely, or if the low char is there - * but its value is such that it is not a low surrogate. - * - * @param c the first (high) part of the surrogate, which - * must be confirmed before calling this method. - * @param ch Character array. - * @param i position Where the surrogate was detected. - * @param end The end index of the significant characters. - * @return 0 if the pair of characters was written out as-is, - * the unicode code point of the character represented by - * the surrogate pair if an entity reference with that value - * was written out. - * - * @throws IOException if invalid UTF-16 surrogate detected. - */ - protected int writeUTF16Surrogate(char c, char ch[], int i, int end) - throws IOException - { - if (i + 1 >= end) - { - throw new IOException( - Utils.messages.createMessage( - MsgKey.ER_INVALID_UTF16_SURROGATE, - new Object[] { Integer.toHexString((int) c)})); - } - - final char high = c; - final char low = ch[i+1]; - return writeUTF16Surrogate(high,low); - } - - /** - * Once a surrogate has been detected, write out the pair of - * characters if it is in the encoding, or if there is no - * encoding, otherwise write out an entity reference - * of the value of the unicode code point of the character - * represented by the high/low surrogate pair. - *

- * An exception is thrown if there is no low surrogate in the pair, - * because the array ends unexpectely, or if the low char is there - * but its value is such that it is not a low surrogate. - * - * @param high the first (high) part of the surrogate. Currently untested. - * @param low the second (low) part of the surrogate. TESTED. - * @return codePoint: 0 if the pair of characters was written out as-is, the - * unicode code point of the character represented by the - * surrogate pair if an entity reference with that value was - * written out. (ToText uses this information, I believe. TODO: - * REVIEW) - * @throws IOException if invalid UTF-16 surrogate detected. Currently - * only the low surrogate is checked since the high is presumed - * to have been confirmed during parsing. TODO: REVIEW.) - */ - protected int writeUTF16Surrogate(char high, char low) - throws IOException - { - int codePoint = 0; - - if (!Encodings.isLowUTF16Surrogate(low)) { - throw new IOException( - Utils.messages.createMessage( - MsgKey.ER_INVALID_UTF16_SURROGATE, - new Object[] { - Integer.toHexString((int) high) - + " " - + Integer.toHexString(low)})); - } - - final java.io.Writer writer = m_writer; - - // If we make it to here we have a valid high, low surrogate pair - if (m_encodingInfo.isInEncoding(high,low)) { - // If the character formed by the surrogate pair - // is in the encoding, so just write it out. - // Note that writing a 2-character array is DIFFERENT from - // writing single chars, as far as encoding is concerned. - char[] surrogatePair={high,low}; - writer.write(surrogatePair); - } - else { - // Don't know what to do with this char, it is - // not in the encoding and not a high char in - // a surrogate pair, so write out as an entity ref - final String encoding = getEncoding(); - if (encoding != null) { - /* The output encoding is known, - * so somthing is wrong. - */ - codePoint = Encodings.toCodePoint(high, low); - // not in the encoding, so write out a character reference - writer.write('&'); - writer.write('#'); - writer.write(Integer.toString(codePoint)); - writer.write(';'); - } else { - /* The output encoding is not known, - * so just write it out as-is. - */ - // Note that writing a 2-character array is DIFFERENT from - // writing single chars, as far as encoding is concerned. - char[] surrogatePair={high,low}; - writer.write(surrogatePair); - } - } - // non-zero only if character reference was written out. - return codePoint; - } - - /** - * Handle one of the default entities, return false if it - * is not a default entity. - * - * @param ch character to be escaped. - * @param i index into character array. - * @param chars non-null reference to character array. - * @param len length of chars. - * @param fromTextNode true if the characters being processed - * are from a text node, false if they are from an attribute value - * @param escLF true if the linefeed should be escaped. - * - * @return i+1 if the character was written, else i. - * - * @throws java.io.IOException if error arose while writing - */ - int accumDefaultEntity( - java.io.Writer writer, - char ch, - int i, - char[] chars, - int len, - boolean fromTextNode, - boolean escLF) - throws IOException - { - - if (!escLF && CharInfo.S_LINEFEED == ch) - { - writer.write(m_lineSep, 0, m_lineSepLen); - } - else - { - // if this is text node character and a special one of those, - // or if this is a character from attribute value and a special one of those - if ((fromTextNode && m_charInfo.shouldMapTextChar(ch)) || (!fromTextNode && m_charInfo.shouldMapAttrChar(ch))) - { - String outputStringForChar = m_charInfo.getOutputStringForChar(ch); - - if (null != outputStringForChar) - { - writer.write(outputStringForChar); - } - else - return i; - } - else - return i; - } - - return i + 1; - - } - /** - * Normalize the characters, but don't escape. - * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @param isCData true if a CDATA block should be built around the characters. - * @param useSystemLineSeparator true if the operating systems - * end-of-line separator should be output rather than a new-line character. - * - * @throws IOException if unable to write - * @throws org.xml.sax.SAXException never (I think), but signature expects it - */ - void writeNormalizedChars( - char ch[], - int start, - int length, - boolean isCData, - boolean useSystemLineSeparator) - throws IOException, org.xml.sax.SAXException - { - final java.io.Writer writer = m_writer; - int end = start + length; - - for (int i = start; i < end; i++) - { - char c = ch[i]; - - if (CharInfo.S_LINEFEED == c && useSystemLineSeparator) - { - writer.write(m_lineSep, 0, m_lineSepLen); - } - else if (isCData && (!escapingNotNeeded(c))) - { - // if (i != 0) - if (m_cdataTagOpen) - closeCDATA(); - - // This needs to go into a function... - if (Encodings.isHighUTF16Surrogate(c)) - { - writeUTF16Surrogate(c, ch, i, end); - i++ ; // process two input characters - } - else - { - writer.write("&#"); - - String intStr = Integer.toString((int) c); - - writer.write(intStr); - writer.write(';'); - } - - // if ((i != 0) && (i < (end - 1))) - // if (!m_cdataTagOpen && (i < (end - 1))) - // { - // writer.write(CDATA_DELIMITER_OPEN); - // m_cdataTagOpen = true; - // } - } - else if ( - isCData - && ((i < (end - 2)) - && (']' == c) - && (']' == ch[i + 1]) - && ('>' == ch[i + 2]))) - { - writer.write(CDATA_CONTINUE); - - i += 2; - } - else - { - if (escapingNotNeeded(c)) - { - if (isCData && !m_cdataTagOpen) - { - writer.write(CDATA_DELIMITER_OPEN); - m_cdataTagOpen = true; - } - writer.write(c); - } - - // This needs to go into a function... - else if (Encodings.isHighUTF16Surrogate(c)) - { - if (m_cdataTagOpen) - closeCDATA(); - writeUTF16Surrogate(c, ch, i, end); - i++; // process two input characters - } - else - { - if (m_cdataTagOpen) - closeCDATA(); - writer.write("&#"); - - String intStr = Integer.toString((int) c); - - writer.write(intStr); - writer.write(';'); - } - } - } - - } - - /** - * Ends an un-escaping section. - * - * @see #startNonEscaping - * - * @throws org.xml.sax.SAXException never, but signature expects it - */ - public void endNonEscaping() throws org.xml.sax.SAXException - { - m_disableOutputEscapingStates.pop(); - } - - /** - * Starts an un-escaping section. All characters printed within an un- - * escaping section are printed as is, without escaping special characters - * into entity references. Only XML and HTML serializers need to support - * this method. - *

The contents of the un-escaping section will be delivered through the - * regular characters event. - * - * @throws org.xml.sax.SAXException never, but signature expects it - */ - public void startNonEscaping() throws org.xml.sax.SAXException - { - m_disableOutputEscapingStates.push(true); - } - - /** - * Receive notification of cdata. - * - *

The Parser will call this method to report each chunk of - * character data. SAX parsers may return all contiguous character - * data in a single chunk, or they may split it into several - * chunks; however, all of the characters in any single event - * must come from the same external entity, so that the Locator - * provides useful information.

- * - *

The application must not attempt to read from the array - * outside of the specified range.

- * - *

Note that some parsers will report whitespace using the - * ignorableWhitespace() method rather than this one (validating - * parsers must do so).

- * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #ignorableWhitespace - * @see org.xml.sax.Locator - */ - protected void cdata(char ch[], int start, final int length) - throws org.xml.sax.SAXException - { - - try - { - final int old_start = start; - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - m_ispreserve = true; - - if (shouldIndent()) - indent(); - - boolean writeCDataBrackets = - (((length >= 1) && escapingNotNeeded(ch[start]))); - - /* Write out the CDATA opening delimiter only if - * we are supposed to, and if we are not already in - * the middle of a CDATA section - */ - if (writeCDataBrackets && !m_cdataTagOpen) - { - m_writer.write(CDATA_DELIMITER_OPEN); - m_cdataTagOpen = true; - } - - // writer.write(ch, start, length); - if (isEscapingDisabled()) - { - charactersRaw(ch, start, length); - } - else - writeNormalizedChars(ch, start, length, true, m_lineSepUse); - - /* used to always write out CDATA closing delimiter here, - * but now we delay, so that we can merge CDATA sections on output. - * need to write closing delimiter later - */ - if (writeCDataBrackets) - { - /* if the CDATA section ends with ] don't leave it open - * as there is a chance that an adjacent CDATA sections - * starts with ]>. - * We don't want to merge ]] with > , or ] with ]> - */ - if (ch[start + length - 1] == ']') - closeCDATA(); - } - - // time to fire off CDATA event - if (m_tracer != null) - super.fireCDATAEvent(ch, old_start, length); - } - catch (IOException ioe) - { - throw new org.xml.sax.SAXException( - Utils.messages.createMessage( - MsgKey.ER_OIERROR, - null), - ioe); - //"IO error", ioe); - } - } - - /** - * Tell if the character escaping should be disabled for the current state. - * - * @return true if the character escaping should be disabled. - */ - private boolean isEscapingDisabled() - { - return m_disableOutputEscapingStates.peekOrFalse(); - } - - /** - * If available, when the disable-output-escaping attribute is used, - * output raw text without escaping. - * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * - * @throws org.xml.sax.SAXException containing IOException, if one arises - */ - protected void charactersRaw(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - - if (m_inEntityRef) - return; - try - { - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - - m_ispreserve = true; - - m_writer.write(ch, start, length); - } - catch (IOException e) - { - throw new SAXException(e); - } - - } - - /** - * Receive notification of character data. - * - *

The Parser will call this method to report each chunk of - * character data. SAX parsers may return all contiguous character - * data in a single chunk, or they may split it into several - * chunks; however, all of the characters in any single event - * must come from the same external entity, so that the Locator - * provides useful information.

- * - *

The application must not attempt to read from the array - * outside of the specified range.

- * - *

Note that some parsers will report whitespace using the - * ignorableWhitespace() method rather than this one (validating - * parsers must do so).

- * - * @param chars The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #ignorableWhitespace - * @see org.xml.sax.Locator - */ - public void characters(final char chars[], final int start, final int length) - throws org.xml.sax.SAXException - { - // It does not make sense to continue with rest of the method if the number of - // characters to read from array is 0. - // Section 7.6.1 of XSLT 1.0 (http://www.w3.org/TR/xslt#value-of) suggest no text node - // is created if string is empty. - if (length == 0 || (m_inEntityRef && !m_expandDTDEntities)) - return; - - m_docIsEmpty = false; - - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - else if (m_needToCallStartDocument) - { - startDocumentInternal(); - } - - if (m_cdataStartCalled || m_elemContext.m_isCdataSection) - { - /* either due to startCDATA() being called or due to - * cdata-section-elements atribute, we need this as cdata - */ - cdata(chars, start, length); - - return; - } - - if (m_cdataTagOpen) - closeCDATA(); - - if (m_disableOutputEscapingStates.peekOrFalse() || (!m_escaping)) - { - charactersRaw(chars, start, length); - - // time to fire off characters generation event - if (m_tracer != null) - super.fireCharEvent(chars, start, length); - - return; - } - - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - - - try - { - int i; - int startClean; - - // skip any leading whitspace - // don't go off the end and use a hand inlined version - // of isWhitespace(ch) - final int end = start + length; - int lastDirtyCharProcessed = start - 1; // last non-clean character that was processed - // that was processed - final Writer writer = m_writer; - boolean isAllWhitespace = true; - i = start; - - // Note: The case where m_pendingHighUTF16Surrogate is set upon entry - // but the first character is not the low surrogate is perplexing. - // THEORETICALLY, everything but characters() should recognize that - // case as meaning characters() just ended abnormally and flush or - // report the isolated high surrogate before they start, rather than - // leaving it for us to erroneously insert into the next character block. - // But that's a pretty pervasive change for a rare error case. - // - // (Not handling it that way risks the high surrogate being flushed into - // the start of the next characters() block, and that in turn would need - // a special case here or it would be flushed after the whitespace... - // This needs more thought. GONK TODO REVIEW. - - // process any leading whitespace - while (i < end && isAllWhitespace) { - char ch1 = chars[i]; - - if (m_charInfo.shouldMapTextChar(ch1)) { - // The character is supposed to be replaced by a String - // so write out the clean whitespace characters accumulated - // so far - // then the String. - writeOutCleanChars(chars, i, lastDirtyCharProcessed); - String outputStringForChar = m_charInfo - .getOutputStringForChar(ch1); - writer.write(outputStringForChar); - // We can't say that everything we are writing out is - // all whitespace, we just wrote out a String. - isAllWhitespace = false; - lastDirtyCharProcessed = i; // mark the last non-clean - // character processed - i++; - } else { - // The character is clean, but is it a whitespace ? - switch (ch1) { - // TODO: Any other whitespace to consider? - case CharInfo.S_SPACE: - // Just accumulate the clean whitespace - i++; - break; - case CharInfo.S_LINEFEED: - lastDirtyCharProcessed = processLineFeed(chars, i, - lastDirtyCharProcessed, writer); - i++; - break; - case CharInfo.S_CARRIAGERETURN: - writeOutCleanChars(chars, i, lastDirtyCharProcessed); - writer.write(" "); - lastDirtyCharProcessed = i; - i++; - break; - case CharInfo.S_HORIZONAL_TAB: - // Just accumulate the clean whitespace - i++; - break; - default: - // The character was clean, but not a whitespace - // so break the loop to continue with this character - // (we don't increment index i !!) - isAllWhitespace = false; - break; - } - } - } - - /* If there is some non-whitespace, mark that we may need - * to preserve this. This is only important if we have indentation on. - */ - if (i < end || !isAllWhitespace) - m_ispreserve = true; - - - // Process characters after initial whitespace (if any) - for (; i < end; i++) - { - char ch = chars[i]; - - if (m_charInfo.shouldMapTextChar(ch)) { - // The character is supposed to be replaced by a String - // e.g. '&' --> "&" - // e.g. '<' --> "<" - writeOutCleanChars(chars, i, lastDirtyCharProcessed); - String outputStringForChar = m_charInfo.getOutputStringForChar(ch); - writer.write(outputStringForChar); - lastDirtyCharProcessed = i; - } - else if (ch <= 0x1F) { - // Range 0x00 through 0x1F inclusive - // - // This covers the non-whitespace control characters - // in the range 0x1 to 0x1F inclusive. - // It also covers the whitespace control characters in the same way: - // 0x9 TAB - // 0xA NEW LINE - // 0xD CARRIAGE RETURN - // - // We also cover 0x0 ... It isn't valid - // but we will output "�" - - // The default will handle this just fine, but this - // is a little performance boost to handle the more - // common TAB, NEW-LINE, CARRIAGE-RETURN - switch (ch) { - - case CharInfo.S_HORIZONAL_TAB: - // Leave whitespace TAB as a real character - break; - case CharInfo.S_LINEFEED: - lastDirtyCharProcessed = processLineFeed(chars, i, lastDirtyCharProcessed, writer); - break; - case CharInfo.S_CARRIAGERETURN: - writeOutCleanChars(chars, i, lastDirtyCharProcessed); - writer.write(" "); - lastDirtyCharProcessed = i; - // Leave whitespace carriage return as a real character - break; - default: - writeOutCleanChars(chars, i, lastDirtyCharProcessed); - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - lastDirtyCharProcessed = i; - break; - - } - } - else if (ch < 0x7F) { - // Range 0x20 through 0x7E inclusive - // Normal ASCII chars, do nothing, just add it to - // the clean characters - - } - else if (ch <= 0x9F){ - // Range 0x7F through 0x9F inclusive - // More control characters, including NEL (0x85) - writeOutCleanChars(chars, i, lastDirtyCharProcessed); - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - lastDirtyCharProcessed = i; - } - else if (ch == CharInfo.S_LINE_SEPARATOR) { - // LINE SEPARATOR - writeOutCleanChars(chars, i, lastDirtyCharProcessed); - writer.write("
"); - lastDirtyCharProcessed = i; - } - else if (m_encodingInfo.isInEncoding(ch)) { - // If the character is in the encoding, and - // not in the normal ASCII range, we also - // just leave it get added on to the clean characters - } - else if (Encodings.isLowUTF16Surrogate(ch)) { - if(m_encodingInfo.isInEncoding(m_pendingHighUTF16Surrogate,ch)) { - char[] buffer= {m_pendingHighUTF16Surrogate,ch}; - writer.write(buffer); - } else { - // Clean characters should have been flushed by high surrogate - int codepoint = Encodings.toCodePoint(m_pendingHighUTF16Surrogate,ch); - writer.write("&#"); - writer.write(Integer.toString(codepoint)); - writer.write(';'); - } - m_pendingHighUTF16Surrogate=0; - lastDirtyCharProcessed=i; - } - else if (Encodings.isHighUTF16Surrogate(ch)) { - writeOutCleanChars(chars,i,lastDirtyCharProcessed); - m_pendingHighUTF16Surrogate=ch; - lastDirtyCharProcessed=i; - } - else { - // This is a fallback plan, we get here if the - // encoding doesn't contain ch and it's not part - // of a surrogate pair - // The right thing is to write out an entity - writeOutCleanChars(chars, i, lastDirtyCharProcessed); - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - lastDirtyCharProcessed = i; - } - } // end input scan loop - - // we've reached the end. Any clean characters at the - // end of the array than need to be written out? - startClean = lastDirtyCharProcessed + 1; - if (i > startClean) - { - int lengthClean = i - startClean; - m_writer.write(chars, startClean, lengthClean); - } - - // For indentation purposes, mark that we've just writen text out - m_isprevtext = true; - } - catch (IOException e) - { - throw new SAXException(e); - } - - // time to fire off characters generation event - if (m_tracer != null) - super.fireCharEvent(chars, start, length); - } - - private int processLineFeed(final char[] chars, int i, int lastProcessed, final Writer writer) throws IOException { - if (!m_lineSepUse - || (m_lineSepLen ==1 && m_lineSep[0] == CharInfo.S_LINEFEED)){ - // We are leaving the new-line alone, and it is just - // being added to the 'clean' characters, - // so the last dirty character processed remains unchanged - } - else { - writeOutCleanChars(chars, i, lastProcessed); - writer.write(m_lineSep, 0, m_lineSepLen); - lastProcessed = i; - } - return lastProcessed; - } - - private void writeOutCleanChars(final char[] chars, int i, int lastProcessed) throws IOException { - int startClean; - startClean = lastProcessed + 1; - if (startClean < i) - { - int lengthClean = i - startClean; - m_writer.write(chars, startClean, lengthClean); - } - } - /** - * This method checks if a given character is between C0 or C1 range - * of Control characters. - * This method is added to support Control Characters for XML 1.1 - * If a given character is TAB (0x09), LF (0x0A) or CR (0x0D), this method - * return false. Since they are whitespace characters, no special processing is needed. - * - * @param ch - * @return boolean - */ - private static boolean isCharacterInC0orC1Range(char ch) - { - if(ch == 0x09 || ch == 0x0A || ch == 0x0D) - return false; - else - return (ch >= 0x7F && ch <= 0x9F)|| (ch >= 0x01 && ch <= 0x1F); - } - /** - * This method checks if a given character either NEL (0x85) or LSEP (0x2028) - * These are new end of line charcters added in XML 1.1. These characters must be - * written as Numeric Character References (NCR) in XML 1.1 output document. - * - * @param ch - * @return boolean - */ - private static boolean isNELorLSEPCharacter(char ch) - { - return (ch == 0x85 || ch == 0x2028); - } - /** - * Process a dirty character and any preeceding clean characters - * that were not yet processed. - * @param chars array of characters being processed - * @param end one (1) beyond the last character - * in chars to be processed - * @param i the index of the dirty character - * @param ch the character in chars[i] - * @param lastDirty the last dirty character previous to i - * @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, - int end, - int i, - char ch, - int lastDirty, - boolean fromTextNode) throws IOException - { - int startClean = lastDirty + 1; - // if we have some clean characters accumulated - // process them before the dirty one. - if (i > startClean) - { - int lengthClean = i - startClean; - m_writer.write(chars, startClean, lengthClean); - } - - // process the "dirty" character - if (CharInfo.S_LINEFEED == ch && fromTextNode) - { - m_writer.write(m_lineSep, 0, m_lineSepLen); - } - else - { - startClean = - accumDefaultEscape( - m_writer, - (char)ch, - i, - chars, - end, - fromTextNode, - false); - i = startClean - 1; - } - // Return the index of the last character that we just processed - // which is a dirty character. - return i; - } - - /** - * Receive notification of character data. - * - * @param s The string of characters to process. - * - * @throws org.xml.sax.SAXException if characters could not be handled - */ - public void characters(String s) throws org.xml.sax.SAXException - { - if (m_inEntityRef && !m_expandDTDEntities) - return; - final int length = s.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length * 2 + 1]; - } - s.getChars(0, length, m_charsBuff, 0); - characters(m_charsBuff, 0, length); - } - - /** - * Escape and writer.write a character. - * - * @param ch character to be escaped. - * @param i index into character array. - * @param chars non-null reference to character array. - * @param len length of chars. - * @param fromTextNode true if the characters being processed are - * from a text node, false if the characters being processed are from - * an attribute value. - * @param escLF true if the linefeed should be escaped. - * - * @return i+1 if a character was written, i+2 if two characters - * were written out, else return i. - * - * @throws IOException if an error occurs while writing - */ - private int accumDefaultEscape( - Writer writer, - char ch, - int i, - char[] chars, - int len, - boolean fromTextNode, - boolean escLF) - throws IOException - { - - int pos = accumDefaultEntity(writer, ch, i, chars, len, fromTextNode, escLF); - - if (i == pos) - { - if (Encodings.isHighUTF16Surrogate(ch)) - { - - // Should be the UTF-16 low surrogate of the hig/low pair. - char next; - // Unicode code point formed from the high/low pair. - int codePoint = 0; - - if (i + 1 >= len) - { - throw new IOException( - Utils.messages.createMessage( - MsgKey.ER_INVALID_UTF16_SURROGATE, - new Object[] { Integer.toHexString(ch)})); - //"Invalid UTF-16 surrogate detected: " - - //+Integer.toHexString(ch)+ " ?"); - } - else - { - next = chars[++i]; - - if (!(Encodings.isLowUTF16Surrogate(next))) - throw new IOException( - Utils.messages.createMessage( - MsgKey - .ER_INVALID_UTF16_SURROGATE, - new Object[] { - Integer.toHexString(ch) - + " " - + Integer.toHexString(next)})); - //"Invalid UTF-16 surrogate detected: " - - //+Integer.toHexString(ch)+" "+Integer.toHexString(next)); - codePoint = Encodings.toCodePoint(ch,next); - } - - writer.write("&#"); - writer.write(Integer.toString(codePoint)); - writer.write(';'); - pos += 2; // count the two characters that went into writing out this entity - } - else - { - /* This if check is added to support control characters in XML 1.1. - * If a character is a Control Character within C0 and C1 range, it is desirable - * to write it out as Numeric Character Reference(NCR) regardless of XML Version - * being used for output document. - */ - if (isCharacterInC0orC1Range(ch) || isNELorLSEPCharacter(ch)) - { - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - } - else if ((!escapingNotNeeded(ch) || - ( (fromTextNode && m_charInfo.shouldMapTextChar(ch)) - || (!fromTextNode && m_charInfo.shouldMapAttrChar(ch)))) - && m_elemContext.m_currentElemDepth > 0) - { - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - } - else - { - writer.write(ch); - } - pos++; // count the single character that was processed - } - - } - return pos; - } - - /** - * Receive notification of the beginning of an element, although this is a - * SAX method additional namespace or attribute information can occur before - * or after this call, that is associated with this element. - * - * - * @param namespaceURI The Namespace URI, or the empty string if the - * element has no Namespace URI or if Namespace - * processing is not being performed. - * @param localName The local name (without prefix), or the - * empty string if Namespace processing is not being - * performed. - * @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 - * wrapping another exception. - * @see org.xml.sax.ContentHandler#startElement - * @see org.xml.sax.ContentHandler#endElement - * @see org.xml.sax.AttributeList - */ - public void startElement( - String namespaceURI, - String localName, - String name, - Attributes atts) - throws org.xml.sax.SAXException - { - if (m_inEntityRef) - return; - - if (m_needToCallStartDocument) - { - startDocumentInternal(); - m_needToCallStartDocument = false; - m_docIsEmpty = false; - } - else if (m_cdataTagOpen) - closeCDATA(); - try - { - if (m_needToOutputDocTypeDecl) { - if(null != getDoctypeSystem()) { - outputDocTypeDecl(name, true); - } - m_needToOutputDocTypeDecl = false; - } - - /* before we over-write the current elementLocalName etc. - * lets close out the old one (if we still need to) - */ - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - - if (namespaceURI != null) - ensurePrefixIsDeclared(namespaceURI, name); - - m_ispreserve = false; - - if (shouldIndent() && m_startNewLine) - { - indent(); - } - - m_startNewLine = true; - - final java.io.Writer writer = m_writer; - writer.write('<'); - writer.write(name); - } - catch (IOException e) - { - throw new SAXException(e); - } - - // process the attributes now, because after this SAX call they might be gone - if (atts != null) - addAttributes(atts); - - m_elemContext = m_elemContext.push(namespaceURI,localName,name); - m_isprevtext = false; - - if (m_tracer != null) - firePseudoAttributes(); - } - - /** - * Receive notification of the beginning of an element, additional - * namespace or attribute information can occur before or after this call, - * that is associated with this element. - * - * - * @param elementNamespaceURI The Namespace URI, or the empty string if the - * element has no Namespace URI or if Namespace - * processing is not being performed. - * @param elementLocalName The local name (without prefix), or the - * empty string if Namespace processing is not being - * performed. - * @param elementName The element type name. - * @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 if characters could not be handled - */ - public void startElement( - String elementNamespaceURI, - String elementLocalName, - String elementName) - throws SAXException - { - startElement(elementNamespaceURI, elementLocalName, elementName, null); - } - - public void startElement(String elementName) throws SAXException - { - startElement(null, null, elementName, null); - } - - /** - * Output the doc type declaration. - * - * @param name non-null reference to document type name. - * NEEDSDOC @param closeDecl - * - * @throws java.io.IOException - */ - void outputDocTypeDecl(String name, boolean closeDecl) throws SAXException - { - if (m_cdataTagOpen) - closeCDATA(); - try - { - final java.io.Writer writer = m_writer; - writer.write(""); - writer.write(m_lineSep, 0, m_lineSepLen); - closeDecl = false; // done closing - } - else - writer.write('\"'); - } - } - catch (IOException e) - { - throw new SAXException(e); - } - } - - /** - * Process the attributes, which means to write out the currently - * collected attributes to the writer. The attributes are not - * cleared by this method - * - * @param writer the writer to write processed attributes to. - * @param nAttrs the number of attributes in m_attributes - * to be processed - * - * @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 - { - /* real SAX attributes are not passed in, so process the - * attributes that were collected after the startElement call. - * _attribVector is a "cheap" list for Stream serializer output - * accumulated over a series of calls to attribute(name,value) - */ - - String encoding = getEncoding(); - for (int i = 0; i < nAttrs; i++) - { - // elementAt is JDK 1.1.8 - final String name = m_attributes.getQName(i); - final String value = m_attributes.getValue(i); - writer.write(' '); - writer.write(name); - writer.write("=\""); - writeAttrString(writer, value, encoding); - writer.write('\"'); - } - } - - /** - * Writes the specified string after substituting specials, - * and UTF-16 surrogates for chracter references &#xnn. - * - * @param writer to recieve processed string - * @param string String to convert to XML format. - * @param encoding CURRENTLY NOT IMPLEMENTED. - * - * @throws IOException if an error occurs while writing - */ - public void writeAttrString( - Writer writer, - String string, - String encoding) - throws IOException - { - final int len = string.length(); - if (len > m_attrBuff.length) - { - m_attrBuff = new char[len*2 + 1]; - } - string.getChars(0,len, m_attrBuff, 0); - final char[] stringChars = m_attrBuff; - - for (int i = 0; i < len; i++) - { - char ch = stringChars[i]; - - if (m_charInfo.shouldMapAttrChar(ch)) { - // The character is supposed to be replaced by a String - // e.g. '&' --> "&" - // e.g. '<' --> "<" - accumDefaultEscape(writer, ch, i, stringChars, len, false, true); - } - else { - if (0x0 <= ch && ch <= 0x1F) { - // Range 0x00 through 0x1F inclusive - // This covers the non-whitespace control characters - // in the range 0x1 to 0x1F inclusive. - // It also covers the whitespace control characters in the same way: - // 0x9 TAB - // 0xA NEW LINE - // 0xD CARRIAGE RETURN - // - // We also cover 0x0 ... It isn't valid - // but we will output "�" - - // The default will handle this just fine, but this - // is a little performance boost to handle the more - // common TAB, NEW-LINE, CARRIAGE-RETURN - switch (ch) { - - case CharInfo.S_HORIZONAL_TAB: - writer.write(" "); - break; - case CharInfo.S_LINEFEED: - writer.write(" "); - break; - case CharInfo.S_CARRIAGERETURN: - writer.write(" "); - break; - default: - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - break; - - } - } - else if (ch < 0x7F) { - // Range 0x20 through 0x7E inclusive - // Normal ASCII chars - writer.write(ch); - } - else if (ch <= 0x9F){ - // Range 0x7F through 0x9F inclusive - // More control characters - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - } - else if (ch == CharInfo.S_LINE_SEPARATOR) { - // LINE SEPARATOR - writer.write("
"); - } - else if (m_encodingInfo.isInEncoding(ch)) { - // If the character is in the encoding, and - // not in the normal ASCII range, we also - // just write it out - writer.write(ch); - } - else if (Encodings.isHighUTF16Surrogate(ch)) - { - writeUTF16Surrogate(ch, stringChars, i, len); - i++ ; // process two input characters - } - else { - // This is a fallback plan, we should never get here - // but if the character wasn't previously handled - // (i.e. isn't in the encoding, etc.) then what - // should we do? We choose to write out a character ref - writer.write("&#"); - writer.write(Integer.toString(ch)); - writer.write(';'); - } - - } - } - } - - /** - * Receive notification of the end of an element. - * - * - * @param namespaceURI The Namespace URI, or the empty string if the - * element has no Namespace URI or if Namespace - * processing is not being performed. - * @param localName The local name (without prefix), or the - * empty string if Namespace processing is not being - * performed. - * @param name The element type name - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void endElement(String namespaceURI, String localName, String name) - throws org.xml.sax.SAXException - { - if (m_inEntityRef) - return; - - // namespaces declared at the current depth are no longer valid - // so get rid of them - m_prefixMap.popNamespaces(m_elemContext.m_currentElemDepth, null); - - try - { - final java.io.Writer writer = m_writer; - if (m_elemContext.m_startTagOpen) - { - if (m_tracer != null) - super.fireStartElem(m_elemContext.m_elementName); - int nAttrs = m_attributes.getLength(); - if (nAttrs > 0) - { - processAttributes(m_writer, nAttrs); - // clear attributes object for re-use with next element - m_attributes.clear(); - } - if (m_spaceBeforeClose) - writer.write(" />"); - else - writer.write("/>"); - /* don't need to pop cdataSectionState because - * this element ended so quickly that we didn't get - * to push the state. - */ - - } - else - { - if (m_cdataTagOpen) - closeCDATA(); - - if (shouldIndent()) - indent(m_elemContext.m_currentElemDepth - 1); - writer.write('<'); - writer.write('/'); - writer.write(name); - writer.write('>'); - } - } - catch (IOException e) - { - throw new SAXException(e); - } - - if (!m_elemContext.m_startTagOpen && m_doIndent) - { - m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop(); - } - - m_isprevtext = false; - - // fire off the end element event - if (m_tracer != null) - super.fireEndElem(name); - m_elemContext = m_elemContext.m_prev; - } - - /** - * Receive notification of the end of an element. - * @param name The element type name - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void endElement(String name) throws org.xml.sax.SAXException - { - endElement(null, null, name); - } - - /** - * Begin the scope of a prefix-URI Namespace mapping - * just before another element is about to start. - * This call will close any open tags so that the prefix mapping - * will not apply to the current element, but the up comming child. - * - * @see org.xml.sax.ContentHandler#startPrefixMapping - * - * @param prefix The Namespace prefix being declared. - * @param uri The Namespace URI the prefix is mapped to. - * - * @throws org.xml.sax.SAXException The client may throw - * an exception during processing. - * - */ - public void startPrefixMapping(String prefix, String uri) - throws org.xml.sax.SAXException - { - // the "true" causes the flush of any open tags - startPrefixMapping(prefix, uri, true); - } - - /** - * Handle a prefix/uri mapping, which is associated with a startElement() - * that is soon to follow. Need to close any open start tag to make - * sure than any name space attributes due to this event are associated wih - * the up comming element, not the current one. - * @see ExtendedContentHandler#startPrefixMapping - * - * @param prefix The Namespace prefix being declared. - * @param uri The Namespace URI the prefix is mapped to. - * @param shouldFlush true if any open tags need to be closed first, this - * will impact which element the mapping applies to (open parent, or its up - * comming child) - * @return returns true if the call made a change to the current - * namespace information, false if it did not change anything, e.g. if the - * prefix/namespace mapping was already in scope from before. - * - * @throws org.xml.sax.SAXException The client may throw - * an exception during processing. - * - * - */ - public boolean startPrefixMapping( - String prefix, - String uri, - boolean shouldFlush) - throws org.xml.sax.SAXException - { - - /* Remember the mapping, and at what depth it was declared - * This is one greater than the current depth because these - * mappings will apply to the next depth. This is in - * consideration that startElement() will soon be called - */ - - boolean pushed; - int pushDepth; - if (shouldFlush) - { - flushPending(); - // the prefix mapping applies to the child element (one deeper) - pushDepth = m_elemContext.m_currentElemDepth + 1; - } - else - { - // the prefix mapping applies to the current element - pushDepth = m_elemContext.m_currentElemDepth; - } - pushed = m_prefixMap.pushNamespace(prefix, uri, pushDepth); - - if (pushed) - { - /* Brian M.: don't know if we really needto do this. The - * callers of this object should have injected both - * startPrefixMapping and the attributes. We are - * just covering our butt here. - */ - String name; - if (EMPTYSTRING.equals(prefix)) - { - name = "xmlns"; - addAttributeAlways(XMLNS_URI, name, name, "CDATA", uri, false); - } - else - { - if (!EMPTYSTRING.equals(uri)) - // hack for XSLTC attribset16 test - { // that maps ns1 prefix to "" URI - name = "xmlns:" + prefix; - - /* for something like xmlns:abc="w3.pretend.org" - * the uri is the value, that is why we pass it in the - * value, or 5th slot of addAttributeAlways() - */ - addAttributeAlways(XMLNS_URI, prefix, name, "CDATA", uri, false); - } - } - } - return pushed; - } - - /** - * Receive notification of an XML comment anywhere in the document. This - * callback will be used for comments inside or outside the document - * element, including comments in the external DTD subset (if read). - * @param ch An array holding the characters in the comment. - * @param start The starting position in the array. - * @param length The number of characters to use from the array. - * @throws org.xml.sax.SAXException The application may raise an exception. - */ - public void comment(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - - int start_old = start; - if (m_inEntityRef) - return; - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - else if (m_needToCallStartDocument) - { - startDocumentInternal(); - m_needToCallStartDocument = false; - } - - try - { - final int limit = start + length; - boolean wasDash = false; - if (m_cdataTagOpen) - closeCDATA(); - - if (shouldIndent()) - indent(); - - final java.io.Writer writer = m_writer; - writer.write(COMMENT_BEGIN); - // Detect occurrences of two consecutive dashes, handle as necessary. - for (int i = start; i < limit; i++) - { - if (wasDash && ch[i] == '-') - { - writer.write(ch, start, i - start); - writer.write(" -"); - start = i + 1; - } - wasDash = (ch[i] == '-'); - } - - // if we have some chars in the comment - if (length > 0) - { - // Output the remaining characters (if any) - final int remainingChars = (limit - start); - if (remainingChars > 0) - writer.write(ch, start, remainingChars); - // Protect comment end from a single trailing dash - if (ch[limit - 1] == '-') - writer.write(' '); - } - writer.write(COMMENT_END); - } - catch (IOException e) - { - throw new SAXException(e); - } - - /* - * Don't write out any indentation whitespace now, - * because there may be non-whitespace text after this. - * - * Simply mark that at this point if we do decide - * to indent that we should - * add a newline on the end of the current line before - * the indentation at the start of the next line. - */ - m_startNewLine = true; - // time to generate comment event - if (m_tracer != null) - super.fireCommentEvent(ch, start_old,length); - } - - /** - * Report the end of a CDATA section. - * @throws org.xml.sax.SAXException The application may raise an exception. - * - * @see #startCDATA - */ - public void endCDATA() throws org.xml.sax.SAXException - { - if (m_cdataTagOpen) - closeCDATA(); - m_cdataStartCalled = false; - } - - /** - * Report the end of DTD declarations. - * @throws org.xml.sax.SAXException The application may raise an exception. - * @see #startDTD - */ - public void endDTD() throws org.xml.sax.SAXException - { - try - { - if (m_needToOutputDocTypeDecl) - { - outputDocTypeDecl(m_elemContext.m_elementName, false); - m_needToOutputDocTypeDecl = false; - } - final java.io.Writer writer = m_writer; - if (!m_inDoctype) - writer.write("]>"); - else - { - writer.write('>'); - } - - writer.write(m_lineSep, 0, m_lineSepLen); - } - catch (IOException e) - { - throw new SAXException(e); - } - - } - - /** - * End the scope of a prefix-URI Namespace mapping. - * @see org.xml.sax.ContentHandler#endPrefixMapping - * - * @param prefix The prefix that was being mapping. - * @throws org.xml.sax.SAXException The client may throw - * an exception during processing. - */ - public void endPrefixMapping(String prefix) throws org.xml.sax.SAXException - { // do nothing - } - - /** - * Receive notification of ignorable whitespace in element content. - * - * Not sure how to get this invoked quite yet. - * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #characters - */ - public void ignorableWhitespace(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - - if (0 == length) - return; - characters(ch, start, length); - } - - /** - * Receive notification of a skipped entity. - * @see org.xml.sax.ContentHandler#skippedEntity - * - * @param name The name of the skipped entity. If it is a - * parameter entity, the name will begin with '%', - * and if it is the external DTD subset, it will be the string - * "[dtd]". - * @throws org.xml.sax.SAXException Any SAX exception, possibly wrapping - * another exception. - */ - public void skippedEntity(String name) throws org.xml.sax.SAXException - { // TODO: Should handle - } - - /** - * Report the start of a CDATA section. - * - * @throws org.xml.sax.SAXException The application may raise an exception. - * @see #endCDATA - */ - public void startCDATA() throws org.xml.sax.SAXException - { - m_cdataStartCalled = true; - } - - /** - * Report the beginning of an entity. - * - * The start and end of the document entity are not reported. - * The start and end of the external DTD subset are reported - * using the pseudo-name "[dtd]". All other events must be - * properly nested within start/end entity events. - * - * @param name The name of the entity. If it is a parameter - * entity, the name will begin with '%'. - * @throws org.xml.sax.SAXException The application may raise an exception. - * @see #endEntity - * @see org.xml.sax.ext.DeclHandler#internalEntityDecl - * @see org.xml.sax.ext.DeclHandler#externalEntityDecl - */ - public void startEntity(String name) throws org.xml.sax.SAXException - { - if (name.equals("[dtd]")) - m_inExternalDTD = true; - - if (!m_expandDTDEntities && !m_inExternalDTD) { - /* Only leave the entity as-is if - * we've been told not to expand them - * and this is not the magic [dtd] name. - */ - startNonEscaping(); - characters("&" + name + ';'); - endNonEscaping(); - } - - m_inEntityRef = true; - } - - /** - * For the enclosing elements starting tag write out - * out any attributes followed by the > character. - * - * @throws org.xml.sax.SAXException if underlying writer encounters error - */ - protected void closeStartTag() throws SAXException - { - - if (m_elemContext.m_startTagOpen) - { - - try - { - if (m_tracer != null) - super.fireStartElem(m_elemContext.m_elementName); - int nAttrs = m_attributes.getLength(); - if (nAttrs > 0) - { - processAttributes(m_writer, nAttrs); - // clear attributes object for re-use with next element - m_attributes.clear(); - } - m_writer.write('>'); - } - catch (IOException e) - { - throw new SAXException(e); - } - - /* whether Xalan or XSLTC, we have the prefix mappings now, so - * lets determine if the current element is specified in the cdata- - * section-elements list. - */ - if (m_CdataElems != null) - m_elemContext.m_isCdataSection = isCdataSection(); - - if (m_doIndent) - { - m_isprevtext = false; - m_preserves.push(m_ispreserve); - } - } - - } - - /** - * Report the start of DTD declarations, if any. - * - * Any declarations are assumed to be in the internal subset unless - * otherwise indicated. - * - * @param name The document type name. - * @param publicId The declared public identifier for the - * external DTD subset, or null if none was declared. - * @param systemId The declared system identifier for the - * external DTD subset, or null if none was declared. - * @throws org.xml.sax.SAXException The application may raise an - * exception. - * @see #endDTD - * @see #startEntity - */ - public void startDTD(String name, String publicId, String systemId) - throws org.xml.sax.SAXException - { - setDoctypeSystem(systemId); - setDoctypePublic(publicId); - - m_elemContext.m_elementName = name; - m_inDoctype = true; - } - - /** - * Returns the m_indentAmount. - * @return int - */ - public int getIndentAmount() - { - return m_indentAmount; - } - - /** - * Sets the m_indentAmount. - * - * @param m_indentAmount The m_indentAmount to set - */ - public void setIndentAmount(int m_indentAmount) - { - this.m_indentAmount = m_indentAmount; - } - - /** - * Tell if, based on space preservation constraints and the doIndent property, - * if an indent should occur. - * - * @return True if an indent should occur. - */ - protected boolean shouldIndent() - { - return m_doIndent && (!m_ispreserve && !m_isprevtext) && m_elemContext.m_currentElemDepth > 0; - } - - /** - * Searches for the list of qname properties with the specified key in the - * property list. If the key is not found in this property list, the default - * property list, and its defaults, recursively, are then checked. The - * method returns null if the property is not found. - * - * @param key the property key. - * @param props the list of properties to search in. - * - * Sets the vector of local-name/URI pairs of the cdata section elements - * specified in the cdata-section-elements property. - * - * This method is essentially a copy of getQNameProperties() from - * OutputProperties. Eventually this method should go away and a call - * to setCdataSectionElements(Vector v) should be made directly. - */ - private void setCdataSectionElements(String key, Properties props) - { - - String s = props.getProperty(key); - - if (null != s) - { - // Vector of URI/LocalName pairs - Vector v = new Vector(); - int l = s.length(); - boolean inCurly = false; - StringBuffer buf = new StringBuffer(); - - // parse through string, breaking on whitespaces. I do this instead - // of a tokenizer so I can track whitespace inside of curly brackets, - // which theoretically shouldn't happen if they contain legal URLs. - for (int i = 0; i < l; i++) - { - char c = s.charAt(i); - - if (Character.isWhitespace(c)) - { - if (!inCurly) - { - if (buf.length() > 0) - { - addCdataSectionElement(buf.toString(), v); - buf.setLength(0); - } - continue; - } - } - else if ('{' == c) - inCurly = true; - else if ('}' == c) - inCurly = false; - - buf.append(c); - } - - if (buf.length() > 0) - { - addCdataSectionElement(buf.toString(), v); - buf.setLength(0); - } - // call the official, public method to set the collected names - setCdataSectionElements(v); - } - - } - - /** - * Adds a URI/LocalName pair of strings to the list. - * - * @param URI_and_localName String of the form "{uri}local" or "local" - * - * @return a QName object - */ - private void addCdataSectionElement(String URI_and_localName, Vector v) - { - - StringTokenizer tokenizer = - new StringTokenizer(URI_and_localName, "{}", false); - String s1 = tokenizer.nextToken(); - String s2 = tokenizer.hasMoreTokens() ? tokenizer.nextToken() : null; - - if (null == s2) - { - // add null URI and the local name - v.addElement(null); - v.addElement(s1); - } - else - { - // add URI, then local name - v.addElement(s1); - v.addElement(s2); - } - } - - /** - * Remembers the cdata sections specified in the cdata-section-elements. - * The "official way to set URI and localName pairs. - * This method should be used by both Xalan and XSLTC. - * - * @param URI_and_localNames a vector of pairs of Strings (URI/local) - */ - public void setCdataSectionElements(Vector URI_and_localNames) - { - // convert to the new way. - if (URI_and_localNames != null) - { - final int len = URI_and_localNames.size() - 1; - if (len > 0) - { - final StringBuffer sb = new StringBuffer(); - for (int i = 0; i < len; i += 2) - { - // whitspace separated "{uri1}local1 {uri2}local2 ..." - if (i != 0) - sb.append(' '); - final String uri = (String) URI_and_localNames.elementAt(i); - final String localName = - (String) URI_and_localNames.elementAt(i + 1); - if (uri != null) - { - // If there is no URI don't put this in, just the localName then. - sb.append('{'); - sb.append(uri); - sb.append('}'); - } - sb.append(localName); - } - m_StringOfCDATASections = sb.toString(); - } - } - initCdataElems(m_StringOfCDATASections); - } - - /** - * 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 if attempt to write declaration failed - */ - protected String ensureAttributesNamespaceIsDeclared( - String ns, - String localName, - String rawName) - throws org.xml.sax.SAXException - { - - if (ns != null && ns.length() > 0) - { - - // extract the prefix in front of the raw name - int index = 0; - String prefixFromRawName = - (index = rawName.indexOf(":")) < 0 - ? "" - : rawName.substring(0, index); - - if (index > 0) - { - // we have a prefix, lets see if it maps to a namespace - String uri = m_prefixMap.lookupNamespace(prefixFromRawName); - if (uri != null && uri.equals(ns)) - { - // the prefix in the raw name is already maps to the given namespace uri - // so we don't need to do anything - return null; - } - else - { - // The uri does not map to the prefix in the raw name, - // so lets make the mapping. - this.startPrefixMapping(prefixFromRawName, ns, false); - this.addAttribute( - "http://www.w3.org/2000/xmlns/", - prefixFromRawName, - "xmlns:" + prefixFromRawName, - "CDATA", - ns, false); - return prefixFromRawName; - } - } - else - { - // we don't have a prefix in the raw name. - // Does the URI map to a prefix already? - String prefix = m_prefixMap.lookupPrefix(ns); - if (prefix == null) - { - // uri is not associated with a prefix, - // so lets generate a new prefix to use - prefix = m_prefixMap.generateNextPrefix(); - this.startPrefixMapping(prefix, ns, false); - this.addAttribute( - "http://www.w3.org/2000/xmlns/", - prefix, - "xmlns:" + prefix, - "CDATA", - ns, false); - } - - return prefix; - - } - } - return null; - } - - void ensurePrefixIsDeclared(String ns, String rawName) - throws org.xml.sax.SAXException - { - - if (ns != null && ns.length() > 0) - { - int index; - final boolean no_prefix = ((index = rawName.indexOf(":")) < 0); - String prefix = (no_prefix) ? "" : rawName.substring(0, index); - - if (null != prefix) - { - String foundURI = m_prefixMap.lookupNamespace(prefix); - - if ((null == foundURI) || !foundURI.equals(ns)) - { - this.startPrefixMapping(prefix, ns); - - // Bugzilla1133: Generate attribute as well as namespace event. - // SAX does expect both. - - this.addAttributeAlways( - "http://www.w3.org/2000/xmlns/", - no_prefix ? "xmlns" : prefix, // local name - no_prefix ? "xmlns" : ("xmlns:"+ prefix), // qname - "CDATA", - ns, - false); - } - - } - } - } - - /** - * This method flushes any pending events, which can be startDocument() - * closing the opening tag of an element, or closing an open CDATA section. - */ - public void flushPending() throws SAXException - { - if (m_needToCallStartDocument) - { - startDocumentInternal(); - m_needToCallStartDocument = false; - } - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - - if (m_cdataTagOpen) - { - closeCDATA(); - m_cdataTagOpen = false; - } - if (m_writer != null) { - try { - m_writer.flush(); - } - catch(IOException e) { - // what? me worry? - } - } - } - - public void setContentHandler(ContentHandler ch) - { - // this method is really only useful in the ToSAXHandler classes but it is - // in the interface. If the method defined here is ever called - // we are probably in trouble. - } - - /** - * Adds the given attribute to the set of attributes, even if there is - * no currently open element. This is useful if a SAX startPrefixMapping() - * should need to add an attribute before the element name is seen. - * - * This method is a copy of its super classes method, except that some - * tracing of events is done. This is so the tracing is only done for - * stream serializers, not for SAX ones. - * - * @param uri the URI of the attribute - * @param localName the local name of the attribute - * @param rawName the qualified name of the attribute - * @param type the type of the attribute (probably CDATA) - * @param value the value of the attribute - * @param xslAttribute true if this attribute is coming from an xsl:attribute element. - * @return true if the attribute value was added, - * false if the attribute already existed and the value was - * replaced with the new value. - */ - public boolean addAttributeAlways( - String uri, - String localName, - String rawName, - String type, - String value, - boolean xslAttribute) - { - boolean was_added; - int index; - if (uri == null || localName == null || uri.length() == 0) - index = m_attributes.getIndex(rawName); - else { - index = m_attributes.getIndex(uri, localName); - } - - if (index >= 0) - { - String old_value = null; - if (m_tracer != null) - { - old_value = m_attributes.getValue(index); - if (value.equals(old_value)) - old_value = null; - } - - /* We've seen the attribute before. - * We may have a null uri or localName, but all we really - * want to re-set is the value anyway. - */ - m_attributes.setValue(index, value); - was_added = false; - if (old_value != null) - firePseudoAttributes(); - - } - else - { - // the attribute doesn't exist yet, create it - if (xslAttribute) - { - /* - * This attribute is from an xsl:attribute element so we take some care in - * adding it, e.g. - * - * 2 - * - * - * We are adding attr1 and attr2 both as attributes of elem1, - * and this code is adding attr2 (the xsl:attribute ). - * We could have a collision with the prefix like in the example above. - */ - - // In the example above, is there a prefix like foo ? - final int colonIndex = rawName.indexOf(':'); - if (colonIndex > 0) - { - String prefix = rawName.substring(0,colonIndex); - NamespaceMappings.MappingRecord existing_mapping = m_prefixMap.getMappingFromPrefix(prefix); - - /* Before adding this attribute (foo:attr2), - * is the prefix for it (foo) already mapped at the current depth? - */ - if (existing_mapping != null - && existing_mapping.m_declarationDepth == m_elemContext.m_currentElemDepth - && !existing_mapping.m_uri.equals(uri)) - { - /* - * There is an existing mapping of this prefix, - * it differs from the one we need, - * and unfortunately it is at the current depth so we - * can not over-ride it. - */ - - /* - * Are we lucky enough that an existing other prefix maps to this URI ? - */ - prefix = m_prefixMap.lookupPrefix(uri); - if (prefix == null) - { - /* Unfortunately there is no existing prefix that happens to map to ours, - * so to avoid a prefix collision we must generated a new prefix to use. - * This is OK because the prefix URI mapping - * defined in the xsl:attribute is short in scope, - * just the xsl:attribute element itself, - * and at this point in serialization the body of the - * xsl:attribute, if any, is just a String. Right? - * . . . I sure hope so - Brian M. - */ - prefix = m_prefixMap.generateNextPrefix(); - } - - rawName = prefix + ':' + localName; - } - } - - try - { - /* This is our last chance to make sure the namespace for this - * attribute is declared, especially if we just generated an alternate - * prefix to avoid a collision (the new prefix/rawName will go out of scope - * soon and be lost ... last chance here. - */ - String prefixUsed = - ensureAttributesNamespaceIsDeclared( - uri, - localName, - rawName); - } - catch (SAXException e) - { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - m_attributes.addAttribute(uri, localName, rawName, type, value); - was_added = true; - if (m_tracer != null) - firePseudoAttributes(); - } - return was_added; - } - - /** - * To fire off the pseudo characters of attributes, as they currently - * exist. This method should be called everytime an attribute is added, - * or when an attribute value is changed, or an element is created. - */ - - protected void firePseudoAttributes() - { - if (m_tracer != null) - { - try - { - // flush out the " 0) - { - // make a writer that internally appends to the same - // StringBuffer - java.io.Writer writer = - new ToStream.WritertoStringBuffer(sb); - - processAttributes(writer, nAttrs); - // Don't clear the attributes! - // We only want to see what would be written out - // at this point, we don't want to loose them. - } - sb.append('>'); // the potential > after the attributes. - // convert the StringBuffer to a char array and - // emit the trace event that these characters "might" - // be written - char ch[] = sb.toString().toCharArray(); - m_tracer.fireGenerateEvent( - SerializerTrace.EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS, - ch, - 0, - ch.length); - } - catch (IOException ioe) - { - // ignore ? - } - catch (SAXException se) - { - // ignore ? - } - } - } - - /** - * This inner class is used only to collect attribute values - * written by the method writeAttrString() into a string buffer. - * In this manner trace events, and the real writing of attributes will use - * the same code. - */ - private static class WritertoStringBuffer extends java.io.Writer - { - final private StringBuffer m_stringbuf; - /** - * @see java.io.Writer#write(char[], int, int) - */ - WritertoStringBuffer(StringBuffer sb) - { - m_stringbuf = sb; - } - - public void write(char[] arg0, int arg1, int arg2) throws IOException - { - m_stringbuf.append(arg0, arg1, arg2); - } - /** - * @see java.io.Writer#flush() - */ - public void flush() throws IOException - { - } - /** - * @see java.io.Writer#close() - */ - public void close() throws IOException - { - } - - public void write(int i) - { - m_stringbuf.append((char) i); - } - - public void write(String s) - { - m_stringbuf.append(s); - } - } - - /** - * @see SerializationHandler#setTransformer(Transformer) - */ - public void setTransformer(Transformer transformer) { - super.setTransformer(transformer); - if (m_tracer != null - && !(m_writer instanceof SerializerTraceWriter) ) - setWriterInternal(new SerializerTraceWriter(m_writer, m_tracer), false); - - - } - /** - * Try's to reset the super class and reset this class for - * re-use, so that you don't need to create a new serializer - * (mostly for performance reasons). - * - * @return true if the class was successfuly reset. - */ - public boolean reset() - { - boolean wasReset = false; - if (super.reset()) - { - resetToStream(); - wasReset = true; - } - return wasReset; - } - - /** - * Reset all of the fields owned by ToStream class - * - */ - private void resetToStream() - { - this.m_cdataStartCalled = false; - /* The stream is being reset. It is one of - * ToXMLStream, ToHTMLStream ... and this type can't be changed - * so neither should m_charInfo which is associated with the - * type of Stream. Just leave m_charInfo as-is for the next re-use. - * - */ - // this.m_charInfo = null; // don't set to null - this.m_disableOutputEscapingStates.clear(); - // this.m_encodingInfo = null; // don't set to null - - this.m_escaping = true; - // Leave m_format alone for now - Brian M. - // this.m_format = null; - this.m_expandDTDEntities = true; - this.m_inDoctype = false; - this.m_ispreserve = false; - this.m_isprevtext = false; - this.m_isUTF8 = false; // ?? used anywhere ?? - this.m_lineSep = s_systemLineSep; - this.m_lineSepLen = s_systemLineSep.length; - this.m_lineSepUse = true; - // this.m_outputStream = null; // Don't reset it may be re-used - this.m_preserves.clear(); - this.m_shouldFlush = true; - this.m_spaceBeforeClose = false; - this.m_startNewLine = false; - this.m_writer_set_by_user = false; - } - - /** - * Sets the character encoding coming from the xsl:output encoding stylesheet attribute. - * @param encoding the character encoding - */ - public void setEncoding(String encoding) - { - setOutputProperty(OutputKeys.ENCODING,encoding); - } - - /** - * Simple stack for boolean values. - * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * A minor changes from that package are: - * doesn't implement Clonable - * - * @xsl.usage internal - */ - static final class BoolStack - { - - /** Array of boolean values */ - private boolean m_values[]; - - /** Array size allocated */ - private int m_allocatedSize; - - /** Index into the array of booleans */ - private int m_index; - - /** - * Default constructor. Note that the default - * block size is very small, for small lists. - */ - public BoolStack() - { - this(32); - } - - /** - * Construct a IntVector, using the given block size. - * - * @param size array size to allocate - */ - public BoolStack(int size) - { - - m_allocatedSize = size; - m_values = new boolean[size]; - m_index = -1; - } - - /** - * Get the length of the list. - * - * @return Current length of the list - */ - public final int size() - { - return m_index + 1; - } - - /** - * Clears the stack. - * - */ - public final void clear() - { - m_index = -1; - } - - /** - * Pushes an item onto the top of this stack. - * - * - * @param val the boolean to be pushed onto this stack. - * @return the item argument. - */ - public final boolean push(boolean val) - { - - if (m_index == m_allocatedSize - 1) - grow(); - - return (m_values[++m_index] = val); - } - - /** - * Removes the object at the top of this stack and returns that - * object as the value of this function. - * - * @return The object at the top of this stack. - * @throws EmptyStackException if this stack is empty. - */ - public final boolean pop() - { - return m_values[m_index--]; - } - - /** - * Removes the object at the top of this stack and returns the - * next object at the top as the value of this function. - * - * - * @return Next object to the top or false if none there - */ - public final boolean popAndTop() - { - - m_index--; - - return (m_index >= 0) ? m_values[m_index] : false; - } - - /** - * Set the item at the top of this stack - * - * - * @param b Object to set at the top of this stack - */ - public final void setTop(boolean b) - { - m_values[m_index] = b; - } - - /** - * Looks at the object at the top of this stack without removing it - * from the stack. - * - * @return the object at the top of this stack. - * @throws EmptyStackException if this stack is empty. - */ - public final boolean peek() - { - return m_values[m_index]; - } - - /** - * Looks at the object at the top of this stack without removing it - * from the stack. If the stack is empty, it returns false. - * - * @return the object at the top of this stack. - */ - public final boolean peekOrFalse() - { - return (m_index > -1) ? m_values[m_index] : false; - } - - /** - * Looks at the object at the top of this stack without removing it - * from the stack. If the stack is empty, it returns true. - * - * @return the object at the top of this stack. - */ - public final boolean peekOrTrue() - { - return (m_index > -1) ? m_values[m_index] : true; - } - - /** - * Tests if this stack is empty. - * - * @return true if this stack is empty; - * false otherwise. - */ - public boolean isEmpty() - { - return (m_index == -1); - } - - /** - * Grows the size of the stack - * - */ - private void grow() - { - - m_allocatedSize *= 2; - - boolean newVector[] = new boolean[m_allocatedSize]; - - System.arraycopy(m_values, 0, newVector, 0, m_index + 1); - - m_values = newVector; - } - } - - // Implement DTDHandler - /** - * If this method is called, the serializer is used as a - * DTDHandler, which changes behavior how the serializer - * handles document entities. - * @see org.xml.sax.DTDHandler#notationDecl(java.lang.String, java.lang.String, java.lang.String) - */ - public void notationDecl(String name, String pubID, String sysID) throws SAXException { - // TODO Auto-generated method stub - try { - DTDprolog(); - - m_writer.write(""); - m_writer.write(m_lineSep, 0, m_lineSepLen); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * If this method is called, the serializer is used as a - * DTDHandler, which changes behavior how the serializer - * handles document entities. - * @see org.xml.sax.DTDHandler#unparsedEntityDecl(java.lang.String, java.lang.String, java.lang.String, java.lang.String) - */ - public void unparsedEntityDecl(String name, String pubID, String sysID, String notationName) throws SAXException { - // TODO Auto-generated method stub - try { - DTDprolog(); - - m_writer.write(""); - m_writer.write(m_lineSep, 0, m_lineSepLen); - } catch (IOException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } - - /** - * 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; - if (m_needToOutputDocTypeDecl) - { - outputDocTypeDecl(m_elemContext.m_elementName, false); - m_needToOutputDocTypeDecl = false; - } - if (m_inDoctype) - { - writer.write(" ["); - writer.write(m_lineSep, 0, m_lineSepLen); - m_inDoctype = false; - } - } - - /** - * If set to false the serializer does not expand DTD entities, - * but leaves them as is, the default value is true; - */ - public void setDTDEntityExpansion(boolean expand) { - m_expandDTDEntities = expand; - } - - /** - * Sets the end of line characters to be used during serialization - * @param eolChars A character array corresponding to the characters to be used. - */ - public void setNewLine (char[] eolChars) { - m_lineSep = eolChars; - m_lineSepLen = eolChars.length; - } - - /** - * Remembers the cdata sections specified in the cdata-section-elements by appending the given - * cdata section elements to the list. This method can be called multiple times, but once an - * element is put in the list of cdata section elements it can not be removed. - * This method should be used by both Xalan and XSLTC. - * - * @param URI_and_localNames a whitespace separated list of element names, each element - * is a URI in curly braces (optional) and a local name. An example of such a parameter is: - * "{http://company.com}price {myURI2}book chapter" - */ - public void addCdataSectionElements(String URI_and_localNames) - { - if (URI_and_localNames != null) - initCdataElems(URI_and_localNames); - if (m_StringOfCDATASections == null) - m_StringOfCDATASections = URI_and_localNames; - else - m_StringOfCDATASections += (" " + URI_and_localNames); - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ToTextSAXHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ToTextSAXHandler.java deleted file mode 100644 index c203eb8ad..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ToTextSAXHandler.java +++ /dev/null @@ -1,411 +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; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; -import java.util.Properties; - -import org.w3c.dom.Node; -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.ext.LexicalHandler; - -/** - * This class converts SAX-like event to SAX events for - * xsl:output method "text". - * - * This class is only to be used internally. This class is not a public API. - * - * @deprecated As of Xalan 2.7.1, replaced by the use of {@link ToXMLSAXHandler}. - * - * @xsl.usage internal - */ -public final class ToTextSAXHandler extends ToSAXHandler -{ - /** - * From XSLTC - * @see ExtendedContentHandler#endElement(String) - */ - public void endElement(String elemName) throws SAXException - { - if (m_tracer != null) - super.fireEndElem(elemName); - } - - /** - * @see org.xml.sax.ContentHandler#endElement(String, String, String) - */ - public void endElement(String arg0, String arg1, String arg2) - throws SAXException - { - if (m_tracer != null) - super.fireEndElem(arg2); - } - - public ToTextSAXHandler(ContentHandler hdlr, LexicalHandler lex, String encoding) - { - super(hdlr, lex, encoding); - } - - // This constructor supports XSLTC - public ToTextSAXHandler(ContentHandler handler, String encoding) - { - super(handler,encoding); - } - - public void comment(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - if (m_tracer != null) - super.fireCommentEvent(ch, start, length); - } - - public void comment(String data) throws org.xml.sax.SAXException - { - final int length = data.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length*2 + 1]; - } - data.getChars(0, length, m_charsBuff, 0); - comment(m_charsBuff, 0, length); - } - - /** - * @see Serializer#getOutputFormat() - */ - public Properties getOutputFormat() - { - return null; - } - - /** - * @see Serializer#getOutputStream() - */ - public OutputStream getOutputStream() - { - return null; - } - - /** - * @see Serializer#getWriter() - */ - public Writer getWriter() - { - return null; - } - - /** - * 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 - { - } - - /** - * @see Serializer#reset() - */ - public boolean reset() - { - return false; - } - - /** - * @see DOMSerializer#serialize(Node) - */ - public void serialize(Node node) throws IOException - { - } - - /** - * @see SerializationHandler#setEscaping(boolean) - */ - public boolean setEscaping(boolean escape) - { - return false; - } - - /** - * @see SerializationHandler#setIndent(boolean) - */ - public void setIndent(boolean indent) - { - } - - /** - * @see Serializer#setOutputFormat(Properties) - */ - public void setOutputFormat(Properties format) - { - } - - /** - * @see Serializer#setOutputStream(OutputStream) - */ - public void setOutputStream(OutputStream output) - { - } - - /** - * @see Serializer#setWriter(Writer) - */ - public void setWriter(Writer writer) - { - } - - /** - * @see ExtendedContentHandler#addAttribute(String, String, String, String, String) - */ - public void addAttribute( - String uri, - String localName, - String rawName, - String type, - String value, - boolean XSLAttribute) - { - } - - /** - * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String, String, String) - */ - public void attributeDecl( - String arg0, - String arg1, - String arg2, - String arg3, - String arg4) - throws SAXException - { - } - - /** - * @see org.xml.sax.ext.DeclHandler#elementDecl(String, String) - */ - public void elementDecl(String arg0, String arg1) throws SAXException - { - } - - /** - * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String) - */ - public void externalEntityDecl(String arg0, String arg1, String arg2) - throws SAXException - { - } - - /** - * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(String, String) - */ - public void internalEntityDecl(String arg0, String arg1) - throws SAXException - { - } - - /** - * @see org.xml.sax.ContentHandler#endPrefixMapping(String) - */ - public void endPrefixMapping(String arg0) throws SAXException - { - } - - /** - * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int) - */ - public void ignorableWhitespace(char[] arg0, int arg1, int arg2) - throws SAXException - { - } - - /** - * From XSLTC - * @see org.xml.sax.ContentHandler#processingInstruction(String, String) - */ - public void processingInstruction(String arg0, String arg1) - throws SAXException - { - if (m_tracer != null) - super.fireEscapingEvent(arg0, arg1); - } - - /** - * @see org.xml.sax.ContentHandler#setDocumentLocator(Locator) - */ - public void setDocumentLocator(Locator arg0) - { - } - - /** - * @see org.xml.sax.ContentHandler#skippedEntity(String) - */ - public void skippedEntity(String arg0) throws SAXException - { - } - - /** - * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes) - */ - public void startElement( - String arg0, - String arg1, - String arg2, - Attributes arg3) - throws SAXException - { - flushPending(); - super.startElement(arg0, arg1, arg2, arg3); - } - - /** - * @see org.xml.sax.ext.LexicalHandler#endCDATA() - */ - public void endCDATA() throws SAXException - { - } - - /** - * @see org.xml.sax.ext.LexicalHandler#endDTD() - */ - public void endDTD() throws SAXException - { - } - - /** - * @see org.xml.sax.ext.LexicalHandler#startCDATA() - */ - public void startCDATA() throws SAXException - { - } - - - /** - * @see org.xml.sax.ext.LexicalHandler#startEntity(String) - */ - public void startEntity(String arg0) throws SAXException - { - } - - - /** - * From XSLTC - * @see ExtendedContentHandler#startElement(String) - */ - public void startElement( - String elementNamespaceURI, - String elementLocalName, - String elementName) throws SAXException - { - super.startElement(elementNamespaceURI, elementLocalName, elementName); - } - - public void startElement( - String elementName) throws SAXException - { - super.startElement(elementName); - } - - - /** - * From XSLTC - * @see org.xml.sax.ContentHandler#endDocument() - */ - public void endDocument() throws SAXException { - - flushPending(); - m_saxHandler.endDocument(); - - if (m_tracer != null) - super.fireEndDoc(); - } - - /** - * - * @see ExtendedContentHandler#characters(String) - */ - public void characters(String characters) - throws SAXException - { - final int length = characters.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length*2 + 1]; - } - characters.getChars(0, length, m_charsBuff, 0); - - m_saxHandler.characters(m_charsBuff, 0, length); - - } - /** - * @see org.xml.sax.ContentHandler#characters(char[], int, int) - */ - public void characters(char[] characters, int offset, int length) - throws SAXException - { - - m_saxHandler.characters(characters, offset, length); - - // time to fire off characters event - if (m_tracer != null) - super.fireCharEvent(characters, offset, length); - } - - /** - * From XSLTC - */ - public void addAttribute(String name, String value) - { - // do nothing - } - - - public boolean startPrefixMapping( - String prefix, - String uri, - boolean shouldFlush) - throws SAXException - { - // no namespace support for HTML - return false; - } - - - public void startPrefixMapping(String prefix, String uri) - throws org.xml.sax.SAXException - { - // no namespace support for HTML - } - - - public void namespaceAfterStartElement( - final String prefix, - final String uri) - throws SAXException - { - // no namespace support for HTML - } - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ToTextStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToTextStream.java deleted file mode 100644 index c64dbebd0..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ToTextStream.java +++ /dev/null @@ -1,623 +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; - -import java.io.IOException; - -import org.apache.xml.serializer.utils.MsgKey; -import org.apache.xml.serializer.utils.Utils; -import org.xml.sax.Attributes; -import org.xml.sax.SAXException; - -/** - * This class is not a public API. - * It is only public because it is used in other packages. - * This class converts SAX or SAX-like calls to a - * serialized document for xsl:output method of "text". - * @xsl.usage internal - */ -public class ToTextStream extends ToStream -{ - - - /** - * Default constructor. - */ - public ToTextStream() - { - super(); - } - - - - /** - * Receive notification of the beginning of a document. - * - *

The SAX parser will invoke this method only once, before any - * other methods in this interface or in DTDHandler (except for - * setDocumentLocator).

- * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - protected void startDocumentInternal() throws org.xml.sax.SAXException - { - super.startDocumentInternal(); - - m_needToCallStartDocument = false; - - // No action for the moment. - } - - /** - * Receive notification of the end of a document. - * - *

The SAX parser will invoke this method only once, and it will - * be the last method invoked during the parse. The parser shall - * not invoke this method until it has either abandoned parsing - * (because of an unrecoverable error) or reached the end of - * input.

- * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void endDocument() throws org.xml.sax.SAXException - { - flushPending(); - flushWriter(); - if (m_tracer != null) - super.fireEndDoc(); - } - - /** - * Receive notification of the beginning of an element. - * - *

The Parser will invoke this method at the beginning of every - * element in the XML document; there will be a corresponding - * endElement() event for every startElement() event (even when the - * element is empty). All of the element's content will be - * reported, in order, before the corresponding endElement() - * event.

- * - *

If the element name has a namespace prefix, the prefix will - * still be attached. Note that the attribute list provided will - * contain only attributes with explicit values (specified or - * defaulted): #IMPLIED attributes will be omitted.

- * - * - * @param namespaceURI The Namespace URI, or the empty string if the - * element has no Namespace URI or if Namespace - * processing is not being performed. - * @param localName The local name (without prefix), or the - * empty string if Namespace processing is not being - * performed. - * @param name The qualified name (with prefix), or the - * empty string if qualified names are not available. - * @param atts The attributes attached to the element, if any. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #endElement - * @see org.xml.sax.AttributeList - */ - public void startElement( - String namespaceURI, String localName, String name, Attributes atts) - throws org.xml.sax.SAXException - { - // time to fire off startElement event - if (m_tracer != null) { - super.fireStartElem(name); - this.firePseudoAttributes(); - } - return; - } - - /** - * Receive notification of the end of an element. - * - *

The SAX parser will invoke this method at the end of every - * element in the XML document; there will be a corresponding - * startElement() event for every endElement() event (even when the - * element is empty).

- * - *

If the element name has a namespace prefix, the prefix will - * still be attached to the name.

- * - * - * @param namespaceURI The Namespace URI, or the empty string if the - * element has no Namespace URI or if Namespace - * processing is not being performed. - * @param localName The local name (without prefix), or the - * empty string if Namespace processing is not being - * performed. - * @param name The qualified name (with prefix), or the - * empty string if qualified names are not available. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void endElement(String namespaceURI, String localName, String name) - throws org.xml.sax.SAXException - { - if (m_tracer != null) - super.fireEndElem(name); - } - - /** - * Receive notification of character data. - * - *

The Parser will call this method to report each chunk of - * character data. SAX parsers may return all contiguous character - * data in a single chunk, or they may split it into several - * chunks; however, all of the characters in any single event - * must come from the same external entity, so that the Locator - * provides useful information.

- * - *

The application must not attempt to read from the array - * outside of the specified range.

- * - *

Note that some parsers will report whitespace using the - * ignorableWhitespace() method rather than this one (validating - * parsers must do so).

- * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #ignorableWhitespace - * @see org.xml.sax.Locator - */ - public void characters(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - - flushPending(); - - try - { - if (inTemporaryOutputState()) { - /* leave characters un-processed as we are - * creating temporary output, the output generated by - * this serializer will be input to a final serializer - * later on and it will do the processing in final - * output state (not temporary output state). - * - * A "temporary" ToTextStream serializer is used to - * evaluate attribute value templates (for example), - * and the result of evaluating such a thing - * is fed into a final serializer later on. - */ - m_writer.write(ch, start, length); - } - else { - // In final output state we do process the characters! - writeNormalizedChars(ch, start, length, m_lineSepUse); - } - - if (m_tracer != null) - super.fireCharEvent(ch, start, length); - } - catch(IOException ioe) - { - throw new SAXException(ioe); - } - } - - /** - * If available, when the disable-output-escaping attribute is used, - * output raw text without escaping. - * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void charactersRaw(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - - try - { - writeNormalizedChars(ch, start, length, m_lineSepUse); - } - catch(IOException ioe) - { - throw new SAXException(ioe); - } - } - - /** - * Normalize the characters, but don't escape. Different from - * SerializerToXML#writeNormalizedChars because it does not attempt to do - * XML escaping at all. - * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @param useLineSep true if the operating systems - * end-of-line separator should be output rather than a new-line character. - * - * @throws IOException if the write fails - * @throws org.xml.sax.SAXException if processing fails in the handler layer - */ - void writeNormalizedChars( - final char ch[], - final int start, - final int length, - final boolean useLineSep) - throws IOException, org.xml.sax.SAXException - { - final String encoding = getEncoding(); - final java.io.Writer writer = m_writer; - final int end = start + length; - - /* copy a few "constants" before the loop for performance */ - final char S_LINEFEED = CharInfo.S_LINEFEED; - - // This for() loop always increments i by one at the end - // of the loop. Additional increments of i adjust for when - // two input characters (a high/low UTF16 surrogate pair) - // are processed. - for (int i = start; i < end; i++) { - final char c = ch[i]; - - if (S_LINEFEED == c && useLineSep) { - writer.write(m_lineSep, 0, m_lineSepLen); - // one input char processed - } else if (m_encodingInfo.isInEncoding(c)) { - writer.write(c); - // one input char processed - } else if (Encodings.isHighUTF16Surrogate(c)) { - final int codePoint = writeUTF16Surrogate(c, ch, i, end); - if (codePoint != 0) { - // I think we can just emit the message, - // not crash and burn. - // Git commit ffb244aaa0f88368a0bf483bddc7e74d8a4d83bf? - final String integralValue = Integer.toString(codePoint); - final String msg = Utils.messages.createMessage( - MsgKey.ER_ILLEGAL_CHARACTER, - new Object[] { integralValue, encoding }); - - //Older behavior was to throw the message, - //but newer gentler behavior is to write a message to System.err - //throw new SAXException(msg); - System.err.println(msg); - - } - i++; // two input chars processed - } else { - // Don't know what to do with this char, it is - // not in the encoding and not a high char in - // a surrogate pair, so write out as numeric char ref - if (encoding != null) { - /* The output encoding is known, - * so somthing is wrong. - */ - - // not in the encoding, so write out a character reference - writer.write('&'); - writer.write('#'); - writer.write(Integer.toString(c)); - writer.write(';'); - - // I think we can just emit the message, - // not crash and burn. - final String integralValue = Integer.toString(c); - final String msg = Utils.messages.createMessage( - MsgKey.ER_ILLEGAL_CHARACTER, - new Object[] { integralValue, encoding }); - - //Older behavior was to throw the message, - //but newer gentler behavior is to write a message to System.err - //throw new SAXException(msg); - System.err.println(msg); - } else { - /* The output encoding is not known, - * so just write it out as-is. - */ - writer.write(c); - } - - // one input char was processed - } - } - } - - /** - * Receive notification of cdata. - * - *

The Parser will call this method to report each chunk of - * character data. SAX parsers may return all contiguous character - * data in a single chunk, or they may split it into several - * chunks; however, all of the characters in any single event - * must come from the same external entity, so that the Locator - * provides useful information.

- * - *

The application must not attempt to read from the array - * outside of the specified range.

- * - *

Note that some parsers will report whitespace using the - * ignorableWhitespace() method rather than this one (validating - * parsers must do so).

- * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #ignorableWhitespace - * @see org.xml.sax.Locator - */ - public void cdata(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - try - { - writeNormalizedChars(ch, start, length, m_lineSepUse); - if (m_tracer != null) - super.fireCDATAEvent(ch, start, length); - } - catch(IOException ioe) - { - throw new SAXException(ioe); - } - } - - /** - * Receive notification of ignorable whitespace in element content. - * - *

Validating Parsers must use this method to report each chunk - * of ignorable whitespace (see the W3C XML 1.0 recommendation, - * section 2.10): non-validating parsers may also use this method - * if they are capable of parsing and using content models.

- * - *

SAX parsers may return all contiguous whitespace in a single - * chunk, or they may split it into several chunks; however, all of - * the characters in any single event must come from the same - * external entity, so that the Locator provides useful - * information.

- * - *

The application must not attempt to read from the array - * outside of the specified range.

- * - * @param ch The characters from the XML document. - * @param start The start position in the array. - * @param length The number of characters to read from the array. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - * @see #characters - */ - public void ignorableWhitespace(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - - try - { - writeNormalizedChars(ch, start, length, m_lineSepUse); - } - catch(IOException ioe) - { - throw new SAXException(ioe); - } - } - - /** - * Receive notification of a processing instruction. - * - *

The Parser will invoke this method once for each processing - * instruction found: note that processing instructions may occur - * before or after the main document element.

- * - *

A SAX parser should never report an XML declaration (XML 1.0, - * section 2.8) or a text declaration (XML 1.0, section 4.3.1) - * using this method.

- * - * @param target The processing instruction target. - * @param data The processing instruction data, or null if - * none was supplied. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void processingInstruction(String target, String data) - throws org.xml.sax.SAXException - { - // flush anything pending first - flushPending(); - - if (m_tracer != null) - super.fireEscapingEvent(target, data); - } - - /** - * Called when a Comment is to be constructed. - * Note that Xalan will normally invoke the other version of this method. - * %REVIEW% In fact, is this one ever needed, or was it a mistake? - * - * @param data The comment data. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void comment(String data) throws org.xml.sax.SAXException - { - final int length = data.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length*2 + 1]; - } - data.getChars(0, length, m_charsBuff, 0); - comment(m_charsBuff, 0, length); - } - - /** - * Report an XML comment anywhere in the document. - * - * This callback will be used for comments inside or outside the - * document element, including comments in the external DTD - * subset (if read). - * - * @param ch An array holding the characters in the comment. - * @param start The starting position in the array. - * @param length The number of characters to use from the array. - * @throws org.xml.sax.SAXException The application may raise an exception. - */ - public void comment(char ch[], int start, int length) - throws org.xml.sax.SAXException - { - - flushPending(); - if (m_tracer != null) - super.fireCommentEvent(ch, start, length); - } - - /** - * Receive notivication of a entityReference. - * - * @param name non-null reference to the name of the entity. - * - * @throws org.xml.sax.SAXException if processing fails in the handler layer - */ - public void entityReference(String name) throws org.xml.sax.SAXException - { - if (m_tracer != null) - super.fireEntityReference(name); - } - - /** - * @see ExtendedContentHandler#addAttribute(String, String, String, String, String) - */ - public void addAttribute( - String uri, - String localName, - String rawName, - String type, - String value, - boolean XSLAttribute) - { - // do nothing, just forget all about the attribute - } - - /** - * @see org.xml.sax.ext.LexicalHandler#endCDATA() - */ - public void endCDATA() throws SAXException - { - // do nothing - } - - /** - * @see ExtendedContentHandler#endElement(String) - */ - public void endElement(String elemName) throws SAXException - { - if (m_tracer != null) - super.fireEndElem(elemName); - } - - /** - * From XSLTC - */ - public void startElement( - String elementNamespaceURI, - String elementLocalName, - String elementName) - throws SAXException - { - if (m_needToCallStartDocument) - startDocumentInternal(); - // time to fire off startlement event. - if (m_tracer != null) { - super.fireStartElem(elementName); - this.firePseudoAttributes(); - } - - return; - } - - - /** - * From XSLTC - */ - public void characters(String characters) - throws SAXException - { - final int length = characters.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length*2 + 1]; - } - characters.getChars(0, length, m_charsBuff, 0); - characters(m_charsBuff, 0, length); - } - - - /** - * From XSLTC - */ - public void addAttribute(String name, String value) - { - // do nothing, forget about the attribute - } - - /** - * Add a unique attribute - */ - public void addUniqueAttribute(String qName, String value, int flags) - throws SAXException - { - // do nothing, forget about the attribute - } - - public boolean startPrefixMapping( - String prefix, - String uri, - boolean shouldFlush) - throws SAXException - { - // no namespace support for HTML - return false; - } - - - public void startPrefixMapping(String prefix, String uri) - throws org.xml.sax.SAXException - { - // no namespace support for HTML - } - - - public void namespaceAfterStartElement( - final String prefix, - final String uri) - throws SAXException - { - // no namespace support for HTML - } - - public void flushPending() throws org.xml.sax.SAXException - { - if (m_needToCallStartDocument) - { - startDocumentInternal(); - m_needToCallStartDocument = false; - } - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ToUnknownStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToUnknownStream.java deleted file mode 100644 index b4777772a..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ToUnknownStream.java +++ /dev/null @@ -1,1316 +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; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; -import java.util.Properties; -import java.util.Vector; - -import javax.xml.transform.SourceLocator; -import javax.xml.transform.Transformer; - -import org.w3c.dom.Node; -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; - - -/** - * 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 - * handler, otherwise it is an XML handler. - * - * This class effectively caches the first few calls to it then passes them - * on to the wrapped handler (once it exists). After that subsequent calls a - * simply passed directly to the wrapped handler. - * - * The user of this class doesn't know if the output is ultimatley XML or HTML. - * - * This class is not a public API, it is public because it is used within Xalan. - * @xsl.usage internal - */ -public final class ToUnknownStream extends SerializerBase -{ - - /** - * The wrapped handler, initially XML but possibly switched to HTML - */ - private SerializationHandler m_handler; - - /** - * A String with no characters - */ - private static final String EMPTYSTRING = ""; - - /** - * true if the underlying handler (XML or HTML) is fully initialized - */ - private boolean m_wrapped_handler_not_initialized = false; - - - /** - * the prefix of the very first tag in the document - */ - private String m_firstElementPrefix; - /** - * the element name (including any prefix) of the very first tag in the document - */ - private String m_firstElementName; - - /** - * the namespace URI associated with the first element - */ - private String m_firstElementURI; - - /** - * the local name (no prefix) associated with the first element - */ - private String m_firstElementLocalName = null; - - /** - * true if the first tag has been emitted to the wrapped handler - */ - private boolean m_firstTagNotEmitted = true; - - /** - * A collection of namespace URI's (only for first element). - * _namespacePrefix has the matching prefix for these URI's - */ - private Vector m_namespaceURI = null; - /** - * A collection of namespace Prefix (only for first element) - * _namespaceURI has the matching URIs for these prefix' - */ - private Vector m_namespacePrefix = null; - - /** - * true if startDocument() was called before the underlying handler - * was initialized - */ - private boolean m_needToCallStartDocument = false; - /** - * true if setVersion() was called before the underlying handler - * was initialized - */ - private boolean m_setVersion_called = false; - /** - * true if setDoctypeSystem() was called before the underlying handler - * was initialized - */ - private boolean m_setDoctypeSystem_called = false; - /** - * true if setDoctypePublic() was called before the underlying handler - * was initialized - */ - private boolean m_setDoctypePublic_called = false; - /** - * true if setMediaType() was called before the underlying handler - * was initialized - */ - private boolean m_setMediaType_called = false; - - /** - * Default constructor. - * Initially this object wraps an XML Stream object, so _handler is never null. - * That may change later to an HTML Stream object. - */ - public ToUnknownStream() - { - m_handler = new ToXMLStream(); - } - - /** - * @see Serializer#asContentHandler() - * @return the wrapped XML or HTML handler - */ - public ContentHandler asContentHandler() throws IOException - { - /* don't return the real handler ( m_handler ) because - * that would expose the real handler to the outside. - * Keep m_handler private so it can be internally swapped - * to an HTML handler. - */ - return this; - } - - /** - * @see SerializationHandler#close() - */ - public void close() - { - m_handler.close(); - } - - /** - * @see Serializer#getOutputFormat() - * @return the properties of the underlying handler - */ - public Properties getOutputFormat() - { - return m_handler.getOutputFormat(); - } - - /** - * @see Serializer#getOutputStream() - * @return the OutputStream of the underlying XML or HTML handler - */ - public OutputStream getOutputStream() - { - return m_handler.getOutputStream(); - } - - /** - * @see Serializer#getWriter() - * @return the Writer of the underlying XML or HTML handler - */ - public Writer getWriter() - { - return m_handler.getWriter(); - } - - /** - * passes the call on to the underlying HTML or XML handler - * @see Serializer#reset() - * @return ??? - */ - public boolean reset() - { - return m_handler.reset(); - } - - /** - * Converts the DOM node to output - * @param node the DOM node to transform to output - * @see DOMSerializer#serialize(Node) - * - */ - public void serialize(Node node) throws IOException - { - if (m_firstTagNotEmitted) - { - flush(); - } - m_handler.serialize(node); - } - - /** - * @see SerializationHandler#setEscaping(boolean) - */ - public boolean setEscaping(boolean escape) throws SAXException - { - return m_handler.setEscaping(escape); - } - - /** - * Set the properties of the handler - * @param format the output properties to set - * @see Serializer#setOutputFormat(Properties) - */ - public void setOutputFormat(Properties format) - { - m_handler.setOutputFormat(format); - } - - /** - * Sets the output stream to write to - * @param output the OutputStream to write to - * @see Serializer#setOutputStream(OutputStream) - */ - public void setOutputStream(OutputStream output) - { - m_handler.setOutputStream(output); - } - - /** - * Sets the writer to write to - * @param writer the writer to write to - * @see Serializer#setWriter(Writer) - */ - public void setWriter(Writer writer) - { - m_handler.setWriter(writer); - } - - /** - * Adds an attribute to the currenly open tag - * @param uri the URI of a namespace - * @param localName the attribute name, without prefix - * @param rawName the attribute name, with prefix (if any) - * @param type the type of the attribute, typically "CDATA" - * @param value the value of the parameter - * @param XSLAttribute true if this attribute is coming from an xsl:attribute element - * @see ExtendedContentHandler#addAttribute(String, String, String, String, String) - */ - public void addAttribute( - String uri, - String localName, - String rawName, - String type, - String value, - boolean XSLAttribute) - throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - m_handler.addAttribute(uri, localName, rawName, type, value, XSLAttribute); - } - /** - * Adds an attribute to the currenly open tag - * @param rawName the attribute name, with prefix (if any) - * @param value the value of the parameter - * @see ExtendedContentHandler#addAttribute(String, String) - */ - public void addAttribute(String rawName, String value) - { - if (m_firstTagNotEmitted) - { - flush(); - } - m_handler.addAttribute(rawName, value); - - } - - /** - * Adds a unique attribute to the currenly open tag - */ - public void addUniqueAttribute(String rawName, String value, int flags) - throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - m_handler.addUniqueAttribute(rawName, value, flags); - - } - - /** - * Converts the String to a character array and calls the SAX method - * characters(char[],int,int); - * - * @see ExtendedContentHandler#characters(String) - */ - public void characters(String chars) throws SAXException - { - final int length = chars.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length*2 + 1]; - } - chars.getChars(0, length, m_charsBuff, 0); - this.characters(m_charsBuff, 0, length); - } - - /** - * Pass the call on to the underlying handler - * @see ExtendedContentHandler#endElement(String) - */ - public void endElement(String elementName) throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - m_handler.endElement(elementName); - } - - - /** - * @see org.xml.sax.ContentHandler#startPrefixMapping(String, String) - * @param prefix The prefix that maps to the URI - * @param uri The URI for the namespace - */ - public void startPrefixMapping(String prefix, String uri) throws SAXException - { - this.startPrefixMapping(prefix,uri, true); - } - - /** - * This method is used when a prefix/uri namespace mapping - * is indicated after the element was started with a - * startElement() and before and endElement(). - * startPrefixMapping(prefix,uri) would be used before the - * startElement() call. - * @param uri the URI of the namespace - * @param prefix the prefix associated with the given URI. - * - * @see ExtendedContentHandler#namespaceAfterStartElement(String, String) - */ - public void namespaceAfterStartElement(String prefix, String uri) - throws SAXException - { - // hack for XSLTC with finding URI for default namespace - if (m_firstTagNotEmitted && m_firstElementURI == null && m_firstElementName != null) - { - String prefix1 = getPrefixPart(m_firstElementName); - if (prefix1 == null && EMPTYSTRING.equals(prefix)) - { - // the elements URI is not known yet, and it - // doesn't have a prefix, and we are currently - // setting the uri for prefix "", so we have - // the uri for the element... lets remember it - m_firstElementURI = uri; - } - } - startPrefixMapping(prefix,uri, false); - } - - public boolean startPrefixMapping(String prefix, String uri, boolean shouldFlush) - throws SAXException - { - boolean pushed = false; - if (m_firstTagNotEmitted) - { - if (m_firstElementName != null && shouldFlush) - { - /* we've already seen a startElement, and this is a prefix mapping - * for the up coming element, so flush the old element - * then send this event on its way. - */ - flush(); - pushed = m_handler.startPrefixMapping(prefix, uri, shouldFlush); - } - else - { - if (m_namespacePrefix == null) - { - m_namespacePrefix = new Vector(); - m_namespaceURI = new Vector(); - } - m_namespacePrefix.addElement(prefix); - m_namespaceURI.addElement(uri); - - if (m_firstElementURI == null) - { - if (prefix.equals(m_firstElementPrefix)) - m_firstElementURI = uri; - } - } - - } - else - { - pushed = m_handler.startPrefixMapping(prefix, uri, shouldFlush); - } - return pushed; - } - - /** - * This method cannot be cached because default is different in - * HTML and XML (we need more than a boolean). - */ - - public void setVersion(String version) - { - m_handler.setVersion(version); - - // Cache call to setVersion() - // super.setVersion(version); - m_setVersion_called = true; - } - - /** - * @see org.xml.sax.ContentHandler#startDocument() - */ - public void startDocument() throws SAXException - { - m_needToCallStartDocument = true; - } - - - - public void startElement(String qName) throws SAXException - { - this.startElement(null, null, qName, null); - } - - public void startElement(String namespaceURI, String localName, String qName) throws SAXException - { - this.startElement(namespaceURI, localName, qName, null); - } - - public void startElement( - String namespaceURI, - String localName, - String elementName, - Attributes atts) throws SAXException - { - /* we are notified of the start of an element */ - if (m_firstTagNotEmitted) - { - /* we have not yet sent the first element on its way */ - if (m_firstElementName != null) - { - /* this is not the first element, but a later one. - * But we have the old element pending, so flush it out, - * then send this one on its way. - */ - flush(); - m_handler.startElement(namespaceURI, localName, elementName, atts); - } - else - { - /* this is the very first element that we have seen, - * so save it for flushing later. We may yet get to know its - * URI due to added attributes. - */ - - m_wrapped_handler_not_initialized = true; - m_firstElementName = elementName; - - // null if not known - m_firstElementPrefix = getPrefixPartUnknown(elementName); - - // null if not known - m_firstElementURI = namespaceURI; - - // null if not known - m_firstElementLocalName = localName; - - if (m_tracer != null) - firePseudoElement(elementName); - - /* we don't want to call our own addAttributes, which - * merely delegates to the wrapped handler, but we want to - * add these attributes to m_attributes. So me must call super. - * addAttributes() In this case m_attributes is only used for the - * first element, after that this class totally delegates to the - * wrapped handler which is either XML or HTML. - */ - if (atts != null) - super.addAttributes(atts); - - // if there are attributes, then lets make the flush() - // call the startElement on the handler and send the - // attributes on their way. - if (atts != null) - flush(); - - } - } - else - { - // this is not the first element, but a later one, so just - // send it on its way. - m_handler.startElement(namespaceURI, localName, elementName, atts); - } - } - - /** - * Pass the call on to the underlying handler - * @see ExtendedLexicalHandler#comment(String) - */ - public void comment(String comment) throws SAXException - { - if (m_firstTagNotEmitted && m_firstElementName != null) - { - emitFirstTag(); - } - else if (m_needToCallStartDocument) - { - m_handler.startDocument(); - m_needToCallStartDocument = false; - } - - m_handler.comment(comment); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#getDoctypePublic() - */ - public String getDoctypePublic() - { - - return m_handler.getDoctypePublic(); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#getDoctypeSystem() - */ - public String getDoctypeSystem() - { - return m_handler.getDoctypeSystem(); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#getEncoding() - */ - public String getEncoding() - { - return m_handler.getEncoding(); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#getIndent() - */ - public boolean getIndent() - { - return m_handler.getIndent(); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#getIndentAmount() - */ - public int getIndentAmount() - { - return m_handler.getIndentAmount(); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#getMediaType() - */ - public String getMediaType() - { - return m_handler.getMediaType(); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#getOmitXMLDeclaration() - */ - public boolean getOmitXMLDeclaration() - { - return m_handler.getOmitXMLDeclaration(); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#getStandalone() - */ - public String getStandalone() - { - return m_handler.getStandalone(); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#getVersion() - */ - public String getVersion() - { - return m_handler.getVersion(); - } - - /** - * @see XSLOutputAttributes#setDoctype(String, String) - */ - public void setDoctype(String system, String pub) - { - m_handler.setDoctypePublic(pub); - m_handler.setDoctypeSystem(system); - } - - /** - * Set the doctype in the underlying XML handler. Remember that this method - * was called, just in case we need to transfer this doctype to an HTML handler - * @param doctype the public doctype to set - * @see XSLOutputAttributes#setDoctypePublic(String) - */ - public void setDoctypePublic(String doctype) - { - m_handler.setDoctypePublic(doctype); - m_setDoctypePublic_called = true; - } - - /** - * Set the doctype in the underlying XML handler. Remember that this method - * was called, just in case we need to transfer this doctype to an HTML handler - * @param doctype the system doctype to set - * @see XSLOutputAttributes#setDoctypeSystem(String) - */ - public void setDoctypeSystem(String doctype) - { - m_handler.setDoctypeSystem(doctype); - m_setDoctypeSystem_called = true; - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#setEncoding(String) - */ - public void setEncoding(String encoding) - { - m_handler.setEncoding(encoding); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#setIndent(boolean) - */ - public void setIndent(boolean indent) - { - m_handler.setIndent(indent); - } - - /** - * Pass the call on to the underlying handler - */ - public void setIndentAmount(int value) - { - m_handler.setIndentAmount(value); - } - - /** - * @see XSLOutputAttributes#setMediaType(String) - */ - public void setMediaType(String mediaType) - { - m_handler.setMediaType(mediaType); - m_setMediaType_called = true; - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#setOmitXMLDeclaration(boolean) - */ - public void setOmitXMLDeclaration(boolean b) - { - m_handler.setOmitXMLDeclaration(b); - } - - /** - * Pass the call on to the underlying handler - * @see XSLOutputAttributes#setStandalone(String) - */ - public void setStandalone(String standalone) - { - m_handler.setStandalone(standalone); - } - - /** - * @see XSLOutputAttributes#setVersion(String) - */ - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String, String, String) - */ - public void attributeDecl( - String arg0, - String arg1, - String arg2, - String arg3, - String arg4) - throws SAXException - { - m_handler.attributeDecl(arg0, arg1, arg2, arg3, arg4); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.DeclHandler#elementDecl(String, String) - */ - public void elementDecl(String arg0, String arg1) throws SAXException - { - if (m_firstTagNotEmitted) - { - emitFirstTag(); - } - m_handler.elementDecl(arg0, arg1); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String) - */ - public void externalEntityDecl( - String name, - String publicId, - String systemId) - throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - m_handler.externalEntityDecl(name, publicId, systemId); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(String, String) - */ - public void internalEntityDecl(String arg0, String arg1) - throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - m_handler.internalEntityDecl(arg0, arg1); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ContentHandler#characters(char[], int, int) - */ - public void characters(char[] characters, int offset, int length) - throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - - m_handler.characters(characters, offset, length); - - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ContentHandler#endDocument() - */ - public void endDocument() throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - - m_handler.endDocument(); - - - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ContentHandler#endElement(String, String, String) - */ - public void endElement(String namespaceURI, String localName, String qName) - throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - if (namespaceURI == null && m_firstElementURI != null) - namespaceURI = m_firstElementURI; - - - if (localName == null && m_firstElementLocalName != null) - localName = m_firstElementLocalName; - } - - m_handler.endElement(namespaceURI, localName, qName); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ContentHandler#endPrefixMapping(String) - */ - public void endPrefixMapping(String prefix) throws SAXException - { - m_handler.endPrefixMapping(prefix); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int) - */ - public void ignorableWhitespace(char[] ch, int start, int length) - throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - m_handler.ignorableWhitespace(ch, start, length); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ContentHandler#processingInstruction(String, String) - */ - public void processingInstruction(String target, String data) - throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - - m_handler.processingInstruction(target, data); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ContentHandler#setDocumentLocator(Locator) - */ - public void setDocumentLocator(Locator locator) - { - m_handler.setDocumentLocator(locator); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ContentHandler#skippedEntity(String) - */ - public void skippedEntity(String name) throws SAXException - { - m_handler.skippedEntity(name); - } - - - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int) - */ - public void comment(char[] ch, int start, int length) throws SAXException - { - if (m_firstTagNotEmitted) - { - flush(); - } - - m_handler.comment(ch, start, length); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.LexicalHandler#endCDATA() - */ - public void endCDATA() throws SAXException - { - - m_handler.endCDATA(); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.LexicalHandler#endDTD() - */ - public void endDTD() throws SAXException - { - - m_handler.endDTD(); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.LexicalHandler#endEntity(String) - */ - public void endEntity(String name) throws SAXException - { - if (m_firstTagNotEmitted) - { - emitFirstTag(); - } - m_handler.endEntity(name); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.LexicalHandler#startCDATA() - */ - public void startCDATA() throws SAXException - { - m_handler.startCDATA(); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.LexicalHandler#startDTD(String, String, String) - */ - public void startDTD(String name, String publicId, String systemId) - throws SAXException - { - m_handler.startDTD(name, publicId, systemId); - } - - /** - * Pass the call on to the underlying handler - * @see org.xml.sax.ext.LexicalHandler#startEntity(String) - */ - public void startEntity(String name) throws SAXException - { - m_handler.startEntity(name); - } - - /** - * Initialize the wrapped output stream (XML or HTML). - * If the stream handler should be HTML, then replace the XML handler with - * an HTML handler. After than send the starting method calls that were cached - * to the wrapped handler. - * - */ - private void initStreamOutput() throws SAXException - { - - // Try to rule out if this is an not to be an HTML document based on prefix - boolean firstElementIsHTML = isFirstElemHTML(); - - if (firstElementIsHTML) - { - // create an HTML output handler, and initialize it - - // keep a reference to the old handler, ... it will soon be gone - SerializationHandler oldHandler = m_handler; - - /* We have to make sure we get an output properties with the proper - * defaults for the HTML method. The easiest way to do this is to - * have the OutputProperties class do it. - */ - - Properties htmlProperties = - OutputPropertiesFactory.getDefaultMethodProperties(Method.HTML); - Serializer serializer = - SerializerFactory.getSerializer(htmlProperties); - - // The factory should be returning a ToStream - // Don't know what to do if it doesn't - // i.e. the user has over-ridden the content-handler property - // for html - m_handler = (SerializationHandler) serializer; - //m_handler = new ToHTMLStream(); - - Writer writer = oldHandler.getWriter(); - - if (null != writer) - m_handler.setWriter(writer); - else - { - OutputStream os = oldHandler.getOutputStream(); - - if (null != os) - m_handler.setOutputStream(os); - } - - // need to copy things from the old handler to the new one here - - // if (_setVersion_called) - // { - m_handler.setVersion(oldHandler.getVersion()); - // } - // if (_setDoctypeSystem_called) - // { - m_handler.setDoctypeSystem(oldHandler.getDoctypeSystem()); - // } - // if (_setDoctypePublic_called) - // { - m_handler.setDoctypePublic(oldHandler.getDoctypePublic()); - // } - // if (_setMediaType_called) - // { - m_handler.setMediaType(oldHandler.getMediaType()); - // } - - m_handler.setTransformer(oldHandler.getTransformer()); - } - - /* Now that we have a real wrapped handler (XML or HTML) lets - * pass any cached calls to it - */ - // Call startDocument() if necessary - if (m_needToCallStartDocument) - { - m_handler.startDocument(); - m_needToCallStartDocument = false; - } - - // the wrapped handler is now fully initialized - m_wrapped_handler_not_initialized = false; - } - - private void emitFirstTag() throws SAXException - { - if (m_firstElementName != null) - { - if (m_wrapped_handler_not_initialized) - { - initStreamOutput(); - m_wrapped_handler_not_initialized = false; - } - // Output first tag - m_handler.startElement(m_firstElementURI, null, m_firstElementName, m_attributes); - // don't need the collected attributes of the first element anymore. - m_attributes = null; - - // Output namespaces of first tag - if (m_namespacePrefix != null) - { - final int n = m_namespacePrefix.size(); - for (int i = 0; i < n; i++) - { - final String prefix = - (String) m_namespacePrefix.elementAt(i); - final String uri = (String) m_namespaceURI.elementAt(i); - m_handler.startPrefixMapping(prefix, uri, false); - } - m_namespacePrefix = null; - m_namespaceURI = null; - } - m_firstTagNotEmitted = false; - } - } - - /** - * Utility function for calls to local-name(). - * - * Don't want to override static function on SerializerBase - * So added Unknown suffix to method name. - */ - private String getLocalNameUnknown(String value) - { - int idx = value.lastIndexOf(':'); - if (idx >= 0) - value = value.substring(idx + 1); - idx = value.lastIndexOf('@'); - if (idx >= 0) - value = value.substring(idx + 1); - return (value); - } - - /** - * Utility function to return prefix - * - * Don't want to override static function on SerializerBase - * So added Unknown suffix to method name. - */ - private String getPrefixPartUnknown(String qname) - { - final int index = qname.indexOf(':'); - return (index > 0) ? qname.substring(0, index) : EMPTYSTRING; - } - - /** - * Determine if the firts element in the document is or - * This uses the cached first element name, first element prefix and the - * cached namespaces from previous method calls - * - * @return true if the first element is an opening tag - */ - private boolean isFirstElemHTML() - { - boolean isHTML; - - // is the first tag html, not considering the prefix ? - isHTML = - getLocalNameUnknown(m_firstElementName).equalsIgnoreCase("html"); - - // Try to rule out if this is not to be an HTML document based on URI - if (isHTML - && m_firstElementURI != null - && !EMPTYSTRING.equals(m_firstElementURI)) - { - // the element has a non-trivial namespace - isHTML = false; - } - // Try to rule out if this is an not to be an HTML document based on prefix - if (isHTML && m_namespacePrefix != null) - { - /* the first element has a name of "html", but lets check the prefix. - * If the prefix points to a namespace with a URL that is not "" - * then the doecument doesn't start with an tag, and isn't html - */ - final int max = m_namespacePrefix.size(); - for (int i = 0; i < max; i++) - { - final String prefix = (String) m_namespacePrefix.elementAt(i); - final String uri = (String) m_namespaceURI.elementAt(i); - - if (m_firstElementPrefix != null - && m_firstElementPrefix.equals(prefix) - && !EMPTYSTRING.equals(uri)) - { - // The first element has a prefix, so it can't be - isHTML = false; - break; - } - } - - } - return isHTML; - } - /** - * @see Serializer#asDOMSerializer() - */ - public DOMSerializer asDOMSerializer() throws IOException - { - return m_handler.asDOMSerializer(); - } - - /** - * @param URI_and_localNames Vector a list of pairs of URI/localName - * specified in the cdata-section-elements attribute. - * @see SerializationHandler#setCdataSectionElements(java.util.Vector) - */ - public void setCdataSectionElements(Vector URI_and_localNames) - { - m_handler.setCdataSectionElements(URI_and_localNames); - } - /** - * @see ExtendedContentHandler#addAttributes(org.xml.sax.Attributes) - */ - public void addAttributes(Attributes atts) throws SAXException - { - m_handler.addAttributes(atts); - } - - /** - * Get the current namespace mappings. - * Simply returns the mappings of the wrapped handler. - * @see ExtendedContentHandler#getNamespaceMappings() - */ - public NamespaceMappings getNamespaceMappings() - { - NamespaceMappings mappings = null; - if (m_handler != null) - { - mappings = m_handler.getNamespaceMappings(); - } - return mappings; - } - /** - * @see SerializationHandler#flushPending() - */ - public void flushPending() throws SAXException - { - - flush(); - - m_handler.flushPending(); - } - - private void flush() - { - try - { - if (m_firstTagNotEmitted) - { - emitFirstTag(); - } - if (m_needToCallStartDocument) - { - m_handler.startDocument(); - m_needToCallStartDocument = false; - } - } - catch(SAXException e) - { - throw new RuntimeException(e.toString()); - } - - - } - - /** - * @see ExtendedContentHandler#getPrefix - */ - public String getPrefix(String namespaceURI) - { - return m_handler.getPrefix(namespaceURI); - } - /** - * @see ExtendedContentHandler#entityReference(java.lang.String) - */ - public void entityReference(String entityName) throws SAXException - { - m_handler.entityReference(entityName); - } - - /** - * @see ExtendedContentHandler#getNamespaceURI(java.lang.String, boolean) - */ - public String getNamespaceURI(String qname, boolean isElement) - { - return m_handler.getNamespaceURI(qname, isElement); - } - - public String getNamespaceURIFromPrefix(String prefix) - { - return m_handler.getNamespaceURIFromPrefix(prefix); - } - - public void setTransformer(Transformer t) - { - m_handler.setTransformer(t); - if ((t instanceof SerializerTrace) && - (((SerializerTrace) t).hasTraceListeners())) { - m_tracer = (SerializerTrace) t; - } else { - m_tracer = null; - } - } - public Transformer getTransformer() - { - return m_handler.getTransformer(); - } - - /** - * @see SerializationHandler#setContentHandler(org.xml.sax.ContentHandler) - */ - public void setContentHandler(ContentHandler ch) - { - m_handler.setContentHandler(ch); - } - /** - * This method is used to set the source locator, which might be used to - * generated an error message. - * @param locator the source locator - * - * @see ExtendedContentHandler#setSourceLocator(javax.xml.transform.SourceLocator) - */ - public void setSourceLocator(SourceLocator locator) - { - m_handler.setSourceLocator(locator); - } - - protected void firePseudoElement(String elementName) - { - - if (m_tracer != null) { - StringBuffer sb = new StringBuffer(); - - sb.append('<'); - sb.append(elementName); - - // convert the StringBuffer to a char array and - // emit the trace event that these characters "might" - // be written - char ch[] = sb.toString().toCharArray(); - m_tracer.fireGenerateEvent( - SerializerTrace.EVENTTYPE_OUTPUT_PSEUDO_CHARACTERS, - ch, - 0, - ch.length); - } - } - - /** - * @see org.apache.xml.serializer.Serializer#asDOM3Serializer() - */ - public Object asDOM3Serializer() throws IOException - { - return m_handler.asDOM3Serializer(); - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java b/serializer/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java deleted file mode 100644 index a9b9cc4f5..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ToXMLSAXHandler.java +++ /dev/null @@ -1,780 +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; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; -import java.util.Properties; - -import javax.xml.transform.Result; - -import org.w3c.dom.Node; -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.ext.LexicalHandler; - -/** - * This class receives notification of SAX-like events, and with gathered - * information over these calls it will invoke the equivalent SAX methods - * on a handler, the ultimate xsl:output method is known to be "xml". - * - * This class is not a public API. - * @xsl.usage internal - */ -public final class ToXMLSAXHandler extends ToSAXHandler -{ - - /** - * Keeps track of whether output escaping is currently enabled - */ - protected boolean m_escapeSetting = true; - - public ToXMLSAXHandler() - { - // default constructor (need to set content handler ASAP !) - m_prefixMap = new NamespaceMappings(); - initCDATA(); - } - - /** - * @see Serializer#getOutputFormat() - */ - public Properties getOutputFormat() - { - return null; - } - - /** - * @see Serializer#getOutputStream() - */ - public OutputStream getOutputStream() - { - return null; - } - - /** - * @see Serializer#getWriter() - */ - public Writer getWriter() - { - return null; - } - - /** - * 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 - { - } - - /** - * @see SerializationHandler#setEscaping(boolean) - */ - public boolean setEscaping(boolean escape) throws SAXException - { - boolean oldEscapeSetting = m_escapeSetting; - m_escapeSetting = escape; - - if (escape) { - processingInstruction(Result.PI_ENABLE_OUTPUT_ESCAPING, ""); - } else { - processingInstruction(Result.PI_DISABLE_OUTPUT_ESCAPING, ""); - } - - return oldEscapeSetting; - } - - /** - * @see Serializer#setOutputFormat(Properties) - */ - public void setOutputFormat(Properties format) - { - } - - /** - * @see Serializer#setOutputStream(OutputStream) - */ - public void setOutputStream(OutputStream output) - { - } - - /** - * @see Serializer#setWriter(Writer) - */ - public void setWriter(Writer writer) - { - } - - /** - * @see org.xml.sax.ext.DeclHandler#attributeDecl(String, String, String, String, String) - */ - public void attributeDecl( - String arg0, - String arg1, - String arg2, - String arg3, - String arg4) - throws SAXException - { - } - - /** - * @see org.xml.sax.ext.DeclHandler#elementDecl(String, String) - */ - public void elementDecl(String arg0, String arg1) throws SAXException - { - } - - /** - * @see org.xml.sax.ext.DeclHandler#externalEntityDecl(String, String, String) - */ - public void externalEntityDecl(String arg0, String arg1, String arg2) - throws SAXException - { - } - - /** - * @see org.xml.sax.ext.DeclHandler#internalEntityDecl(String, String) - */ - public void internalEntityDecl(String arg0, String arg1) - throws SAXException - { - } - - /** - * Receives notification of the end of the document. - * @see org.xml.sax.ContentHandler#endDocument() - */ - public void endDocument() throws SAXException - { - - flushPending(); - - // Close output document - m_saxHandler.endDocument(); - - if (m_tracer != null) - super.fireEndDoc(); - } - - /** - * This method is called when all the data needed for a call to the - * SAX handler's startElement() method has been gathered. - */ - protected void closeStartTag() throws SAXException - { - - m_elemContext.m_startTagOpen = false; - - final String localName = getLocalName(m_elemContext.m_elementName); - final String uri = getNamespaceURI(m_elemContext.m_elementName, true); - - // Now is time to send the startElement event - if (m_needToCallStartDocument) - { - startDocumentInternal(); - } - m_saxHandler.startElement(uri, localName, m_elemContext.m_elementName, m_attributes); - // we've sent the official SAX attributes on their way, - // now we don't need them anymore. - m_attributes.clear(); - - if(m_state != null) - m_state.setCurrentNode(null); - } - - /** - * Closes ane open cdata tag, and - * 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 CDATA closing bracket - "]]>" - if (m_lexHandler != null && m_cdataTagOpen) { - m_lexHandler.endCDATA(); - } - - - // There are no longer any calls made to - // m_lexHandler.startCDATA() without a balancing call to - // m_lexHandler.endCDATA() - // so we set m_cdataTagOpen to false to remember this. - m_cdataTagOpen = false; - } - - /** - * @see org.xml.sax.ContentHandler#endElement(String, String, String) - */ - public void endElement(String namespaceURI, String localName, String qName) - throws SAXException - { - // Close any open elements etc. - flushPending(); - - if (namespaceURI == null) - { - if (m_elemContext.m_elementURI != null) - namespaceURI = m_elemContext.m_elementURI; - else - namespaceURI = getNamespaceURI(qName, true); - } - - if (localName == null) - { - if (m_elemContext.m_elementLocalName != null) - localName = m_elemContext.m_elementLocalName; - else - localName = getLocalName(qName); - } - - m_saxHandler.endElement(namespaceURI, localName, qName); - - if (m_tracer != null) - super.fireEndElem(qName); - - /* Pop all namespaces at the current element depth. - * We are not waiting for official endPrefixMapping() calls. - */ - m_prefixMap.popNamespaces(m_elemContext.m_currentElemDepth, - m_saxHandler); - m_elemContext = m_elemContext.m_prev; - } - - /** - * @see org.xml.sax.ContentHandler#endPrefixMapping(String) - */ - public void endPrefixMapping(String prefix) throws SAXException - { - /* poping all prefix mappings should have been done - * in endElement() already - */ - return; - } - - /** - * @see org.xml.sax.ContentHandler#ignorableWhitespace(char[], int, int) - */ - public void ignorableWhitespace(char[] arg0, int arg1, int arg2) - throws SAXException - { - m_saxHandler.ignorableWhitespace(arg0,arg1,arg2); - } - - /** - * @see org.xml.sax.ContentHandler#setDocumentLocator(Locator) - */ - public void setDocumentLocator(Locator arg0) - { - m_saxHandler.setDocumentLocator(arg0); - } - - /** - * @see org.xml.sax.ContentHandler#skippedEntity(String) - */ - public void skippedEntity(String arg0) throws SAXException - { - m_saxHandler.skippedEntity(arg0); - } - - /** - * @see org.xml.sax.ContentHandler#startPrefixMapping(String, String) - * @param prefix The prefix that maps to the URI - * @param uri The URI for the namespace - */ - public void startPrefixMapping(String prefix, String uri) - throws SAXException - { - startPrefixMapping(prefix, uri, true); - } - - /** - * Remember the prefix/uri mapping at the current nested element depth. - * - * @see org.xml.sax.ContentHandler#startPrefixMapping(String, String) - * @param prefix The prefix that maps to the URI - * @param uri The URI for the namespace - * @param shouldFlush a flag indicating if the mapping applies to the - * current element or an up coming child (not used). - */ - - public boolean startPrefixMapping( - String prefix, - String uri, - boolean shouldFlush) - throws org.xml.sax.SAXException - { - - /* Remember the mapping, and at what depth it was declared - * This is one greater than the current depth because these - * mappings will apply to the next depth. This is in - * consideration that startElement() will soon be called - */ - - boolean pushed; - int pushDepth; - if (shouldFlush) - { - flushPending(); - // the prefix mapping applies to the child element (one deeper) - pushDepth = m_elemContext.m_currentElemDepth + 1; - } - else - { - // the prefix mapping applies to the current element - pushDepth = m_elemContext.m_currentElemDepth; - } - pushed = m_prefixMap.pushNamespace(prefix, uri, pushDepth); - - if (pushed) - { - m_saxHandler.startPrefixMapping(prefix,uri); - - if (getShouldOutputNSAttr()) - { - - /* I don't know if we really needto do this. The - * callers of this object should have injected both - * startPrefixMapping and the attributes. We are - * just covering our butt here. - */ - String name; - if (EMPTYSTRING.equals(prefix)) - { - name = "xmlns"; - addAttributeAlways(XMLNS_URI, name, name,"CDATA",uri, false); - } - else - { - if (!EMPTYSTRING.equals(uri)) // hack for attribset16 test - { // that maps ns1 prefix to "" URI - name = "xmlns:" + prefix; - - /* for something like xmlns:abc="w3.pretend.org" - * the uri is the value, that is why we pass it in the - * value, or 5th slot of addAttributeAlways() - */ - addAttributeAlways(XMLNS_URI, prefix, name,"CDATA",uri, false ); - } - } - } - } - return pushed; - } - - - /** - * @see org.xml.sax.ext.LexicalHandler#comment(char[], int, int) - */ - public void comment(char[] arg0, int arg1, int arg2) throws SAXException - { - flushPending(); - if (m_lexHandler != null) - m_lexHandler.comment(arg0, arg1, arg2); - - if (m_tracer != null) - super.fireCommentEvent(arg0, arg1, arg2); - } - - /** - * @see org.xml.sax.ext.LexicalHandler#endCDATA() - */ - public void endCDATA() throws SAXException - { - /* Normally we would do somthing with this but we ignore it. - * The neccessary call to m_lexHandler.endCDATA() will be made - * in flushPending(). - * - * This is so that if we get calls like these: - * this.startCDATA(); - * this.characters(chars1, off1, len1); - * this.endCDATA(); - * this.startCDATA(); - * this.characters(chars2, off2, len2); - * this.endCDATA(); - * - * that we will only make these calls to the wrapped handlers: - * - * m_lexHandler.startCDATA(); - * m_saxHandler.characters(chars1, off1, len1); - * m_saxHandler.characters(chars1, off2, len2); - * m_lexHandler.endCDATA(); - * - * We will merge adjacent CDATA blocks. - */ - } - - /** - * @see org.xml.sax.ext.LexicalHandler#endDTD() - */ - public void endDTD() throws SAXException - { - if (m_lexHandler != null) - m_lexHandler.endDTD(); - } - - /** - * @see org.xml.sax.ext.LexicalHandler#startEntity(String) - */ - public void startEntity(String arg0) throws SAXException - { - if (m_lexHandler != null) - m_lexHandler.startEntity(arg0); - } - - /** - * @see ExtendedContentHandler#characters(String) - */ - public void characters(String chars) throws SAXException - { - final int length = chars.length(); - if (length > m_charsBuff.length) - { - m_charsBuff = new char[length*2 + 1]; - } - chars.getChars(0, length, m_charsBuff, 0); - this.characters(m_charsBuff, 0, length); - } - - public ToXMLSAXHandler(ContentHandler handler, String encoding) - { - super(handler, encoding); - - initCDATA(); - // initNamespaces(); - m_prefixMap = new NamespaceMappings(); - } - - public ToXMLSAXHandler( - ContentHandler handler, - LexicalHandler lex, - String encoding) - { - super(handler, lex, encoding); - - initCDATA(); - // initNamespaces(); - m_prefixMap = new NamespaceMappings(); - } - - /** - * Start an element in the output document. This might be an XML element - * (<elem>data</elem> type) or a CDATA section. - */ - public void startElement( - String elementNamespaceURI, - String elementLocalName, - String elementName) throws SAXException - { - startElement( - elementNamespaceURI,elementLocalName,elementName, null); - - - } - public void startElement(String elementName) throws SAXException - { - startElement(null, null, elementName, null); - } - - - public void characters(char[] ch, int off, int len) throws SAXException - { - // We do the first two things in flushPending() but we don't - // close any open CDATA calls. - if (m_needToCallStartDocument) - { - startDocumentInternal(); - m_needToCallStartDocument = false; - } - - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - - if (m_elemContext.m_isCdataSection && !m_cdataTagOpen - && m_lexHandler != null) - { - m_lexHandler.startCDATA(); - // We have made a call to m_lexHandler.startCDATA() with - // no balancing call to m_lexHandler.endCDATA() - // so we set m_cdataTagOpen true to remember this. - m_cdataTagOpen = true; - } - - /* If there are any occurances of "]]>" in the character data - * let m_saxHandler worry about it, we've already warned them with - * the previous call of m_lexHandler.startCDATA(); - */ - m_saxHandler.characters(ch, off, len); - - // time to generate characters event - if (m_tracer != null) - fireCharEvent(ch, off, len); - } - - - /** - * @see ExtendedContentHandler#endElement(String) - */ - public void endElement(String elemName) throws SAXException - { - endElement(null, null, elemName); - } - - - /** - * Send a namespace declaration in the output document. The namespace - * declaration will not be include if the namespace is already in scope - * with the same prefix. - */ - public void namespaceAfterStartElement( - final String prefix, - final String uri) - throws SAXException - { - startPrefixMapping(prefix,uri,false); - } - - /** - * 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 - { - flushPending(); - - // Pass the processing instruction to the SAX handler - m_saxHandler.processingInstruction(target, data); - - // we don't want to leave serializer to fire off this event, - // so do it here. - if (m_tracer != null) - super.fireEscapingEvent(target, 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) - { - try - { - if (m_prefixMap.popNamespace(prefix)) - { - m_saxHandler.endPrefixMapping(prefix); - return true; - } - } - catch (SAXException e) - { - // falls through - } - return false; - } - - public void startCDATA() throws SAXException - { - /* m_cdataTagOpen can only be true here if we have ignored the - * previous call to this.endCDATA() and the previous call - * this.startCDATA() before that is still "open". In this way - * we merge adjacent CDATA. If anything else happened after the - * ignored call to this.endCDATA() and this call then a call to - * flushPending() would have been made which would have - * closed the CDATA and set m_cdataTagOpen to false. - */ - if (!m_cdataTagOpen ) - { - flushPending(); - if (m_lexHandler != null) { - m_lexHandler.startCDATA(); - - // We have made a call to m_lexHandler.startCDATA() with - // no balancing call to m_lexHandler.endCDATA() - // so we set m_cdataTagOpen true to remember this. - m_cdataTagOpen = true; - } - } - } - - /** - * @see org.xml.sax.ContentHandler#startElement(String, String, String, Attributes) - */ - public void startElement( - String namespaceURI, - String localName, - String name, - Attributes atts) - throws SAXException - { - flushPending(); - super.startElement(namespaceURI, localName, name, atts); - - // Handle document type declaration (for first element only) - if (m_needToOutputDocTypeDecl) - { - String doctypeSystem = getDoctypeSystem(); - if (doctypeSystem != null && m_lexHandler != null) - { - String doctypePublic = getDoctypePublic(); - if (doctypeSystem != null) - m_lexHandler.startDTD( - name, - doctypePublic, - doctypeSystem); - } - m_needToOutputDocTypeDecl = false; - } - m_elemContext = m_elemContext.push(namespaceURI, localName, name); - - // ensurePrefixIsDeclared depends on the current depth, so - // the previous increment is necessary where it is. - if (namespaceURI != null) - ensurePrefixIsDeclared(namespaceURI, name); - - // add the attributes to the collected ones - if (atts != null) - addAttributes(atts); - - - // do we really need this CDATA section state? - m_elemContext.m_isCdataSection = isCdataSection(); - - } - - private void ensurePrefixIsDeclared(String ns, String rawName) - throws org.xml.sax.SAXException - { - - if (ns != null && ns.length() > 0) - { - int index; - final boolean no_prefix = ((index = rawName.indexOf(":")) < 0); - String prefix = (no_prefix) ? "" : rawName.substring(0, index); - - - if (null != prefix) - { - String foundURI = m_prefixMap.lookupNamespace(prefix); - - if ((null == foundURI) || !foundURI.equals(ns)) - { - this.startPrefixMapping(prefix, ns, false); - - if (getShouldOutputNSAttr()) { - // Bugzilla1133: Generate attribute as well as namespace event. - // SAX does expect both. - this.addAttributeAlways( - "http://www.w3.org/2000/xmlns/", - no_prefix ? "xmlns" : prefix, // local name - no_prefix ? "xmlns" : ("xmlns:"+ prefix), // qname - "CDATA", - ns, - false); - } - } - - } - } - } - /** - * Adds the given attribute to the set of attributes, and also makes sure - * that the needed prefix/uri mapping is declared, but only if there is a - * currently open element. - * - * @param uri the URI of the attribute - * @param localName the local name of the attribute - * @param rawName the qualified name of the attribute - * @param type the type of the attribute (probably CDATA) - * @param value the value of the attribute - * @param XSLAttribute true if this attribute is coming from an xsl:attribute element - * @see ExtendedContentHandler#addAttribute(String, String, String, String, String) - */ - public void addAttribute( - String uri, - String localName, - String rawName, - String type, - String value, - boolean XSLAttribute) - throws SAXException - { - if (m_elemContext.m_startTagOpen) - { - ensurePrefixIsDeclared(uri, rawName); - addAttributeAlways(uri, localName, rawName, type, value, false); - } - - } - - /** - * Try's to reset the super class and reset this class for - * re-use, so that you don't need to create a new serializer - * (mostly for performance reasons). - * - * @return true if the class was successfuly reset. - * @see Serializer#reset() - */ - public boolean reset() - { - boolean wasReset = false; - if (super.reset()) - { - resetToXMLSAXHandler(); - wasReset = true; - } - return wasReset; - } - - /** - * Reset all of the fields owned by ToXMLSAXHandler class - * - */ - private void resetToXMLSAXHandler() - { - this.m_escapeSetting = true; - } - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/ToXMLStream.java b/serializer/src/main/java/org/apache/xml/serializer/ToXMLStream.java deleted file mode 100644 index da444c348..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/ToXMLStream.java +++ /dev/null @@ -1,643 +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; - -import java.io.IOException; - -import javax.xml.transform.ErrorListener; -import javax.xml.transform.Result; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; - -import org.apache.xml.serializer.utils.MsgKey; -import org.apache.xml.serializer.utils.Utils; -import org.xml.sax.SAXException; - -/** - * This class converts SAX or SAX-like calls to a - * serialized xml document. The xsl:output method is "xml". - * - * This class is used explicitly in code generated by XSLTC, - * so it is "public", but it should - * be viewed as internal or package private, this is not an API. - * - * @xsl.usage internal - */ -public class ToXMLStream extends ToStream -{ - /** - * Map that tells which XML characters should have special treatment, and it - * provides character to entity name lookup. - */ - private CharInfo m_xmlcharInfo = - CharInfo.getCharInfo(CharInfo.XML_ENTITIES_RESOURCE, Method.XML); - - /** - * Default constructor. - */ - public ToXMLStream() - { - m_charInfo = m_xmlcharInfo; - - initCDATA(); - // initialize namespaces - m_prefixMap = new NamespaceMappings(); - - } - - /** - * Copy properties from another SerializerToXML. - * - * @param xmlListener non-null reference to a SerializerToXML object. - */ - public void CopyFrom(ToXMLStream xmlListener) - { - - setWriter(xmlListener.m_writer); - - - // m_outputStream = xmlListener.m_outputStream; - String encoding = xmlListener.getEncoding(); - setEncoding(encoding); - - setOmitXMLDeclaration(xmlListener.getOmitXMLDeclaration()); - - m_ispreserve = xmlListener.m_ispreserve; - m_preserves = xmlListener.m_preserves; - m_isprevtext = xmlListener.m_isprevtext; - m_doIndent = xmlListener.m_doIndent; - setIndentAmount(xmlListener.getIndentAmount()); - m_startNewLine = xmlListener.m_startNewLine; - m_needToOutputDocTypeDecl = xmlListener.m_needToOutputDocTypeDecl; - setDoctypeSystem(xmlListener.getDoctypeSystem()); - setDoctypePublic(xmlListener.getDoctypePublic()); - setStandalone(xmlListener.getStandalone()); - setMediaType(xmlListener.getMediaType()); - m_encodingInfo = xmlListener.m_encodingInfo; - m_spaceBeforeClose = xmlListener.m_spaceBeforeClose; - m_cdataStartCalled = xmlListener.m_cdataStartCalled; - - } - - /** - * Receive notification of the beginning of a document. - * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void startDocumentInternal() throws org.xml.sax.SAXException - { - - if (m_needToCallStartDocument) - { - super.startDocumentInternal(); - m_needToCallStartDocument = false; - - if (m_inEntityRef) - return; - - m_needToOutputDocTypeDecl = true; - m_startNewLine = false; - /* The call to getXMLVersion() might emit an error message - * and we should emit this message regardless of if we are - * writing out an XML header or not. - */ - final String version = getXMLVersion(); - if (getOmitXMLDeclaration() == false) - { - String encoding = Encodings.getMimeEncoding(getEncoding()); - String standalone; - - if (m_standaloneWasSpecified) - { - standalone = " standalone=\"" + getStandalone() + "\""; - } - else - { - standalone = ""; - } - - try - { - final java.io.Writer writer = m_writer; - writer.write(""); - if (m_doIndent) { - if (m_standaloneWasSpecified - || getDoctypePublic() != null - || getDoctypeSystem() != null) { - // We almost never put a newline after the XML - // header because this XML could be used as - // an extenal general parsed entity - // and we don't know the context into which it - // will be used in the future. Only when - // standalone, or a doctype system or public is - // specified are we free to insert a new line - // after the header. Is it even worth bothering - // in these rare cases? - writer.write(m_lineSep, 0, m_lineSepLen); - } - } - } - catch(IOException e) - { - throw new SAXException(e); - } - - } - } - } - - /** - * Receive notification of the end of a document. - * - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void endDocument() throws org.xml.sax.SAXException - { - flushPending(); - if (m_doIndent && !m_isprevtext) - { - try - { - outputLineSep(); - } - catch(IOException e) - { - throw new SAXException(e); - } - } - - flushWriter(); - - if (m_tracer != null) - super.fireEndDoc(); - } - - /** - * Starts a whitespace preserving section. All characters printed - * within a preserving section are printed without indentation and - * without consolidating multiple spaces. This is equivalent to - * the xml:space="preserve" attribute. Only XML - * and HTML serializers need to support this method. - *

- * The contents of the whitespace preserving section will be delivered - * through the regular characters event. - * - * @throws org.xml.sax.SAXException never (I think) but required by signature - */ - public void startPreserving() throws org.xml.sax.SAXException - { - - // Not sure this is really what we want. -sb - m_preserves.push(true); - - m_ispreserve = true; - } - - /** - * Ends a whitespace preserving section. - * - * @see #startPreserving - * - * @throws org.xml.sax.SAXException never (I think), but required by signature. - */ - public void endPreserving() throws org.xml.sax.SAXException - { - - // Not sure this is really what we want. -sb - m_ispreserve = m_preserves.isEmpty() ? false : m_preserves.pop(); - } - - /** - * Receive notification of a processing instruction. - * - * @param target The processing instruction target. - * @param data The processing instruction data, or null if - * none was supplied. - * @throws org.xml.sax.SAXException Any SAX exception, possibly - * wrapping another exception. - */ - public void processingInstruction(String target, String data) - throws org.xml.sax.SAXException - { - if (m_inEntityRef) - return; - - flushPending(); - - if (target.equals(Result.PI_DISABLE_OUTPUT_ESCAPING)) - { - startNonEscaping(); - } - else if (target.equals(Result.PI_ENABLE_OUTPUT_ESCAPING)) - { - endNonEscaping(); - } - else - { - try - { - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - else if (m_needToCallStartDocument) - startDocumentInternal(); - - if (shouldIndent()) - indent(); - - final java.io.Writer writer = m_writer; - writer.write(" 0 - && !Character.isSpaceChar(data.charAt(0))) - writer.write(' '); - - int indexOfQLT = data.indexOf("?>"); - - if (indexOfQLT >= 0) - { - - // See XSLT spec on error recovery of "?>" in PIs. - if (indexOfQLT > 0) - { - writer.write(data.substring(0, indexOfQLT)); - } - - writer.write("? >"); // add space between. - - if ((indexOfQLT + 2) < data.length()) - { - writer.write(data.substring(indexOfQLT + 2)); - } - } - else - { - writer.write(data); - } - - writer.write('?'); - writer.write('>'); - - /* - * Don't write out any indentation whitespace now, - * because there may be non-whitespace text after this. - * - * Simply mark that at this point if we do decide - * to indent that we should - * add a newline on the end of the current line before - * the indentation at the start of the next line. - */ - m_startNewLine = true; - } - catch(IOException e) - { - throw new SAXException(e); - } - } - - if (m_tracer != null) - super.fireEscapingEvent(target, data); - } - - /** - * Receive notivication of a entityReference. - * - * @param name The name of the entity. - * - * @throws org.xml.sax.SAXException never (I think), but required by signature. - */ - public void entityReference(String name) throws org.xml.sax.SAXException - { - if (m_elemContext.m_startTagOpen) - { - closeStartTag(); - m_elemContext.m_startTagOpen = false; - } - - try - { - if (shouldIndent()) - indent(); - - final java.io.Writer writer = m_writer; - writer.write('&'); - writer.write(name); - writer.write(';'); - } - catch(IOException e) - { - throw new SAXException(e); - } - - if (m_tracer != null) - super.fireEntityReference(name); - } - - /** - * This method is used to add an attribute to the currently open element. - * The caller has guaranted that this attribute is unique, which means that it - * not been seen before and will not be seen again. - * - * @param name the qualified name of the attribute - * @param value the value of the attribute which can contain only - * ASCII printable characters characters in the range 32 to 127 inclusive. - * @param flags the bit values of this integer give optimization information. - */ - public void addUniqueAttribute(String name, String value, int flags) - throws SAXException - { - if (m_elemContext.m_startTagOpen) - { - - try - { - final String patchedName = patchName(name); - final java.io.Writer writer = m_writer; - if ((flags & NO_BAD_CHARS) > 0 && m_xmlcharInfo.onlyQuotAmpLtGt) - { - // "flags" has indicated that the characters - // '>' '<' '&' and '"' are not in the value and - // m_htmlcharInfo has recorded that there are no other - // entities in the range 32 to 127 so we write out the - // value directly - - writer.write(' '); - writer.write(patchedName); - writer.write("=\""); - writer.write(value); - writer.write('"'); - } - else - { - writer.write(' '); - writer.write(patchedName); - writer.write("=\""); - writeAttrString(writer, value, this.getEncoding()); - writer.write('"'); - } - } catch (IOException e) { - throw new SAXException(e); - } - } - } - - /** - * Add an attribute to the current element. - * @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 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 org.xml.sax.SAXException never (I think), but required by signature. - */ - public void addAttribute( - String uri, - String localName, - String rawName, - String type, - String value, - boolean xslAttribute) - throws SAXException - { - if (m_elemContext.m_startTagOpen) - { - boolean was_added = addAttributeAlways(uri, localName, rawName, type, value, xslAttribute); - - - /* - * We don't run this block of code if: - * 1. The attribute value was only replaced (was_added is false). - * 2. The attribute is from an xsl:attribute element (that is handled - * in the addAttributeAlways() call just above. - * 3. The name starts with "xmlns", i.e. it is a namespace declaration. - */ - if (was_added && !xslAttribute && !rawName.startsWith("xmlns")) - { - String prefixUsed = - ensureAttributesNamespaceIsDeclared( - uri, - localName, - rawName); - if (prefixUsed != null - && rawName != null - && !rawName.startsWith(prefixUsed)) - { - // use a different raw name, with the prefix used in the - // generated namespace declaration - rawName = prefixUsed + ":" + localName; - - } - } - addAttributeAlways(uri, localName, rawName, type, value, xslAttribute); - } - else - { - /* - * The startTag is closed, yet we are adding an attribute? - * - * Section: 7.1.3 Creating Attributes Adding an attribute to an - * element after a PI (for example) has been added to it is an - * error. The attributes can be ignored. The spec doesn't explicitly - * say this is disallowed, as it does for child elements, but it - * makes sense to have the same treatment. - * - * We choose to ignore the attribute which is added too late. - */ - // Generate a warning of the ignored attributes - - // Create the warning message - String msg = Utils.messages.createMessage( - MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION,new Object[]{ localName }); - - try { - // Prepare to issue the warning message - Transformer tran = super.getTransformer(); - ErrorListener errHandler = tran.getErrorListener(); - - - // Issue the warning message - if (null != errHandler && m_sourceLocator != null) - errHandler.warning(new TransformerException(msg, m_sourceLocator)); - else - System.out.println(msg); - } - catch (TransformerException e){ - // A user defined error handler, errHandler, may throw - // a TransformerException if it chooses to, and if it does - // we will wrap it with a SAXException and re-throw. - // Of course if the handler throws another type of - // exception, like a RuntimeException, then that is OK too. - SAXException se = new SAXException(e); - throw se; - } - } - } - - /** - * @see ExtendedContentHandler#endElement(String) - */ - public void endElement(String elemName) throws SAXException - { - endElement(null, null, elemName); - } - - /** - * This method is used to notify the serializer of a namespace mapping (or node) - * that applies to the current element whose startElement() call has already been seen. - * The official SAX startPrefixMapping(prefix,uri) is to define a mapping for a child - * element that is soon to be seen with a startElement() call. The official SAX call - * does not apply to the current element, hence the reason for this method. - */ - public void namespaceAfterStartElement( - final String prefix, - final String uri) - throws SAXException - { - - // hack for XSLTC with finding URI for default namespace - if (m_elemContext.m_elementURI == null) - { - String prefix1 = getPrefixPart(m_elemContext.m_elementName); - if (prefix1 == null && EMPTYSTRING.equals(prefix)) - { - // the elements URI is not known yet, and it - // doesn't have a prefix, and we are currently - // setting the uri for prefix "", so we have - // the uri for the element... lets remember it - m_elemContext.m_elementURI = uri; - } - } - startPrefixMapping(prefix,uri,false); - return; - - } - - /** - * 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) - { - try - { - if (m_prefixMap.pushNamespace( - prefix, uri, m_elemContext.m_currentElemDepth)) - { - startPrefixMapping(prefix, uri); - return true; - } - } - catch (SAXException e) - { - // falls through - } - return false; - } - /** - * Try's to reset the super class and reset this class for - * re-use, so that you don't need to create a new serializer - * (mostly for performance reasons). - * - * @return true if the class was successfuly reset. - */ - public boolean reset() - { - boolean wasReset = false; - if (super.reset()) - { - // Make this call when resetToXMLStream does - // something. - // resetToXMLStream(); - wasReset = true; - } - return wasReset; - } - - /** - * Reset all of the fields owned by ToStream class - * - */ - private void resetToXMLStream() - { - // This is an empty method, but is kept for future use - // as a place holder for a location to reset fields - // defined within this class - return; - } - - /** - * This method checks for the XML version of output document. - * If XML version of output document is not specified, then output - * document is of version XML 1.0. - * If XML version of output doucment is specified, but it is not either - * XML 1.0 or XML 1.1, a warning message is generated, the XML Version of - * output document is set to XML 1.0 and processing continues. - * @return string (XML version) - */ - private String getXMLVersion() - { - String xmlVersion = getVersion(); - if(xmlVersion == null || xmlVersion.equals(XMLVERSION10)) - { - xmlVersion = XMLVERSION10; - } - else if(xmlVersion.equals(XMLVERSION11)) - { - xmlVersion = XMLVERSION11; - } - else - { - String msg = Utils.messages.createMessage( - MsgKey.ER_XML_VERSION_NOT_SUPPORTED,new Object[]{ xmlVersion }); - try - { - // Prepare to issue the warning message - Transformer tran = super.getTransformer(); - ErrorListener errHandler = tran.getErrorListener(); - // Issue the warning message - if (null != errHandler && m_sourceLocator != null) - errHandler.warning(new TransformerException(msg, m_sourceLocator)); - else - System.out.println(msg); - } - catch (Exception e){} - xmlVersion = XMLVERSION10; - } - return xmlVersion; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/TransformStateSetter.java b/serializer/src/main/java/org/apache/xml/serializer/TransformStateSetter.java deleted file mode 100644 index 2f8dc9491..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/TransformStateSetter.java +++ /dev/null @@ -1,56 +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; - -import javax.xml.transform.Transformer; - -import org.w3c.dom.Node; -/** - * This interface is meant to be used by a base interface to - * 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. - * - * This interface is not a public API, it is only public because it is - * used by Xalan. - * - * @see org.apache.xalan.transformer.TransformState - * @xsl.usage internal - */ -public interface TransformStateSetter -{ - - - /** - * Set the current node. - * - * @param n The current node. - */ - void setCurrentNode(Node n); - - /** - * Reset the state on the given transformer object. - * - * @param transformer The transformer to have its state reset - */ - void resetState(Transformer transformer); - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/TreeWalker.java b/serializer/src/main/java/org/apache/xml/serializer/TreeWalker.java deleted file mode 100644 index fd3e225f1..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/TreeWalker.java +++ /dev/null @@ -1,530 +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; - -import java.io.File; - -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; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.ProcessingInstruction; -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; - - -/** - * This class does a pre-order walk of the DOM tree, calling a ContentHandler - * interface as it goes. - * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * - * @xsl.usage internal - */ - -public final class TreeWalker -{ - - /** Local reference to a ContentHandler */ - final private ContentHandler m_contentHandler; - /** - * If m_contentHandler is a SerializationHandler, then this is - * a reference to the same object. - */ - final private SerializationHandler m_Serializer; - - // ARGHH!! JAXP Uses Xerces without setting the namespace processing to ON! - // DOM2Helper m_dh = new DOM2Helper(); - - /** DomHelper for this TreeWalker */ - final protected DOM2Helper m_dh; - - /** Locator object for this TreeWalker */ - final private LocatorImpl m_locator = new LocatorImpl(); - - /** - * Get the ContentHandler used for the tree walk. - * - * @return the ContentHandler used for the tree walk - */ - public ContentHandler getContentHandler() - { - return m_contentHandler; - } - - public TreeWalker(ContentHandler ch) { - this(ch,null); - } - /** - * 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) - { - // Set the content handler - m_contentHandler = contentHandler; - if (m_contentHandler instanceof SerializationHandler) { - m_Serializer = (SerializationHandler) m_contentHandler; - } - else - m_Serializer = null; - - // Set the system ID, if it is given - m_contentHandler.setDocumentLocator(m_locator); - if (systemId != null) - m_locator.setSystemId(systemId); - else { - try { - // Bug see Bugzilla 26741 - m_locator.setSystemId(System.getProperty("user.dir") + File.separator + "dummy.xsl"); - } - catch (SecurityException se) {// user.dir not accessible from applet - } - } - - // Set the document locator - if (m_contentHandler != null) - m_contentHandler.setDocumentLocator(m_locator); - try { - // Bug see Bugzilla 26741 - m_locator.setSystemId(System.getProperty("user.dir") + File.separator + "dummy.xsl"); - } - catch (SecurityException se){// user.dir not accessible from applet - - } - m_dh = new DOM2Helper(); - } - - /** - * Perform a pre-order traversal non-recursive style. - * - * Note that TreeWalker assumes that the subtree is intended to represent - * a complete (though not necessarily well-formed) document and, during a - * traversal, startDocument and endDocument will always be issued to the - * SAX listener. - * - * @param pos Node in the tree where to start traversal - * - * @throws SAXException if the ContentHandler objects to the request. - */ - public void traverse(Node pos) throws org.xml.sax.SAXException - { - - this.m_contentHandler.startDocument(); - - Node top = pos; - - while (null != pos) - { - startNode(pos); - - Node nextNode = pos.getFirstChild(); - - while (null == nextNode) - { - endNode(pos); - - if (top.equals(pos)) - break; - - nextNode = pos.getNextSibling(); - - if (null == nextNode) - { - pos = pos.getParentNode(); - - if ((null == pos) || (top.equals(pos))) - { - if (null != pos) - endNode(pos); - - nextNode = null; - - break; - } - } - } - - pos = nextNode; - } - this.m_contentHandler.endDocument(); - } - - /** - * Perform a pre-order traversal non-recursive style. - - * Note that TreeWalker assumes that the subtree is intended to represent - * a complete (though not necessarily well-formed) document and, during a - * traversal, startDocument and endDocument will always be issued to the - * SAX listener. - * - * @param pos Node in the tree where to start traversal - * @param top Node in the tree where to end traversal - * - * @throws SAXException if the ContentHandler objects to the request. - */ - public void traverse(Node pos, Node top) throws org.xml.sax.SAXException - { - - this.m_contentHandler.startDocument(); - - while (null != pos) - { - startNode(pos); - - Node nextNode = pos.getFirstChild(); - - while (null == nextNode) - { - endNode(pos); - - if ((null != top) && top.equals(pos)) - break; - - nextNode = pos.getNextSibling(); - - if (null == nextNode) - { - pos = pos.getParentNode(); - - if ((null == pos) || ((null != top) && top.equals(pos))) - { - nextNode = null; - - break; - } - } - } - - pos = nextNode; - } - this.m_contentHandler.endDocument(); - } - - /** Flag indicating whether following text to be processed is raw text */ - boolean nextIsRaw = false; - - /** - * Optimized dispatch of characters. - * @throws SAXException if the ContentHandler objects to the request. - */ - private final void dispatachChars(Node node) - throws org.xml.sax.SAXException - { - if(m_Serializer != null) - { - this.m_Serializer.characters(node); - } - else - { - String data = ((Text) node).getData(); - this.m_contentHandler.characters(data.toCharArray(), 0, data.length()); - } - } - - /** - * Start processing given node - * - * - * @param node Node to process - * @throws SAXException if the ContentHandler objects to the request. - */ - protected void startNode(Node node) throws org.xml.sax.SAXException - { - -// TODO: -// A Serializer implements ContentHandler, but not NodeConsumer -// so drop this reference to NodeConsumer which would otherwise -// pull in all sorts of things -// if (m_contentHandler instanceof NodeConsumer) -// { -// ((NodeConsumer) m_contentHandler).setOriginatingNode(node); -// } -// TODO: - - if (node instanceof Locator) - { - Locator loc = (Locator)node; - m_locator.setColumnNumber(loc.getColumnNumber()); - m_locator.setLineNumber(loc.getLineNumber()); - m_locator.setPublicId(loc.getPublicId()); - m_locator.setSystemId(loc.getSystemId()); - } - else - { - m_locator.setColumnNumber(0); - m_locator.setLineNumber(0); - } - - switch (node.getNodeType()) - { - case Node.COMMENT_NODE : - { - String data = ((Comment) node).getData(); - - if (m_contentHandler instanceof LexicalHandler) - { - LexicalHandler lh = ((LexicalHandler) this.m_contentHandler); - - lh.comment(data.toCharArray(), 0, data.length()); - } - } - break; - case Node.DOCUMENT_FRAGMENT_NODE : - - // ??; - break; - case Node.DOCUMENT_NODE : - - break; - case Node.ELEMENT_NODE : - Element elem_node = (Element) node; - { - // Make sure the namespace node - // for the element itself is declared - // to the ContentHandler - String uri = elem_node.getNamespaceURI(); - if (uri != null) { - String prefix = elem_node.getPrefix(); - if (prefix==null) - prefix=""; - this.m_contentHandler.startPrefixMapping(prefix,uri); - } - } - NamedNodeMap atts = elem_node.getAttributes(); - int nAttrs = atts.getLength(); - // System.out.println("TreeWalker#startNode: "+node.getNodeName()); - - - // Make sure the namespace node of - // each attribute is declared to the ContentHandler - for (int i = 0; i < nAttrs; i++) - { - final Node attr = atts.item(i); - final String attrName = attr.getNodeName(); - final int colon = attrName.indexOf(':'); - final String prefix; - - // System.out.println("TreeWalker#startNode: attr["+i+"] = "+attrName+", "+attr.getNodeValue()); - if (attrName.equals("xmlns") || attrName.startsWith("xmlns:")) - { - // Use "" instead of null, as Xerces likes "" for the - // name of the default namespace. Fix attributed - // to "Steven Murray" . - if (colon < 0) - prefix = ""; - else - prefix = attrName.substring(colon + 1); - - this.m_contentHandler.startPrefixMapping(prefix, - attr.getNodeValue()); - } - else if (colon > 0) { - prefix = attrName.substring(0,colon); - String uri = attr.getNamespaceURI(); - if (uri != null) - this.m_contentHandler.startPrefixMapping(prefix,uri); - } - } - - String ns = m_dh.getNamespaceOfNode(node); - if(null == ns) - ns = ""; - this.m_contentHandler.startElement(ns, - m_dh.getLocalNameOfNode(node), - node.getNodeName(), - new AttList(atts, m_dh)); - break; - case Node.PROCESSING_INSTRUCTION_NODE : - { - ProcessingInstruction pi = (ProcessingInstruction) node; - String name = pi.getNodeName(); - - // String data = pi.getData(); - if (name.equals("xslt-next-is-raw")) - { - nextIsRaw = true; - } - else - { - this.m_contentHandler.processingInstruction(pi.getNodeName(), - pi.getData()); - } - } - break; - case Node.CDATA_SECTION_NODE : - { - boolean isLexH = (m_contentHandler instanceof LexicalHandler); - LexicalHandler lh = isLexH - ? ((LexicalHandler) this.m_contentHandler) : null; - - if (isLexH) - { - lh.startCDATA(); - } - - dispatachChars(node); - - { - if (isLexH) - { - lh.endCDATA(); - } - } - } - break; - case Node.TEXT_NODE : - { - //String data = ((Text) node).getData(); - - if (nextIsRaw) - { - nextIsRaw = false; - - m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING, ""); - dispatachChars(node); - m_contentHandler.processingInstruction(javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING, ""); - } - else - { - dispatachChars(node); - } - } - break; - case Node.ENTITY_REFERENCE_NODE : - { - EntityReference eref = (EntityReference) node; - - if (m_contentHandler instanceof LexicalHandler) - { - ((LexicalHandler) this.m_contentHandler).startEntity( - eref.getNodeName()); - } - else - { - // warning("Can not output entity to a pure SAX ContentHandler"); - } - } - break; - default : - } - } - - /** - * End processing of given node - * - * - * @param node Node we just finished processing - * - * @throws SAXException if the ContentHandler objects to the request. - */ - protected void endNode(Node node) throws org.xml.sax.SAXException - { - - switch (node.getNodeType()) - { - case Node.DOCUMENT_NODE : - break; - - case Node.ELEMENT_NODE : - String ns = m_dh.getNamespaceOfNode(node); - if(null == ns) - ns = ""; - this.m_contentHandler.endElement(ns, - m_dh.getLocalNameOfNode(node), - node.getNodeName()); - - if (m_Serializer == null) { - // Don't bother with endPrefixMapping calls if the ContentHandler is a - // SerializationHandler because SerializationHandler's ignore the - // endPrefixMapping() calls anyways. . . . This is an optimization. - Element elem_node = (Element) node; - NamedNodeMap atts = elem_node.getAttributes(); - int nAttrs = atts.getLength(); - - // do the endPrefixMapping calls in reverse order - // of the startPrefixMapping calls - for (int i = (nAttrs-1); 0 <= i; i--) - { - final Node attr = atts.item(i); - final String attrName = attr.getNodeName(); - final int colon = attrName.indexOf(':'); - final String prefix; - - if (attrName.equals("xmlns") || attrName.startsWith("xmlns:")) - { - // Use "" instead of null, as Xerces likes "" for the - // name of the default namespace. Fix attributed - // to "Steven Murray" . - if (colon < 0) - prefix = ""; - else - prefix = attrName.substring(colon + 1); - - this.m_contentHandler.endPrefixMapping(prefix); - } - else if (colon > 0) { - prefix = attrName.substring(0, colon); - this.m_contentHandler.endPrefixMapping(prefix); - } - } - { - String uri = elem_node.getNamespaceURI(); - if (uri != null) { - String prefix = elem_node.getPrefix(); - if (prefix==null) - prefix=""; - this.m_contentHandler.endPrefixMapping(prefix); - } - } - } - break; - case Node.CDATA_SECTION_NODE : - break; - case Node.ENTITY_REFERENCE_NODE : - { - EntityReference eref = (EntityReference) node; - - if (m_contentHandler instanceof LexicalHandler) - { - LexicalHandler lh = ((LexicalHandler) this.m_contentHandler); - - lh.endEntity(eref.getNodeName()); - } - } - break; - default : - } - } -} //TreeWalker - diff --git a/serializer/src/main/java/org/apache/xml/serializer/Version.java b/serializer/src/main/java/org/apache/xml/serializer/Version.java deleted file mode 100644 index a57bbd8d7..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/Version.java +++ /dev/null @@ -1,217 +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; - -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. - *

This class implements the upcoming standard of having - * org.apache.project-name.Version.getVersion() be a standard way - * to get version information.

- * @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 - * "Xalan Serializer Java v.r[.dd| Dnn]". - * - * @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. - *

- * 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. - *

- * 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() { - 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/serializer/src/main/java/org/apache/xml/serializer/WriterChain.java b/serializer/src/main/java/org/apache/xml/serializer/WriterChain.java deleted file mode 100644 index b9d4d28a6..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/WriterChain.java +++ /dev/null @@ -1,82 +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; - -import java.io.IOException; - -/** - * It is unfortunate that java.io.Writer is a class rather than an interface. - * The serializer has a number of classes that extend java.io.Writer - * and which send their ouput to a yet another wrapped Writer or OutputStream. - * - * The purpose of this interface is to force such classes to over-ride all of - * the important methods defined on the java.io.Writer class, namely these: - * - * write(int val) - * write(char[] chars) - * write(char[] chars, int start, int count) - * write(String chars) - * write(String chars, int start, int count) - * flush() - * close() - * - * In this manner nothing will accidentally go directly to - * the base class rather than to the wrapped Writer or OutputStream. - * - * The purpose of this class is to have a uniform way of chaining the output of one writer to - * the next writer in the chain. In addition there are methods to obtain the Writer or - * OutputStream that this object sends its output to. - * - * This interface is only for internal use withing the serializer. - * @xsl.usage internal - */ -interface WriterChain -{ - /** This method forces us to over-ride the method defined in java.io.Writer */ - public void write(int val) throws IOException; - /** This method forces us to over-ride the method defined in java.io.Writer */ - public void write(char[] chars) throws IOException; - /** This method forces us to over-ride the method defined in java.io.Writer */ - public void write(char[] chars, int start, int count) throws IOException; - /** This method forces us to over-ride the method defined in java.io.Writer */ - public void write(String chars) throws IOException; - /** This method forces us to over-ride the method defined in java.io.Writer */ - public void write(String chars, int start, int count) throws IOException; - /** This method forces us to over-ride the method defined in java.io.Writer */ - public void flush() throws IOException; - /** This method forces us to over-ride the method defined in java.io.Writer */ - public void close() throws IOException; - - /** - * If this method returns null, getOutputStream() must return non-null. - * Get the writer that this writer sends its output to. - * - * It is possible that the Writer returned by this method does not - * implement the WriterChain interface. - */ - public java.io.Writer getWriter(); - - /** - * If this method returns null, getWriter() must return non-null. - * Get the OutputStream that this writer sends its output to. - */ - public java.io.OutputStream getOutputStream(); -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/WriterToASCI.java b/serializer/src/main/java/org/apache/xml/serializer/WriterToASCI.java deleted file mode 100644 index 50c6f20b9..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/WriterToASCI.java +++ /dev/null @@ -1,155 +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; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.Writer; - - - -/** - * This class writes ASCII to a byte stream as quickly as possible. For the - * moment it does not do buffering, though I reserve the right to do some - * buffering down the line if I can prove that it will be faster even if the - * output stream is buffered. - * - * This class is only used internally within Xalan. - * - * @xsl.usage internal - */ -class WriterToASCI extends Writer implements WriterChain -{ - - /** The byte stream to write to. */ - private final OutputStream m_os; - - /** - * Create an unbuffered ASCII writer. - * - * - * @param os The byte stream to write to. - */ - public WriterToASCI(OutputStream os) - { - m_os = os; - } - - /** - * Write a portion of an array of characters. - * - * @param chars Array of characters - * @param start Offset from which to start writing characters - * @param length Number of characters to write - * - * @exception IOException If an I/O error occurs - * - * @throws java.io.IOException - */ - public void write(char chars[], int start, int length) - throws java.io.IOException - { - - int n = length+start; - - for (int i = start; i < n; i++) - { - m_os.write(chars[i]); - } - } - - /** - * Write a single character. The character to be written is contained in - * the 16 low-order bits of the given integer value; the 16 high-order bits - * are ignored. - * - *

Subclasses that intend to support efficient single-character output - * should override this method. - * - * @param c int specifying a character to be written. - * @exception IOException If an I/O error occurs - */ - public void write(int c) throws IOException - { - m_os.write(c); - } - - /** - * Write a string. - * - * @param s String to be written - * - * @exception IOException If an I/O error occurs - */ - public void write(String s) throws IOException - { - int n = s.length(); - for (int i = 0; i < n; i++) - { - m_os.write(s.charAt(i)); - } - } - - /** - * Flush the stream. If the stream has saved any characters from the - * various write() methods in a buffer, write them immediately to their - * intended destination. Then, if that destination is another character or - * byte stream, flush it. Thus one flush() invocation will flush all the - * buffers in a chain of Writers and OutputStreams. - * - * @exception IOException If an I/O error occurs - */ - public void flush() throws java.io.IOException - { - m_os.flush(); - } - - /** - * Close the stream, flushing it first. Once a stream has been closed, - * further write() or flush() invocations will cause an IOException to be - * thrown. Closing a previously-closed stream, however, has no effect. - * - * @exception IOException If an I/O error occurs - */ - public void close() throws java.io.IOException - { - m_os.close(); - } - - /** - * Get the output stream where the events will be serialized to. - * - * @return reference to the result stream, or null of only a writer was - * set. - */ - public OutputStream getOutputStream() - { - return m_os; - } - - /** - * Get the writer that this writer directly chains to. - */ - public Writer getWriter() - { - return null; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/WriterToUTF8Buffered.java b/serializer/src/main/java/org/apache/xml/serializer/WriterToUTF8Buffered.java deleted file mode 100644 index 9dbf53bcc..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/WriterToUTF8Buffered.java +++ /dev/null @@ -1,502 +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; - -import java.io.IOException; -import java.io.OutputStream; -import java.io.UnsupportedEncodingException; -import java.io.Writer; - - -/** - * This class writes unicode characters to a byte stream (java.io.OutputStream) - * as quickly as possible. It buffers the output in an internal - * buffer which must be flushed to the OutputStream when done. This flushing - * is done via the close() flush() or flushBuffer() method. - * - * This class is only used internally within Xalan. - * - * @xsl.usage internal - */ -final class WriterToUTF8Buffered extends Writer implements WriterChain -{ - - /** number of bytes that the byte buffer can hold. - * This is a fixed constant is used rather than m_outputBytes.lenght for performance. - */ - private static final int BYTES_MAX=16*1024; - /** number of characters that the character buffer can hold. - * This is 1/3 of the number of bytes because UTF-8 encoding - * can expand one unicode character by up to 3 bytes. - */ - private static final int CHARS_MAX=(BYTES_MAX/3); - - // private static final int - - /** The byte stream to write to. (sc & sb remove final to compile in JDK 1.1.8) */ - private final OutputStream m_os; - - /** - * The internal buffer where data is stored. - * (sc & sb remove final to compile in JDK 1.1.8) - */ - private final byte m_outputBytes[]; - - private final char m_inputChars[]; - - /** - * The number of valid bytes in the buffer. This value is always - * in the range 0 through m_outputBytes.length; elements - * m_outputBytes[0] through m_outputBytes[count-1] contain valid - * byte data. - */ - private int count; - - /** - * Create an buffered UTF-8 writer. - * - * - * @param out the underlying output stream. - * - * @throws UnsupportedEncodingException - */ - public WriterToUTF8Buffered(OutputStream out) - { - m_os = out; - // get 3 extra bytes to make buffer overflow checking simpler and faster - // we won't have to keep checking for a few extra characters - m_outputBytes = new byte[BYTES_MAX + 3]; - - // Big enough to hold the input chars that will be transformed - // into output bytes in m_ouputBytes. - m_inputChars = new char[CHARS_MAX + 2]; - count = 0; - -// the old body of this constructor, before the buffersize was changed to a constant -// this(out, 8*1024); - } - - /** - * Create an buffered UTF-8 writer to write data to the - * specified underlying output stream with the specified buffer - * size. - * - * @param out the underlying output stream. - * @param size the buffer size. - * @exception IllegalArgumentException if size <= 0. - */ -// public WriterToUTF8Buffered(final OutputStream out, final int size) -// { -// -// m_os = out; -// -// if (size <= 0) -// { -// throw new IllegalArgumentException( -// SerializerMessages.createMessage(SerializerErrorResources.ER_BUFFER_SIZE_LESSTHAN_ZERO, null)); //"Buffer size <= 0"); -// } -// -// m_outputBytes = new byte[size]; -// count = 0; -// } - - /** - * Write a single character. The character to be written is contained in - * the 16 low-order bits of the given integer value; the 16 high-order bits - * are ignored. - * - *

Subclasses that intend to support efficient single-character output - * should override this method. - * - * @param c int specifying a character to be written. - * @exception IOException If an I/O error occurs - */ - public void write(final int c) throws IOException - { - - /* If we are close to the end of the buffer then flush it. - * Remember the buffer can hold a few more bytes than BYTES_MAX - */ - if (count >= BYTES_MAX) - flushBuffer(); - - if (c < 0x80) - { - m_outputBytes[count++] = (byte) (c); - } - else if (c < 0x800) - { - m_outputBytes[count++] = (byte) (0xc0 + (c >> 6)); - m_outputBytes[count++] = (byte) (0x80 + (c & 0x3f)); - } - else if (c < 0x10000) - { - m_outputBytes[count++] = (byte) (0xe0 + (c >> 12)); - m_outputBytes[count++] = (byte) (0x80 + ((c >> 6) & 0x3f)); - m_outputBytes[count++] = (byte) (0x80 + (c & 0x3f)); - } - else - { - m_outputBytes[count++] = (byte) (0xf0 + (c >> 18)); - m_outputBytes[count++] = (byte) (0x80 + ((c >> 12) & 0x3f)); - m_outputBytes[count++] = (byte) (0x80 + ((c >> 6) & 0x3f)); - m_outputBytes[count++] = (byte) (0x80 + (c & 0x3f)); - } - - } - - - /** - * Write a portion of an array of characters. - * - * @param chars Array of characters - * @param start Offset from which to start writing characters - * @param length Number of characters to write - * - * @exception IOException If an I/O error occurs - * - * @throws java.io.IOException - */ - public void write(final char chars[], final int start, final int length) - throws java.io.IOException - { - - // We multiply the length by three since this is the maximum length - // of the characters that we can put into the buffer. It is possible - // for each Unicode character to expand to three bytes. - - int lengthx3 = 3*length; - - if (lengthx3 >= BYTES_MAX - count) - { - // The requested length is greater than the unused part of the buffer - flushBuffer(); - - if (lengthx3 > BYTES_MAX) - { - /* - * The requested length exceeds the size of the buffer. - * Cut the buffer up into chunks, each of which will - * not cause an overflow to the output buffer m_outputBytes, - * and make multiple recursive calls. - * Be careful about integer overflows in multiplication. - */ - int split = length/CHARS_MAX; - final int chunks; - if (length % CHARS_MAX > 0) - chunks = split + 1; - else - chunks = split; - int end_chunk = start; - for (int chunk = 1; chunk <= chunks; chunk++) - { - int start_chunk = end_chunk; - end_chunk = start + (int) ((((long) length) * chunk) / chunks); - - // Adjust the end of the chunk if it ends on a high char - // of a Unicode surrogate pair and low char of the pair - // is not going to be in the same chunk - final char c = chars[end_chunk - 1]; - int ic = chars[end_chunk - 1]; - if (c >= 0xD800 && c <= 0xDBFF) { - // The last Java char that we were going - // to process is the first of a - // Java surrogate char pair that - // represent a Unicode character. - - if (end_chunk < start + length) { - // Avoid spanning by including the low - // char in the current chunk of chars. - end_chunk++; - } else { - /* This is the last char of the last chunk, - * and it is the high char of a high/low pair with - * no low char provided. - * TODO: error message needed. - * The char array incorrectly ends in a high char - * of a high/low surrogate pair, but there is - * no corresponding low as the high is the last char - */ - end_chunk--; - } - } - - - int len_chunk = (end_chunk - start_chunk); - this.write(chars,start_chunk, len_chunk); - } - return; - } - } - - - - final int n = length+start; - final byte[] buf_loc = m_outputBytes; // local reference for faster access - int count_loc = count; // local integer for faster access - int i = start; - { - /* This block could be omitted and the code would produce - * the same result. But this block exists to give the JIT - * a better chance of optimizing a tight and common loop which - * occurs when writing out ASCII characters. - */ - char c; - for(; i < n && (c = chars[i])< 0x80 ; i++ ) - buf_loc[count_loc++] = (byte)c; - } - for (; i < n; i++) - { - - final char c = chars[i]; - - if (c < 0x80) - buf_loc[count_loc++] = (byte) (c); - else if (c < 0x800) - { - buf_loc[count_loc++] = (byte) (0xc0 + (c >> 6)); - buf_loc[count_loc++] = (byte) (0x80 + (c & 0x3f)); - } - /** - * The following else if condition is added to support XML 1.1 Characters for - * UTF-8: [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]* - * Unicode: [1101 10ww] [wwzz zzyy] (high surrogate) - * [1101 11yy] [yyxx xxxx] (low surrogate) - * * uuuuu = wwww + 1 - */ - else if (c >= 0xD800 && c <= 0xDBFF) - { - char high, low; - high = c; - i++; - low = chars[i]; - - buf_loc[count_loc++] = (byte) (0xF0 | (((high + 0x40) >> 8) & 0xf0)); - buf_loc[count_loc++] = (byte) (0x80 | (((high + 0x40) >> 2) & 0x3f)); - buf_loc[count_loc++] = (byte) (0x80 | ((low >> 6) & 0x0f) + ((high << 4) & 0x30)); - buf_loc[count_loc++] = (byte) (0x80 | (low & 0x3f)); - } - else - { - buf_loc[count_loc++] = (byte) (0xe0 + (c >> 12)); - buf_loc[count_loc++] = (byte) (0x80 + ((c >> 6) & 0x3f)); - buf_loc[count_loc++] = (byte) (0x80 + (c & 0x3f)); - } - } - // Store the local integer back into the instance variable - count = count_loc; - - } - - /** - * Write a string. - * - * @param s String to be written - * - * @exception IOException If an I/O error occurs - */ - public void write(final String s) throws IOException - { - - // We multiply the length by three since this is the maximum length - // of the characters that we can put into the buffer. It is possible - // for each Unicode character to expand to three bytes. - final int length = s.length(); - int lengthx3 = 3*length; - - if (lengthx3 >= BYTES_MAX - count) - { - // The requested length is greater than the unused part of the buffer - flushBuffer(); - - if (lengthx3 > BYTES_MAX) - { - /* - * The requested length exceeds the size of the buffer, - * so break it up in chunks that don't exceed the buffer size. - */ - final int start = 0; - int split = length/CHARS_MAX; - final int chunks; - if (length % CHARS_MAX > 0) - chunks = split + 1; - else - chunks = split; - int end_chunk = 0; - for (int chunk = 1; chunk <= chunks; chunk++) - { - int start_chunk = end_chunk; - end_chunk = start + (int) ((((long) length) * chunk) / chunks); - s.getChars(start_chunk,end_chunk, m_inputChars,0); - int len_chunk = (end_chunk - start_chunk); - - // Adjust the end of the chunk if it ends on a high char - // of a Unicode surrogate pair and low char of the pair - // is not going to be in the same chunk - final char c = m_inputChars[len_chunk - 1]; - if (c >= 0xD800 && c <= 0xDBFF) { - // Exclude char in this chunk, - // to avoid spanning a Unicode character - // that is in two Java chars as a high/low surrogate - end_chunk--; - len_chunk--; - if (chunk == chunks) { - /* TODO: error message needed. - * The String incorrectly ends in a high char - * of a high/low surrogate pair, but there is - * no corresponding low as the high is the last char - * Recover by ignoring this last char. - */ - } - } - - this.write(m_inputChars,0, len_chunk); - } - return; - } - } - - - s.getChars(0, length , m_inputChars, 0); - final char[] chars = m_inputChars; - final int n = length; - final byte[] buf_loc = m_outputBytes; // local reference for faster access - int count_loc = count; // local integer for faster access - int i = 0; - { - /* This block could be omitted and the code would produce - * the same result. But this block exists to give the JIT - * a better chance of optimizing a tight and common loop which - * occurs when writing out ASCII characters. - */ - char c; - for(; i < n && (c = chars[i])< 0x80 ; i++ ) - buf_loc[count_loc++] = (byte)c; - } - for (; i < n; i++) - { - - final char c = chars[i]; - - if (c < 0x80) - buf_loc[count_loc++] = (byte) (c); - else if (c < 0x800) - { - buf_loc[count_loc++] = (byte) (0xc0 + (c >> 6)); - buf_loc[count_loc++] = (byte) (0x80 + (c & 0x3f)); - } - /** - * The following else if condition is added to support XML 1.1 Characters for - * UTF-8: [1111 0uuu] [10uu zzzz] [10yy yyyy] [10xx xxxx]* - * Unicode: [1101 10ww] [wwzz zzyy] (high surrogate) - * [1101 11yy] [yyxx xxxx] (low surrogate) - * * uuuuu = wwww + 1 - */ - else if (c >= 0xD800 && c <= 0xDBFF) - { - char high, low; - high = c; - i++; - low = chars[i]; - - buf_loc[count_loc++] = (byte) (0xF0 | (((high + 0x40) >> 8) & 0xf0)); - buf_loc[count_loc++] = (byte) (0x80 | (((high + 0x40) >> 2) & 0x3f)); - buf_loc[count_loc++] = (byte) (0x80 | ((low >> 6) & 0x0f) + ((high << 4) & 0x30)); - buf_loc[count_loc++] = (byte) (0x80 | (low & 0x3f)); - } - else - { - buf_loc[count_loc++] = (byte) (0xe0 + (c >> 12)); - buf_loc[count_loc++] = (byte) (0x80 + ((c >> 6) & 0x3f)); - buf_loc[count_loc++] = (byte) (0x80 + (c & 0x3f)); - } - } - // Store the local integer back into the instance variable - count = count_loc; - - } - - /** - * Flush the internal buffer - * - * @throws IOException - */ - public void flushBuffer() throws IOException - { - - if (count > 0) - { - m_os.write(m_outputBytes, 0, count); - - count = 0; - } - } - - /** - * Flush the stream. If the stream has saved any characters from the - * various write() methods in a buffer, write them immediately to their - * intended destination. Then, if that destination is another character or - * byte stream, flush it. Thus one flush() invocation will flush all the - * buffers in a chain of Writers and OutputStreams. - * - * @exception IOException If an I/O error occurs - * - * @throws java.io.IOException - */ - public void flush() throws java.io.IOException - { - flushBuffer(); - m_os.flush(); - } - - /** - * Close the stream, flushing it first. Once a stream has been closed, - * further write() or flush() invocations will cause an IOException to be - * thrown. Closing a previously-closed stream, however, has no effect. - * - * @exception IOException If an I/O error occurs - * - * @throws java.io.IOException - */ - public void close() throws java.io.IOException - { - flushBuffer(); - m_os.close(); - } - - /** - * Get the output stream where the events will be serialized to. - * - * @return reference to the result stream, or null of only a writer was - * set. - */ - public OutputStream getOutputStream() - { - return m_os; - } - - public Writer getWriter() - { - // Only one of getWriter() or getOutputStream() can return null - // This type of writer wraps an OutputStream, not a Writer. - return null; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/XSLOutputAttributes.java b/serializer/src/main/java/org/apache/xml/serializer/XSLOutputAttributes.java deleted file mode 100644 index a285b154e..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/XSLOutputAttributes.java +++ /dev/null @@ -1,236 +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; - -import java.util.Vector; - -/** - * This interface has methods associated with the XSLT xsl:output attribues - * specified in the stylesheet that effect the format of the document output. - * - * In an XSLT stylesheet these attributes appear for example as: - *

- * <xsl:output method="xml" omit-xml-declaration="no" indent="yes"/>
- * 
- * The xsl:output attributes covered in this interface are: - *
- * version
- * encoding
- * omit-xml-declarations
- * standalone
- * doctype-public
- * doctype-system
- * cdata-section-elements
- * indent
- * media-type
- * 
- * - * The one attribute not covered in this interface is method as - * this value is implicitly chosen by the serializer that is created, for - * example ToXMLStream vs. ToHTMLStream or another one. - * - * This interface is only used internally within Xalan. - * - * @xsl.usage internal - */ -interface XSLOutputAttributes -{ - /** - * Returns the previously set value of the value to be used as the public - * identifier in the document type declaration (DTD). - * - *@return the public identifier to be used in the DOCTYPE declaration in the - * output document. - */ - public String getDoctypePublic(); - /** - * Returns the previously set value of the value to be used - * as the system identifier in the document type declaration (DTD). - * @return the system identifier to be used in the DOCTYPE declaration in - * the output document. - * - */ - public String getDoctypeSystem(); - /** - * @return the character encoding to be used in the output document. - */ - public String getEncoding(); - /** - * @return true if the output document should be indented to visually - * indicate its structure. - */ - public boolean getIndent(); - - /** - * @return the number of spaces to indent for each indentation level. - */ - public int getIndentAmount(); - /** - * @return the mediatype the media-type or MIME type associated with the - * output document. - */ - public String getMediaType(); - /** - * @return true if the XML declaration is to be omitted from the output - * document. - */ - public boolean getOmitXMLDeclaration(); - /** - * @return a value of "yes" if the standalone delaration is to - * be included in the output document. - */ - public String getStandalone(); - /** - * @return the version of the output format. - */ - public String getVersion(); - - - - - - - /** - * Sets the value coming from the xsl:output cdata-section-elements - * stylesheet property. - * - * This sets the elements whose text elements are to be output as CDATA - * sections. - * @param URI_and_localNames pairs of namespace URI and local names that - * identify elements whose text elements are to be output as CDATA sections. - * The namespace of the local element must be the given URI to match. The - * qName is not given because the prefix does not matter, only the namespace - * URI to which that prefix would map matters, so the prefix itself is not - * relevant in specifying which elements have their text to be output as - * CDATA sections. - */ - public void setCdataSectionElements(Vector URI_and_localNames); - - /** Set the value coming from the xsl:output doctype-public and doctype-system stylesheet properties - * @param system the system identifier to be used in the DOCTYPE declaration - * in the output document. - * @param pub the public identifier to be used in the DOCTYPE declaration in - * the output document. - */ - public void setDoctype(String system, String pub); - - /** Set the value coming from the xsl:output doctype-public stylesheet attribute. - * @param doctype the public identifier to be used in the DOCTYPE - * declaration in the output document. - */ - public void setDoctypePublic(String doctype); - /** Set the value coming from the xsl:output doctype-system stylesheet attribute. - * @param doctype the system identifier to be used in the DOCTYPE - * declaration in the output document. - */ - public void setDoctypeSystem(String doctype); - /** - * Sets the character encoding coming from the xsl:output encoding stylesheet attribute. - * @param encoding the character encoding - */ - public void setEncoding(String encoding); - /** - * Sets the value coming from the xsl:output indent stylesheet - * attribute. - * @param indent true if the output document should be indented to visually - * indicate its structure. - */ - public void setIndent(boolean indent); - /** - * Sets the value coming from the xsl:output media-type stylesheet attribute. - * @param mediatype the media-type or MIME type associated with the output - * document. - */ - public void setMediaType(String mediatype); - /** - * Sets the value coming from the xsl:output omit-xml-declaration stylesheet attribute - * @param b true if the XML declaration is to be omitted from the output - * document. - */ - public void setOmitXMLDeclaration(boolean b); - /** - * Sets the value coming from the xsl:output standalone stylesheet attribute. - * @param standalone a value of "yes" indicates that the - * standalone delaration is to be included in the output - * document. - */ - public void setStandalone(String standalone); - /** - * Sets the value coming from the xsl:output version attribute. - * @param version the version of the output format. - */ - public void setVersion(String version); - - /** - * Get the value for a property that affects seraialization, - * if a property was set return that value, otherwise return - * the default value, otherwise return null. - * @param name The name of the property, which is just the local name - * if it is in no namespace, but is the URI in curly braces followed by - * the local name if it is in a namespace, for example: - *
    - *
  • "encoding" - *
  • "method" - *
  • "{http://xml.apache.org/xalan}indent-amount" - *
  • "{http://xml.apache.org/xalan}line-separator" - *
- * @return The value of the parameter - */ - public String getOutputProperty(String name); - /** - * Get the default value for a property that affects seraialization, - * or null if there is none. It is possible that a non-default value - * was set for the property, however the value returned by this method - * is unaffected by any non-default settings. - * @param name The name of the property. - * @return The default value of the parameter, or null if there is no default value. - */ - public String getOutputPropertyDefault(String name); - /** - * Set the non-default value for a property that affects seraialization. - * @param name The name of the property, which is just the local name - * if it is in no namespace, but is the URI in curly braces followed by - * the local name if it is in a namespace, for example: - *
    - *
  • "encoding" - *
  • "method" - *
  • "{http://xml.apache.org/xalan}indent-amount" - *
  • "{http://xml.apache.org/xalan}line-separator" - *
- * @param val The non-default value of the parameter - */ - public void setOutputProperty(String name, String val); - - /** - * Set the default value for a property that affects seraialization. - * @param name The name of the property, which is just the local name - * if it is in no namespace, but is the URI in curly braces followed by - * the local name if it is in a namespace, for example: - *
    - *
  • "encoding" - *
  • "method" - *
  • "{http://xml.apache.org/xalan}indent-amount" - *
  • "{http://xml.apache.org/xalan}line-separator" - *
- * @param val The default value of the parameter - */ - public void setOutputPropertyDefault(String name, String val); -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3SerializerImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3SerializerImpl.java deleted file mode 100644 index e382ba5d7..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3SerializerImpl.java +++ /dev/null @@ -1,158 +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.dom3; - -import java.io.IOException; - -import org.apache.xml.serializer.DOM3Serializer; -import org.apache.xml.serializer.SerializationHandler; -import org.apache.xml.serializer.utils.WrappedRuntimeException; -import org.w3c.dom.DOMErrorHandler; -import org.w3c.dom.Node; -import org.w3c.dom.ls.LSSerializerFilter; - -/** - * This class implements the DOM3Serializer interface. - * - * @xsl.usage internal - */ -public final class DOM3SerializerImpl implements DOM3Serializer { - - /** - * Private class members - */ - // The DOMErrorHandler - private DOMErrorHandler fErrorHandler; - - // A LSSerializerFilter - private LSSerializerFilter fSerializerFilter; - - // A LSSerializerFilter - private String fNewLine; - - // A SerializationHandler ex. an instance of ToXMLStream - private SerializationHandler fSerializationHandler; - - /** - * Constructor - * - * @param handler An instance of the SerializationHandler interface. - */ - public DOM3SerializerImpl(SerializationHandler handler) { - fSerializationHandler = handler; - } - - // Public memebers - - /** - * Returns a DOMErrorHandler set on the DOM Level 3 Serializer. - * - * This interface is a public API. - * - * @return A Level 3 DOMErrorHandler - */ - public DOMErrorHandler getErrorHandler() { - return fErrorHandler; - } - - /** - * Returns a LSSerializerFilter set on the DOM Level 3 Serializer to filter nodes - * during serialization. - * - * This interface is a public API. - * - * @return The Level 3 LSSerializerFilter - */ - public LSSerializerFilter getNodeFilter() { - return fSerializerFilter; - } - - /** - * @return char[] containing the end-of-line sequence of characters to be used during serialization. - */ - public char[] getNewLine() { - return (fNewLine != null) ? fNewLine.toCharArray() : null; - } - - /** - * Serializes the Level 3 DOM node by creating an instance of DOM3TreeWalker - * which traverses the DOM tree and invokes handler events to serialize - * the DOM NOde. Throws an exception only if an I/O exception occured - * while serializing. - * This interface is a public API. - * - * @param node the Level 3 DOM node to serialize - * @throws IOException if an I/O exception occured while serializing - */ - public void serializeDOM3(Node node) throws IOException { - try { - DOM3TreeWalker walker = new DOM3TreeWalker(fSerializationHandler, - fErrorHandler, fSerializerFilter, fNewLine); - - walker.traverse(node); - } catch (org.xml.sax.SAXException se) { - throw new WrappedRuntimeException(se); - } - } - - /** - * Sets a DOMErrorHandler on the DOM Level 3 Serializer. - * - * This interface is a public API. - * - * @param handler the Level 3 DOMErrorHandler - */ - public void setErrorHandler(DOMErrorHandler handler) { - fErrorHandler = handler; - } - - /** - * Sets a LSSerializerFilter on the DOM Level 3 Serializer to filter nodes - * during serialization. - * - * This interface is a public API. - * - * @param filter the Level 3 LSSerializerFilter - */ - public void setNodeFilter(LSSerializerFilter filter) { - fSerializerFilter = filter; - } - - /** - * Sets a SerializationHandler on the DOM Serializer. - * - * This interface is a public API. - * - * @param handler An instance of SerializationHandler - */ - public void setSerializationHandler(SerializationHandler handler) { - fSerializationHandler = handler; - } - - /** - * Sets the end-of-line sequence of characters to be used during serialization. - * @param newLine The end-of-line sequence of characters to be used during serialization. - */ - public void setNewLine(char[] newLine) { - fNewLine = (newLine != null) ? new String(newLine) : null; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java deleted file mode 100644 index 7dba2249b..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOM3TreeWalker.java +++ /dev/null @@ -1,2149 +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.dom3; - -import java.io.File; -import java.io.IOException; -import java.io.Writer; -import java.util.Enumeration; -import java.util.Hashtable; -import java.util.Properties; - -import org.apache.xml.serializer.dom3.NamespaceSupport; -import org.apache.xml.serializer.OutputPropertiesFactory; -import org.apache.xml.serializer.SerializationHandler; -import org.apache.xml.serializer.utils.MsgKey; -import org.apache.xml.serializer.utils.Utils; -import org.apache.xml.serializer.utils.XML11Char; -import org.apache.xml.serializer.utils.XMLChar; -import org.w3c.dom.Attr; -import org.w3c.dom.CDATASection; -import org.w3c.dom.Comment; -import org.w3c.dom.DOMError; -import org.w3c.dom.DOMErrorHandler; -import org.w3c.dom.Document; -import org.w3c.dom.DocumentType; -import org.w3c.dom.Element; -import org.w3c.dom.Entity; -import org.w3c.dom.EntityReference; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; -import org.w3c.dom.NodeList; -import org.w3c.dom.ProcessingInstruction; -import org.w3c.dom.Text; -import org.w3c.dom.ls.LSSerializerFilter; -import org.w3c.dom.traversal.NodeFilter; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; -import org.xml.sax.ext.LexicalHandler; -import org.xml.sax.helpers.LocatorImpl; - -/** - * Built on org.apache.xml.serializer.TreeWalker and adds functionality to - * traverse and serialize a DOM Node (Level 2 or Level 3) as specified in - * the DOM Level 3 LS Recommedation by evaluating and applying DOMConfiguration - * parameters and filters if any during serialization. - * - * @xsl.usage internal - */ -final class DOM3TreeWalker { - - /** - * The SerializationHandler, it extends ContentHandler and when - * this class is instantiated via the constructor provided, a - * SerializationHandler object is passed to it. - */ - private SerializationHandler fSerializer = null; - - /** We do not need DOM2Helper since DOM Level 3 LS applies to DOM Level 2 or newer */ - - /** Locator object for this TreeWalker */ - private LocatorImpl fLocator = new LocatorImpl(); - - /** ErrorHandler */ - private DOMErrorHandler fErrorHandler = null; - - /** LSSerializerFilter */ - private LSSerializerFilter fFilter = null; - - /** If the serializer is an instance of a LexicalHandler */ - private LexicalHandler fLexicalHandler = null; - - private int fWhatToShowFilter; - - /** New Line character to use in serialization */ - private String fNewLine = null; - - /** DOMConfiguration Properties */ - private Properties fDOMConfigProperties = null; - - /** Keeps track if we are in an entity reference when entities=true */ - private boolean fInEntityRef = false; - - /** Stores the version of the XML document to be serialize */ - private String fXMLVersion = null; - - /** XML Version, default 1.0 */ - private boolean fIsXMLVersion11 = false; - - /** Is the Node a Level 3 DOM node */ - private boolean fIsLevel3DOM = false; - - /** DOM Configuration Parameters */ - private int fFeatures = 0; - - /** Flag indicating whether following text to be processed is raw text */ - boolean fNextIsRaw = false; - - // - private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/"; - - // - private static final String XMLNS_PREFIX = "xmlns"; - - // - private static final String XML_URI = "http://www.w3.org/XML/1998/namespace"; - - // - private static final String XML_PREFIX = "xml"; - - /** stores namespaces in scope */ - protected NamespaceSupport fNSBinder; - - /** stores all namespace bindings on the current element */ - protected NamespaceSupport fLocalNSBinder; - - /** stores the current element depth */ - private int fElementDepth = 0; - - // *********************************************************************** - // DOMConfiguration paramter settings - // *********************************************************************** - // Parameter canonical-form, true [optional] - NOT SUPPORTED - private final static int CANONICAL = 0x1 << 0; - - // Parameter cdata-sections, true [required] (default) - private final static int CDATA = 0x1 << 1; - - // Parameter check-character-normalization, true [optional] - NOT SUPPORTED - private final static int CHARNORMALIZE = 0x1 << 2; - - // Parameter comments, true [required] (default) - private final static int COMMENTS = 0x1 << 3; - - // Parameter datatype-normalization, true [optional] - NOT SUPPORTED - private final static int DTNORMALIZE = 0x1 << 4; - - // Parameter element-content-whitespace, true [required] (default) - value - false [optional] NOT SUPPORTED - private final static int ELEM_CONTENT_WHITESPACE = 0x1 << 5; - - // Parameter entities, true [required] (default) - private final static int ENTITIES = 0x1 << 6; - - // Parameter infoset, true [required] (default), false has no effect --> True has no effect for the serializer - private final static int INFOSET = 0x1 << 7; - - // Parameter namespaces, true [required] (default) - private final static int NAMESPACES = 0x1 << 8; - - // Parameter namespace-declarations, true [required] (default) - private final static int NAMESPACEDECLS = 0x1 << 9; - - // Parameter normalize-characters, true [optional] - NOT SUPPORTED - private final static int NORMALIZECHARS = 0x1 << 10; - - // Parameter split-cdata-sections, true [required] (default) - private final static int SPLITCDATA = 0x1 << 11; - - // Parameter validate, true [optional] - NOT SUPPORTED - private final static int VALIDATE = 0x1 << 12; - - // Parameter validate-if-schema, true [optional] - NOT SUPPORTED - private final static int SCHEMAVALIDATE = 0x1 << 13; - - // Parameter split-cdata-sections, true [required] (default) - private final static int WELLFORMED = 0x1 << 14; - - // Parameter discard-default-content, true [required] (default) - // Not sure how this will be used in level 2 Documents - private final static int DISCARDDEFAULT = 0x1 << 15; - - // Parameter format-pretty-print, true [optional] - private final static int PRETTY_PRINT = 0x1 << 16; - - // Parameter ignore-unknown-character-denormalizations, true [required] (default) - // We currently do not support XML 1.1 character normalization - private final static int IGNORE_CHAR_DENORMALIZE = 0x1 << 17; - - // Parameter discard-default-content, true [required] (default) - private final static int XMLDECL = 0x1 << 18; - - /** - * Constructor. - * @param contentHandler serialHandler The implemention of the SerializationHandler interface - */ - DOM3TreeWalker( - SerializationHandler serialHandler, - DOMErrorHandler errHandler, - LSSerializerFilter filter, - String newLine) { - fSerializer = serialHandler; - //fErrorHandler = errHandler == null ? new DOMErrorHandlerImpl() : errHandler; // Should we be using the default? - fErrorHandler = errHandler; - fFilter = filter; - fLexicalHandler = null; - fNewLine = newLine; - - fNSBinder = new NamespaceSupport(); - fLocalNSBinder = new NamespaceSupport(); - - fDOMConfigProperties = fSerializer.getOutputFormat(); - fSerializer.setDocumentLocator(fLocator); - initProperties(fDOMConfigProperties); - - try { - // Bug see Bugzilla 26741 - fLocator.setSystemId( - System.getProperty("user.dir") + File.separator + "dummy.xsl"); - } catch (SecurityException se) { // user.dir not accessible from applet - - } - } - - /** - * Perform a pre-order traversal non-recursive style. - * - * Note that TreeWalker assumes that the subtree is intended to represent - * a complete (though not necessarily well-formed) document and, during a - * traversal, startDocument and endDocument will always be issued to the - * SAX listener. - * - * @param pos Node in the tree where to start traversal - * - * @throws TransformerException - */ - public void traverse(Node pos) throws org.xml.sax.SAXException { - this.fSerializer.startDocument(); - - // Determine if the Node is a DOM Level 3 Core Node. - if (pos.getNodeType() != Node.DOCUMENT_NODE) { - Document ownerDoc = pos.getOwnerDocument(); - if (ownerDoc != null - && ownerDoc.getImplementation().hasFeature("Core", "3.0")) { - fIsLevel3DOM = true; - } - } else { - if (((Document) pos) - .getImplementation() - .hasFeature("Core", "3.0")) { - fIsLevel3DOM = true; - } - } - - if (fSerializer instanceof LexicalHandler) { - fLexicalHandler = ((LexicalHandler) this.fSerializer); - } - - if (fFilter != null) - fWhatToShowFilter = fFilter.getWhatToShow(); - - Node top = pos; - - while (null != pos) { - startNode(pos); - - Node nextNode = null; - - nextNode = pos.getFirstChild(); - - while (null == nextNode) { - endNode(pos); - - if (top.equals(pos)) - break; - - nextNode = pos.getNextSibling(); - - if (null == nextNode) { - pos = pos.getParentNode(); - - if ((null == pos) || (top.equals(pos))) { - if (null != pos) - endNode(pos); - - nextNode = null; - - break; - } - } - } - - pos = nextNode; - } - this.fSerializer.endDocument(); - } - - /** - * Perform a pre-order traversal non-recursive style. - - * Note that TreeWalker assumes that the subtree is intended to represent - * a complete (though not necessarily well-formed) document and, during a - * traversal, startDocument and endDocument will always be issued to the - * SAX listener. - * - * @param pos Node in the tree where to start traversal - * @param top Node in the tree where to end traversal - * - * @throws TransformerException - */ - public void traverse(Node pos, Node top) throws org.xml.sax.SAXException { - - this.fSerializer.startDocument(); - - // Determine if the Node is a DOM Level 3 Core Node. - if (pos.getNodeType() != Node.DOCUMENT_NODE) { - Document ownerDoc = pos.getOwnerDocument(); - if (ownerDoc != null - && ownerDoc.getImplementation().hasFeature("Core", "3.0")) { - fIsLevel3DOM = true; - } - } else { - if (((Document) pos) - .getImplementation() - .hasFeature("Core", "3.0")) { - fIsLevel3DOM = true; - } - } - - if (fSerializer instanceof LexicalHandler) { - fLexicalHandler = ((LexicalHandler) this.fSerializer); - } - - if (fFilter != null) - fWhatToShowFilter = fFilter.getWhatToShow(); - - while (null != pos) { - startNode(pos); - - Node nextNode = null; - - nextNode = pos.getFirstChild(); - - while (null == nextNode) { - endNode(pos); - - if ((null != top) && top.equals(pos)) - break; - - nextNode = pos.getNextSibling(); - - if (null == nextNode) { - pos = pos.getParentNode(); - - if ((null == pos) || ((null != top) && top.equals(pos))) { - nextNode = null; - - break; - } - } - } - - pos = nextNode; - } - this.fSerializer.endDocument(); - } - - /** - * Optimized dispatch of characters. - */ - private final void dispatachChars(Node node) - throws org.xml.sax.SAXException { - if (fSerializer != null) { - this.fSerializer.characters(node); - } else { - String data = ((Text) node).getData(); - this.fSerializer.characters(data.toCharArray(), 0, data.length()); - } - } - - /** - * Start processing given node - * - * @param node Node to process - * - * @throws org.xml.sax.SAXException - */ - protected void startNode(Node node) throws org.xml.sax.SAXException { - if (node instanceof Locator) { - Locator loc = (Locator) node; - fLocator.setColumnNumber(loc.getColumnNumber()); - fLocator.setLineNumber(loc.getLineNumber()); - fLocator.setPublicId(loc.getPublicId()); - fLocator.setSystemId(loc.getSystemId()); - } else { - fLocator.setColumnNumber(0); - fLocator.setLineNumber(0); - } - - switch (node.getNodeType()) { - case Node.DOCUMENT_TYPE_NODE : - serializeDocType((DocumentType) node, true); - break; - case Node.COMMENT_NODE : - serializeComment((Comment) node); - break; - case Node.DOCUMENT_FRAGMENT_NODE : - // Children are traversed - break; - case Node.DOCUMENT_NODE : - break; - case Node.ELEMENT_NODE : - serializeElement((Element) node, true); - break; - case Node.PROCESSING_INSTRUCTION_NODE : - serializePI((ProcessingInstruction) node); - break; - case Node.CDATA_SECTION_NODE : - serializeCDATASection((CDATASection) node); - break; - case Node.TEXT_NODE : - serializeText((Text) node); - break; - case Node.ENTITY_REFERENCE_NODE : - serializeEntityReference((EntityReference) node, true); - break; - default : - } - } - - /** - * End processing of given node - * - * - * @param node Node we just finished processing - * - * @throws org.xml.sax.SAXException - */ - protected void endNode(Node node) throws org.xml.sax.SAXException { - - switch (node.getNodeType()) { - case Node.DOCUMENT_NODE : - break; - case Node.DOCUMENT_TYPE_NODE : - serializeDocType((DocumentType) node, false); - break; - case Node.ELEMENT_NODE : - serializeElement((Element) node, false); - break; - case Node.CDATA_SECTION_NODE : - break; - case Node.ENTITY_REFERENCE_NODE : - serializeEntityReference((EntityReference) node, false); - break; - default : - } - } - - // *********************************************************************** - // Node serialization methods - // *********************************************************************** - /** - * Applies a filter on the node to serialize - * - * @param node The Node to serialize - * @return True if the node is to be serialized else false if the node - * is to be rejected or skipped. - */ - protected boolean applyFilter(Node node, int nodeType) { - if (fFilter != null && (fWhatToShowFilter & nodeType) != 0) { - - short code = fFilter.acceptNode(node); - switch (code) { - case NodeFilter.FILTER_REJECT : - case NodeFilter.FILTER_SKIP : - return false; // skip the node - default : // fall through.. - } - } - return true; - } - - /** - * Serializes a Document Type Node. - * - * @param node The Docuemnt Type Node to serialize - * @param bStart Invoked at the start or end of node. Default true. - */ - protected void serializeDocType(DocumentType node, boolean bStart) - throws SAXException { - // The DocType and internalSubset can not be modified in DOM and is - // considered to be well-formed as the outcome of successful parsing. - String docTypeName = node.getNodeName(); - String publicId = node.getPublicId(); - String systemId = node.getSystemId(); - String internalSubset = node.getInternalSubset(); - - //DocumentType nodes are never passed to the filter - - if (internalSubset != null && !"".equals(internalSubset)) { - - if (bStart) { - try { - // The Serializer does not provide a way to write out the - // DOCTYPE internal subset via an event call, so we write it - // out here. - Writer writer = fSerializer.getWriter(); - StringBuffer dtd = new StringBuffer(); - - dtd.append(""); - dtd.append(fNewLine); - - writer.write(dtd.toString()); - writer.flush(); - - } catch (IOException e) { - throw new SAXException(Utils.messages.createMessage( - MsgKey.ER_WRITING_INTERNAL_SUBSET, null), e); - } - } // else if !bStart do nothing - - } else { - - if (bStart) { - if (fLexicalHandler != null) { - fLexicalHandler.startDTD(docTypeName, publicId, systemId); - } - } else { - if (fLexicalHandler != null) { - fLexicalHandler.endDTD(); - } - } - } - } - - /** - * Serializes a Comment Node. - * - * @param node The Comment Node to serialize - */ - protected void serializeComment(Comment node) throws SAXException { - // comments=true - if ((fFeatures & COMMENTS) != 0) { - String data = node.getData(); - - // well-formed=true - if ((fFeatures & WELLFORMED) != 0) { - isCommentWellFormed(data); - } - - if (fLexicalHandler != null) { - // apply the LSSerializer filter after the operations requested by the - // DOMConfiguration parameters have been applied - if (!applyFilter(node, NodeFilter.SHOW_COMMENT)) { - return; - } - - fLexicalHandler.comment(data.toCharArray(), 0, data.length()); - } - } - } - - /** - * Serializes an Element Node. - * - * @param node The Element Node to serialize - * @param bStart Invoked at the start or end of node. - */ - protected void serializeElement(Element node, boolean bStart) - throws SAXException { - if (bStart) { - fElementDepth++; - - // We use the Xalan specific startElement and starPrefixMapping calls - // (and addAttribute and namespaceAfterStartElement) as opposed to - // SAX specific, for performance reasons as they reduce the overhead - // of creating an AttList object upfront. - - // well-formed=true - if ((fFeatures & WELLFORMED) != 0) { - isElementWellFormed(node); - } - - // REVISIT: We apply the LSSerializer filter for elements before - // namesapce fixup - if (!applyFilter(node, NodeFilter.SHOW_ELEMENT)) { - return; - } - - // namespaces=true, record and fixup namspaced element - if ((fFeatures & NAMESPACES) != 0) { - fNSBinder.pushContext(); - fLocalNSBinder.reset(); - - recordLocalNSDecl(node); - fixupElementNS(node); - } - - // Namespace normalization - fSerializer.startElement( - node.getNamespaceURI(), - node.getLocalName(), - node.getNodeName()); - - serializeAttList(node); - - } else { - fElementDepth--; - - // apply the LSSerializer filter - if (!applyFilter(node, NodeFilter.SHOW_ELEMENT)) { - return; - } - - this.fSerializer.endElement( - node.getNamespaceURI(), - node.getLocalName(), - node.getNodeName()); - // since endPrefixMapping was not used by SerializationHandler it was removed - // for performance reasons. - - if ((fFeatures & NAMESPACES) != 0 ) { - fNSBinder.popContext(); - } - - } - } - - /** - * Serializes the Attr Nodes of an Element. - * - * @param node The OwnerElement whose Attr Nodes are to be serialized. - */ - protected void serializeAttList(Element node) throws SAXException { - NamedNodeMap atts = node.getAttributes(); - int nAttrs = atts.getLength(); - - for (int i = 0; i < nAttrs; i++) { - Node attr = atts.item(i); - - String localName = attr.getLocalName(); - String attrName = attr.getNodeName(); - String attrPrefix = attr.getPrefix() == null ? "" : attr.getPrefix(); - String attrValue = attr.getNodeValue(); - - // Determine the Attr's type. - String type = null; - if (fIsLevel3DOM) { - type = ((Attr) attr).getSchemaTypeInfo().getTypeName(); - } - type = type == null ? "CDATA" : type; - - String attrNS = attr.getNamespaceURI(); - if (attrNS !=null && attrNS.length() == 0) { - attrNS=null; - // we must remove prefix for this attribute - attrName=attr.getLocalName(); - } - - boolean isSpecified = ((Attr) attr).getSpecified(); - boolean addAttr = true; - boolean applyFilter = false; - boolean xmlnsAttr = - attrName.equals("xmlns") || attrName.startsWith("xmlns:"); - - // well-formed=true - if ((fFeatures & WELLFORMED) != 0) { - isAttributeWellFormed(attr); - } - - //----------------------------------------------------------------- - // start Attribute namespace fixup - //----------------------------------------------------------------- - // namespaces=true, normalize all non-namespace attributes - // Step 3. Attribute - if ((fFeatures & NAMESPACES) != 0 && !xmlnsAttr) { - - // If the Attr has a namespace URI - if (attrNS != null) { - attrPrefix = attrPrefix == null ? "" : attrPrefix; - - String declAttrPrefix = fNSBinder.getPrefix(attrNS); - String declAttrNS = fNSBinder.getURI(attrPrefix); - - // attribute has no prefix (default namespace decl does not apply to - // attributes) - // OR - // attribute prefix is not declared - // OR - // conflict: attribute has a prefix that conflicts with a binding - if ("".equals(attrPrefix) || "".equals(declAttrPrefix) - || !attrPrefix.equals(declAttrPrefix)) { - - // namespaceURI matches an in scope declaration of one or - // more prefixes - if (declAttrPrefix != null && !"".equals(declAttrPrefix)) { - // pick the prefix that was found and change attribute's - // prefix and nodeName. - attrPrefix = declAttrPrefix; - - if (declAttrPrefix.length() > 0 ) { - attrName = declAttrPrefix + ":" + localName; - } else { - attrName = localName; - } - } else { - // The current prefix is not null and it has no in scope - // declaration - if (attrPrefix != null && !"".equals(attrPrefix) - && declAttrNS == null) { - // declare this prefix - if ((fFeatures & NAMESPACEDECLS) != 0) { - fSerializer.addAttribute(XMLNS_URI, attrPrefix, - XMLNS_PREFIX + ":" + attrPrefix, "CDATA", - attrNS); - fNSBinder.declarePrefix(attrPrefix, attrNS); - fLocalNSBinder.declarePrefix(attrPrefix, attrNS); - } - } else { - // find a prefix following the pattern "NS" +index - // (starting at 1) - // make sure this prefix is not declared in the current - // scope. - int counter = 1; - attrPrefix = "NS" + counter++; - - while (fLocalNSBinder.getURI(attrPrefix) != null) { - attrPrefix = "NS" + counter++; - } - // change attribute's prefix and Name - attrName = attrPrefix + ":" + localName; - - // create a local namespace declaration attribute - // Add the xmlns declaration attribute - if ((fFeatures & NAMESPACEDECLS) != 0) { - - fSerializer.addAttribute(XMLNS_URI, attrPrefix, - XMLNS_PREFIX + ":" + attrPrefix, "CDATA", - attrNS); - fNSBinder.declarePrefix(attrPrefix, attrNS); - fLocalNSBinder.declarePrefix(attrPrefix, attrNS); - } - } - } - } - - } else { // if the Attr has no namespace URI - // Attr has no localName - if (localName == null) { - // DOM Level 1 node! - String msg = Utils.messages.createMessage( - MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - new Object[] { attrName }); - - if (fErrorHandler != null) { - fErrorHandler - .handleError(new DOMErrorImpl( - DOMError.SEVERITY_ERROR, msg, - MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, null, - null, null)); - } - - } else { // uri=null and no colon - // attr has no namespace URI and no prefix - // no action is required, since attrs don't use default - } - } - - } - - - // discard-default-content=true - // Default attr's are not passed to the filter and this contraint - // is applied only when discard-default-content=true - // What about default xmlns attributes???? check for xmlnsAttr - if ((((fFeatures & DISCARDDEFAULT) != 0) && isSpecified) - || ((fFeatures & DISCARDDEFAULT) == 0)) { - applyFilter = true; - } else { - addAttr = false; - } - - if (applyFilter) { - // apply the filter for Attributes that are not default attributes - // or namespace decl attributes - if (fFilter != null - && (fFilter.getWhatToShow() & NodeFilter.SHOW_ATTRIBUTE) - != 0) { - - if (!xmlnsAttr) { - short code = fFilter.acceptNode(attr); - switch (code) { - case NodeFilter.FILTER_REJECT : - case NodeFilter.FILTER_SKIP : - addAttr = false; - break; - default : //fall through.. - } - } - } - } - - // if the node is a namespace node - if (addAttr && xmlnsAttr) { - // If namespace-declarations=true, add the node , else don't add it - if ((fFeatures & NAMESPACEDECLS) != 0) { - // The namespace may have been fixed up, in that case don't add it. - if (localName != null && !"".equals(localName)) { - fSerializer.addAttribute(attrNS, localName, attrName, type, attrValue); - } - } - } else if ( - addAttr && !xmlnsAttr) { // if the node is not a namespace node - // If namespace-declarations=true, add the node with the Attr nodes namespaceURI - // else add the node setting it's namespace to null or else the serializer will later - // attempt to add a xmlns attr for the prefixed attribute - if (((fFeatures & NAMESPACEDECLS) != 0) && (attrNS != null)) { - fSerializer.addAttribute( - attrNS, - localName, - attrName, - type, - attrValue); - } else { - fSerializer.addAttribute( - "", - localName, - attrName, - type, - attrValue); - } - } - - // - if (xmlnsAttr && ((fFeatures & NAMESPACEDECLS) != 0)) { - int index; - // Use "" instead of null, as Xerces likes "" for the - // name of the default namespace. Fix attributed - // to "Steven Murray" . - String prefix = - (index = attrName.indexOf(":")) < 0 - ? "" - : attrName.substring(index + 1); - - if (!"".equals(prefix)) { - fSerializer.namespaceAfterStartElement(prefix, attrValue); - } - } - } - - } - - /** - * Serializes an ProcessingInstruction Node. - * - * @param node The ProcessingInstruction Node to serialize - */ - protected void serializePI(ProcessingInstruction node) - throws SAXException { - ProcessingInstruction pi = node; - String name = pi.getNodeName(); - - // well-formed=true - if ((fFeatures & WELLFORMED) != 0) { - isPIWellFormed(node); - } - - // apply the LSSerializer filter - if (!applyFilter(node, NodeFilter.SHOW_PROCESSING_INSTRUCTION)) { - return; - } - - // String data = pi.getData(); - if (name.equals("xslt-next-is-raw")) { - fNextIsRaw = true; - } else { - this.fSerializer.processingInstruction(name, pi.getData()); - } - } - - /** - * Serializes an CDATASection Node. - * - * @param node The CDATASection Node to serialize - */ - protected void serializeCDATASection(CDATASection node) - throws SAXException { - // well-formed=true - if ((fFeatures & WELLFORMED) != 0) { - isCDATASectionWellFormed(node); - } - - // cdata-sections = true - if ((fFeatures & CDATA) != 0) { - - // split-cdata-sections = true - // Assumption: This parameter has an effect only when - // cdata-sections=true - // ToStream, by default splits cdata-sections. Hence the check - // below. - String nodeValue = node.getNodeValue(); - int endIndex = nodeValue.indexOf("]]>"); - if ((fFeatures & SPLITCDATA) != 0) { - if (endIndex >= 0) { - // The first node split will contain the ]] markers - String relatedData = nodeValue.substring(0, endIndex + 2); - - String msg = - Utils.messages.createMessage( - MsgKey.ER_CDATA_SECTIONS_SPLIT, - null); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_WARNING, - msg, - MsgKey.ER_CDATA_SECTIONS_SPLIT, - null, - relatedData, - null)); - } - } - } else { - if (endIndex >= 0) { - // The first node split will contain the ]] markers - String relatedData = nodeValue.substring(0, endIndex + 2); - - String msg = - Utils.messages.createMessage( - MsgKey.ER_CDATA_SECTIONS_SPLIT, - null); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_ERROR, - msg, - MsgKey.ER_CDATA_SECTIONS_SPLIT)); - } - // Report an error and return. What error??? - return; - } - } - - // apply the LSSerializer filter - if (!applyFilter(node, NodeFilter.SHOW_CDATA_SECTION)) { - return; - } - - // splits the cdata-section - if (fLexicalHandler != null) { - fLexicalHandler.startCDATA(); - } - dispatachChars(node); - if (fLexicalHandler != null) { - fLexicalHandler.endCDATA(); - } - } else { - dispatachChars(node); - } - } - - /** - * Serializes an Text Node. - * - * @param node The Text Node to serialize - */ - protected void serializeText(Text node) throws SAXException { - if (fNextIsRaw) { - fNextIsRaw = false; - fSerializer.processingInstruction( - javax.xml.transform.Result.PI_DISABLE_OUTPUT_ESCAPING, - ""); - dispatachChars(node); - fSerializer.processingInstruction( - javax.xml.transform.Result.PI_ENABLE_OUTPUT_ESCAPING, - ""); - } else { - // keep track of dispatch or not to avoid duplicaiton of filter code - boolean bDispatch = false; - - // well-formed=true - if ((fFeatures & WELLFORMED) != 0) { - isTextWellFormed(node); - } - - // if the node is whitespace - // Determine the Attr's type. - boolean isElementContentWhitespace = false; - if (fIsLevel3DOM) { - isElementContentWhitespace = - node.isElementContentWhitespace(); - } - - if (isElementContentWhitespace) { - // element-content-whitespace=true - if ((fFeatures & ELEM_CONTENT_WHITESPACE) != 0) { - bDispatch = true; - } - } else { - bDispatch = true; - } - - // apply the LSSerializer filter - if (!applyFilter(node, NodeFilter.SHOW_TEXT)) { - return; - } - - if (bDispatch) { - dispatachChars(node); - } - } - } - - /** - * Serializes an EntityReference Node. - * - * @param node The EntityReference Node to serialize - * @param bStart Inicates if called from start or endNode - */ - protected void serializeEntityReference( - EntityReference node, - boolean bStart) - throws SAXException { - if (bStart) { - EntityReference eref = node; - // entities=true - if ((fFeatures & ENTITIES) != 0) { - - // perform well-formedness and other checking only if - // entities = true - - // well-formed=true - if ((fFeatures & WELLFORMED) != 0) { - isEntityReferneceWellFormed(node); - } - - // check "unbound-prefix-in-entity-reference" [fatal] - // Raised if the configuration parameter "namespaces" is set to true - if ((fFeatures & NAMESPACES) != 0) { - checkUnboundPrefixInEntRef(node); - } - - // The filter should not apply in this case, since the - // EntityReference is not being expanded. - // should we pass entity reference nodes to the filter??? - } - - if (fLexicalHandler != null) { - - // startEntity outputs only Text but not Element, Attr, Comment - // and PI child nodes. It does so by setting the m_inEntityRef - // in ToStream and using this to decide if a node is to be - // serialized or not. - fLexicalHandler.startEntity(eref.getNodeName()); - } - - } else { - EntityReference eref = node; - // entities=true or false, - if (fLexicalHandler != null) { - fLexicalHandler.endEntity(eref.getNodeName()); - } - } - } - - - // *********************************************************************** - // Methods to check well-formedness - // *********************************************************************** - /** - * Taken from org.apache.xerces.dom.CoreDocumentImpl - * - * Check the string against XML's definition of acceptable names for - * elements and attributes and so on using the XMLCharacterProperties - * utility class - */ - protected boolean isXMLName(String s, boolean xml11Version) { - - if (s == null) { - return false; - } - if (!xml11Version) - return XMLChar.isValidName(s); - else - return XML11Char.isXML11ValidName(s); - } - - /** - * Taken from org.apache.xerces.dom.CoreDocumentImpl - * - * Checks if the given qualified name is legal with respect - * to the version of XML to which this document must conform. - * - * @param prefix prefix of qualified name - * @param local local part of qualified name - */ - protected boolean isValidQName( - String prefix, - String local, - boolean xml11Version) { - - // check that both prefix and local part match NCName - if (local == null) - return false; - boolean validNCName = false; - - if (!xml11Version) { - validNCName = - (prefix == null || XMLChar.isValidNCName(prefix)) - && XMLChar.isValidNCName(local); - } else { - validNCName = - (prefix == null || XML11Char.isXML11ValidNCName(prefix)) - && XML11Char.isXML11ValidNCName(local); - } - - return validNCName; - } - - /** - * Checks if a XML character is well-formed - * - * @param characters A String of characters to be checked for Well-Formedness - * @param refInvalidChar A reference to the character to be returned that was determined invalid. - */ - protected boolean isWFXMLChar(String chardata, Character refInvalidChar) { - if (chardata == null || (chardata.length() == 0)) { - return true; - } - - char[] dataarray = chardata.toCharArray(); - int datalength = dataarray.length; - - // version of the document is XML 1.1 - if (fIsXMLVersion11) { - //we need to check all characters as per production rules of XML11 - int i = 0; - while (i < datalength) { - if (XML11Char.isXML11Invalid(dataarray[i++])) { - // check if this is a supplemental character - char ch = dataarray[i - 1]; - if (XMLChar.isHighSurrogate(ch) && i < datalength) { - char ch2 = dataarray[i++]; - if (XMLChar.isLowSurrogate(ch2) - && XMLChar.isSupplemental( - XMLChar.supplemental(ch, ch2))) { - continue; - } - } - // Reference to invalid character which is returned - refInvalidChar = new Character(ch); - return false; - } - } - } // version of the document is XML 1.0 - else { - // we need to check all characters as per production rules of XML 1.0 - int i = 0; - while (i < datalength) { - if (XMLChar.isInvalid(dataarray[i++])) { - // check if this is a supplemental character - char ch = dataarray[i - 1]; - if (XMLChar.isHighSurrogate(ch) && i < datalength) { - char ch2 = dataarray[i++]; - if (XMLChar.isLowSurrogate(ch2) - && XMLChar.isSupplemental( - XMLChar.supplemental(ch, ch2))) { - continue; - } - } - // Reference to invalid character which is returned - refInvalidChar = new Character(ch); - return false; - } - } - } // end-else fDocument.isXMLVersion() - - return true; - } // isXMLCharWF - - /** - * Checks if a XML character is well-formed. If there is a problem with - * the character a non-null Character is returned else null is returned. - * - * @param characters A String of characters to be checked for Well-Formedness - * @return Character A reference to the character to be returned that was determined invalid. - */ - protected Character isWFXMLChar(String chardata) { - Character refInvalidChar; - if (chardata == null || (chardata.length() == 0)) { - return null; - } - - char[] dataarray = chardata.toCharArray(); - int datalength = dataarray.length; - - // version of the document is XML 1.1 - if (fIsXMLVersion11) { - //we need to check all characters as per production rules of XML11 - int i = 0; - while (i < datalength) { - if (XML11Char.isXML11Invalid(dataarray[i++])) { - // check if this is a supplemental character - char ch = dataarray[i - 1]; - if (XMLChar.isHighSurrogate(ch) && i < datalength) { - char ch2 = dataarray[i++]; - if (XMLChar.isLowSurrogate(ch2) - && XMLChar.isSupplemental( - XMLChar.supplemental(ch, ch2))) { - continue; - } - } - // Reference to invalid character which is returned - refInvalidChar = new Character(ch); - return refInvalidChar; - } - } - } // version of the document is XML 1.0 - else { - // we need to check all characters as per production rules of XML 1.0 - int i = 0; - while (i < datalength) { - if (XMLChar.isInvalid(dataarray[i++])) { - // check if this is a supplemental character - char ch = dataarray[i - 1]; - if (XMLChar.isHighSurrogate(ch) && i < datalength) { - char ch2 = dataarray[i++]; - if (XMLChar.isLowSurrogate(ch2) - && XMLChar.isSupplemental( - XMLChar.supplemental(ch, ch2))) { - continue; - } - } - // Reference to invalid character which is returned - refInvalidChar = new Character(ch); - return refInvalidChar; - } - } - } // end-else fDocument.isXMLVersion() - - return null; - } // isXMLCharWF - - /** - * Checks if a comment node is well-formed - * - * @param data The contents of the comment node - * @return a boolean indiacating if the comment is well-formed or not. - */ - protected void isCommentWellFormed(String data) { - if (data == null || (data.length() == 0)) { - return; - } - - char[] dataarray = data.toCharArray(); - int datalength = dataarray.length; - - // version of the document is XML 1.1 - if (fIsXMLVersion11) { - // we need to check all chracters as per production rules of XML11 - int i = 0; - while (i < datalength) { - char c = dataarray[i++]; - if (XML11Char.isXML11Invalid(c)) { - // check if this is a supplemental character - if (XMLChar.isHighSurrogate(c) && i < datalength) { - char c2 = dataarray[i++]; - if (XMLChar.isLowSurrogate(c2) - && XMLChar.isSupplemental( - XMLChar.supplemental(c, c2))) { - continue; - } - } - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - new Object[] { new Character(c)}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER, - null, - null, - null)); - } - } else if (c == '-' && i < datalength && dataarray[i] == '-') { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_DASH_IN_COMMENT, - null); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER, - null, - null, - null)); - } - } - } - } // version of the document is XML 1.0 - else { - // we need to check all chracters as per production rules of XML 1.0 - int i = 0; - while (i < datalength) { - char c = dataarray[i++]; - if (XMLChar.isInvalid(c)) { - // check if this is a supplemental character - if (XMLChar.isHighSurrogate(c) && i < datalength) { - char c2 = dataarray[i++]; - if (XMLChar.isLowSurrogate(c2) - && XMLChar.isSupplemental( - XMLChar.supplemental(c, c2))) { - continue; - } - } - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - new Object[] { new Character(c)}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER, - null, - null, - null)); - } - } else if (c == '-' && i < datalength && dataarray[i] == '-') { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_DASH_IN_COMMENT, - null); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER, - null, - null, - null)); - } - } - } - } - return; - } - - /** - * Checks if an element node is well-formed, by checking its Name for well-formedness. - * - * @param data The contents of the comment node - * @return a boolean indiacating if the comment is well-formed or not. - */ - protected void isElementWellFormed(Node node) { - boolean isNameWF = false; - if ((fFeatures & NAMESPACES) != 0) { - isNameWF = - isValidQName( - node.getPrefix(), - node.getLocalName(), - fIsXMLVersion11); - } else { - isNameWF = isXMLName(node.getNodeName(), fIsXMLVersion11); - } - - if (!isNameWF) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - new Object[] { "Element", node.getNodeName()}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - null, - null, - null)); - } - } - } - - /** - * Checks if an attr node is well-formed, by checking it's Name and value - * for well-formedness. - * - * @param data The contents of the comment node - * @return a boolean indiacating if the comment is well-formed or not. - */ - protected void isAttributeWellFormed(Node node) { - boolean isNameWF = false; - if ((fFeatures & NAMESPACES) != 0) { - isNameWF = - isValidQName( - node.getPrefix(), - node.getLocalName(), - fIsXMLVersion11); - } else { - isNameWF = isXMLName(node.getNodeName(), fIsXMLVersion11); - } - - if (!isNameWF) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - new Object[] { "Attr", node.getNodeName()}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - null, - null, - null)); - } - } - - // Check the Attr's node value - // WFC: No < in Attribute Values - String value = node.getNodeValue(); - if (value.indexOf('<') >= 0) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_LT_IN_ATTVAL, - new Object[] { - ((Attr) node).getOwnerElement().getNodeName(), - node.getNodeName()}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_LT_IN_ATTVAL, - null, - null, - null)); - } - } - - // we need to loop through the children of attr nodes and check their values for - // well-formedness - NodeList children = node.getChildNodes(); - for (int i = 0; i < children.getLength(); i++) { - Node child = children.item(i); - // An attribute node with no text or entity ref child for example - // doc.createAttributeNS("http://www.w3.org/2000/xmlns/", "xmlns:ns"); - // followes by - // element.setAttributeNodeNS(attribute); - // can potentially lead to this situation. If the attribute - // was a prefix Namespace attribute declaration then then DOM Core - // should have some exception defined for this. - if (child == null) { - // we should probably report an error - continue; - } - switch (child.getNodeType()) { - case Node.TEXT_NODE : - isTextWellFormed((Text) child); - break; - case Node.ENTITY_REFERENCE_NODE : - isEntityReferneceWellFormed((EntityReference) child); - break; - default : - } - } - - // TODO: - // WFC: Check if the attribute prefix is bound to - // http://www.w3.org/2000/xmlns/ - - // WFC: Unique Att Spec - // Perhaps pass a seen boolean value to this method. serializeAttList will determine - // if the attr was seen before. - } - - /** - * Checks if a PI node is well-formed, by checking it's Name and data - * for well-formedness. - * - * @param data The contents of the comment node - */ - protected void isPIWellFormed(ProcessingInstruction node) { - // Is the PI Target a valid XML name - if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - new Object[] { "ProcessingInstruction", node.getTarget()}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - null, - null, - null)); - } - } - - // Does the PI Data carry valid XML characters - - // REVISIT: Should we check if the PI DATA contains a ?> ??? - Character invalidChar = isWFXMLChar(node.getData()); - if (invalidChar != null) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) }); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER, - null, - null, - null)); - } - } - } - - /** - * Checks if an CDATASection node is well-formed, by checking it's data - * for well-formedness. Note that the presence of a CDATA termination mark - * in the contents of a CDATASection is handled by the parameter - * spli-cdata-sections - * - * @param data The contents of the comment node - */ - protected void isCDATASectionWellFormed(CDATASection node) { - // Does the data valid XML character data - Character invalidChar = isWFXMLChar(node.getData()); - //if (!isWFXMLChar(node.getData(), invalidChar)) { - if (invalidChar != null) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) }); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER, - null, - null, - null)); - } - } - } - - /** - * Checks if an Text node is well-formed, by checking if it contains invalid - * XML characters. - * - * @param data The contents of the comment node - */ - protected void isTextWellFormed(Text node) { - // Does the data valid XML character data - Character invalidChar = isWFXMLChar(node.getData()); - if (invalidChar != null) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - new Object[] { Integer.toHexString(Character.getNumericValue(invalidChar.charValue())) }); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER, - null, - null, - null)); - } - } - } - - /** - * Checks if an EntityRefernece node is well-formed, by checking it's node name. Then depending - * on whether it is referenced in Element content or in an Attr Node, checks if the EntityReference - * references an unparsed entity or a external entity and if so throws raises the - * appropriate well-formedness error. - * - * @param data The contents of the comment node - * @parent The parent of the EntityReference Node - */ - protected void isEntityReferneceWellFormed(EntityReference node) { - // Is the EntityReference name a valid XML name - if (!isXMLName(node.getNodeName(), fIsXMLVersion11)) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - new Object[] { "EntityReference", node.getNodeName()}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - null, - null, - null)); - } - } - - // determine the parent node - Node parent = node.getParentNode(); - - // Traverse the declared entities and check if the nodeName and namespaceURI - // of the EntityReference matches an Entity. If so, check the if the notationName - // is not null, if so, report an error. - DocumentType docType = node.getOwnerDocument().getDoctype(); - if (docType != null) { - NamedNodeMap entities = docType.getEntities(); - for (int i = 0; i < entities.getLength(); i++) { - Entity ent = (Entity) entities.item(i); - - String nodeName = - node.getNodeName() == null ? "" : node.getNodeName(); - String nodeNamespaceURI = - node.getNamespaceURI() == null - ? "" - : node.getNamespaceURI(); - String entName = - ent.getNodeName() == null ? "" : ent.getNodeName(); - String entNamespaceURI = - ent.getNamespaceURI() == null ? "" : ent.getNamespaceURI(); - // If referenced in Element content - // WFC: Parsed Entity - if (parent.getNodeType() == Node.ELEMENT_NODE) { - if (entNamespaceURI.equals(nodeNamespaceURI) - && entName.equals(nodeName)) { - - if (ent.getNotationName() != null) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - new Object[] { node.getNodeName()}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - null, - null, - null)); - } - } - } - } // end if WFC: Parsed Entity - - // If referenced in an Attr value - // WFC: No External Entity References - if (parent.getNodeType() == Node.ATTRIBUTE_NODE) { - if (entNamespaceURI.equals(nodeNamespaceURI) - && entName.equals(nodeName)) { - - if (ent.getPublicId() != null - || ent.getSystemId() != null - || ent.getNotationName() != null) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - new Object[] { node.getNodeName()}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - null, - null, - null)); - } - } - } - } //end if WFC: No External Entity References - } - } - } // isEntityReferneceWellFormed - - /** - * If the configuration parameter "namespaces" is set to true, this methods - * checks if an entity whose replacement text contains unbound namespace - * prefixes is referenced in a location where there are no bindings for - * the namespace prefixes and if so raises a LSException with the error-type - * "unbound-prefix-in-entity-reference" - * - * @param Node, The EntityReference nodes whose children are to be checked - */ - protected void checkUnboundPrefixInEntRef(Node node) { - Node child, next; - for (child = node.getFirstChild(); child != null; child = next) { - next = child.getNextSibling(); - - if (child.getNodeType() == Node.ELEMENT_NODE) { - - //If a NamespaceURI is not declared for the current - //node's prefix, raise a fatal error. - String prefix = child.getPrefix(); - if (prefix != null - && fNSBinder.getURI(prefix) == null) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - new Object[] { - node.getNodeName(), - child.getNodeName(), - prefix }); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - null, - null, - null)); - } - } - - NamedNodeMap attrs = child.getAttributes(); - - for (int i = 0; i < attrs.getLength(); i++) { - String attrPrefix = attrs.item(i).getPrefix(); - if (attrPrefix != null - && fNSBinder.getURI(attrPrefix) == null) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - new Object[] { - node.getNodeName(), - child.getNodeName(), - attrs.item(i)}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, - msg, - MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - null, - null, - null)); - } - } - } - } - - if (child.hasChildNodes()) { - checkUnboundPrefixInEntRef(child); - } - } - } - - // *********************************************************************** - // Namespace normalization - // *********************************************************************** - /** - * Records local namespace declarations, to be used for normalization later - * - * @param Node, The element node, whose namespace declarations are to be recorded - */ - protected void recordLocalNSDecl(Node node) { - NamedNodeMap atts = ((Element) node).getAttributes(); - int length = atts.getLength(); - - for (int i = 0; i < length; i++) { - Node attr = atts.item(i); - - String localName = attr.getLocalName(); - String attrPrefix = attr.getPrefix(); - String attrValue = attr.getNodeValue(); - String attrNS = attr.getNamespaceURI(); - - localName = - localName == null - || XMLNS_PREFIX.equals(localName) ? "" : localName; - attrPrefix = attrPrefix == null ? "" : attrPrefix; - attrValue = attrValue == null ? "" : attrValue; - attrNS = attrNS == null ? "" : attrNS; - - // check if attribute is a namespace decl - if (XMLNS_URI.equals(attrNS)) { - - // No prefix may be bound to http://www.w3.org/2000/xmlns/. - if (XMLNS_URI.equals(attrValue)) { - String msg = - Utils.messages.createMessage( - MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - new Object[] { attrPrefix, XMLNS_URI }); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_ERROR, - msg, - MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - null, - null, - null)); - } - } else { - // store the namespace-declaration - if (XMLNS_PREFIX.equals(attrPrefix) ) { - // record valid decl - if (attrValue.length() != 0) { - fNSBinder.declarePrefix(localName, attrValue); - } else { - // Error; xmlns:prefix="" - } - } else { // xmlns - // empty prefix is always bound ("" or some string) - fNSBinder.declarePrefix("", attrValue); - } - } - - } - } - } - - /** - * Fixes an element's namespace - * - * @param Node, The element node, whose namespace is to be fixed - */ - protected void fixupElementNS(Node node) throws SAXException { - String namespaceURI = ((Element) node).getNamespaceURI(); - String prefix = ((Element) node).getPrefix(); - String localName = ((Element) node).getLocalName(); - - if (namespaceURI != null) { - //if ( Element's prefix/namespace pair (or default namespace, - // if no prefix) are within the scope of a binding ) - prefix = prefix == null ? "" : prefix; - String inScopeNamespaceURI = fNSBinder.getURI(prefix); - - if ((inScopeNamespaceURI != null - && inScopeNamespaceURI.equals(namespaceURI))) { - // do nothing, declaration in scope is inherited - - } else { - // Create a local namespace declaration attr for this namespace, - // with Element's current prefix (or a default namespace, if - // no prefix). If there's a conflicting local declaration - // already present, change its value to use this namespace. - - // Add the xmlns declaration attribute - //fNSBinder.pushNamespace(prefix, namespaceURI, fElementDepth); - if ((fFeatures & NAMESPACEDECLS) != 0) { - if ("".equals(prefix) || "".equals(namespaceURI)) { - ((Element)node).setAttributeNS(XMLNS_URI, XMLNS_PREFIX, namespaceURI); - } else { - ((Element)node).setAttributeNS(XMLNS_URI, XMLNS_PREFIX + ":" + prefix, namespaceURI); - } - } - fLocalNSBinder.declarePrefix(prefix, namespaceURI); - fNSBinder.declarePrefix(prefix, namespaceURI); - - } - } else { - // Element has no namespace - // DOM Level 1 - if (localName == null || "".equals(localName)) { - // DOM Level 1 node! - String msg = - Utils.messages.createMessage( - MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - new Object[] { node.getNodeName()}); - - if (fErrorHandler != null) { - fErrorHandler.handleError( - new DOMErrorImpl( - DOMError.SEVERITY_ERROR, - msg, - MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - null, - null, - null)); - } - } else { - namespaceURI = fNSBinder.getURI(""); - if (namespaceURI !=null && namespaceURI.length() > 0) { - ((Element)node).setAttributeNS(XMLNS_URI, XMLNS_PREFIX, ""); - fLocalNSBinder.declarePrefix("", ""); - fNSBinder.declarePrefix("", ""); - } - } - } - } - /** - * This table is a quick lookup of a property key (String) to the integer that - * is the bit to flip in the fFeatures field, so the integers should have - * values 1,2,4,8,16... - * - */ - private static final Hashtable s_propKeys = new Hashtable(); - static { - - // Initialize the mappings of property keys to bit values (Integer objects) - // or mappings to a String object "", which indicates we are interested - // in the property, but it does not have a simple bit value to flip - - // cdata-sections - int i = CDATA; - Integer val = new Integer(i); - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_CDATA_SECTIONS, - val); - - // comments - int i1 = COMMENTS; - val = new Integer(i1); - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_COMMENTS, - val); - - // element-content-whitespace - int i2 = ELEM_CONTENT_WHITESPACE; - val = new Integer(i2); - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, - val); - int i3 = ENTITIES; - - // entities - val = new Integer(i3); - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_ENTITIES, - val); - - // namespaces - int i4 = NAMESPACES; - val = new Integer(i4); - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_NAMESPACES, - val); - - // namespace-declarations - int i5 = NAMESPACEDECLS; - val = new Integer(i5); - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACE_DECLARATIONS, - val); - - // split-cdata-sections - int i6 = SPLITCDATA; - val = new Integer(i6); - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_SPLIT_CDATA, - val); - - // discard-default-content - int i7 = WELLFORMED; - val = new Integer(i7); - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS + DOMConstants.DOM_WELLFORMED, - val); - - // discard-default-content - int i8 = DISCARDDEFAULT; - val = new Integer(i8); - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT, - val); - - // We are interested in these properties, but they don't have a simple - // bit value to deal with. - s_propKeys.put( - DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_FORMAT_PRETTY_PRINT, - ""); - s_propKeys.put(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, ""); - s_propKeys.put( - DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, - ""); - s_propKeys.put(DOMConstants.S_XSL_OUTPUT_ENCODING, ""); - s_propKeys.put(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.DOM_ENTITIES, ""); - } - - /** - * Initializes fFeatures based on the DOMConfiguration Parameters set. - * - * @param properties DOMConfiguraiton properties that were set and which are - * to be used while serializing the DOM. - */ - protected void initProperties(Properties properties) { - - for (Enumeration keys = properties.keys(); keys.hasMoreElements();) { - - final String key = (String) keys.nextElement(); - - // caonical-form - // Other features will be enabled or disabled when this is set to true or false. - - // error-handler; set via the constructor - - // infoset - // Other features will be enabled or disabled when this is set to true - - // A quick lookup for the given set of properties (cdata-sections ...) - final Object iobj = s_propKeys.get(key); - if (iobj != null) { - if (iobj instanceof Integer) { - // Dealing with a property that has a simple bit value that - // we need to set - - // cdata-sections - // comments - // element-content-whitespace - // entities - // namespaces - // namespace-declarations - // split-cdata-sections - // well-formed - // discard-default-content - final int BITFLAG = ((Integer) iobj).intValue(); - if ((properties.getProperty(key).endsWith("yes"))) { - fFeatures = fFeatures | BITFLAG; - } else { - fFeatures = fFeatures & ~BITFLAG; - } - } else { - // We are interested in the property, but it is not - // a simple bit that we need to set. - - if ((DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_FORMAT_PRETTY_PRINT) - .equals(key)) { - // format-pretty-print; set internally on the serializers via xsl:output properties in LSSerializer - if ((properties.getProperty(key).endsWith("yes"))) { - fSerializer.setIndent(true); - fSerializer.setIndentAmount(3); - } else { - fSerializer.setIndent(false); - } - } else if ( - (DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL).equals( - key)) { - // omit-xml-declaration; set internally on the serializers via xsl:output properties in LSSerializer - if ((properties.getProperty(key).endsWith("yes"))) { - fSerializer.setOmitXMLDeclaration(true); - } else { - fSerializer.setOmitXMLDeclaration(false); - } - } else if ( - ( - DOMConstants.S_XERCES_PROPERTIES_NS - + DOMConstants.S_XML_VERSION).equals( - key)) { - // Retreive the value of the XML Version attribute via the xml-version - String version = properties.getProperty(key); - if ("1.1".equals(version)) { - fIsXMLVersion11 = true; - fSerializer.setVersion(version); - } else { - fSerializer.setVersion("1.0"); - } - } else if ( - (DOMConstants.S_XSL_OUTPUT_ENCODING).equals(key)) { - // Retreive the value of the XML Encoding attribute - String encoding = properties.getProperty(key); - if (encoding != null) { - fSerializer.setEncoding(encoding); - } - } else if ((DOMConstants.S_XERCES_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES).equals(key)) { - // Preserve entity references in the document - if ((properties.getProperty(key).endsWith("yes"))) { - fSerializer.setDTDEntityExpansion(false); - } - else { - fSerializer.setDTDEntityExpansion(true); - } - } else { - // We shouldn't get here, ever, now what? - } - } - } - } - // Set the newLine character to use - if (fNewLine != null) { - fSerializer.setOutputProperty(OutputPropertiesFactory.S_KEY_LINE_SEPARATOR, fNewLine); - } - } - -} //TreeWalker diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMConstants.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMConstants.java deleted file mode 100644 index aec2910b3..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMConstants.java +++ /dev/null @@ -1,134 +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.dom3; - -/** - * DOM Constants used by the DOM Level 3 LSSerializer implementation. - * - * @xsl.usage internal - */ -final class DOMConstants { - // - // Constants: DOM Level 3 feature ids - // - public static final String DOM3_REC_URL = "http://www.w3.org/TR/DOM-Level-3-LS"; - - public static final String XERCES_URL = "http://xml.apache.org/xerces-2j"; - - // The namespace used to qualified DOM Level 3 DOMConfiguration parameters - public static final String S_DOM3_PROPERTIES_NS = "{" - + DOMConstants.DOM3_REC_URL + "}"; - - public static final String S_XERCES_PROPERTIES_NS = "{" - + DOMConstants.XERCES_URL + "}"; - - // xmlns namespaces - private static final String XMLNS_URI = "http://www.w3.org/2000/xmlns/"; - - // namespace prefix - private static final String XMLNS_PREFIX = "xmlns"; - - // ************************************************************************ - // DOM Level 3 DOM Configuration parameter names - // ************************************************************************ - // DOM Level 3 parameters defined in Core - public static final String DOM_CANONICAL_FORM = "canonical-form"; // Unsupported, we only appear to support this - - public static final String DOM_CDATA_SECTIONS = "cdata-sections"; - - public static final String DOM_CHECK_CHAR_NORMALIZATION = "check-character-normalization"; // Unsupported - - public static final String DOM_COMMENTS = "comments"; - - public static final String DOM_DATATYPE_NORMALIZATION = "datatype-normalization"; // Unsupported - - public static final String DOM_ELEMENT_CONTENT_WHITESPACE = "element-content-whitespace"; - - public static final String DOM_ENTITIES = "entities"; - - public static final String DOM_INFOSET = "infoset"; - - public static final String DOM_NAMESPACES = "namespaces"; - - public static final String DOM_NAMESPACE_DECLARATIONS = "namespace-declarations"; - - public static final String DOM_NORMALIZE_CHARACTERS = "normalize-characters"; // Unsupported - - public static final String DOM_SPLIT_CDATA = "split-cdata-sections"; - - public static final String DOM_VALIDATE_IF_SCHEMA = "validate-if-schema"; // Unsopported - - public static final String DOM_VALIDATE = "validate"; // Unsopported - - public static final String DOM_WELLFORMED = "well-formed"; - - // DOM Level 3 Save - public static final String DOM_DISCARD_DEFAULT_CONTENT = "discard-default-content"; - - public static final String DOM_FORMAT_PRETTY_PRINT = "format-pretty-print"; - - public static final String DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS = "ignore-unknown-character-denormalizations"; // Unsupported - - public static final String DOM_XMLDECL = "xml-declaration"; - - // DOM Properties - public static final String DOM_ERROR_HANDLER = "error-handler"; - - public static final String DOM_SCHEMA_TYPE = "schema-type"; // Unsupported - - public static final String DOM_SCHEMA_LOCATION = "schema-location"; // Unsupported - - // ************************************************************************ - - // XSL Output properties - // The xsl:output 'indent' property used in LSSerializer - public static final String S_XSL_OUTPUT_INDENT = "indent"; - - // The xsl:output 'indent' property used in LSSerializer - public static final String S_XSL_OUTPUT_ENCODING = "encoding"; - - // The xsl:output 'omit-xml-declaration' property used in LSSerializer - public static final String S_XSL_OUTPUT_OMIT_XML_DECL = "omit-xml-declaration"; - - // The xerces serializer specific 'omit-xml-declaration' property used in LSSerializer - public static final String S_XML_VERSION = "xml-version"; - - // - public static final String S_XSL_VALUE_ENTITIES = "org/apache/xml/serializer/XMLEntities"; - - // Parameter values - public static final String DOM3_EXPLICIT_TRUE = "explicit:yes"; - - public static final String DOM3_DEFAULT_TRUE = "default:yes"; - - public static final String DOM3_EXPLICIT_FALSE = "explicit:no"; - - public static final String DOM3_DEFAULT_FALSE = "default:no"; - - // DOM Exceptions - public static final String DOM_EXCEPTION_FEATURE_NOT_FOUND = "FEATURE_NOT_FOUND"; - - public static final String DOM_EXCEPTION_FEATURE_NOT_SUPPORTED = "FEATURE_NOT_SUPPORTED"; - - public static final String DOM_LSEXCEPTION_SERIALIZER_ERR = "SERIALIZER_ERROR"; - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorHandlerImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorHandlerImpl.java deleted file mode 100644 index 27602ff81..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorHandlerImpl.java +++ /dev/null @@ -1,67 +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.dom3; - -import org.w3c.dom.DOMError; -import org.w3c.dom.DOMErrorHandler; - -/** - * This is the default implementation of the ErrorHandler interface and is - * used if one is not provided. The default implementation simply reports - * DOMErrors to System.err. - * - * @xsl.usage internal - */ -final class DOMErrorHandlerImpl implements DOMErrorHandler { - - /** - * Default Constructor - */ - DOMErrorHandlerImpl() { - } - - /** - * Implementation of DOMErrorHandler.handleError that - * adds copy of error to list for later retrieval. - * - */ - public boolean handleError(DOMError error) { - boolean fail = true; - String severity = null; - if (error.getSeverity() == DOMError.SEVERITY_WARNING) { - fail = false; - severity = "[Warning]"; - } else if (error.getSeverity() == DOMError.SEVERITY_ERROR) { - severity = "[Error]"; - } else if (error.getSeverity() == DOMError.SEVERITY_FATAL_ERROR) { - severity = "[Fatal Error]"; - } - - System.err.println(severity + ": " + error.getMessage() + "\t"); - System.err.println("Type : " + error.getType() + "\t" + "Related Data: " - + error.getRelatedData() + "\t" + "Related Exception: " - + error.getRelatedException() ); - - return fail; - } -} - diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorImpl.java deleted file mode 100644 index c2bd8b525..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMErrorImpl.java +++ /dev/null @@ -1,176 +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.dom3; - -import org.w3c.dom.DOMError; -import org.w3c.dom.DOMLocator; - -/** - * Implementation of the DOM Level 3 DOMError interface. - * - *

See also the DOMError Interface definition from Document Object Model (DOM) Level 3 Core Specification. - * - * @xsl.usage internal - */ - -final class DOMErrorImpl implements DOMError { - - /** private data members */ - - // The DOMError Severity - private short fSeverity = DOMError.SEVERITY_WARNING; - - // The Error message - private String fMessage = null; - - // A String indicating which related data is expected in relatedData. - private String fType; - - // The platform related exception - private Exception fException = null; - - // - private Object fRelatedData; - - // The location of the exception - private DOMLocatorImpl fLocation = new DOMLocatorImpl(); - - - // - // Constructors - // - - /** - * Default constructor. - */ - DOMErrorImpl () { - } - - /** - * @param severity - * @param message - * @param type - */ - DOMErrorImpl(short severity, String message, String type) { - fSeverity = severity; - fMessage = message; - fType = type; - } - - /** - * @param severity - * @param message - * @param type - * @param exception - */ - DOMErrorImpl(short severity, String message, String type, - Exception exception) { - fSeverity = severity; - fMessage = message; - fType = type; - fException = exception; - } - - /** - * @param severity - * @param message - * @param type - * @param exception - * @param relatedData - * @param location - */ - DOMErrorImpl(short severity, String message, String type, - Exception exception, Object relatedData, DOMLocatorImpl location) { - fSeverity = severity; - fMessage = message; - fType = type; - fException = exception; - fRelatedData = relatedData; - fLocation = location; - } - - - /** - * The severity of the error, either SEVERITY_WARNING, - * SEVERITY_ERROR, or SEVERITY_FATAL_ERROR. - * - * @return A short containing the DOMError severity - */ - public short getSeverity() { - return fSeverity; - } - - /** - * The DOMError message string. - * - * @return String - */ - public String getMessage() { - return fMessage; - } - - /** - * The location of the DOMError. - * - * @return A DOMLocator object containing the DOMError location. - */ - public DOMLocator getLocation() { - return fLocation; - } - - /** - * The related platform dependent exception if any. - * - * @return A java.lang.Exception - */ - public Object getRelatedException(){ - return fException; - } - - /** - * Returns a String indicating which related data is expected in relatedData. - * - * @return A String - */ - public String getType(){ - return fType; - } - - /** - * The related DOMError.type dependent data if any. - * - * @return java.lang.Object - */ - public Object getRelatedData(){ - return fRelatedData; - } - - public void reset(){ - fSeverity = DOMError.SEVERITY_WARNING; - fException = null; - fMessage = null; - fType = null; - fRelatedData = null; - fLocation = null; - } - -}// class DOMErrorImpl diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMLocatorImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMLocatorImpl.java deleted file mode 100644 index f73789b2d..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMLocatorImpl.java +++ /dev/null @@ -1,180 +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.dom3; - -import org.w3c.dom.DOMLocator; -import org.w3c.dom.Node; - - -/** - * DOMLocatorImpl is an implementaion that describes a location (e.g. - * where an error occured). - *

See also the Document Object Model (DOM) Level 3 Core Specification. - * This class is a copy of the Xerces-2J class org.apache.xerces.dom.DOMLocatorImpl.java v 1.10 - * - * @author Gopal Sharma, SUN Microsystems Inc. - * @version $Id: - * - * @xsl.usage internal - */ -final class DOMLocatorImpl implements DOMLocator { - - // - // Data - // - - /** - * The column number where the error occured, - * or -1 if there is no column number available. - */ - private final int fColumnNumber; - - /** - * The line number where the error occured, - * or -1 if there is no line number available. - */ - private final int fLineNumber; - - /** related data node*/ - private final Node fRelatedNode; - - /** - * The URI where the error occured, - * or null if there is no URI available. - */ - private final String fUri; - - /** - * The byte offset into the input source this locator is pointing to or -1 - * if there is no byte offset available - */ - private final int fByteOffset; - - /** - * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], - * offset into the input source this locator is pointing to or -1 if there - * is no UTF-16 offset available. - */ - private final int fUtf16Offset; - - // - // Constructors - // - - DOMLocatorImpl(){ - fColumnNumber = -1; - fLineNumber = -1; - fRelatedNode = null; - fUri = null; - fByteOffset = -1; - fUtf16Offset = -1; - } - - DOMLocatorImpl (int lineNumber, int columnNumber, String uri ){ - fLineNumber = lineNumber ; - fColumnNumber = columnNumber ; - fUri = uri; - - fRelatedNode = null; - fByteOffset = -1; - fUtf16Offset = -1; - } // DOMLocatorImpl (int lineNumber, int columnNumber, String uri ) - - DOMLocatorImpl (int lineNumber, int columnNumber, int utf16Offset, String uri ){ - fLineNumber = lineNumber ; - fColumnNumber = columnNumber ; - fUri = uri; - fUtf16Offset = utf16Offset; - - - fRelatedNode = null; - fByteOffset = -1; - } // DOMLocatorImpl (int lineNumber, int columnNumber, int utf16Offset, String uri ) - - DOMLocatorImpl (int lineNumber, int columnNumber, int byteoffset, Node relatedData, String uri ){ - fLineNumber = lineNumber ; - fColumnNumber = columnNumber ; - fByteOffset = byteoffset ; - fRelatedNode = relatedData ; - fUri = uri; - - fUtf16Offset = -1; - } // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri ) - - DOMLocatorImpl (int lineNumber, int columnNumber, int byteoffset, Node relatedData, String uri, int utf16Offset ){ - fLineNumber = lineNumber ; - fColumnNumber = columnNumber ; - fByteOffset = byteoffset ; - fRelatedNode = relatedData ; - fUri = uri; - fUtf16Offset = utf16Offset; - } // DOMLocatorImpl (int lineNumber, int columnNumber, int offset, Node errorNode, String uri ) - - - /** - * The line number where the error occured, or -1 if there is no line - * number available. - */ - public int getLineNumber(){ - return fLineNumber; - } - - /** - * The column number where the error occured, or -1 if there is no column - * number available. - */ - public int getColumnNumber(){ - return fColumnNumber; - } - - - /** - * The URI where the error occured, or null if there is no URI available. - */ - public String getUri(){ - return fUri; - } - - - public Node getRelatedNode(){ - return fRelatedNode; - } - - - /** - * The byte offset into the input source this locator is pointing to or -1 - * if there is no byte offset available - */ - public int getByteOffset(){ - return fByteOffset; - } - - /** - * The UTF-16, as defined in [Unicode] and Amendment 1 of [ISO/IEC 10646], - * offset into the input source this locator is pointing to or -1 if there - * is no UTF-16 offset available. - */ - public int getUtf16Offset(){ - return fUtf16Offset; - } - -}// class DOMLocatorImpl diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMOutputImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMOutputImpl.java deleted file mode 100644 index 6b1ff8cb9..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMOutputImpl.java +++ /dev/null @@ -1,177 +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.dom3; - -import org.w3c.dom.ls.LSOutput; - -import java.io.Writer; -import java.io.OutputStream; - -/** - * This is a copy of the Xerces-2J class org.apache.xerces.dom.DOMOutputImpl.java - * - * This class represents an output destination for data. - * This interface allows an application to encapsulate information about an - * output destination in a single object, which may include a URI, a byte stream - * (possibly with a specifiedencoding), a base URI, and/or a character stream. - * The exact definitions of a byte stream and a character stream are binding - * dependent. - * The application is expected to provide objects that implement this interface - * whenever such objects are needed. The application can either provide its - * own objects that implement this interface, or it can use the generic factory - * method DOMImplementationLS.createLSOutput() to create objects that - * implement this interface. - * The DOMSerializer will use the LSOutput object to determine where to - * serialize the output to. The DOMSerializer will look at the different - * outputs specified in the LSOutput in the following order to know which one - * to output to, the first one that data can be output to will be used: - * 1.LSOutput.characterStream - * 2.LSOutput.byteStream - * 3.LSOutput.systemId - * LSOutput objects belong to the application. The DOM implementation will - * never modify them (though it may make copies and modify the copies, - * if necessary). - * - * - * @author Arun Yadav, Sun Microsytems - * @author Gopal Sharma, Sun Microsystems - * @version $Id : - * @xsl.usage internal - */ - -final class DOMOutputImpl implements LSOutput { - - private Writer fCharStream = null; - private OutputStream fByteStream = null; - private String fSystemId = null; - private String fEncoding = null; - - /** - * Default Constructor - */ - DOMOutputImpl() {} - - /** - * An attribute of a language and binding dependent type that represents a - * writable stream of bytes. If the application knows the character encoding - * of the byte stream, it should set the encoding attribute. Setting the - * encoding in this way will override any encoding specified in an XML - * declaration in the data. - */ - - public Writer getCharacterStream(){ - return fCharStream; - }; - - /** - * An attribute of a language and binding dependent type that represents a - * writable stream of bytes. If the application knows the character encoding - * of the byte stream, it should set the encoding attribute. Setting the - * encoding in this way will override any encoding specified in an XML - * declaration in the data. - */ - - public void setCharacterStream(Writer characterStream){ - fCharStream = characterStream; - }; - - /** - * Depending on the language binding in use, this attribute may not be - * available. An attribute of a language and binding dependent type that - * represents a writable stream to which 16-bit units can be output. The - * application must encode the stream using UTF-16 (defined in [Unicode] and - * Amendment 1 of [ISO/IEC 10646]). - */ - - public OutputStream getByteStream(){ - return fByteStream; - }; - - /** - * Depending on the language binding in use, this attribute may not be - * available. An attribute of a language and binding dependent type that - * represents a writable stream to which 16-bit units can be output. The - * application must encode the stream using UTF-16 (defined in [Unicode] and - * Amendment 1 of [ISO/IEC 10646]). - */ - - public void setByteStream(OutputStream byteStream){ - fByteStream = byteStream; - }; - - /** - * The system identifier, a URI reference [IETF RFC 2396], for this output - * destination. If the application knows the character encoding of the - * object pointed to by the system identifier, it can set the encoding - * using the encoding attribute. If the system ID is a relative URI - * reference (see section 5 in [IETF RFC 2396]), the behavior is - * implementation dependent. - */ - - public String getSystemId(){ - return fSystemId; - }; - - /** - * The system identifier, a URI reference [IETF RFC 2396], for this output - * destination. If the application knows the character encoding of the - * object pointed to by the system identifier, it can set the encoding - * using the encoding attribute. If the system ID is a relative URI - * reference (see section 5 in [IETF RFC 2396]), the behavior is - * implementation dependent. - */ - - public void setSystemId(String systemId){ - fSystemId = systemId; - }; - - /** - * The character encoding, if known. The encoding must be a string - * acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3 - * "Character Encoding in Entities"). This attribute has no effect when the - * application provides a character stream or string data. For other sources - * of input, an encoding specified by means of this attribute will override - * any encoding specified in the XML declaration or the Text declaration, or - * an encoding obtained from a higher level protocol, such as HTTP - * [IETF RFC 2616]. - */ - - public String getEncoding(){ - return fEncoding; - }; - - /** - * The character encoding, if known. The encoding must be a string - * acceptable for an XML encoding declaration ([XML 1.0] section 4.3.3 - * "Character Encoding in Entities"). This attribute has no effect when the - * application provides a character stream or string data. For other sources - * of input, an encoding specified by means of this attribute will override - * any encoding specified in the XML declaration or the Text declaration, or - * an encoding obtained from a higher level protocol, such as HTTP - * [IETF RFC 2616]. - */ - - public void setEncoding(String encoding){ - fEncoding = encoding; - }; - -}//DOMOutputImpl diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMStringListImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMStringListImpl.java deleted file mode 100644 index 79fa0b919..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/DOMStringListImpl.java +++ /dev/null @@ -1,99 +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.dom3; - -import java.util.Vector; - -//import org.apache.xerces.dom3.DOMStringList; -import org.w3c.dom.DOMStringList; - -/** - * This class implemets the DOM Level 3 Core interface DOMStringList. - * - * @xsl.usage internal - */ -final class DOMStringListImpl implements DOMStringList { - - //A collection of DOMString values - private Vector fStrings; - - /** - * Construct an empty list of DOMStringListImpl - */ - DOMStringListImpl() { - fStrings = new Vector(); - } - - /** - * Construct an empty list of DOMStringListImpl - */ - DOMStringListImpl(Vector params) { - fStrings = params; - } - - /** - * Construct an empty list of DOMStringListImpl - */ - DOMStringListImpl(String[] params ) { - fStrings = new Vector(); - if (params != null) { - for (int i=0; i < params.length; i++) { - fStrings.add(params[i]); - } - } - } - - /** - * @see org.apache.xerces.dom3.DOMStringList#item(int) - */ - public String item(int index) { - try { - return (String) fStrings.elementAt(index); - } catch (ArrayIndexOutOfBoundsException e) { - return null; - } - } - - /** - * @see org.apache.xerces.dom3.DOMStringList#getLength() - */ - public int getLength() { - return fStrings.size(); - } - - /** - * @see org.apache.xerces.dom3.DOMStringList#contains(String) - */ - public boolean contains(String param) { - return fStrings.contains(param) ; - } - - /** - * DOM Internal: - * Add a DOMString to the list. - * - * @param domString A string to add to the list - */ - public void add(String param) { - fStrings.add(param); - } - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java deleted file mode 100644 index 7ce20c3b6..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/LSSerializerImpl.java +++ /dev/null @@ -1,1535 +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.dom3; - -import java.io.FileOutputStream; -import java.io.OutputStream; -import java.io.StringWriter; -import java.io.UnsupportedEncodingException; -import java.io.Writer; -import java.net.HttpURLConnection; -import java.net.URL; -import java.net.URLConnection; -import java.security.AccessController; -import java.security.PrivilegedAction; -import java.util.Properties; -import java.util.StringTokenizer; - -import org.apache.xml.serializer.DOM3Serializer; -import org.apache.xml.serializer.Encodings; -import org.apache.xml.serializer.OutputPropertiesFactory; -import org.apache.xml.serializer.Serializer; -import org.apache.xml.serializer.SerializerFactory; -import org.apache.xml.serializer.utils.MsgKey; -import org.apache.xml.serializer.utils.SystemIDResolver; -import org.apache.xml.serializer.utils.Utils; -import org.w3c.dom.DOMConfiguration; -import org.w3c.dom.DOMError; -import org.w3c.dom.DOMErrorHandler; -import org.w3c.dom.DOMException; -import org.w3c.dom.DOMStringList; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.ls.LSException; -import org.w3c.dom.ls.LSOutput; -import org.w3c.dom.ls.LSSerializer; -import org.w3c.dom.ls.LSSerializerFilter; - -/** - * Implemenatation of DOM Level 3 org.w3c.ls.LSSerializer and - * org.w3c.dom.ls.DOMConfiguration. Serialization is achieved by delegating - * serialization calls to org.apache.xml.serializer.ToStream or - * one of its derived classes depending on the serialization method, while walking - * the DOM in DOM3TreeWalker. - * @see org.w3c.dom.ls.LSSerializer - * @see org.w3c.dom.DOMConfiguration - * - * @version $Id: - * - * @xsl.usage internal - */ -final public class LSSerializerImpl implements DOMConfiguration, LSSerializer { - - // The default end-of-line character sequence used in serialization. - private static final String DEFAULT_END_OF_LINE; - static { - String lineSeparator = (String) AccessController.doPrivileged(new PrivilegedAction() { - public Object run() { - try { - return System.getProperty("line.separator"); - } - catch (SecurityException ex) {} - return null; - } - }); - // The DOM Level 3 Load and Save specification requires that implementations choose a default - // sequence which matches one allowed by XML 1.0 (or XML 1.1). If the value of "line.separator" - // isn't one of the XML 1.0 end-of-line sequences then we select "\n" as the default value. - DEFAULT_END_OF_LINE = lineSeparator != null && - (lineSeparator.equals("\r\n") || lineSeparator.equals("\r")) ? lineSeparator : "\n"; - } - - /** private data members */ - private Serializer fXMLSerializer = null; - - // Tracks DOMConfiguration features. - protected int fFeatures = 0; - - // Common DOM serializer - private DOM3Serializer fDOMSerializer = null; - - // A filter set on the LSSerializer - private LSSerializerFilter fSerializerFilter = null; - - // Stores the nodeArg parameter to speed up multiple writes of the same node. - private Node fVisitedNode = null; - - // The end-of-line character sequence used in serialization. "\n" is whats used on the web. - private String fEndOfLine = DEFAULT_END_OF_LINE; - - // The DOMErrorhandler. - private DOMErrorHandler fDOMErrorHandler = null; - - // The Configuration parameter to pass to the Underlying serilaizer. - private Properties fDOMConfigProperties = null; - - // The encoding to use during serialization. - private String fEncoding; - - // ************************************************************************ - // DOM Level 3 DOM Configuration parameter names - // ************************************************************************ - // Parameter canonical-form, true [optional] - NOT SUPPORTED - private final static int CANONICAL = 0x1 << 0; - - // Parameter cdata-sections, true [required] (default) - private final static int CDATA = 0x1 << 1; - - // Parameter check-character-normalization, true [optional] - NOT SUPPORTED - private final static int CHARNORMALIZE = 0x1 << 2; - - // Parameter comments, true [required] (default) - private final static int COMMENTS = 0x1 << 3; - - // Parameter datatype-normalization, true [optional] - NOT SUPPORTED - private final static int DTNORMALIZE = 0x1 << 4; - - // Parameter element-content-whitespace, true [required] (default) - value - false [optional] NOT SUPPORTED - private final static int ELEM_CONTENT_WHITESPACE = 0x1 << 5; - - // Parameter entities, true [required] (default) - private final static int ENTITIES = 0x1 << 6; - - // Parameter infoset, true [required] (default), false has no effect --> True has no effect for the serializer - private final static int INFOSET = 0x1 << 7; - - // Parameter namespaces, true [required] (default) - private final static int NAMESPACES = 0x1 << 8; - - // Parameter namespace-declarations, true [required] (default) - private final static int NAMESPACEDECLS = 0x1 << 9; - - // Parameter normalize-characters, true [optional] - NOT SUPPORTED - private final static int NORMALIZECHARS = 0x1 << 10; - - // Parameter split-cdata-sections, true [required] (default) - private final static int SPLITCDATA = 0x1 << 11; - - // Parameter validate, true [optional] - NOT SUPPORTED - private final static int VALIDATE = 0x1 << 12; - - // Parameter validate-if-schema, true [optional] - NOT SUPPORTED - private final static int SCHEMAVALIDATE = 0x1 << 13; - - // Parameter split-cdata-sections, true [required] (default) - private final static int WELLFORMED = 0x1 << 14; - - // Parameter discard-default-content, true [required] (default) - // Not sure how this will be used in level 2 Documents - private final static int DISCARDDEFAULT = 0x1 << 15; - - // Parameter format-pretty-print, true [optional] - private final static int PRETTY_PRINT = 0x1 << 16; - - // Parameter ignore-unknown-character-denormalizations, true [required] (default) - // We currently do not support XML 1.1 character normalization - private final static int IGNORE_CHAR_DENORMALIZE = 0x1 << 17; - - // Parameter discard-default-content, true [required] (default) - private final static int XMLDECL = 0x1 << 18; - // ************************************************************************ - - // Recognized parameters for which atleast one value can be set - private String fRecognizedParameters [] = { - DOMConstants.DOM_CANONICAL_FORM, - DOMConstants.DOM_CDATA_SECTIONS, - DOMConstants.DOM_CHECK_CHAR_NORMALIZATION, - DOMConstants.DOM_COMMENTS, - DOMConstants.DOM_DATATYPE_NORMALIZATION, - DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, - DOMConstants.DOM_ENTITIES, - DOMConstants.DOM_INFOSET, - DOMConstants.DOM_NAMESPACES, - DOMConstants.DOM_NAMESPACE_DECLARATIONS, - //DOMConstants.DOM_NORMALIZE_CHARACTERS, - DOMConstants.DOM_SPLIT_CDATA, - DOMConstants.DOM_VALIDATE, - DOMConstants.DOM_VALIDATE_IF_SCHEMA, - DOMConstants.DOM_WELLFORMED, - DOMConstants.DOM_DISCARD_DEFAULT_CONTENT, - DOMConstants.DOM_FORMAT_PRETTY_PRINT, - DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS, - DOMConstants.DOM_XMLDECL, - DOMConstants.DOM_ERROR_HANDLER - }; - - - /** - * Constructor: Creates a LSSerializerImpl object. The underlying - * XML 1.0 or XML 1.1 org.apache.xml.serializer.Serializer object is - * created and initialized the first time any of the write methods are - * invoked to serialize the Node. Subsequent write methods on the same - * LSSerializerImpl object will use the previously created Serializer object. - */ - public LSSerializerImpl () { - // set default parameters - fFeatures |= CDATA; - fFeatures |= COMMENTS; - fFeatures |= ELEM_CONTENT_WHITESPACE; - fFeatures |= ENTITIES; - fFeatures |= NAMESPACES; - fFeatures |= NAMESPACEDECLS; - fFeatures |= SPLITCDATA; - fFeatures |= WELLFORMED; - fFeatures |= DISCARDDEFAULT; - fFeatures |= XMLDECL; - - // New OutputFormat properties - fDOMConfigProperties = new Properties(); - - // Initialize properties to be passed on the underlying serializer - initializeSerializerProps(); - - // Create the underlying serializer. - Properties configProps = OutputPropertiesFactory.getDefaultMethodProperties("xml"); - - // change xml version from 1.0 to 1.1 - //configProps.setProperty("version", "1.1"); - - // Get a serializer that seriailizes according the the properties, - // which in this case is to xml - fXMLSerializer = SerializerFactory.getSerializer(configProps); - - // Initialize Serializer - fXMLSerializer.setOutputFormat(fDOMConfigProperties); - } - - /** - * Initializes the underlying serializer's configuration depending on the - * default DOMConfiguration parameters. This method must be called before a - * node is to be serialized. - * - * @xsl.usage internal - */ - public void initializeSerializerProps () { - // canonical-form - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_CANONICAL_FORM, DOMConstants.DOM3_DEFAULT_FALSE); - - // cdata-sections - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_DEFAULT_TRUE); - - // "check-character-normalization" - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_CHECK_CHAR_NORMALIZATION, - DOMConstants.DOM3_DEFAULT_FALSE); - - // comments - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_DEFAULT_TRUE); - - // datatype-normalization - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_DATATYPE_NORMALIZATION, - DOMConstants.DOM3_DEFAULT_FALSE); - - // element-content-whitespace - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, - DOMConstants.DOM3_DEFAULT_TRUE); - - // entities - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_DEFAULT_TRUE); - // preserve entities - fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_DEFAULT_TRUE); - - // error-handler - // Should we set our default ErrorHandler - /* - * if (fDOMConfig.getParameter(Constants.DOM_ERROR_HANDLER) != null) { - * fDOMErrorHandler = - * (DOMErrorHandler)fDOMConfig.getParameter(Constants.DOM_ERROR_HANDLER); } - */ - - // infoset - if ((fFeatures & INFOSET) != 0) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_DEFAULT_TRUE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACE_DECLARATIONS, - DOMConstants.DOM3_DEFAULT_TRUE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_DEFAULT_TRUE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, - DOMConstants.DOM3_DEFAULT_TRUE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_DEFAULT_TRUE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_DEFAULT_FALSE); - // preserve entities - fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_DEFAULT_FALSE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_CDATA_SECTIONS, - DOMConstants.DOM3_DEFAULT_FALSE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_VALIDATE_IF_SCHEMA, - DOMConstants.DOM3_DEFAULT_FALSE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_DATATYPE_NORMALIZATION, - DOMConstants.DOM3_DEFAULT_FALSE); - } - - // namespaces - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_DEFAULT_TRUE); - - // namespace-declarations - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACE_DECLARATIONS, - DOMConstants.DOM3_DEFAULT_TRUE); - - // normalize-characters - /* - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NORMALIZE_CHARACTERS, - DOMConstants.DOM3_DEFAULT_FALSE); - */ - - // split-cdata-sections - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_SPLIT_CDATA, DOMConstants.DOM3_DEFAULT_TRUE); - - // validate - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_VALIDATE, DOMConstants.DOM3_DEFAULT_FALSE); - - // validate-if-schema - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_VALIDATE_IF_SCHEMA, - DOMConstants.DOM3_DEFAULT_FALSE); - - // well-formed - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_DEFAULT_TRUE); - - // pretty-print - fDOMConfigProperties.setProperty( - DOMConstants.S_XSL_OUTPUT_INDENT, - DOMConstants.DOM3_DEFAULT_TRUE); - fDOMConfigProperties.setProperty( - OutputPropertiesFactory.S_KEY_INDENT_AMOUNT, Integer.toString(3)); - - // - - // discard-default-content - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT, - DOMConstants.DOM3_DEFAULT_TRUE); - - // xml-declaration - fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "no"); - - } - - // ************************************************************************ - // DOMConfiguraiton implementation - // ************************************************************************ - - /** - * Checks if setting a parameter to a specific value is supported. - * - * @see org.w3c.dom.DOMConfiguration#canSetParameter(java.lang.String, java.lang.Object) - * @since DOM Level 3 - * @param name A String containing the DOMConfiguration parameter name. - * @param value An Object specifying the value of the corresponding parameter. - */ - public boolean canSetParameter(String name, Object value) { - if (value instanceof Boolean){ - if ( name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS) - || name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS) - || name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES) - || name.equalsIgnoreCase(DOMConstants.DOM_INFOSET) - || name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE) - || name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES) - || name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS) - || name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA) - || name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED) - || name.equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT) - || name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT) - || name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL)){ - // both values supported - return true; - } - else if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM) - || name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION) - || name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION) - || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA) - || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE) - // || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS) - ) { - // true is not supported - return !((Boolean)value).booleanValue(); - } - else if (name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) { - // false is not supported - return ((Boolean)value).booleanValue(); - } - } - else if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER) && - value == null || value instanceof DOMErrorHandler){ - return true; - } - return false; - } - /** - * This method returns the value of a parameter if known. - * - * @see org.w3c.dom.DOMConfiguration#getParameter(java.lang.String) - * - * @param name A String containing the DOMConfiguration parameter name - * whose value is to be returned. - * @return Object The value of the parameter if known. - */ - public Object getParameter(String name) throws DOMException { - if (name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)) { - return ((fFeatures & COMMENTS) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)) { - return ((fFeatures & CDATA) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)) { - return ((fFeatures & ENTITIES) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES)) { - return ((fFeatures & NAMESPACES) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS)) { - return ((fFeatures & NAMESPACEDECLS) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA)) { - return ((fFeatures & SPLITCDATA) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED)) { - return ((fFeatures & WELLFORMED) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT)) { - return ((fFeatures & DISCARDDEFAULT) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT)) { - return ((fFeatures & PRETTY_PRINT) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL)) { - return ((fFeatures & XMLDECL) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE)) { - return ((fFeatures & ELEM_CONTENT_WHITESPACE) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT)) { - return ((fFeatures & PRETTY_PRINT) != 0) ? Boolean.TRUE : Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) { - return Boolean.TRUE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM) - || name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION) - || name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION) - // || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS) - || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE) - || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)) { - return Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_INFOSET)){ - if ((fFeatures & ENTITIES) == 0 && - (fFeatures & CDATA) == 0 && - (fFeatures & ELEM_CONTENT_WHITESPACE) != 0 && - (fFeatures & NAMESPACES) != 0 && - (fFeatures & NAMESPACEDECLS) != 0 && - (fFeatures & WELLFORMED) != 0 && - (fFeatures & COMMENTS) != 0) { - return Boolean.TRUE; - } - return Boolean.FALSE; - } else if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER)) { - return fDOMErrorHandler; - } else if ( - name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_LOCATION) - || name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_TYPE)) { - return null; - } else { - // Here we have to add the Xalan specific DOM Message Formatter - String msg = Utils.messages.createMessage( - MsgKey.ER_FEATURE_NOT_FOUND, - new Object[] { name }); - throw new DOMException(DOMException.NOT_FOUND_ERR, msg); - } - } - - /** - * This method returns a of the parameters supported by this DOMConfiguration object - * and for which at least one value can be set by the application - * - * @see org.w3c.dom.DOMConfiguration#getParameterNames() - * - * @return DOMStringList A list of DOMConfiguration parameters recognized - * by the serializer - */ - public DOMStringList getParameterNames() { - return new DOMStringListImpl(fRecognizedParameters); - } - - /** - * This method sets the value of the named parameter. - * - * @see org.w3c.dom.DOMConfiguration#setParameter(java.lang.String, java.lang.Object) - * - * @param name A String containing the DOMConfiguration parameter name. - * @param value An Object contaiing the parameters value to set. - */ - public void setParameter(String name, Object value) throws DOMException { - // If the value is a boolean - if (value instanceof Boolean) { - boolean state = ((Boolean) value).booleanValue(); - - if (name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS)) { - fFeatures = state ? fFeatures | COMMENTS : fFeatures - & ~COMMENTS; - // comments - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_EXPLICIT_TRUE); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS)) { - fFeatures = state ? fFeatures | CDATA : fFeatures - & ~CDATA; - // cdata-sections - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_EXPLICIT_TRUE); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES)) { - fFeatures = state ? fFeatures | ENTITIES : fFeatures - & ~ENTITIES; - // entities - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_TRUE); - fDOMConfigProperties.setProperty( - DOMConstants.S_XERCES_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_TRUE); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_FALSE); - fDOMConfigProperties.setProperty( - DOMConstants.S_XERCES_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES)) { - fFeatures = state ? fFeatures | NAMESPACES : fFeatures - & ~NAMESPACES; - // namespaces - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_EXPLICIT_TRUE); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name - .equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS)) { - fFeatures = state ? fFeatures | NAMESPACEDECLS - : fFeatures & ~NAMESPACEDECLS; - // namespace-declarations - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACE_DECLARATIONS, DOMConstants.DOM3_EXPLICIT_TRUE); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACE_DECLARATIONS, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA)) { - fFeatures = state ? fFeatures | SPLITCDATA : fFeatures - & ~SPLITCDATA; - // split-cdata-sections - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_SPLIT_CDATA, DOMConstants.DOM3_EXPLICIT_TRUE); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_SPLIT_CDATA, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED)) { - fFeatures = state ? fFeatures | WELLFORMED : fFeatures - & ~WELLFORMED; - // well-formed - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_EXPLICIT_TRUE); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name - .equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT)) { - fFeatures = state ? fFeatures | DISCARDDEFAULT - : fFeatures & ~DISCARDDEFAULT; - // discard-default-content - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT, DOMConstants.DOM3_EXPLICIT_TRUE); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_DISCARD_DEFAULT_CONTENT, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT)) { - fFeatures = state ? fFeatures | PRETTY_PRINT : fFeatures - & ~PRETTY_PRINT; - // format-pretty-print - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_FORMAT_PRETTY_PRINT, DOMConstants.DOM3_EXPLICIT_TRUE); - } - else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_FORMAT_PRETTY_PRINT, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL)) { - fFeatures = state ? fFeatures | XMLDECL : fFeatures - & ~XMLDECL; - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "no"); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, "yes"); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE)) { - fFeatures = state ? fFeatures | ELEM_CONTENT_WHITESPACE : fFeatures - & ~ELEM_CONTENT_WHITESPACE; - // element-content-whitespace - if (state) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, DOMConstants.DOM3_EXPLICIT_TRUE); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS)) { - // false is not supported - if (!state) { - // Here we have to add the Xalan specific DOM Message Formatter - String msg = Utils.messages.createMessage( - MsgKey.ER_FEATURE_NOT_SUPPORTED, - new Object[] { name }); - throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg); - } else { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS, DOMConstants.DOM3_EXPLICIT_TRUE); - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM) - || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA) - || name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE) - || name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION) - || name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION) - // || name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS) - ) { - // true is not supported - if (state) { - String msg = Utils.messages.createMessage( - MsgKey.ER_FEATURE_NOT_SUPPORTED, - new Object[] { name }); - throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg); - } else { - if (name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM)) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_CANONICAL_FORM, DOMConstants.DOM3_EXPLICIT_FALSE); - } else if (name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_VALIDATE_IF_SCHEMA, DOMConstants.DOM3_EXPLICIT_FALSE); - } else if (name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE)) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_VALIDATE, DOMConstants.DOM3_EXPLICIT_FALSE); - } else if (name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA)) { - fDOMConfigProperties.setProperty(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION - + DOMConstants.DOM_CHECK_CHAR_NORMALIZATION, DOMConstants.DOM3_EXPLICIT_FALSE); - } else if (name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION)) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_DATATYPE_NORMALIZATION, DOMConstants.DOM3_EXPLICIT_FALSE); - } /* else if (name.equalsIgnoreCase(DOMConstants.DOM_NORMALIZE_CHARACTERS)) { - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NORMALIZE_CHARACTERS, DOMConstants.DOM3_EXPLICIT_FALSE); - } */ - } - } else if (name.equalsIgnoreCase(DOMConstants.DOM_INFOSET)) { - // infoset - if (state) { - fFeatures &= ~ENTITIES; - fFeatures &= ~CDATA; - fFeatures &= ~SCHEMAVALIDATE; - fFeatures &= ~DTNORMALIZE; - fFeatures |= NAMESPACES; - fFeatures |= NAMESPACEDECLS; - fFeatures |= WELLFORMED; - fFeatures |= ELEM_CONTENT_WHITESPACE; - fFeatures |= COMMENTS; - - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACES, DOMConstants.DOM3_EXPLICIT_TRUE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_NAMESPACE_DECLARATIONS, DOMConstants.DOM3_EXPLICIT_TRUE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_COMMENTS, DOMConstants.DOM3_EXPLICIT_TRUE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE, DOMConstants.DOM3_EXPLICIT_TRUE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_WELLFORMED, DOMConstants.DOM3_EXPLICIT_TRUE); - - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_FALSE); - fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS - + DOMConstants.DOM_ENTITIES, DOMConstants.DOM3_EXPLICIT_FALSE); - - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_CDATA_SECTIONS, DOMConstants.DOM3_EXPLICIT_FALSE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_VALIDATE_IF_SCHEMA, DOMConstants.DOM3_EXPLICIT_FALSE); - fDOMConfigProperties.setProperty(DOMConstants.S_DOM3_PROPERTIES_NS - + DOMConstants.DOM_DATATYPE_NORMALIZATION, DOMConstants.DOM3_EXPLICIT_FALSE); - } - } else { - // If this is a non-boolean parameter a type mismatch should be thrown. - if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER) || - name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_LOCATION) || - name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_TYPE)) { - String msg = Utils.messages.createMessage( - MsgKey.ER_TYPE_MISMATCH_ERR, - new Object[] { name }); - throw new DOMException(DOMException.TYPE_MISMATCH_ERR, msg); - } - - // Parameter is not recognized - String msg = Utils.messages.createMessage( - MsgKey.ER_FEATURE_NOT_FOUND, - new Object[] { name }); - throw new DOMException(DOMException.NOT_FOUND_ERR, msg); - } - } // If the parameter value is not a boolean - else if (name.equalsIgnoreCase(DOMConstants.DOM_ERROR_HANDLER)) { - if (value == null || value instanceof DOMErrorHandler) { - fDOMErrorHandler = (DOMErrorHandler)value; - } else { - String msg = Utils.messages.createMessage( - MsgKey.ER_TYPE_MISMATCH_ERR, - new Object[] { name }); - throw new DOMException(DOMException.TYPE_MISMATCH_ERR, msg); - } - } else if ( - name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_LOCATION) - || name.equalsIgnoreCase(DOMConstants.DOM_SCHEMA_TYPE)) { - if (value != null) { - if (!(value instanceof String)) { - String msg = Utils.messages.createMessage( - MsgKey.ER_TYPE_MISMATCH_ERR, - new Object[] { name }); - throw new DOMException(DOMException.TYPE_MISMATCH_ERR, msg); - } - String msg = Utils.messages.createMessage( - MsgKey.ER_FEATURE_NOT_SUPPORTED, - new Object[] { name }); - throw new DOMException(DOMException.NOT_SUPPORTED_ERR, msg); - } - } else { - // If this is a boolean parameter a type mismatch should be thrown. - if (name.equalsIgnoreCase(DOMConstants.DOM_COMMENTS) || - name.equalsIgnoreCase(DOMConstants.DOM_CDATA_SECTIONS) || - name.equalsIgnoreCase(DOMConstants.DOM_ENTITIES) || - name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACES) || - name.equalsIgnoreCase(DOMConstants.DOM_NAMESPACE_DECLARATIONS) || - name.equalsIgnoreCase(DOMConstants.DOM_SPLIT_CDATA) || - name.equalsIgnoreCase(DOMConstants.DOM_WELLFORMED) || - name.equalsIgnoreCase(DOMConstants.DOM_DISCARD_DEFAULT_CONTENT) || - name.equalsIgnoreCase(DOMConstants.DOM_FORMAT_PRETTY_PRINT) || - name.equalsIgnoreCase(DOMConstants.DOM_XMLDECL) || - name.equalsIgnoreCase(DOMConstants.DOM_ELEMENT_CONTENT_WHITESPACE) || - name.equalsIgnoreCase(DOMConstants.DOM_IGNORE_UNKNOWN_CHARACTER_DENORMALIZATIONS) || - name.equalsIgnoreCase(DOMConstants.DOM_CANONICAL_FORM) || - name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE_IF_SCHEMA) || - name.equalsIgnoreCase(DOMConstants.DOM_VALIDATE) || - name.equalsIgnoreCase(DOMConstants.DOM_CHECK_CHAR_NORMALIZATION) || - name.equalsIgnoreCase(DOMConstants.DOM_DATATYPE_NORMALIZATION) || - name.equalsIgnoreCase(DOMConstants.DOM_INFOSET)) { - String msg = Utils.messages.createMessage( - MsgKey.ER_TYPE_MISMATCH_ERR, - new Object[] { name }); - throw new DOMException(DOMException.TYPE_MISMATCH_ERR, msg); - } - - // Parameter is not recognized - String msg = Utils.messages.createMessage( - MsgKey.ER_FEATURE_NOT_FOUND, - new Object[] { name }); - throw new DOMException(DOMException.NOT_FOUND_ERR, msg); - } - } - // ************************************************************************ - - - // ************************************************************************ - // DOMConfiguraiton implementation - // ************************************************************************ - - /** - * Returns the DOMConfiguration of the LSSerializer. - * - * @see org.w3c.dom.ls.LSSerializer#getDomConfig() - * @since DOM Level 3 - * @return A DOMConfiguration object. - */ - public DOMConfiguration getDomConfig() { - return (DOMConfiguration)this; - } - - /** - * Returns the DOMConfiguration of the LSSerializer. - * - * @see org.w3c.dom.ls.LSSerializer#getFilter() - * @since DOM Level 3 - * @return A LSSerializerFilter object. - */ - public LSSerializerFilter getFilter() { - return fSerializerFilter; - } - - /** - * Returns the End-Of-Line sequence of characters to be used in the XML - * being serialized. If none is set a default "\n" is returned. - * - * @see org.w3c.dom.ls.LSSerializer#getNewLine() - * @since DOM Level 3 - * @return A String containing the end-of-line character sequence used in - * serialization. - */ - public String getNewLine() { - return fEndOfLine; - } - - /** - * Set a LSSerilizerFilter on the LSSerializer. When set, the filter is - * called before each node is serialized which depending on its implemention - * determines if the node is to be serialized or not. - * - * @see org.w3c.dom.ls.LSSerializer#setFilter - * @since DOM Level 3 - * @param filter A LSSerializerFilter to be applied to the stream to serialize. - */ - public void setFilter(LSSerializerFilter filter) { - fSerializerFilter = filter; - } - - /** - * Sets the End-Of-Line sequence of characters to be used in the XML - * being serialized. Setting this attribute to null will reset its - * value to the default value i.e. "\n". - * - * @see org.w3c.dom.ls.LSSerializer#setNewLine - * @since DOM Level 3 - * @param newLine a String that is the end-of-line character sequence to be used in - * serialization. - */ - public void setNewLine(String newLine) { - fEndOfLine = (newLine != null) ? newLine : DEFAULT_END_OF_LINE; - } - - /** - * Serializes the specified node to the specified LSOutput and returns true if the Node - * was successfully serialized. - * - * @see org.w3c.dom.ls.LSSerializer#write(org.w3c.dom.Node, org.w3c.dom.ls.LSOutput) - * @since DOM Level 3 - * @param nodeArg The Node to serialize. - * @throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the - * LSSerializer was unable to serialize the node. - * - */ - public boolean write(Node nodeArg, LSOutput destination) throws LSException { - // If the destination is null - if (destination == null) { - String msg = Utils.messages - .createMessage( - MsgKey.ER_NO_OUTPUT_SPECIFIED, - null); - if (fDOMErrorHandler != null) { - fDOMErrorHandler.handleError(new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, msg, - MsgKey.ER_NO_OUTPUT_SPECIFIED)); - } - throw new LSException(LSException.SERIALIZE_ERR, msg); - } - - // If nodeArg is null, return false. Should we throw and LSException instead? - if (nodeArg == null ) { - return false; - } - - // Obtain a reference to the serializer to use - // Serializer serializer = getXMLSerializer(xmlVersion); - Serializer serializer = fXMLSerializer; - serializer.reset(); - - // If the node has not been seen - if ( nodeArg != fVisitedNode) { - // Determine the XML Document version of the Node - String xmlVersion = getXMLVersion(nodeArg); - - // Determine the encoding: 1.LSOutput.encoding, 2.Document.inputEncoding, 3.Document.xmlEncoding. - fEncoding = destination.getEncoding(); - if (fEncoding == null ) { - fEncoding = getInputEncoding(nodeArg); - fEncoding = fEncoding != null ? fEncoding : getXMLEncoding(nodeArg) == null? "UTF-8": getXMLEncoding(nodeArg); - } - - // If the encoding is not recognized throw an exception. - // Note: The serializer defaults to UTF-8 when created - if (!Encodings.isRecognizedEncoding(fEncoding)) { - String msg = Utils.messages - .createMessage( - MsgKey.ER_UNSUPPORTED_ENCODING, - null); - if (fDOMErrorHandler != null) { - fDOMErrorHandler.handleError(new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, msg, - MsgKey.ER_UNSUPPORTED_ENCODING)); - } - throw new LSException(LSException.SERIALIZE_ERR, msg); - } - - serializer.getOutputFormat().setProperty("version", xmlVersion); - - // Set the output encoding and xml version properties - fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, xmlVersion); - fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_ENCODING, fEncoding); - - // If the node to be serialized is not a Document, Element, or Entity - // node - // then the XML declaration, or text declaration, should be never be - // serialized. - if ( (nodeArg.getNodeType() != Node.DOCUMENT_NODE - || nodeArg.getNodeType() != Node.ELEMENT_NODE - || nodeArg.getNodeType() != Node.ENTITY_NODE) - && ((fFeatures & XMLDECL) != 0)) { - fDOMConfigProperties.setProperty( - DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, - DOMConstants.DOM3_DEFAULT_FALSE); - } - - fVisitedNode = nodeArg; - } - - // Update the serializer properties - fXMLSerializer.setOutputFormat(fDOMConfigProperties); - - // - try { - - // The LSSerializer will use the LSOutput object to determine - // where to serialize the output to in the following order the - // first one that is not null and not an empty string will be - // used: 1.LSOutput.characterStream, 2.LSOutput.byteStream, - // 3. LSOutput.systemId - // 1.LSOutput.characterStream - Writer writer = destination.getCharacterStream(); - if (writer == null ) { - - // 2.LSOutput.byteStream - OutputStream outputStream = destination.getByteStream(); - if ( outputStream == null) { - - // 3. LSOutput.systemId - String uri = destination.getSystemId(); - if (uri == null) { - String msg = Utils.messages - .createMessage( - MsgKey.ER_NO_OUTPUT_SPECIFIED, - null); - if (fDOMErrorHandler != null) { - fDOMErrorHandler.handleError(new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, msg, - MsgKey.ER_NO_OUTPUT_SPECIFIED)); - } - throw new LSException(LSException.SERIALIZE_ERR, msg); - - } else { - // Expand the System Id and obtain an absolute URI for it. - String absoluteURI = SystemIDResolver.getAbsoluteURI(uri); - - URL url = new URL(absoluteURI); - OutputStream urlOutStream = null; - String protocol = url.getProtocol(); - String host = url.getHost(); - - // For file protocols, there is no need to use a URL to get its - // corresponding OutputStream - - // Scheme names consist of a sequence of characters. The lower case - // letters "a"--"z", digits, and the characters plus ("+"), period - // ("."), and hyphen ("-") are allowed. For resiliency, programs - // interpreting URLs should treat upper case letters as equivalent to - // lower case in scheme names (e.g., allow "HTTP" as well as "http"). - if (protocol.equalsIgnoreCase("file") - && (host == null || host.length() == 0 || host.equals("localhost"))) { - // do we also need to check for host.equals(hostname) - urlOutStream = new FileOutputStream(getPathWithoutEscapes(url.getPath())); - - } else { - // This should support URL's whose schemes are mentioned in - // RFC1738 other than file - - URLConnection urlCon = url.openConnection(); - urlCon.setDoInput(false); - urlCon.setDoOutput(true); - urlCon.setUseCaches(false); - urlCon.setAllowUserInteraction(false); - - // When writing to a HTTP URI, a HTTP PUT is performed. - if (urlCon instanceof HttpURLConnection) { - HttpURLConnection httpCon = (HttpURLConnection) urlCon; - httpCon.setRequestMethod("PUT"); - } - urlOutStream = urlCon.getOutputStream(); - } - // set the OutputStream to that obtained from the systemId - serializer.setOutputStream(urlOutStream); - } - } else { - // 2.LSOutput.byteStream - serializer.setOutputStream(outputStream); - } - } else { - // 1.LSOutput.characterStream - serializer.setWriter(writer); - } - - // The associated media type by default is set to text/xml on - // org.apache.xml.serializer.SerializerBase. - - // Get a reference to the serializer then lets you serilize a DOM - // Use this hack till Xalan support JAXP1.3 - if (fDOMSerializer == null) { - fDOMSerializer = (DOM3Serializer)serializer.asDOM3Serializer(); - } - - // Set the error handler on the DOM3Serializer interface implementation - if (fDOMErrorHandler != null) { - fDOMSerializer.setErrorHandler(fDOMErrorHandler); - } - - // Set the filter on the DOM3Serializer interface implementation - if (fSerializerFilter != null) { - fDOMSerializer.setNodeFilter(fSerializerFilter); - } - - // Set the NewLine character to be used - fDOMSerializer.setNewLine(fEndOfLine.toCharArray()); - - // Serializer your DOM, where node is an org.w3c.dom.Node - // Assuming that Xalan's serializer can serialize any type of DOM node - fDOMSerializer.serializeDOM3(nodeArg); - - } catch( UnsupportedEncodingException ue) { - - String msg = Utils.messages - .createMessage( - MsgKey.ER_UNSUPPORTED_ENCODING, - null); - if (fDOMErrorHandler != null) { - fDOMErrorHandler.handleError(new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, msg, - MsgKey.ER_UNSUPPORTED_ENCODING, ue)); - } - throw (LSException) createLSException(LSException.SERIALIZE_ERR, ue).fillInStackTrace(); - } catch (LSException lse) { - // Rethrow LSException. - throw lse; - } catch (RuntimeException e) { - throw (LSException) createLSException(LSException.SERIALIZE_ERR, e).fillInStackTrace(); - } catch (Exception e) { - if (fDOMErrorHandler != null) { - fDOMErrorHandler.handleError(new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, e.getMessage(), - null, e)); - } - throw (LSException) createLSException(LSException.SERIALIZE_ERR, e).fillInStackTrace(); - } - return true; - } - - /** - * Serializes the specified node and returns a String with the serialized - * data to the caller. - * - * @see org.w3c.dom.ls.LSSerializer#writeToString(org.w3c.dom.Node) - * @since DOM Level 3 - * @param nodeArg The Node to serialize. - * @throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the - * LSSerializer was unable to serialize the node. - * - */ - public String writeToString(Node nodeArg) throws DOMException, LSException { - // return null is nodeArg is null. Should an Exception be thrown instead? - if (nodeArg == null) { - return null; - } - - // Should we reset the serializer configuration before each write operation? - // Obtain a reference to the serializer to use - Serializer serializer = fXMLSerializer; - serializer.reset(); - - if (nodeArg != fVisitedNode){ - // Determine the XML Document version of the Node - String xmlVersion = getXMLVersion(nodeArg); - - serializer.getOutputFormat().setProperty("version", xmlVersion); - - // Set the output encoding and xml version properties - fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, xmlVersion); - fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_ENCODING, "UTF-16"); - - // If the node to be serialized is not a Document, Element, or Entity - // node - // then the XML declaration, or text declaration, should be never be - // serialized. - if ((nodeArg.getNodeType() != Node.DOCUMENT_NODE - || nodeArg.getNodeType() != Node.ELEMENT_NODE - || nodeArg.getNodeType() != Node.ENTITY_NODE) - && ((fFeatures & XMLDECL) != 0)) { - fDOMConfigProperties.setProperty( - DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, - DOMConstants.DOM3_DEFAULT_FALSE); - } - - fVisitedNode = nodeArg; - } - // Update the serializer properties - fXMLSerializer.setOutputFormat(fDOMConfigProperties); - - // StringWriter to Output to - StringWriter output = new StringWriter(); - - // - try { - - // Set the Serializer's Writer to a StringWriter - serializer.setWriter(output); - - // Get a reference to the serializer then lets you serilize a DOM - // Use this hack till Xalan support JAXP1.3 - if (fDOMSerializer == null) { - fDOMSerializer = (DOM3Serializer)serializer.asDOM3Serializer(); - } - - // Set the error handler on the DOM3Serializer interface implementation - if (fDOMErrorHandler != null) { - fDOMSerializer.setErrorHandler(fDOMErrorHandler); - } - - // Set the filter on the DOM3Serializer interface implementation - if (fSerializerFilter != null) { - fDOMSerializer.setNodeFilter(fSerializerFilter); - } - - // Set the NewLine character to be used - fDOMSerializer.setNewLine(fEndOfLine.toCharArray()); - - // Serializer your DOM, where node is an org.w3c.dom.Node - fDOMSerializer.serializeDOM3(nodeArg); - } catch (LSException lse) { - // Rethrow LSException. - throw lse; - } catch (RuntimeException e) { - throw (LSException) createLSException(LSException.SERIALIZE_ERR, e).fillInStackTrace(); - } catch (Exception e) { - if (fDOMErrorHandler != null) { - fDOMErrorHandler.handleError(new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, e.getMessage(), - null, e)); - } - throw (LSException) createLSException(LSException.SERIALIZE_ERR, e).fillInStackTrace(); - } - - // return the serialized string - return output.toString(); - } - - /** - * Serializes the specified node to the specified URI and returns true if the Node - * was successfully serialized. - * - * @see org.w3c.dom.ls.LSSerializer#writeToURI(org.w3c.dom.Node, String) - * @since DOM Level 3 - * @param nodeArg The Node to serialize. - * @throws org.w3c.dom.ls.LSException SERIALIZE_ERR: Raised if the - * LSSerializer was unable to serialize the node. - * - */ - public boolean writeToURI(Node nodeArg, String uri) throws LSException { - // If nodeArg is null, return false. Should we throw and LSException instead? - if (nodeArg == null ) { - return false; - } - - // Obtain a reference to the serializer to use - Serializer serializer = fXMLSerializer; - serializer.reset(); - - if (nodeArg != fVisitedNode) { - // Determine the XML Document version of the Node - String xmlVersion = getXMLVersion(nodeArg); - - // Determine the encoding: 1.LSOutput.encoding, - // 2.Document.inputEncoding, 3.Document.xmlEncoding. - fEncoding = getInputEncoding(nodeArg); - if (fEncoding == null ) { - fEncoding = fEncoding != null ? fEncoding : getXMLEncoding(nodeArg) == null? "UTF-8": getXMLEncoding(nodeArg); - } - - serializer.getOutputFormat().setProperty("version", xmlVersion); - - // Set the output encoding and xml version properties - fDOMConfigProperties.setProperty(DOMConstants.S_XERCES_PROPERTIES_NS + DOMConstants.S_XML_VERSION, xmlVersion); - fDOMConfigProperties.setProperty(DOMConstants.S_XSL_OUTPUT_ENCODING, fEncoding); - - // If the node to be serialized is not a Document, Element, or Entity - // node - // then the XML declaration, or text declaration, should be never be - // serialized. - if ( (nodeArg.getNodeType() != Node.DOCUMENT_NODE - || nodeArg.getNodeType() != Node.ELEMENT_NODE - || nodeArg.getNodeType() != Node.ENTITY_NODE) - && ((fFeatures & XMLDECL) != 0)) { - fDOMConfigProperties.setProperty( - DOMConstants.S_XSL_OUTPUT_OMIT_XML_DECL, - DOMConstants.DOM3_DEFAULT_FALSE); - } - - fVisitedNode = nodeArg; - } - - // Update the serializer properties - fXMLSerializer.setOutputFormat(fDOMConfigProperties); - - // - try { - // If the specified encoding is not supported an - // "unsupported-encoding" fatal error is raised. ?? - if (uri == null) { - String msg = Utils.messages.createMessage( - MsgKey.ER_NO_OUTPUT_SPECIFIED, null); - if (fDOMErrorHandler != null) { - fDOMErrorHandler.handleError(new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, msg, - MsgKey.ER_NO_OUTPUT_SPECIFIED)); - } - throw new LSException(LSException.SERIALIZE_ERR, msg); - - } else { - // REVISIT: Can this be used to get an absolute expanded URI - String absoluteURI = SystemIDResolver.getAbsoluteURI(uri); - - URL url = new URL(absoluteURI); - OutputStream urlOutStream = null; - String protocol = url.getProtocol(); - String host = url.getHost(); - - // For file protocols, there is no need to use a URL to get its - // corresponding OutputStream - - // Scheme names consist of a sequence of characters. The lower - // case letters "a"--"z", digits, and the characters plus ("+"), - // period ("."), and hyphen ("-") are allowed. For resiliency, - // programs interpreting URLs should treat upper case letters as - // equivalent to lower case in scheme names - // (e.g., allow "HTTP" as well as "http"). - if (protocol.equalsIgnoreCase("file") - && (host == null || host.length() == 0 || host - .equals("localhost"))) { - // do we also need to check for host.equals(hostname) - urlOutStream = new FileOutputStream(getPathWithoutEscapes(url.getPath())); - - } else { - // This should support URL's whose schemes are mentioned in - // RFC1738 other than file - - URLConnection urlCon = url.openConnection(); - urlCon.setDoInput(false); - urlCon.setDoOutput(true); - urlCon.setUseCaches(false); - urlCon.setAllowUserInteraction(false); - - // When writing to a HTTP URI, a HTTP PUT is performed. - if (urlCon instanceof HttpURLConnection) { - HttpURLConnection httpCon = (HttpURLConnection) urlCon; - httpCon.setRequestMethod("PUT"); - } - urlOutStream = urlCon.getOutputStream(); - } - // set the OutputStream to that obtained from the systemId - serializer.setOutputStream(urlOutStream); - } - - // Get a reference to the serializer then lets you serilize a DOM - // Use this hack till Xalan support JAXP1.3 - if (fDOMSerializer == null) { - fDOMSerializer = (DOM3Serializer)serializer.asDOM3Serializer(); - } - - // Set the error handler on the DOM3Serializer interface implementation - if (fDOMErrorHandler != null) { - fDOMSerializer.setErrorHandler(fDOMErrorHandler); - } - - // Set the filter on the DOM3Serializer interface implementation - if (fSerializerFilter != null) { - fDOMSerializer.setNodeFilter(fSerializerFilter); - } - - // Set the NewLine character to be used - fDOMSerializer.setNewLine(fEndOfLine.toCharArray()); - - // Serializer your DOM, where node is an org.w3c.dom.Node - // Assuming that Xalan's serializer can serialize any type of DOM - // node - fDOMSerializer.serializeDOM3(nodeArg); - - } catch (LSException lse) { - // Rethrow LSException. - throw lse; - } catch (RuntimeException e) { - throw (LSException) createLSException(LSException.SERIALIZE_ERR, e).fillInStackTrace(); - } catch (Exception e) { - if (fDOMErrorHandler != null) { - fDOMErrorHandler.handleError(new DOMErrorImpl( - DOMError.SEVERITY_FATAL_ERROR, e.getMessage(), - null, e)); - } - throw (LSException) createLSException(LSException.SERIALIZE_ERR, e).fillInStackTrace(); - } - - return true; - } - // ************************************************************************ - - - // ************************************************************************ - // Implementaion methods - // ************************************************************************ - - /** - * Determines the XML Version of the Document Node to serialize. If the Document Node - * is not a DOM Level 3 Node, then the default version returned is 1.0. - * - * @param nodeArg The Node to serialize - * @return A String containing the version pseudo-attribute of the XMLDecl. - */ - protected String getXMLVersion(Node nodeArg) { - Document doc = null; - - // Determine the XML Version of the document - if (nodeArg != null) { - if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) { - // The Document node is the Node argument - doc = (Document)nodeArg; - } else { - // The Document node is the Node argument's ownerDocument - doc = nodeArg.getOwnerDocument(); - } - - // Determine the DOM Version. - if (doc != null && doc.getImplementation().hasFeature("Core","3.0")) { - return doc.getXmlVersion(); - } - } - // The version will be treated as "1.0" which may result in - // an ill-formed document being serialized. - // If nodeArg does not have an ownerDocument, treat this as XML 1.0 - return "1.0"; - } - - /** - * 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. - */ - protected String getXMLEncoding(Node nodeArg) { - Document doc = null; - - // Determine the XML Encoding of the document - if (nodeArg != null) { - if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) { - // The Document node is the Node argument - doc = (Document)nodeArg; - } else { - // The Document node is the Node argument's ownerDocument - doc = nodeArg.getOwnerDocument(); - } - - // Determine the XML Version. - if (doc != null && doc.getImplementation().hasFeature("Core","3.0")) { - return doc.getXmlEncoding(); - } - } - // The default encoding is UTF-8 except for the writeToString method - return "UTF-8"; - } - - /** - * Determines the Input Encoding of the Document Node to serialize. If the Document Node - * is not a DOM Level 3 Node, then null is returned. - * - * @param nodeArg The Node to serialize - * @return A String containing the input encoding. - */ - protected String getInputEncoding(Node nodeArg) { - Document doc = null; - - // Determine the Input Encoding of the document - if (nodeArg != null) { - if (nodeArg.getNodeType() == Node.DOCUMENT_NODE) { - // The Document node is the Node argument - doc = (Document)nodeArg; - } else { - // The Document node is the Node argument's ownerDocument - doc = nodeArg.getOwnerDocument(); - } - - // Determine the DOM Version. - if (doc != null && doc.getImplementation().hasFeature("Core","3.0")) { - return doc.getInputEncoding(); - } - } - // The default encoding returned is null - return null; - } - - /** - * This method returns the LSSerializer's error handler. - * - * @return Returns the fDOMErrorHandler. - */ - public DOMErrorHandler getErrorHandler() { - return fDOMErrorHandler; - } - - /** - * Replaces all escape sequences in the given path with their literal characters. - */ - private static String getPathWithoutEscapes(String origPath) { - if (origPath != null && origPath.length() != 0 && origPath.indexOf('%') != -1) { - // Locate the escape characters - StringTokenizer tokenizer = new StringTokenizer(origPath, "%"); - StringBuffer result = new StringBuffer(origPath.length()); - int size = tokenizer.countTokens(); - result.append(tokenizer.nextToken()); - for(int i = 1; i < size; ++i) { - String token = tokenizer.nextToken(); - if (token.length() >= 2 && isHexDigit(token.charAt(0)) && - isHexDigit(token.charAt(1))) { - // Decode the 2 digit hexadecimal number following % in '%nn' - result.append((char)Integer.valueOf(token.substring(0, 2), 16).intValue()); - token = token.substring(2); - } - result.append(token); - } - return result.toString(); - } - return origPath; - } - - /** - * Returns true if the given character is a valid hex character. - */ - private static boolean isHexDigit(char c) { - return (c >= '0' && c <= '9' || - c >= 'a' && c <= 'f' || - c >= 'A' && c <= 'F'); - } - - /** - * Creates an LSException. On J2SE 1.4 and above the cause for the exception will be set. - */ - private static LSException createLSException(short code, Throwable cause) { - LSException lse = new LSException(code, cause != null ? cause.getMessage() : null); - if (cause != null && ThrowableMethods.fgThrowableMethodsAvailable) { - try { - ThrowableMethods.fgThrowableInitCauseMethod.invoke(lse, new Object [] {cause}); - } - // Something went wrong. There's not much we can do about it. - catch (Exception e) {} - } - return lse; - } - - /** - * Holder of methods from java.lang.Throwable. - */ - static class ThrowableMethods { - - // Method: java.lang.Throwable.initCause(java.lang.Throwable) - private static java.lang.reflect.Method fgThrowableInitCauseMethod = null; - - // Flag indicating whether or not Throwable methods available. - private static boolean fgThrowableMethodsAvailable = false; - - private ThrowableMethods() {} - - // Attempt to get methods for java.lang.Throwable on class initialization. - static { - try { - fgThrowableInitCauseMethod = Throwable.class.getMethod("initCause", new Class [] {Throwable.class}); - fgThrowableMethodsAvailable = true; - } - // ClassNotFoundException, NoSuchMethodException or SecurityException - // Whatever the case, we cannot use java.lang.Throwable.initCause(java.lang.Throwable). - catch (Exception exc) { - fgThrowableInitCauseMethod = null; - fgThrowableMethodsAvailable = false; - } - } - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/dom3/NamespaceSupport.java b/serializer/src/main/java/org/apache/xml/serializer/dom3/NamespaceSupport.java deleted file mode 100644 index a7eb6bffa..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/dom3/NamespaceSupport.java +++ /dev/null @@ -1,336 +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.dom3; - -import java.util.Enumeration; -import java.util.NoSuchElementException; - -/** - * Namespace support for XML document handlers. This class doesn't - * perform any error checking and assumes that all strings passed - * as arguments to methods are unique symbols. The SymbolTable class - * can be used for this purpose. - * - * Derived from org.apache.xerces.util.NamespaceSupport - * - * @author Andy Clark, IBM - * - * @version $Id$ - */ -public class NamespaceSupport { - - static final String PREFIX_XML = "xml".intern(); - - static final String PREFIX_XMLNS = "xmlns".intern(); - - /** - * The XML Namespace ("http://www.w3.org/XML/1998/namespace"). This is - * the Namespace URI that is automatically mapped to the "xml" prefix. - */ - public final static String XML_URI = "http://www.w3.org/XML/1998/namespace".intern(); - - /** - * XML Information Set REC - * all namespace attributes (including those named xmlns, - * whose [prefix] property has no value) have a namespace URI of http://www.w3.org/2000/xmlns/ - */ - public final static String XMLNS_URI = "http://www.w3.org/2000/xmlns/".intern(); - - // - // Data - // - - /** - * Namespace binding information. This array is composed of a - * series of tuples containing the namespace binding information: - * <prefix, uri>. The default size can be set to anything - * as long as it is a power of 2 greater than 1. - * - * @see #fNamespaceSize - * @see #fContext - */ - protected String[] fNamespace = new String[16 * 2]; - - /** The top of the namespace information array. */ - protected int fNamespaceSize; - - // NOTE: The constructor depends on the initial context size - // being at least 1. -Ac - - /** - * Context indexes. This array contains indexes into the namespace - * information array. The index at the current context is the start - * index of declared namespace bindings and runs to the size of the - * namespace information array. - * - * @see #fNamespaceSize - */ - protected int[] fContext = new int[8]; - - /** The current context. */ - protected int fCurrentContext; - - protected String[] fPrefixes = new String[16]; - - // - // Constructors - // - - /** Default constructor. */ - public NamespaceSupport() { - } // () - - // - // Public methods - // - - /** - * @see org.apache.xerces.xni.NamespaceContext#reset() - */ - public void reset() { - - // reset namespace and context info - fNamespaceSize = 0; - fCurrentContext = 0; - fContext[fCurrentContext] = fNamespaceSize; - - // bind "xml" prefix to the XML uri - fNamespace[fNamespaceSize++] = PREFIX_XML; - fNamespace[fNamespaceSize++] = XML_URI; - // bind "xmlns" prefix to the XMLNS uri - fNamespace[fNamespaceSize++] = PREFIX_XMLNS; - fNamespace[fNamespaceSize++] = XMLNS_URI; - ++fCurrentContext; - - } // reset(SymbolTable) - - - /** - * @see org.apache.xerces.xni.NamespaceContext#pushContext() - */ - public void pushContext() { - - // extend the array, if necessary - if (fCurrentContext + 1 == fContext.length) { - int[] contextarray = new int[fContext.length * 2]; - System.arraycopy(fContext, 0, contextarray, 0, fContext.length); - fContext = contextarray; - } - - // push context - fContext[++fCurrentContext] = fNamespaceSize; - - } // pushContext() - - - /** - * @see org.apache.xerces.xni.NamespaceContext#popContext() - */ - public void popContext() { - fNamespaceSize = fContext[fCurrentContext--]; - } // 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) { - // ignore "xml" and "xmlns" prefixes - if (prefix == PREFIX_XML || prefix == PREFIX_XMLNS) { - return false; - } - - // see if prefix already exists in current context - for (int i = fNamespaceSize; i > fContext[fCurrentContext]; i -= 2) { - //if (fNamespace[i - 2] == prefix) { - if (fNamespace[i - 2].equals(prefix) ) { - // REVISIT: [Q] Should the new binding override the - // previously declared binding or should it - // it be ignored? -Ac - // NOTE: The SAX2 "NamespaceSupport" helper allows - // re-bindings with the new binding overwriting - // the previous binding. -Ac - fNamespace[i - 1] = uri; - return true; - } - } - - // resize array, if needed - if (fNamespaceSize == fNamespace.length) { - String[] namespacearray = new String[fNamespaceSize * 2]; - System.arraycopy(fNamespace, 0, namespacearray, 0, fNamespaceSize); - fNamespace = namespacearray; - } - - // bind prefix to uri in current context - fNamespace[fNamespaceSize++] = prefix; - fNamespace[fNamespaceSize++] = uri; - - return true; - - } // 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) { - - // find prefix in current context - for (int i = fNamespaceSize; i > 0; i -= 2) { - //if (fNamespace[i - 2] == prefix) { - if (fNamespace[i - 2].equals(prefix) ) { - return fNamespace[i - 1]; - } - } - - // prefix not found - return null; - - } // getURI(String):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 - for (int i = fNamespaceSize; i > 0; i -= 2) { - //if (fNamespace[i - 1] == uri) { - if (fNamespace[i - 1].equals(uri) ) { - //if (getURI(fNamespace[i - 2]) == uri) - if (getURI(fNamespace[i - 2]).equals(uri) ) - return fNamespace[i - 2]; - } - } - - // uri not found - return null; - - } // getPrefix(String):String - - - /** @return number of prefixes currently bound - * @see org.apache.xerces.xni.NamespaceContext#getDeclaredPrefixCount() - */ - public int getDeclaredPrefixCount() { - return (fNamespaceSize - fContext[fCurrentContext]) / 2; - } // getDeclaredPrefixCount():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 - - /** - * @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 - String[] prefixes = new String[fNamespaceSize]; - fPrefixes = prefixes; - } - String prefix = null; - boolean unique = true; - for (int i = 2; i < (fNamespaceSize-2); i += 2) { - prefix = fNamespace[i + 2]; - for (int k=0;k - - - Xalan Serializer Package. - -

Processes SAX events into streams.

- -

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}).

-

{@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. -

-

XML mapping from characters to entity references is defined in - XMLEntities.res. HTML entity reference mapping is defined in HTMLEntities.res. -

-

Encoding information is defined in {@link org.apache.xml.serializer.Encodings}.

- - - - diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/AttList.java b/serializer/src/main/java/org/apache/xml/serializer/utils/AttList.java deleted file mode 100644 index 811713065..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/AttList.java +++ /dev/null @@ -1,264 +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.utils; - -import org.w3c.dom.Attr; -import org.w3c.dom.NamedNodeMap; -import org.w3c.dom.Node; - -import org.xml.sax.Attributes; - -/** - * Wraps a DOM attribute list in a SAX Attributes. - * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * A minor changes from that package are: - * DOMHelper reference changed to DOM2Helper, class is not "public" - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public final class AttList implements Attributes -{ - - /** List of attribute nodes */ - NamedNodeMap m_attrs; - - /** Index of last attribute node */ - int m_lastIndex; - - // ARGHH!! JAXP Uses Xerces without setting the namespace processing to ON! - // DOM2Helper m_dh = new DOM2Helper(); - - /** Local reference to DOMHelper */ - DOM2Helper m_dh; - -// /** -// * Constructor AttList -// * -// * -// * @param attrs List of attributes this will contain -// */ -// public AttList(NamedNodeMap attrs) -// { -// -// m_attrs = attrs; -// m_lastIndex = m_attrs.getLength() - 1; -// m_dh = new DOM2Helper(); -// } - - /** - * Constructor AttList - * - * - * @param attrs List of attributes this will contain - * @param dh DOMHelper - */ - public AttList(NamedNodeMap attrs, DOM2Helper dh) - { - - m_attrs = attrs; - m_lastIndex = m_attrs.getLength() - 1; - m_dh = dh; - } - - /** - * Get the number of attribute nodes in the list - * - * - * @return number of attribute nodes - */ - public int getLength() - { - return m_attrs.getLength(); - } - - /** - * Look up an attribute's Namespace URI by index. - * - * @param index The attribute index (zero-based). - * @return The Namespace URI, or the empty string if none - * is available, or null if the index is out of - * range. - */ - public String getURI(int index) - { - String ns = m_dh.getNamespaceOfNode(((Attr) m_attrs.item(index))); - if(null == ns) - ns = ""; - return ns; - } - - /** - * Look up an attribute's local name by index. - * - * @param index The attribute index (zero-based). - * @return The local name, or the empty string if Namespace - * processing is not being performed, or null - * if the index is out of range. - */ - public String getLocalName(int index) - { - return m_dh.getLocalNameOfNode(((Attr) m_attrs.item(index))); - } - - /** - * Look up an attribute's qualified name by index. - * - * - * @param i The attribute index (zero-based). - * - * @return The attribute's qualified name - */ - public String getQName(int i) - { - return ((Attr) m_attrs.item(i)).getName(); - } - - /** - * Get the attribute's node type by index - * - * - * @param i The attribute index (zero-based) - * - * @return the attribute's node type - */ - public String getType(int i) - { - return "CDATA"; // for the moment - } - - /** - * Get the attribute's node value by index - * - * - * @param i The attribute index (zero-based) - * - * @return the attribute's node value - */ - public String getValue(int i) - { - return ((Attr) m_attrs.item(i)).getValue(); - } - - /** - * Get the attribute's node type by name - * - * - * @param name Attribute name - * - * @return the attribute's node type - */ - public String getType(String name) - { - return "CDATA"; // for the moment - } - - /** - * Look up an attribute's type by Namespace name. - * - * @param uri The Namespace URI, or the empty String if the - * name has no Namespace URI. - * @param localName The local name of the attribute. - * @return The attribute type as a string, or null if the - * attribute is not in the list or if Namespace - * processing is not being performed. - */ - public String getType(String uri, String localName) - { - return "CDATA"; // for the moment - } - - /** - * Look up an attribute's value by name. - * - * - * @param name The attribute node's name - * - * @return The attribute node's value - */ - public String getValue(String name) - { - Attr attr = ((Attr) m_attrs.getNamedItem(name)); - return (null != attr) - ? attr.getValue() : null; - } - - /** - * Look up an attribute's value by Namespace name. - * - * @param uri The Namespace URI, or the empty String if the - * name has no Namespace URI. - * @param localName The local name of the attribute. - * @return The attribute value as a string, or null if the - * attribute is not in the list. - */ - public String getValue(String uri, String localName) - { - Node a=m_attrs.getNamedItemNS(uri,localName); - return (a==null) ? null : a.getNodeValue(); - } - - /** - * Look up the index of an attribute by Namespace name. - * - * @param uri The Namespace URI, or the empty string if - * the name has no Namespace URI. - * @param localPart The attribute's local name. - * @return The index of the attribute, or -1 if it does not - * appear in the list. - */ - public int getIndex(String uri, String localPart) - { - for(int i=m_attrs.getLength()-1;i>=0;--i) - { - Node a=m_attrs.item(i); - String u=a.getNamespaceURI(); - if( (u==null ? uri==null : u.equals(uri)) - && - a.getLocalName().equals(localPart) ) - return i; - } - return -1; - } - - /** - * Look up the index of an attribute by raw XML 1.0 name. - * - * @param qName The qualified (prefixed) name. - * @return The index of the attribute, or -1 if it does not - * appear in the list. - */ - public int getIndex(String qName) - { - for(int i=m_attrs.getLength()-1;i>=0;--i) - { - Node a=m_attrs.item(i); - if(a.getNodeName().equals(qName) ) - return i; - } - return -1; - } -} - diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/BoolStack.java b/serializer/src/main/java/org/apache/xml/serializer/utils/BoolStack.java deleted file mode 100644 index e1f49d6bc..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/BoolStack.java +++ /dev/null @@ -1,204 +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.utils; -import java.util.EmptyStackException; - -/** - * Simple stack for boolean values. - * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * A minor changes from that package are: - * doesn't implement Clonable - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public final class BoolStack -{ - - /** Array of boolean values */ - private boolean m_values[]; - - /** Array size allocated */ - private int m_allocatedSize; - - /** Index into the array of booleans */ - private int m_index; - - /** - * Default constructor. Note that the default - * block size is very small, for small lists. - */ - public BoolStack() - { - this(32); - } - - /** - * Construct a IntVector, using the given block size. - * - * @param size array size to allocate - */ - public BoolStack(int size) - { - - m_allocatedSize = size; - m_values = new boolean[size]; - m_index = -1; - } - - /** - * Get the length of the list. - * - * @return Current length of the list - */ - public final int size() - { - return m_index + 1; - } - - /** - * Clears the stack. - * - */ - public final void clear() - { - m_index = -1; - } - - /** - * Pushes an item onto the top of this stack. - * - * - * @param val the boolean to be pushed onto this stack. - * @return the item argument. - */ - public final boolean push(boolean val) - { - - if (m_index == m_allocatedSize - 1) - grow(); - - return (m_values[++m_index] = val); - } - - /** - * Removes the object at the top of this stack and returns that - * object as the value of this function. - * - * @return The object at the top of this stack. - * @throws EmptyStackException if this stack is empty. - */ - public final boolean pop() - { - return m_values[m_index--]; - } - - /** - * Removes the object at the top of this stack and returns the - * next object at the top as the value of this function. - * - * - * @return Next object to the top or false if none there - */ - public final boolean popAndTop() - { - - m_index--; - - return (m_index >= 0) ? m_values[m_index] : false; - } - - /** - * Set the item at the top of this stack - * - * - * @param b Object to set at the top of this stack - */ - public final void setTop(boolean b) - { - m_values[m_index] = b; - } - - /** - * Looks at the object at the top of this stack without removing it - * from the stack. - * - * @return the object at the top of this stack. - * @throws EmptyStackException if this stack is empty. - */ - public final boolean peek() - { - return m_values[m_index]; - } - - /** - * Looks at the object at the top of this stack without removing it - * from the stack. If the stack is empty, it returns false. - * - * @return the object at the top of this stack. - */ - public final boolean peekOrFalse() - { - return (m_index > -1) ? m_values[m_index] : false; - } - - /** - * Looks at the object at the top of this stack without removing it - * from the stack. If the stack is empty, it returns true. - * - * @return the object at the top of this stack. - */ - public final boolean peekOrTrue() - { - return (m_index > -1) ? m_values[m_index] : true; - } - - /** - * Tests if this stack is empty. - * - * @return true if this stack is empty; - * false otherwise. - */ - public boolean isEmpty() - { - return (m_index == -1); - } - - /** - * Grows the size of the stack - * - */ - private void grow() - { - - m_allocatedSize *= 2; - - boolean newVector[] = new boolean[m_allocatedSize]; - - System.arraycopy(m_values, 0, newVector, 0, m_index + 1); - - m_values = newVector; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/DOM2Helper.java b/serializer/src/main/java/org/apache/xml/serializer/utils/DOM2Helper.java deleted file mode 100644 index c21cecf48..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/DOM2Helper.java +++ /dev/null @@ -1,122 +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.utils; - -import org.w3c.dom.Node; - -/** - * This class provides a DOM level 2 "helper", which provides services currently - * not provided be the DOM standard. - * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * - * The differences from the original class are: - * it doesn't extend DOMHelper, not depricated, - * dropped method isNodeAfter(Node node1, Node node2) - * dropped method parse(InputSource) - * dropped method supportSAX() - * dropped method setDocument(doc) - * dropped method checkNode(Node) - * dropped method getDocument() - * dropped method getElementByID(String id, Document doc) - * dropped method getParentOfNode(Node node) - * dropped field Document m_doc; - * made class non-public - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public final class DOM2Helper -{ - - /** - * Construct an instance. - */ - public DOM2Helper(){} - - /** - * Returns the local name of the given node, as defined by the - * XML Namespaces specification. This is prepared to handle documents - * built using DOM Level 1 methods by falling back upon explicitly - * parsing the node name. - * - * @param n Node to be examined - * - * @return String containing the local name, or null if the node - * was not assigned a Namespace. - */ - public String getLocalNameOfNode(Node n) - { - - String name = n.getLocalName(); - - return (null == name) ? getLocalNameOfNodeFallback(n) : name; - } - - /** - * Returns the local name of the given node. If the node's name begins - * with a namespace prefix, this is the part after the colon; otherwise - * it's the full node name. - * - * This method is copied from org.apache.xml.utils.DOMHelper - * - * @param n the node to be examined. - * - * @return String containing the Local Name - */ - private String getLocalNameOfNodeFallback(Node n) - { - - String qname = n.getNodeName(); - int index = qname.indexOf(':'); - - return (index < 0) ? qname : qname.substring(index + 1); - } - - /** - * Returns the Namespace Name (Namespace URI) for the given node. - * In a Level 2 DOM, you can ask the node itself. Note, however, that - * doing so conflicts with our decision in getLocalNameOfNode not - * to trust the that the DOM was indeed created using the Level 2 - * methods. If Level 1 methods were used, these two functions will - * disagree with each other. - *

- * TODO: Reconcile with getLocalNameOfNode. - * - * @param n Node to be examined - * - * @return String containing the Namespace URI bound to this DOM node - * at the time the Node was created. - */ - public String getNamespaceOfNode(Node n) - { - return n.getNamespaceURI(); - } - - /** Field m_useDOM2getNamespaceURI is a compile-time flag which - * gates some of the parser options used to build a DOM -- but - * that code is commented out at this time and nobody else - * references it, so I've commented this out as well. */ - //private boolean m_useDOM2getNamespaceURI = false; -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/Messages.java b/serializer/src/main/java/org/apache/xml/serializer/utils/Messages.java deleted file mode 100644 index a8d94381b..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/Messages.java +++ /dev/null @@ -1,366 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * A utility class for issuing error messages. - * - * A user of this class normally would create a singleton - * instance of this class, passing the name - * of the message class on the constructor. For example: - * - * static Messages x = new Messages("org.package.MyMessages"); - * - * Later the message is typically generated this way if there are no - * substitution arguments: - * - * String msg = x.createMessage(org.package.MyMessages.KEY_ONE, null); - * - * If there are arguments substitutions then something like this: - * - * String filename = ...; - * String directory = ...; - * String msg = x.createMessage(org.package.MyMessages.KEY_TWO, - * new Object[] {filename, directory) ); - * - * - * The constructor of an instance of this class must be given - * the class name of a class that extends java.util.ListResourceBundle - * ("org.package.MyMessages" in the example above). - * The name should not have any language suffix - * which will be added automatically by this utility class. - * - * The message class ("org.package.MyMessages") - * must define the abstract method getContents() that is - * declared in its base class, for example: - * - * public Object[][] getContents() {return contents;} - * - * - * It is suggested that the message class expose its - * message keys like this: - * - * public static final String KEY_ONE = "KEY1"; - * public static final String KEY_TWO = "KEY2"; - * . . . - * - * and used through their names (KEY_ONE ...) rather than - * their values ("KEY1" ...). - * - * The field contents (returned by getContents() - * should be initialized something like this: - * - * public static final Object[][] contents = { - * { KEY_ONE, "Something has gone wrong!" }, - * { KEY_TWO, "The file ''{0}'' does not exist in directory ''{1}''." }, - * . . . - * { KEY_N, "Message N" } } - * - * - * Where that section of code with the KEY to Message mappings - * (where the message classes 'contents' field is initialized) - * can have the Message strings translated in an alternate language - * in a errorResourceClass with a language suffix. - * - * More sophisticated use of this class would be to pass null - * when contructing it, but then call loadResourceBundle() - * before creating any messages. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public final class Messages -{ - /** The local object to use. */ - private final Locale m_locale = Locale.getDefault(); - - /** The language specific resource object for messages. */ - private ListResourceBundle m_resourceBundle; - - /** The class name of the error message string table with no language suffix. */ - private String m_resourceBundleName; - - - - /** - * Constructor. - * @param resourceBundle the class name of the ListResourceBundle - * that the instance of this class is associated with and will use when - * creating messages. - * The class name is without a language suffix. If the value passed - * is null then loadResourceBundle(errorResourceClass) needs to be called - * explicitly before any messages are created. - * - * @xsl.usage internal - */ - Messages(String resourceBundle) - { - - m_resourceBundleName = resourceBundle; - } - - /* - * Set the Locale object to use. If this method is not called the - * default locale is used. This method needs to be called before - * loadResourceBundle(). - * - * @param locale non-null reference to Locale object. - * @xsl.usage internal - */ -// public void setLocale(Locale locale) -// { -// m_locale = locale; -// } - - /** - * Get the Locale object that is being used. - * - * @return non-null reference to Locale object. - * @xsl.usage internal - */ - private Locale getLocale() - { - return m_locale; - } - - /** - * Get the ListResourceBundle being used by this Messages instance which was - * previously set by a call to loadResourceBundle(className) - * @xsl.usage internal - */ - private ListResourceBundle getResourceBundle() - { - return m_resourceBundle; - } - - /** - * Creates a message from the specified key and replacement - * arguments, localized to the given locale. - * - * @param msgKey The key for the message text. - * @param args The arguments to be used as replacement text - * in the message created. - * - * @return The formatted message string. - * @xsl.usage internal - */ - public final String createMessage(String msgKey, Object args[]) - { - if (m_resourceBundle == null) - m_resourceBundle = loadResourceBundle(m_resourceBundleName); - - if (m_resourceBundle != null) - { - return createMsg(m_resourceBundle, msgKey, args); - } - else - return "Could not load the resource bundles: "+ m_resourceBundleName; - } - - /** - * Creates a message from the specified key and replacement - * arguments, localized to the given locale. - * - * @param errorCode The key for the message text. - * - * @param fResourceBundle The resource bundle to use. - * @param msgKey The message key to use. - * @param args The arguments to be used as replacement text - * in the message created. - * - * @return The formatted message string. - * @xsl.usage internal - */ - private final String createMsg( - ListResourceBundle fResourceBundle, - String msgKey, - Object args[]) //throws Exception - { - - String fmsg = null; - boolean throwex = false; - String msg = null; - - if (msgKey != null) - msg = fResourceBundle.getString(msgKey); - else - msgKey = ""; - - if (msg == null) - { - throwex = true; - /* The message is not in the bundle . . . this is bad, - * so try to get the message that the message is not in the bundle - */ - try - { - - msg = - java.text.MessageFormat.format( - MsgKey.BAD_MSGKEY, - new Object[] { msgKey, m_resourceBundleName }); - } - catch (Exception e) - { - /* even the message that the message is not in the bundle is - * not there ... this is really bad - */ - msg = - "The message key '" - + msgKey - + "' is not in the message class '" - + m_resourceBundleName+"'"; - } - } - else if (args != null) - { - try - { - // Do this to keep format from crying. - // This is better than making a bunch of conditional - // code all over the place. - int n = args.length; - - for (int i = 0; i < n; i++) - { - if (null == args[i]) - args[i] = ""; - } - - fmsg = java.text.MessageFormat.format(msg, args); - // if we get past the line above we have create the message ... hurray! - } - catch (Exception e) - { - throwex = true; - try - { - // Get the message that the format failed. - fmsg = - java.text.MessageFormat.format( - MsgKey.BAD_MSGFORMAT, - new Object[] { msgKey, m_resourceBundleName }); - fmsg += " " + msg; - } - catch (Exception formatfailed) - { - // We couldn't even get the message that the format of - // the message failed ... so fall back to English. - fmsg = - "The format of message '" - + msgKey - + "' in message class '" - + m_resourceBundleName - + "' failed."; - } - } - } - else - fmsg = msg; - - if (throwex) - { - throw new RuntimeException(fmsg); - } - - return fmsg; - } - - /** - * Return a named ResourceBundle for a particular locale. This method mimics the behavior - * of ResourceBundle.getBundle(). - * - * @param className the name of the class that implements ListResourceBundle, - * without language suffix. - * @return the ResourceBundle - * @throws MissingResourceException - * @xsl.usage internal - */ - private ListResourceBundle loadResourceBundle(String resourceBundle) - throws MissingResourceException - { - m_resourceBundleName = resourceBundle; - Locale locale = getLocale(); - - ListResourceBundle lrb; - - try - { - - ResourceBundle rb = - ResourceBundle.getBundle(m_resourceBundleName, locale); - lrb = (ListResourceBundle) rb; - } - catch (MissingResourceException e) - { - try // try to fall back to en_US if we can't load - { - - // Since we can't find the localized property file, - // fall back to en_US. - lrb = - (ListResourceBundle) ResourceBundle.getBundle( - m_resourceBundleName, - new Locale("en", "US")); - } - catch (MissingResourceException e2) - { - - // Now we are really in trouble. - // very bad, definitely very bad...not going to get very far - throw new MissingResourceException( - "Could not load any resource bundles." + m_resourceBundleName, - m_resourceBundleName, - ""); - } - } - m_resourceBundle = lrb; - return lrb; - } - - /** - * Return the resource file suffic for the indicated locale - * For most locales, this will be based the language code. However - * for Chinese, we do distinguish between Taiwan and PRC - * - * @param locale the locale - * @return an String suffix which can be appended to a resource name - * @xsl.usage internal - */ - private static String getResourceSuffix(Locale locale) - { - - String suffix = "_" + locale.getLanguage(); - String country = locale.getCountry(); - - if (country.equals("TW")) - suffix += "_" + country; - - return suffix; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/MsgKey.java b/serializer/src/main/java/org/apache/xml/serializer/utils/MsgKey.java deleted file mode 100644 index ccb82d3d8..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/MsgKey.java +++ /dev/null @@ -1,131 +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.utils; - -/** - * This class is not a public API, - * It is used internally by serializer and is public, - * in the Java sense, only because its use crosses - * package boundaries. - *

- * This class holds only the message keys used - * when generating messages. - */ -public class MsgKey { - - /** An internal error with the messages, - * this is the message to use if the message key can't be found - */ - public static final String BAD_MSGKEY = "BAD_MSGKEY"; - - /** - * An internal error with the messages, - * this is the message to use if the message format operation failed. - */ - public static final String BAD_MSGFORMAT = "BAD_MSGFORMAT"; - - public static final String ER_RESOURCE_COULD_NOT_FIND = - "ER_RESOURCE_COULD_NOT_FIND"; - public static final String ER_RESOURCE_COULD_NOT_LOAD = - "ER_RESOURCE_COULD_NOT_LOAD"; - public static final String ER_BUFFER_SIZE_LESSTHAN_ZERO = - "ER_BUFFER_SIZE_LESSTHAN_ZERO"; - public static final String ER_INVALID_UTF16_SURROGATE = - "ER_INVALID_UTF16_SURROGATE"; - public static final String ER_OIERROR = "ER_OIERROR"; - public static final String ER_NAMESPACE_PREFIX = "ER_NAMESPACE_PREFIX"; - public static final String ER_STRAY_ATTRIBUTE = "ER_STRAY_ATTRIBUTE"; - public static final String ER_STRAY_NAMESPACE = "ER_STRAY_NAMESPACE"; - public static final String ER_COULD_NOT_LOAD_RESOURCE = - "ER_COULD_NOT_LOAD_RESOURCE"; - public static final String ER_COULD_NOT_LOAD_METHOD_PROPERTY = - "ER_COULD_NOT_LOAD_METHOD_PROPERTY"; - public static final String ER_SERIALIZER_NOT_CONTENTHANDLER = - "ER_SERIALIZER_NOT_CONTENTHANDLER"; - public static final String ER_ILLEGAL_ATTRIBUTE_POSITION = - "ER_ILLEGAL_ATTRIBUTE_POSITION"; - public static final String ER_ILLEGAL_CHARACTER = "ER_ILLEGAL_CHARACTER"; - - public static final String ER_INVALID_PORT = "ER_INVALID_PORT"; - public static final String ER_PORT_WHEN_HOST_NULL = - "ER_PORT_WHEN_HOST_NULL"; - public static final String ER_HOST_ADDRESS_NOT_WELLFORMED = - "ER_HOST_ADDRESS_NOT_WELLFORMED"; - public static final String ER_SCHEME_NOT_CONFORMANT = - "ER_SCHEME_NOT_CONFORMANT"; - public static final String ER_SCHEME_FROM_NULL_STRING = - "ER_SCHEME_FROM_NULL_STRING"; - public static final String ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE = - "ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE"; - public static final String ER_PATH_INVALID_CHAR = "ER_PATH_INVALID_CHAR"; - public static final String ER_NO_SCHEME_INURI = "ER_NO_SCHEME_INURI"; - public static final String ER_FRAG_INVALID_CHAR = "ER_FRAG_INVALID_CHAR"; - public static final String ER_FRAG_WHEN_PATH_NULL = - "ER_FRAG_WHEN_PATH_NULL"; - public static final String ER_FRAG_FOR_GENERIC_URI = - "ER_FRAG_FOR_GENERIC_URI"; - public static final String ER_NO_SCHEME_IN_URI = "ER_NO_SCHEME_IN_URI"; - public static final String ER_CANNOT_INIT_URI_EMPTY_PARMS = - "ER_CANNOT_INIT_URI_EMPTY_PARMS"; - public static final String ER_NO_FRAGMENT_STRING_IN_PATH = - "ER_NO_FRAGMENT_STRING_IN_PATH"; - public static final String ER_NO_QUERY_STRING_IN_PATH = - "ER_NO_QUERY_STRING_IN_PATH"; - public static final String ER_NO_PORT_IF_NO_HOST = "ER_NO_PORT_IF_NO_HOST"; - public static final String ER_NO_USERINFO_IF_NO_HOST = - "ER_NO_USERINFO_IF_NO_HOST"; - public static final String ER_SCHEME_REQUIRED = "ER_SCHEME_REQUIRED"; - public static final String ER_XML_VERSION_NOT_SUPPORTED = "ER_XML_VERSION_NOT_SUPPORTED"; - public static final String ER_FACTORY_PROPERTY_MISSING = "ER_FACTORY_PROPERTY_MISSING"; - public static final String ER_ENCODING_NOT_SUPPORTED = "ER_ENCODING_NOT_SUPPORTED"; - // DOM Exceptions - public static final String ER_FEATURE_NOT_FOUND = "FEATURE_NOT_FOUND"; - public static final String ER_FEATURE_NOT_SUPPORTED = "FEATURE_NOT_SUPPORTED"; - public static final String ER_STRING_TOO_LONG = "DOMSTRING_SIZE_ERR"; - public static final String ER_TYPE_MISMATCH_ERR = "TYPE_MISMATCH_ERR"; - - // DOM Level 3 load and save messages - public static final String ER_NO_OUTPUT_SPECIFIED = "no-output-specified"; - public static final String ER_UNSUPPORTED_ENCODING = "unsupported-encoding"; - public static final String ER_ELEM_UNBOUND_PREFIX_IN_ENTREF = "unbound-prefix-in-entity-reference"; - public static final String ER_ATTR_UNBOUND_PREFIX_IN_ENTREF = "unbound-prefix-in-entity-reference"; - public static final String ER_CDATA_SECTIONS_SPLIT = "cdata-sections-splitted"; - public static final String ER_WF_INVALID_CHARACTER = "wf-invalid-character"; - public static final String ER_WF_INVALID_CHARACTER_IN_NODE_NAME = "wf-invalid-character-in-node-name"; - - // DOM Level 3 Implementation specific Exceptions - public static final String ER_UNABLE_TO_SERIALIZE_NODE = "ER_UNABLE_TO_SERIALIZE_NODE"; - public static final String ER_WARNING_WF_NOT_CHECKED = "ER_WARNING_WF_NOT_CHECKED"; - - public static final String ER_WF_INVALID_CHARACTER_IN_COMMENT = "ER_WF_INVALID_CHARACTER_IN_COMMENT"; - public static final String ER_WF_INVALID_CHARACTER_IN_PI = "ER_WF_INVALID_CHARACTER_IN_PI"; - public static final String ER_WF_INVALID_CHARACTER_IN_CDATA = "ER_WF_INVALID_CHARACTER_IN_CDATA"; - public static final String ER_WF_INVALID_CHARACTER_IN_TEXT = "ER_WF_INVALID_CHARACTER_IN_TEXT"; - public static final String ER_WF_DASH_IN_COMMENT = "ER_WF_DASH_IN_COMMENT"; - public static final String ER_WF_LT_IN_ATTVAL = "ER_WF_LT_IN_ATTVAL"; - public static final String ER_WF_REF_TO_UNPARSED_ENT = "ER_WF_REF_TO_UNPARSED_ENT"; - public static final String ER_WF_REF_TO_EXTERNAL_ENT = "ER_WF_REF_TO_EXTERNAL_ENT"; - public static final String ER_NS_PREFIX_CANNOT_BE_BOUND = "ER_NS_PREFIX_CANNOT_BE_BOUND"; - public static final String ER_NULL_LOCAL_ELEMENT_NAME = "ER_NULL_LOCAL_ELEMENT_NAME"; - public static final String ER_NULL_LOCAL_ATTR_NAME = "ER_NULL_LOCAL_ATTR_NAME"; - public static final String ER_WRITING_INTERNAL_SUBSET = "ER_WRITING_INTERNAL_SUBSET"; - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages.java deleted file mode 100644 index f9049d601..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages.java +++ /dev/null @@ -1,296 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in the serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "The message key ''{0}'' is not in the message class ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "The format of message ''{0}'' in message class ''{1}'' failed." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "The serializer class ''{0}'' does not implement org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "The resource [ {0} ] could not be found.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "The resource [ {0} ] could not load: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Buffer size <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Invalid UTF-16 surrogate detected: {0} ?" }, - - { MsgKey.ER_OIERROR, - "IO error" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Cannot add attribute {0} after child nodes or before an element is produced. Attribute will be ignored." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "Namespace for prefix ''{0}'' has not been declared." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Attribute ''{0}'' outside of element." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Namespace declaration ''{0}''=''{1}'' outside of element." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Could not load ''{0}'' (check CLASSPATH), now using just the defaults" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Attempt to output character of integral value {0} that is not represented in specified output encoding of {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Could not load the propery file ''{0}'' for output method ''{1}'' (check CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "Invalid port number" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Port cannot be set when host is null" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Host is not a well formed address" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "The scheme is not conformant." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Cannot set scheme from null string" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Path contains invalid escape sequence" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Path contains invalid character: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment contains invalid character" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Fragment cannot be set when path is null" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment can only be set for a generic URI" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "No scheme found in URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Cannot initialize URI with empty parameters" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment cannot be specified in both the path and fragment" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "Query string cannot be specified in path and query string" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Port may not be specified if host is not specified" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Userinfo may not be specified if host is not specified" }, - - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Warning: The version of the output document is requested to be ''{0}''. This version of XML is not supported. The version of the output document will be ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Scheme is required!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "The Properties object passed to the SerializerFactory does not have a ''{0}'' property." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Warning: The encoding ''{0}'' is not supported by the Java runtime." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "The parameter ''{0}'' is not recognized."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "The parameter ''{0}'' is recognized but the requested value cannot be set."}, - - {MsgKey.ER_STRING_TOO_LONG, - "The resulting string is too long to fit in a DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "The value type for this parameter name is incompatible with the expected value type."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "The output destination for data to be written to was null."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "An unsupported encoding is encountered."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "The node could not be serialized."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "The CDATA Section contains one or more termination markers ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "An instance of the Well-Formedness checker could not be created. The well-formed parameter was set to true but well-formedness checking can not be performed." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "The node ''{0}'' contains invalid XML characters." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "An invalid XML character (Unicode: 0x{0}) was found in the comment." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "An invalid XML character (Unicode: 0x{0}) was found in the processing instructiondata." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "An invalid XML character (Unicode: 0x{0}) was found in the contents of the CDATASection." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "An invalid XML character (Unicode: 0x{0}) was found in the node''s character data content." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "An invalid XML character(s) was found in the {0} node named ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "The string \"--\" is not permitted within comments." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "The value of attribute \"{1}\" associated with an element type \"{0}\" must not contain the ''<'' character." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "The unparsed entity reference \"&{0};\" is not permitted." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "The external entity reference \"&{0};\" is not permitted in an attribute value." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "The prefix \"{0}\" can not be bound to namespace \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "The local name of element \"{0}\" is null." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "The local name of attr \"{0}\" is null." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "The replacement text of the entity node \"{0}\" contains an element node \"{1}\" with an unbound prefix \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "The replacement text of the entity node \"{0}\" contains an attribute node \"{1}\" with an unbound prefix \"{2}\"." - }, - - { MsgKey.ER_WRITING_INTERNAL_SUBSET, - "An error occured while writing the internal subset." - }, - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ca.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ca.java deleted file mode 100644 index 0954a8534..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ca.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_ca extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "La clau del missatge ''{0}'' no est\u00e0 a la classe del missatge ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "El format del missatge ''{0}'' a la classe del missatge ''{1}'' ha fallat." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "La classe de serialitzador ''{0}'' no implementa org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "No s''ha trobat el recurs [ {0} ].\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "No s''ha pogut carregar el recurs [ {0} ]: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Grand\u00e0ria del buffer <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "S''ha detectat un suplent UTF-16 no v\u00e0lid: {0} ?" }, - - { MsgKey.ER_OIERROR, - "Error d'E/S" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "No es pot afegir l''atribut {0} despr\u00e9s dels nodes subordinats o abans que es produeixi un element. Es passar\u00e0 per alt l''atribut." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "No s''ha declarat l''espai de noms pel prefix ''{0}''." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "L''atribut ''{0}'' es troba fora de l''element." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "La declaraci\u00f3 de l''espai de noms ''{0}''=''{1}'' es troba fora de l''element." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "No s''ha pogut carregar ''{0}'' (comproveu CLASSPATH), ara s''est\u00e0 fent servir els valors per defecte." }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "S''ha intentat un car\u00e0cter de sortida del valor integral {0} que no est\u00e0 representat a una codificaci\u00f3 de sortida especificada de {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "No s''ha pogut carregar el fitxer de propietats ''{0}'' del m\u00e8tode de sortida ''{1}'' (comproveu CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "N\u00famero de port no v\u00e0lid" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "El port no es pot establir quan el sistema principal \u00e9s nul" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "El format de l'adre\u00e7a del sistema principal no \u00e9s el correcte" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "L'esquema no t\u00e9 conformitat." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "No es pot establir un esquema des d'una cadena nul\u00b7la" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "La via d'acc\u00e9s cont\u00e9 una seq\u00fc\u00e8ncia d'escapament no v\u00e0lida" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "La via d''acc\u00e9s cont\u00e9 un car\u00e0cter no v\u00e0lid {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "El fragment cont\u00e9 un car\u00e0cter no v\u00e0lid" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "El fragment no es pot establir si la via d'acc\u00e9s \u00e9s nul\u00b7la" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "El fragment nom\u00e9s es pot establir per a un URI gen\u00e8ric" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "No s'ha trobat cap esquema a l'URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "No es pot inicialitzar l'URI amb par\u00e0metres buits" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "No es pot especificar un fragment tant en la via d'acc\u00e9s com en el fragment" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "No es pot especificar una cadena de consulta en la via d'acc\u00e9s i la cadena de consulta" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "No es pot especificar el port si no s'especifica el sistema principal" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "No es pot especificar informaci\u00f3 de l'usuari si no s'especifica el sistema principal" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Av\u00eds: la versi\u00f3 del document de sortida s''ha sol\u00b7licitat que sigui ''{0}''. Aquesta versi\u00f3 de XML no est\u00e0 suportada. La versi\u00f3 del document de sortida ser\u00e0 ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Es necessita l'esquema" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "L''objecte de propietats passat a SerializerFactory no t\u00e9 cap propietat ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Av\u00eds: el temps d''execuci\u00f3 de Java no d\u00f3na suport a la codificaci\u00f3 ''{0}''." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "El par\u00e0metre ''{0}'' no es reconeix."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "El par\u00e0metre ''{0}'' es reconeix per\u00f2 el valor sol\u00b7licitat no es pot establir."}, - - {MsgKey.ER_STRING_TOO_LONG, - "La cadena resultant \u00e9s massa llarga per cabre en una DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "El tipus de valor per a aquest nom de par\u00e0metre \u00e9s incompatible amb el tipus de valor esperat."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "La destinaci\u00f3 de sortida per a les dades que s'ha d'escriure era nul\u00b7la."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "S'ha trobat una codificaci\u00f3 no suportada."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "El node no s'ha pogut serialitzat."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "La secci\u00f3 CDATA cont\u00e9 un o m\u00e9s marcadors d'acabament ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "No s'ha pogut crear cap inst\u00e0ncia per comprovar si t\u00e9 un format correcte o no. El par\u00e0metre del tipus ben format es va establir en cert, per\u00f2 la comprovaci\u00f3 de format no s'ha pogut realitzar." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "El node ''{0}'' cont\u00e9 car\u00e0cters XML no v\u00e0lids." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x{0}) en el comentari." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x{0}) en les dades d''instrucci\u00f3 de proc\u00e9s." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x''{0})'' en els continguts de la CDATASection." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "S''ha trobat un car\u00e0cter XML no v\u00e0lid (Unicode: 0x''{0})'' en el contingut de dades de car\u00e0cter del node." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "S''han trobat car\u00e0cters XML no v\u00e0lids al node {0} anomenat ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "La cadena \"--\" no est\u00e0 permesa dins dels comentaris." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "El valor d''atribut \"{1}\" associat amb un tipus d''element \"{0}\" no pot contenir el car\u00e0cter ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "La refer\u00e8ncia de l''entitat no analitzada \"&{0};\" no est\u00e0 permesa." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "La refer\u00e8ncia externa de l''entitat \"&{0};\" no est\u00e0 permesa en un valor d''atribut." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "El prefix \"{0}\" no es pot vincular a l''espai de noms \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "El nom local de l''element \"{0}\" \u00e9s nul." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "El nom local d''atr \"{0}\" \u00e9s nul." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "El text de recanvi del node de l''entitat \"{0}\" cont\u00e9 un node d''element \"{1}\" amb un prefix de no enlla\u00e7at \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "El text de recanvi del node de l''entitat \"{0}\" cont\u00e9 un node d''atribut \"{1}\" amb un prefix de no enlla\u00e7at \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_cs.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_cs.java deleted file mode 100644 index 5e110cf5a..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_cs.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_cs extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "Kl\u00ed\u010d zpr\u00e1vy ''{0}'' nen\u00ed obsa\u017een ve t\u0159\u00edd\u011b zpr\u00e1v ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Form\u00e1t zpr\u00e1vy ''{0}'' ve t\u0159\u00edd\u011b zpr\u00e1v ''{1}'' selhal. " }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "T\u0159\u00edda serializace ''{0}'' neimplementuje obslu\u017en\u00fd program org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Nelze naj\u00edt zdroj [ {0} ].\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Nelze zav\u00e9st zdroj [ {0} ]: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Velikost vyrovn\u00e1vac\u00ed pam\u011bti <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Byla zji\u0161t\u011bna neplatn\u00e1 n\u00e1hrada UTF-16: {0} ?" }, - - { MsgKey.ER_OIERROR, - "Chyba vstupu/v\u00fdstupu" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Nelze p\u0159idat atribut {0} po uzlech potomk\u016f ani p\u0159ed t\u00edm, ne\u017e je vytvo\u0159en prvek. Atribut bude ignorov\u00e1n." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "Obor n\u00e1zv\u016f pro p\u0159edponu ''{0}'' nebyl deklarov\u00e1n." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Atribut ''{0}'' se nach\u00e1z\u00ed vn\u011b prvku." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Deklarace oboru n\u00e1zv\u016f ''{0}''=''{1}'' se nach\u00e1z\u00ed vn\u011b prvku." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Nelze zav\u00e9st prost\u0159edek ''{0}'' (zkontrolujte prom\u011bnnou CLASSPATH) - budou pou\u017eity pouze v\u00fdchoz\u00ed prost\u0159edky" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Byl proveden pokus o v\u00fdstup znaku s celo\u010d\u00edselnou hodnotou {0}, kter\u00e1 nen\u00ed reprezentov\u00e1na v ur\u010den\u00e9m v\u00fdstupn\u00edm k\u00f3dov\u00e1n\u00ed {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Nelze na\u010d\u00edst soubor vlastnost\u00ed ''{0}'' pro v\u00fdstupn\u00ed metodu ''{1}'' (zkontrolujte prom\u011bnnou CLASSPATH)." }, - - { MsgKey.ER_INVALID_PORT, - "Neplatn\u00e9 \u010d\u00edslo portu." }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "M\u00e1-li hostitel hodnotu null, nelze nastavit port." }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Adresa hostitele m\u00e1 nespr\u00e1vn\u00fd form\u00e1t." }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Sch\u00e9ma nevyhovuje." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Nelze nastavit sch\u00e9ma \u0159et\u011bzce s hodnotou null." }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Cesta obsahuje neplatnou escape sekvenci" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Cesta obsahuje neplatn\u00fd znak: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment obsahuje neplatn\u00fd znak." }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "M\u00e1-li cesta hodnotu null, nelze nastavit fragment." }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment lze nastavit jen u generick\u00e9ho URI." }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "V URI nebylo nalezeno \u017e\u00e1dn\u00e9 sch\u00e9ma" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "URI nelze inicializovat s pr\u00e1zdn\u00fdmi parametry." }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment nelze ur\u010dit z\u00e1rove\u0148 v cest\u011b i ve fragmentu." }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "V \u0159et\u011bzci cesty a dotazu nelze zadat \u0159et\u011bzec dotazu." }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Nen\u00ed-li ur\u010den hostitel, nelze zadat port." }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Nen\u00ed-li ur\u010den hostitel, nelze zadat \u00fadaje o u\u017eivateli." }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Varov\u00e1n\u00ed: Je po\u017eadov\u00e1na verze ''{0}'' v\u00fdstupn\u00edho dokumentu. Tato verze form\u00e1tu XML nen\u00ed podporov\u00e1na. Bude pou\u017eita verze ''1.0'' v\u00fdstupn\u00edho dokumentu. " }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Je vy\u017eadov\u00e1no sch\u00e9ma!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "Objekt vlastnost\u00ed p\u0159edan\u00fd faktorii SerializerFactory neobsahuje vlastnost ''{0}''. " }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Varov\u00e1n\u00ed: K\u00f3dov\u00e1n\u00ed ''{0}'' nen\u00ed v b\u011bhov\u00e9m prost\u0159ed\u00ed Java podporov\u00e1no." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Parametr ''{0}'' nebyl rozpozn\u00e1n."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Parametr ''{0}'' byl rozpozn\u00e1n, ale nelze nastavit po\u017eadovanou hodnotu."}, - - {MsgKey.ER_STRING_TOO_LONG, - "V\u00fdsledn\u00fd \u0159et\u011bzec je p\u0159\u00edli\u0161 dlouh\u00fd pro \u0159et\u011bzec DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Typ hodnoty pro tento n\u00e1zev parametru nen\u00ed kompatibiln\u00ed s o\u010dek\u00e1van\u00fdm typem hodnoty."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "C\u00edlov\u00e9 um\u00edst\u011bn\u00ed v\u00fdstupu pro data ur\u010den\u00e1 k z\u00e1pisu je rovno hodnot\u011b Null. "}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Bylo nalezeno nepodporovan\u00e9 k\u00f3dov\u00e1n\u00ed."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Nelze prov\u00e9st serializaci uzlu. "}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "Sekce CDATA obsahuje jednu nebo v\u00edce ukon\u010dovac\u00edch zna\u010dek ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Nelze vytvo\u0159it instanci modulu pro kontrolu spr\u00e1vn\u00e9ho utvo\u0159en\u00ed. Parametr spr\u00e1vn\u00e9ho utvo\u0159en\u00ed byl nastaven na hodnotu true, nepoda\u0159ilo se v\u0161ak zkontrolovat spr\u00e1vnost utvo\u0159en\u00ed. " - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Uzel ''{0}'' obsahuje neplatn\u00e9 znaky XML. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "V pozn\u00e1mce byl zji\u0161t\u011bn neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "V datech instrukce zpracov\u00e1n\u00ed byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "V odd\u00edlu CDATASection byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "V obsahu znakov\u00fdch dat uzlu byl nalezen neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "V objektu {0} s n\u00e1zvem ''{1}'' byl nalezen neplatn\u00fd znak XML. " - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "V pozn\u00e1mk\u00e1ch nen\u00ed povolen \u0159et\u011bzec \"--\"." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "Hodnota atributu \"{1}\" souvisej\u00edc\u00edho s typem prvku \"{0}\" nesm\u00ed obsahovat znak ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Odkaz na neanalyzovanou entitu \"&{0};\" nen\u00ed povolen." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "Extern\u00ed odkaz na entitu \"&{0};\" nen\u00ed v hodnot\u011b atributu povolen." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "P\u0159edpona \"{0}\" nesm\u00ed b\u00fdt v\u00e1zan\u00e1 k oboru n\u00e1zv\u016f \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Lok\u00e1ln\u00ed n\u00e1zev prvku \"{0}\" m\u00e1 hodnotu Null. " - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Lok\u00e1ln\u00ed n\u00e1zev atributu \"{0}\" m\u00e1 hodnotu Null. " - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "Nov\u00fd text uzlu entity \"{0}\" obsahuje uzel prvku \"{1}\" s nesv\u00e1zanou p\u0159edponou \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Nov\u00fd text uzlu entity \"{0}\" obsahuje uzel atributu \"{1}\" s nesv\u00e1zanou p\u0159edponou \"{2}\". " - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_de.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_de.java deleted file mode 100644 index c1c867c68..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_de.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_de extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "Der Nachrichtenschl\u00fcssel ''{0}'' ist nicht in der Nachrichtenklasse ''{1}'' enthalten." }, - - { MsgKey.BAD_MSGFORMAT, - "Das Format der Nachricht ''{0}'' in der Nachrichtenklasse ''{1}'' ist fehlgeschlagen." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "Die Parallel-Seriell-Umsetzerklasse ''{0}'' implementiert org.xml.sax.ContentHandler nicht." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Die Ressource [ {0} ] konnte nicht gefunden werden.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Die Ressource [ {0} ] konnte nicht geladen werden: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Puffergr\u00f6\u00dfe <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Ung\u00fcltige UTF-16-Ersetzung festgestellt: {0} ?" }, - - { MsgKey.ER_OIERROR, - "E/A-Fehler" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Attribut {0} kann nicht nach Kindknoten oder vor dem Erstellen eines Elements hinzugef\u00fcgt werden. Das Attribut wird ignoriert." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "Der Namensbereich f\u00fcr Pr\u00e4fix ''{0}'' wurde nicht deklariert." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Attribut ''{0}'' befindet sich nicht in einem Element." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Namensbereichdeklaration ''{0}''=''{1}'' befindet sich nicht in einem Element." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "''{0}'' konnte nicht geladen werden (CLASSPATH pr\u00fcfen). Es werden die Standardwerte verwendet." }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Es wurde versucht, ein Zeichen des Integralwerts {0} auszugeben, der nicht in der angegebenen Ausgabeverschl\u00fcsselung von {1} dargestellt ist." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Die Merkmaldatei ''{0}'' konnte f\u00fcr die Ausgabemethode ''{1}'' nicht geladen werden (CLASSPATH pr\u00fcfen)" }, - - { MsgKey.ER_INVALID_PORT, - "Ung\u00fcltige Portnummer" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Der Port kann nicht festgelegt werden, wenn der Host gleich Null ist." }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Der Host ist keine syntaktisch korrekte Adresse." }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Das Schema ist nicht angepasst." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Schema kann nicht von Nullzeichenfolge festgelegt werden." }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Der Pfad enth\u00e4lt eine ung\u00fcltige Escapezeichenfolge." }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Pfad enth\u00e4lt ung\u00fcltiges Zeichen: {0}." }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment enth\u00e4lt ein ung\u00fcltiges Zeichen." }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Fragment kann nicht festgelegt werden, wenn der Pfad gleich Null ist." }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment kann nur f\u00fcr eine generische URI (Uniform Resource Identifier) festgelegt werden." }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Kein Schema gefunden in URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "URI (Uniform Resource Identifier) kann nicht mit leeren Parametern initialisiert werden." }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment kann nicht im Pfad und im Fragment angegeben werden." }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "Abfragezeichenfolge kann nicht im Pfad und in der Abfragezeichenfolge angegeben werden." }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Der Port kann nicht angegeben werden, wenn der Host nicht angegeben wurde." }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Benutzerinformationen k\u00f6nnen nicht angegeben werden, wenn der Host nicht angegeben wurde." }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Warnung: Die Version des Ausgabedokuments muss ''{0}'' lauten. Diese XML-Version wird nicht unterst\u00fctzt. Die Version des Ausgabedokuments ist ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Schema ist erforderlich!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "Das an SerializerFactory \u00fcbermittelte Merkmalobjekt weist kein Merkmal ''{0}'' auf." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Warnung: Die Codierung ''{0}'' wird von Java Runtime nicht unterst\u00fctzt." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Der Parameter ''{0}'' wird nicht erkannt."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Der Parameter ''{0}'' wird erkannt, der angeforderte Wert kann jedoch nicht festgelegt werden."}, - - {MsgKey.ER_STRING_TOO_LONG, - "Die Ergebniszeichenfolge ist zu lang f\u00fcr eine DOM-Zeichenfolge: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Der Werttyp f\u00fcr diesen Parameternamen ist nicht kompatibel mit dem erwarteten Werttyp."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "Das Ausgabeziel f\u00fcr die zu schreibenden Daten war leer."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Eine nicht unterst\u00fctzte Codierung wurde festgestellt."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Der Knoten konnte nicht serialisiert werden."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "Der Abschnitt CDATA enth\u00e4lt mindestens eine Beendigungsmarkierung ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Eine Instanz des Pr\u00fcfprogramms f\u00fcr korrekte Formatierung konnte nicht erstellt werden. F\u00fcr den korrekt formatierten Parameter wurde der Wert 'True' festgelegt, die Pr\u00fcfung auf korrekte Formatierung kann jedoch nicht durchgef\u00fchrt werden." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Der Knoten ''{0}'' enth\u00e4lt ung\u00fcltige XML-Zeichen." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "Im Kommentar wurde ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) gefunden." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "In der Verarbeitungsanweisung wurde ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) gefunden." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "Im Inhalt von CDATASection wurde ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) gefunden." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "Ein ung\u00fcltiges XML-Zeichen (Unicode: 0x{0}) wurde im Inhalt der Zeichendaten des Knotens gefunden." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "Ung\u00fcltige XML-Zeichen wurden gefunden in {0} im Knoten ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "Die Zeichenfolge \"--\" ist innerhalb von Kommentaren nicht zul\u00e4ssig." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "Der Wert des Attributs \"{1}\" mit einem Elementtyp \"{0}\" darf nicht das Zeichen ''<'' enthalten." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Der syntaktisch nicht analysierte Entit\u00e4tenverweis \"&{0};\" ist nicht zul\u00e4ssig." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "Der externe Entit\u00e4tenverweis \"&{0};\" ist in einem Attributwert nicht zul\u00e4ssig." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "Das Pr\u00e4fix \"{0}\" kann nicht an den Namensbereich \"{1}\" gebunden werden." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Der lokale Name von Element \"{0}\" ist nicht angegeben." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Der lokale Name des Attributs \"{0}\" ist nicht angegeben." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "Der Ersatztext des Entit\u00e4tenknotens \"{0}\" enth\u00e4lt einen Elementknoten \"{1}\" mit einem nicht gebundenen Pr\u00e4fix \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Der Ersatztext des Entit\u00e4tenknotens \"{0}\" enth\u00e4lt einen Attributknoten \"{1}\" mit einem nicht gebundenen Pr\u00e4fix \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_en.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_en.java deleted file mode 100644 index 0aa380715..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_en.java +++ /dev/null @@ -1,30 +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.utils; - - -/** - * Default implementation. This is just an empty class. - * @xsl.usage internal - */ -public final class SerializerMessages_en extends SerializerMessages -{ -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_es.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_es.java deleted file mode 100644 index 06738ea15..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_es.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_es extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "La clave de mensaje ''{0}'' no est\u00e1 en la clase de mensaje ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Se ha producido un error en el formato de mensaje ''{0}'' de la clase de mensaje ''{1}''." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "La clase serializer ''{0}'' no implementa org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "No se ha podido encontrar el recurso [ {0} ].\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "No se ha podido cargar el recurso [ {0} ]: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Tama\u00f1o de almacenamiento intermedio <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\u00bfSe ha detectado un sustituto UTF-16 no v\u00e1lido: {0}?" }, - - { MsgKey.ER_OIERROR, - "Error de ES" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "No se puede a\u00f1adir el atributo {0} despu\u00e9s de nodos hijo o antes de que se produzca un elemento. Se ignorar\u00e1 el atributo." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "No se ha declarado el espacio de nombres para el prefijo ''{0}''." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Atributo ''{0}'' fuera del elemento." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Declaraci\u00f3n del espacio de nombres ''{0}''=''{1}'' fuera del elemento." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "No se ha podido cargar ''{0}'' (compruebe la CLASSPATH), ahora s\u00f3lo se est\u00e1n utilizando los valores predeterminados" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Se ha intentado dar salida a un car\u00e1cter del valor integral {0} que no est\u00e1 representado en la codificaci\u00f3n de salida especificada de {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "No se ha podido cargar el archivo de propiedades ''{0}'' para el m\u00e9todo de salida ''{1}'' (compruebe la CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "N\u00famero de puerto no v\u00e1lido" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "No se puede establecer el puerto si el sistema principal es nulo" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "El sistema principal no es una direcci\u00f3n bien formada" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "El esquema no es compatible." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "No se puede establecer un esquema de una serie nula" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "La v\u00eda de acceso contiene una secuencia de escape no v\u00e1lida" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "La v\u00eda de acceso contiene un car\u00e1cter no v\u00e1lido: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "El fragmento contiene un car\u00e1cter no v\u00e1lido" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "No se puede establecer el fragmento si la v\u00eda de acceso es nula" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "S\u00f3lo se puede establecer el fragmento para un URI gen\u00e9rico" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "No se ha encontrado un esquema en el URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "No se puede inicializar el URI con par\u00e1metros vac\u00edos" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "No se puede especificar el fragmento en la v\u00eda de acceso y en el fragmento" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "No se puede especificar la serie de consulta en la v\u00eda de acceso y en la serie de consulta" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "No se puede especificar el puerto si no se ha especificado el sistema principal" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "No se puede especificar la informaci\u00f3n de usuario si no se ha especificado el sistema principal" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Aviso: la versi\u00f3n del documento de salida tiene que ser ''{0}''. No se admite esta versi\u00f3n de XML. La versi\u00f3n del documento de salida ser\u00e1 ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "\u00a1Se necesita un esquema!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "El objeto Properties pasado a SerializerFactory no tiene una propiedad ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Aviso: La codificaci\u00f3n ''{0}'' no est\u00e1 soportada por Java Runtime." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "El par\u00e1metro ''{0}'' no se reconoce."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Se reconoce el par\u00e1metro ''{0}'' pero no puede establecerse el valor solicitado."}, - - {MsgKey.ER_STRING_TOO_LONG, - "La serie producida es demasiado larga para ajustarse a DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "El tipo de valor para este nombre de par\u00e1metro es incompatible con el tipo de valor esperado."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "El destino de salida de escritura de los datos es nulo."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Se ha encontrado una codificaci\u00f3n no soportada."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "No se ha podido serializar el nodo."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "La secci\u00f3n CDATA contiene uno o m\u00e1s marcadores ']]>' de terminaci\u00f3n."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "No se ha podido crear una instancia del comprobador de gram\u00e1tica correcta. El par\u00e1metro well-formed se ha establecido en true pero no se puede realizar la comprobaci\u00f3n de gram\u00e1tica correcta." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "El nodo ''{0}'' contiene caracteres XML no v\u00e1lidos." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en el comentario." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en los datos de la instrucci\u00f3n de proceso." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en el contenido de CDATASection." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "Se ha encontrado un car\u00e1cter XML no v\u00e1lido (Unicode: 0x{0}) en el contenido de datos de caracteres del nodo." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "Se ha encontrado un car\u00e1cter o caracteres XML no v\u00e1lidos en el nodo {0} denominado ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "No se permite la serie \"--\" dentro de los comentarios." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "El valor del atributo \"{1}\" asociado a un tipo de elemento \"{0}\" no debe contener el car\u00e1cter ''''<''''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "No se permite la referencia de entidad no analizada \"&{0};\"." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "La referencia de entidad externa \"&{0};\" no est\u00e1 permitida en un valor de atributo." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "No se puede encontrar el prefijo \"{0}\" en el espacio de nombres \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "El nombre local del elemento \"{0}\" es null." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "El nombre local del atributo \"{0}\" es null." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "El texto de sustituci\u00f3n del nodo de entidad \"{0}\" contiene un nodo de elemento \"{1}\" con un prefijo no enlazado \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "El texto de sustituci\u00f3n del nodo de entidad \"{0}\" contiene un nodo de atributo \"{1}\" con un prefijo no enlazado \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_fr.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_fr.java deleted file mode 100644 index 61dadeb44..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_fr.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_fr extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "La cl\u00e9 du message ''{0}'' ne se trouve pas dans la classe du message ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Le format du message ''{0}'' de la classe du message ''{1}'' est incorrect." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "La classe de la m\u00e9thode de s\u00e9rialisation ''{0}'' n''impl\u00e9mente pas org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "La ressource [ {0} ] est introuvable.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "La ressource [ {0} ] n''a pas pu charger : {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Taille du tampon <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Substitut UTF-16 non valide d\u00e9tect\u00e9 : {0} ?" }, - - { MsgKey.ER_OIERROR, - "Erreur d'E-S" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Ajout impossible de l''attribut {0} apr\u00e8s des noeuds enfants ou avant la production d''un \u00e9l\u00e9ment. L''attribut est ignor\u00e9." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "L''espace de noms du pr\u00e9fixe ''{0}'' n''a pas \u00e9t\u00e9 d\u00e9clar\u00e9." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "L''attribut ''{0}'' est \u00e0 l''ext\u00e9rieur de l''\u00e9l\u00e9ment." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "La d\u00e9claration d''espace de noms ''{0}''=''{1}'' est \u00e0 l''ext\u00e9rieur de l''\u00e9l\u00e9ment." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Impossible de charger ''{0}'' (v\u00e9rifier CLASSPATH), les valeurs par d\u00e9faut sont donc employ\u00e9es" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Tentative de sortie d''un caract\u00e8re de la valeur enti\u00e8re {0} non repr\u00e9sent\u00e9e dans l''encodage de sortie de {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Impossible de charger le fichier de propri\u00e9t\u00e9s ''{0}'' pour la m\u00e9thode de sortie ''{1}'' (v\u00e9rifier CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "Num\u00e9ro de port non valide" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Le port ne peut \u00eatre d\u00e9fini quand l'h\u00f4te est vide" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "L'h\u00f4te n'est pas une adresse bien form\u00e9e" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Le processus n'est pas conforme." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Impossible de d\u00e9finir le processus \u00e0 partir de la cha\u00eene vide" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Le chemin d'acc\u00e8s contient une s\u00e9quence d'\u00e9chappement non valide" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Le chemin contient un caract\u00e8re non valide : {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Le fragment contient un caract\u00e8re non valide" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Le fragment ne peut \u00eatre d\u00e9fini quand le chemin d'acc\u00e8s est vide" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Le fragment ne peut \u00eatre d\u00e9fini que pour un URI g\u00e9n\u00e9rique" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Processus introuvable dans l'URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Impossible d'initialiser l'URI avec des param\u00e8tres vides" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Le fragment ne doit pas \u00eatre indiqu\u00e9 \u00e0 la fois dans le chemin et dans le fragment" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "La cha\u00eene de requ\u00eate ne doit pas figurer dans un chemin et une cha\u00eene de requ\u00eate" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Le port peut ne pas \u00eatre sp\u00e9cifi\u00e9 si l'h\u00f4te n'est pas sp\u00e9cifi\u00e9" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Userinfo ne peut \u00eatre sp\u00e9cifi\u00e9 si l'h\u00f4te ne l'est pas" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Avertissement : La version du document de sortie doit \u00eatre ''{0}''. Cette version XML n''est pas prise en charge. La version du document de sortie sera ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Processus requis !" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "L''objet Properties transmis \u00e0 SerializerFactory ne dispose pas de propri\u00e9t\u00e9 ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Avertissement : Le codage ''{0}'' n''est pas pris en charge par l''environnement d''ex\u00e9cution Java." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Le param\u00e8tre ''{0}'' n''est pas reconnu."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Le param\u00e8tre ''{0}'' est reconnu mas la valeur demand\u00e9e ne peut pas \u00eatre d\u00e9finie."}, - - {MsgKey.ER_STRING_TOO_LONG, - "La cha\u00eene obtenue est trop longue pour un DOMString : ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Le type de valeur de ce param\u00e8tre est incompatible avec le type de valeur attendu."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "La sortie de destination des donn\u00e9es \u00e0 \u00e9crire \u00e9tait vide."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Codage non pris en charge."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Le noeud ne peut pas \u00eatre s\u00e9rialis\u00e9."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "La section CDATA contient un ou plusieurs marqueurs de fin ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Aucune instance du programme de v\u00e9rification de la formation n'a pu \u00eatre cr\u00e9\u00e9e. La valeur true a \u00e9t\u00e9 attribu\u00e9e au param\u00e8tre well-formed mais la v\u00e9rification de la formation n'a pas pu \u00eatre effectu\u00e9e." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Le noeud ''{0}'' contient des caract\u00e8res XML non valides." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "Un caract\u00e8re XML non valide (Unicode : 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans le commentaire." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "Un caract\u00e8re XML non valide (Unicode : 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans les donn\u00e9es de l''instruction de traitement." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "Un caract\u00e8re XML non valide (Unicode: 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans le contenu de la CDATASection" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "Un caract\u00e8re XML non valide (Unicode : 0x{0}) a \u00e9t\u00e9 trouv\u00e9 dans le contenu des donn\u00e9es de type caract\u00e8res du noeud." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "Un ou plusieurs caract\u00e8res non valides ont \u00e9t\u00e9 trouv\u00e9s dans le noeud {0} nomm\u00e9 ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "La cha\u00eene \"--\" est interdite dans des commentaires." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "La valeur de l''attribut \"{1}\" associ\u00e9 \u00e0 un type d''\u00e9l\u00e9ment \"{0}\" ne doit pas contenir le caract\u00e8re ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "La r\u00e9f\u00e9rence d''entit\u00e9 non analys\u00e9e \"&{0};\" n''est pas admise." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "La r\u00e9f\u00e9rence d''entit\u00e9 externe \"&{0};\" n''est pas admise dans une valeur d''attribut." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "Le pr\u00e9fixe \"{0}\" ne peut pas \u00eatre li\u00e9 \u00e0 l''espace de noms \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Le nom local de l''\u00e9l\u00e9ment \"{0}\" a une valeur null." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Le nom local de l''attribut \"{0}\" a une valeur null." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "le texte de remplacement du noeud de l''entit\u00e9 \"{0}\" contaient un noeud d''\u00e9l\u00e9ment \"{1}\" avec un pr\u00e9fixe non li\u00e9 \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Le texte de remplacement du noeud de l''entit\u00e9 \"{0}\" contient un noeud d''attribut \"{1}\" avec un pr\u00e9fixe non li\u00e9 \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_hu.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_hu.java deleted file mode 100644 index 1ea5c7bc2..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_hu.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_hu extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "A(z) ''{0}'' \u00fczenetkulcs nem tal\u00e1lhat\u00f3 a(z) ''{1}'' \u00fczenetoszt\u00e1lyban." }, - - { MsgKey.BAD_MSGFORMAT, - "A(z) ''{1}'' \u00fczenetoszt\u00e1ly ''{0}'' \u00fczenet\u00e9nek form\u00e1tuma hib\u00e1s." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "A(z) ''{0}'' p\u00e9ld\u00e1nyos\u00edt\u00f3 oszt\u00e1ly nem val\u00f3s\u00edtja meg az org.xml.sax.ContentHandler f\u00fcggv\u00e9nyt." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "A(z) [ {0} ] er\u0151forr\u00e1s nem tal\u00e1lhat\u00f3.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "A(z) [ {0} ] er\u0151forr\u00e1st nem lehet bet\u00f6lteni: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Pufferm\u00e9ret <= 0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\u00c9rv\u00e9nytelen UTF-16 helyettes\u00edt\u00e9s: {0} ?" }, - - { MsgKey.ER_OIERROR, - "IO hiba" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Nem lehet {0} attrib\u00fatumot hozz\u00e1adni ut\u00f3d csom\u00f3pontok ut\u00e1n vagy egy elem el\u0151\u00e1ll\u00edt\u00e1sa el\u0151tt. Az attrib\u00fatum figyelmen k\u00edv\u00fcl marad." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "A(z) ''{0}'' el\u0151tag n\u00e9vtere nincs deklar\u00e1lva." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "A(z) ''{0}'' attrib\u00fatum k\u00edv\u00fcl esik az elemen." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "A(z) ''{0}''=''{1}'' n\u00e9vt\u00e9rdeklar\u00e1ci\u00f3 k\u00edv\u00fcl esik az elemen." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Nem lehet bet\u00f6lteni ''{0}'' er\u0151forr\u00e1st (ellen\u0151rizze a CLASSPATH be\u00e1ll\u00edt\u00e1st), a rendszer az alap\u00e9rtelmez\u00e9seket haszn\u00e1lja." }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "K\u00eds\u00e9rletet tett {0} \u00e9rt\u00e9k\u00e9nek karakteres ki\u00edr\u00e1s\u00e1ra, de nem jelen\u00edthet\u0151 meg a megadott {1} kimeneti k\u00f3dol\u00e1ssal." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Nem lehet bet\u00f6lteni a(z) ''{0}'' tulajdons\u00e1gf\u00e1jlt a(z) ''{1}'' met\u00f3dushoz (ellen\u0151rizze a CLASSPATH be\u00e1ll\u00edt\u00e1st)" }, - - { MsgKey.ER_INVALID_PORT, - "\u00c9rv\u00e9nytelen portsz\u00e1m" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "A portot nem \u00e1ll\u00edthatja be, ha a hoszt null" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "A hoszt nem j\u00f3l form\u00e1zott c\u00edm" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "A s\u00e9ma nem megfelel\u0151." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Nem lehet be\u00e1ll\u00edtani a s\u00e9m\u00e1t null karaktersorozatb\u00f3l" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Az el\u00e9r\u00e9si \u00fat \u00e9rv\u00e9nytelen vez\u00e9rl\u0151 jelsorozatot tartalmaz" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Az el\u00e9r\u00e9si \u00fat \u00e9rv\u00e9nytelen karaktert tartalmaz: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "A t\u00f6red\u00e9k \u00e9rv\u00e9nytelen karaktert tartalmaz" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "A t\u00f6red\u00e9ket nem \u00e1ll\u00edthatja be, ha az el\u00e9r\u00e9si \u00fat null" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Csak \u00e1ltal\u00e1nos URI-hoz \u00e1ll\u00edthat be t\u00f6red\u00e9ket" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Nem tal\u00e1lhat\u00f3 s\u00e9ma az URI-ban" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Az URI nem inicializ\u00e1lhat\u00f3 \u00fcres param\u00e9terekkel" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Nem adhat meg t\u00f6red\u00e9ket az el\u00e9r\u00e9si \u00fatban \u00e9s a t\u00f6red\u00e9kben is" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "Nem adhat meg lek\u00e9rdez\u00e9si karaktersorozatot az el\u00e9r\u00e9si \u00fatban \u00e9s a lek\u00e9rdez\u00e9si karaktersorozatban" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Nem adhatja meg a portot, ha nincs megadva hoszt" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Nem adhatja meg a felhaszn\u00e1l\u00f3i inform\u00e1ci\u00f3kat, ha nincs megadva hoszt" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Figyelmeztet\u00e9s: A kimeneti dokumentum k\u00e9rt verzi\u00f3ja ''{0}''. Az XML ezen verzi\u00f3ja nem t\u00e1mogatott. A kimeneti dokumentum verzi\u00f3ja ''1.0'' lesz." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "S\u00e9m\u00e1ra van sz\u00fcks\u00e9g!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "A SerializerFactory oszt\u00e1lynak \u00e1tadott Properties objektumnak nincs ''{0}'' tulajdons\u00e1ga." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Figyelmeztet\u00e9s: A(z) ''{0}'' k\u00f3dol\u00e1st nem t\u00e1mogatja a Java fut\u00e1si k\u00f6rnyezet." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "A(z) ''{0}'' param\u00e9ter nem ismerhet\u0151 fel."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "A(z) ''{0}'' param\u00e9ter ismert, de a k\u00e9rt \u00e9rt\u00e9k nem \u00e1ll\u00edthat\u00f3 be."}, - - {MsgKey.ER_STRING_TOO_LONG, - "A l\u00e9trej\u00f6v\u0151 karaktersorozat t\u00fal hossz\u00fa, nem f\u00e9r el egy DOMString-ben: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "A param\u00e9tern\u00e9v \u00e9rt\u00e9k\u00e9nek t\u00edpusa nem kompatibilis a v\u00e1rt t\u00edpussal."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "Az adatki\u00edr\u00e1s c\u00e9ljak\u00e9nt megadott \u00e9rt\u00e9k \u00fcres volt."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Nem t\u00e1mogatott k\u00f3dol\u00e1s."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "A csom\u00f3pont nem p\u00e9ld\u00e1nyos\u00edthat\u00f3."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "A CDATA szakasz legal\u00e1bb egy ']]>' lez\u00e1r\u00f3 jelz\u0151t tartalmaz."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "A szab\u00e1lyos form\u00e1z\u00e1st ellen\u0151rz\u0151 p\u00e9ld\u00e1nyt nem siker\u00fclt l\u00e9trehozni. A well-formed param\u00e9ter \u00e9rt\u00e9ke true, de a szab\u00e1lyos form\u00e1z\u00e1st nem lehet ellen\u0151rizni." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "A(z) ''{0}'' csom\u00f3pont \u00e9rv\u00e9nytelen XML karaktereket tartalmaz." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "\u00c9rv\u00e9nytelen XML karakter (Unicode: 0x{0}) szerepelt a megjegyz\u00e9sben." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\u00c9rv\u00e9nytelen XML karakter (Unicode: 0x{0}) szerepelt a feldolgoz\u00e1si utas\u00edt\u00e1sadatokban." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "\u00c9rv\u00e9nytelen XML karakter (Unicode: 0x{0}) szerepelt a CDATASection tartalm\u00e1ban." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "\u00c9rv\u00e9nytelen XML karakter (Unicode: 0x{0}) szerepelt a csom\u00f3pont karakteradat tartalm\u00e1ban." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "\u00c9rv\u00e9nytelen XML karakter tal\u00e1lhat\u00f3 a(z) ''{1}'' nev\u0171 {0} csom\u00f3pontban." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "A \"--\" karaktersorozat nem megengedett a megjegyz\u00e9sekben." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "A(z) \"{0}\" elemt\u00edpussal t\u00e1rs\u00edtott \"{1}\" attrib\u00fatum \u00e9rt\u00e9ke nem tartalmazhat ''<'' karaktert." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Az \u00e9rtelmez\u00e9s n\u00e9lk\u00fcli \"&{0};\" entit\u00e1shivatkoz\u00e1s nem megengedett." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "A(z) \"&{0};\" k\u00fcls\u0151 entit\u00e1shivatkoz\u00e1s nem megengedett egy attrib\u00fatum\u00e9rt\u00e9kben." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "A(z) \"{0}\" el\u0151tag nem k\u00f6thet\u0151 a(z) \"{1}\" n\u00e9vt\u00e9rhez." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "A(z) \"{0}\" elem helyi neve null." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "A(z) \"{0}\" attrib\u00fatum helyi neve null." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "A(z) \"{0}\" entit\u00e1scsom\u00f3pont helyettes\u00edt\u0151 sz\u00f6vege a(z) \"{1}\" elemcsom\u00f3pontot tartalmazza, amelynek nem k\u00f6t\u00f6tt el\u0151tagja \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "A(z) \"{0}\" entit\u00e1scsom\u00f3pont helyettes\u00edt\u0151 sz\u00f6vege a(z) \"{1}\" attrib\u00fatum-csom\u00f3pontot tartalmazza, amelynek nem k\u00f6t\u00f6tt el\u0151tagja \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_it.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_it.java deleted file mode 100644 index d19325c29..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_it.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_it extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "La chiave messaggio ''{0}'' non si trova nella classe del messaggio ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Il formato del messaggio ''{0}'' nella classe del messaggio ''{1}'' non \u00e8 riuscito." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "La classe del serializzatore ''{0}'' non implementa org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Risorsa [ {0} ] non trovata.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Impossibile caricare la risorsa [ {0} ]: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Dimensione buffer <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Rilevato surrogato UTF-16 non valido: {0} ?" }, - - { MsgKey.ER_OIERROR, - "Errore IO" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Impossibile aggiungere l''''attributo {0} dopo i nodi secondari o prima che sia prodotto un elemento. L''''attributo verr\u00e0 ignorato." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "Lo spazio nomi per il prefisso ''{0}'' non \u00e8 stato dichiarato." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "L''''attributo ''{0}'' al di fuori dell''''elemento." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Dichiarazione dello spazio nome ''{0}''=''{1}'' al di fuori dell''''elemento." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Impossibile caricare ''{0}'' (verificare CLASSPATH), verranno utilizzati i valori predefiniti" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Tentare di generare l''''output del carattere di valor integrale {0} che non \u00e8 rappresentato nella codifica di output specificata di {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Impossibile caricare il file delle propriet\u00e0 ''{0}'' per il metodo di emissione ''{1}'' (verificare CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "Numero di porta non valido" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "La porta non pu\u00f2 essere impostata se l'host \u00e8 nullo" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Host non \u00e8 un'indirizzo corretto" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Lo schema non \u00e8 conforme." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Impossibile impostare lo schema da una stringa nulla" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Il percorso contiene sequenza di escape non valida" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Il percorso contiene un carattere non valido: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Il frammento contiene un carattere non valido" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Il frammento non pu\u00f2 essere impostato se il percorso \u00e8 nullo" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Il frammento pu\u00f2 essere impostato solo per un URI generico" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Non \u00e8 stato trovato alcuno schema nell'URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Impossibile inizializzare l'URI con i parametri vuoti" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Il frammento non pu\u00f2 essere specificato sia nel percorso che nel frammento" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "La stringa di interrogazione non pu\u00f2 essere specificata nella stringa di interrogazione e percorso." }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "La porta non pu\u00f2 essere specificata se l'host non S specificato" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Userinfo non pu\u00f2 essere specificato se l'host non S specificato" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Attenzione: La versione del documento di emissione \u00e8 obbligatorio che sia ''{0}''. Questa versione di XML non \u00e8 supportata. La versione del documento di emissione sar\u00e0 ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Lo schema \u00e8 obbligatorio." }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "L''''oggetto Properties passato al SerializerFactory non ha una propriet\u00e0 ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Avvertenza: La codifica ''{0}'' non \u00e8 supportata da Java runtime." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Il parametro ''{0}'' non \u00e8 riconosciuto."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Il parametro ''{0}'' \u00e8 riconosciuto ma non \u00e8 possibile impostare il valore richiesto."}, - - {MsgKey.ER_STRING_TOO_LONG, - "La stringa risultante \u00e8 troppo lunga per essere inserita in DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Il tipo di valore per questo nome di parametro non \u00e8 compatibile con il tipo di valore previsto."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "La destinazione di output in cui scrivere i dati era nulla."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "\u00c8 stata rilevata una codifica non supportata."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Impossibile serializzare il nodo."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "La Sezione CDATA contiene uno o pi\u00f9 markers di termine ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Impossibile creare un'istanza del controllore Well-Formedness. Il parametro well-formed \u00e8 stato impostato su true ma non \u00e8 possibile eseguire i controlli well-formedness." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Il nodo ''{0}'' contiene caratteri XML non validi." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "Trovato un carattere XML non valido (Unicode: 0x{0}) nel commento." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "Carattere XML non valido (Unicode: 0x{0}) rilevato nell''elaborazione di instructiondata." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "Carattere XML non valido (Unicode: 0x{0}) rilevato nel contenuto di CDATASection." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "Carattere XML non valido (Unicode: 0x{0}) rilevato nel contenuto dati di caratteri del nodo. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "Carattere XML non valido rilevato nel nodo {0} denominato ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "La stringa \"--\" non \u00e8 consentita nei commenti." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "Il valore dell''''attributo \"{1}\" associato con un tipo di elemento \"{0}\" non deve contenere il carattere ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Il riferimento entit\u00e0 non analizzata \"&{0};\" non \u00e8 permesso." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "Il riferimento all''''entit\u00e0 esterna \"&{0};\" non \u00e8 permesso in un valore attributo." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "Il prefisso \"{0}\" non pu\u00f2 essere associato allo spazio nome \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Il nome locale dell''''elemento \"{0}\" \u00e8 null." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Il nome locale dell''''attributo \"{0}\" \u00e8 null." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "Il testo di sostituzione del nodo di entit\u00e0 \"{0}\" contiene un nodo di elemento \"{1}\" con un prefisso non associato \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Il testo di sostituzione del nodo di entit\u00e0 \"{0}\" contiene un nodo di attributo \"{1}\" con un prefisso non associato \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ja.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ja.java deleted file mode 100644 index 5a4792443..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ja.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_ja extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "\u30e1\u30c3\u30bb\u30fc\u30b8\u30fb\u30ad\u30fc ''{0}'' \u306f\u30e1\u30c3\u30bb\u30fc\u30b8\u30fb\u30af\u30e9\u30b9 ''{1}'' \u306b\u3042\u308a\u307e\u305b\u3093\u3002" }, - - { MsgKey.BAD_MSGFORMAT, - "\u30e1\u30c3\u30bb\u30fc\u30b8\u30fb\u30af\u30e9\u30b9 ''{1}'' \u306e\u30e1\u30c3\u30bb\u30fc\u30b8 ''{0}'' \u306e\u30d5\u30a9\u30fc\u30de\u30c3\u30c8\u8a2d\u5b9a\u304c\u5931\u6557\u3057\u307e\u3057\u305f\u3002" }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "\u30b7\u30ea\u30a2\u30e9\u30a4\u30b6\u30fc\u30fb\u30af\u30e9\u30b9 ''{0}'' \u306f org.xml.sax.ContentHandler \u3092\u5b9f\u88c5\u3057\u307e\u305b\u3093\u3002" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "\u30ea\u30bd\u30fc\u30b9 [ {0} ] \u306f\u898b\u3064\u304b\u308a\u307e\u305b\u3093\u3067\u3057\u305f\u3002\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "\u30ea\u30bd\u30fc\u30b9 [ {0} ] \u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\u30d0\u30c3\u30d5\u30a1\u30fc\u30fb\u30b5\u30a4\u30ba <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\u7121\u52b9\u306a UTF-16 \u30b5\u30ed\u30b2\u30fc\u30c8\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f: {0} ?" }, - - { MsgKey.ER_OIERROR, - "\u5165\u51fa\u529b\u30a8\u30e9\u30fc" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "\u4e0b\u4f4d\u30ce\u30fc\u30c9\u306e\u5f8c\u307e\u305f\u306f\u8981\u7d20\u304c\u751f\u6210\u3055\u308c\u308b\u524d\u306b\u5c5e\u6027 {0} \u306f\u8ffd\u52a0\u3067\u304d\u307e\u305b\u3093\u3002 \u5c5e\u6027\u306f\u7121\u8996\u3055\u308c\u307e\u3059\u3002" }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "\u63a5\u982d\u90e8 ''{0}'' \u306e\u540d\u524d\u7a7a\u9593\u304c\u5ba3\u8a00\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002" }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "\u5c5e\u6027 ''{0}'' \u304c\u8981\u7d20\u306e\u5916\u5074\u3067\u3059\u3002" }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "\u540d\u524d\u7a7a\u9593\u5ba3\u8a00 ''{0}''=''{1}'' \u304c\u8981\u7d20\u306e\u5916\u5074\u3067\u3059\u3002" }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "''{0}'' \u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f (CLASSPATH \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044)\u3002\u73fe\u5728\u306f\u30c7\u30d5\u30a9\u30eb\u30c8\u306e\u3082\u306e\u306e\u307f\u3092\u4f7f\u7528\u3057\u3066\u3044\u307e\u3059\u3002" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "{1} \u306e\u6307\u5b9a\u3055\u308c\u305f\u51fa\u529b\u30a8\u30f3\u30b3\u30fc\u30c9\u3067\u8868\u305b\u306a\u3044\u6574\u6570\u5024 {0} \u306e\u6587\u5b57\u306e\u51fa\u529b\u3092\u8a66\u307f\u307e\u3057\u305f\u3002" }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "\u51fa\u529b\u30e1\u30bd\u30c3\u30c9 ''{1}'' \u306e\u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u30fb\u30d5\u30a1\u30a4\u30eb ''{0}'' \u3092\u30ed\u30fc\u30c9\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f (CLASSPATH \u3092\u78ba\u8a8d\u3057\u3066\u304f\u3060\u3055\u3044)" }, - - { MsgKey.ER_INVALID_PORT, - "\u7121\u52b9\u306a\u30dd\u30fc\u30c8\u756a\u53f7" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "\u30db\u30b9\u30c8\u304c\u30cc\u30eb\u3067\u3042\u308b\u3068\u30dd\u30fc\u30c8\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "\u30db\u30b9\u30c8\u306f\u3046\u307e\u304f\u69cb\u6210\u3055\u308c\u305f\u30a2\u30c9\u30ec\u30b9\u3067\u3042\u308a\u307e\u305b\u3093" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "\u30b9\u30ad\u30fc\u30e0\u306f\u4e00\u81f4\u3057\u3066\u3044\u307e\u305b\u3093\u3002" }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "\u30cc\u30eb\u30fb\u30b9\u30c8\u30ea\u30f3\u30b0\u304b\u3089\u306f\u30b9\u30ad\u30fc\u30e0\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\u30d1\u30b9\u306b\u7121\u52b9\u306a\u30a8\u30b9\u30b1\u30fc\u30d7\u30fb\u30b7\u30fc\u30b1\u30f3\u30b9\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "\u30d1\u30b9\u306b\u7121\u52b9\u6587\u5b57: {0} \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306b\u7121\u52b9\u6587\u5b57\u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "\u30d1\u30b9\u304c\u30cc\u30eb\u3067\u3042\u308b\u3068\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u3092\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "\u7dcf\u79f0 URI \u306e\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u3057\u304b\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "\u30b9\u30ad\u30fc\u30e0\u306f URI \u3067\u898b\u3064\u304b\u308a\u307e\u305b\u3093" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "URI \u306f\u7a7a\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u3092\u4f7f\u7528\u3057\u3066\u521d\u671f\u5316\u3067\u304d\u307e\u305b\u3093" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306f\u30d1\u30b9\u3068\u30d5\u30e9\u30b0\u30e1\u30f3\u30c8\u306e\u4e21\u65b9\u306b\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "\u7167\u4f1a\u30b9\u30c8\u30ea\u30f3\u30b0\u306f\u30d1\u30b9\u304a\u3088\u3073\u7167\u4f1a\u30b9\u30c8\u30ea\u30f3\u30b0\u5185\u306b\u6307\u5b9a\u3067\u304d\u307e\u305b\u3093" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "\u30db\u30b9\u30c8\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f\u30dd\u30fc\u30c8\u3092\u6307\u5b9a\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "\u30db\u30b9\u30c8\u304c\u6307\u5b9a\u3055\u308c\u3066\u3044\u306a\u3044\u5834\u5408\u306f Userinfo \u3092\u6307\u5b9a\u3057\u3066\u306f\u3044\u3051\u307e\u305b\u3093" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "\u8b66\u544a: \u51fa\u529b\u6587\u66f8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u3068\u3057\u3066 ''{0}'' \u304c\u8981\u6c42\u3055\u308c\u307e\u3057\u305f\u3002 \u3053\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306e XML \u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u307e\u305b\u3093\u3002 \u51fa\u529b\u6587\u66f8\u306e\u30d0\u30fc\u30b8\u30e7\u30f3\u306f ''1.0'' \u306b\u306a\u308a\u307e\u3059\u3002" }, - - { MsgKey.ER_SCHEME_REQUIRED, - "\u30b9\u30ad\u30fc\u30e0\u304c\u5fc5\u8981\u3067\u3059\u3002" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "SerializerFactory \u306b\u6e21\u3055\u308c\u305f Properties \u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u306f ''{0}'' \u30d7\u30ed\u30d1\u30c6\u30a3\u30fc\u304c\u3042\u308a\u307e\u305b\u3093\u3002" }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "\u8b66\u544a: \u30a8\u30f3\u30b3\u30fc\u30c9 ''{0}'' \u306f\u3053\u306e Java \u30e9\u30f3\u30bf\u30a4\u30e0\u3067\u306f\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u3066\u3044\u307e\u305b\u3093\u3002" }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc ''{0}'' \u306f\u8a8d\u8b58\u3055\u308c\u307e\u305b\u3093\u3002"}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc ''{0}'' \u306f\u8a8d\u8b58\u3055\u308c\u307e\u3059\u304c\u3001\u8981\u6c42\u3055\u308c\u305f\u5024\u306f\u8a2d\u5b9a\u3067\u304d\u307e\u305b\u3093\u3002"}, - - {MsgKey.ER_STRING_TOO_LONG, - "\u7d50\u679c\u306e\u30b9\u30c8\u30ea\u30f3\u30b0\u304c\u9577\u3059\u304e\u308b\u305f\u3081\u3001DOMString \u5185\u306b\u53ce\u307e\u308a\u307e\u305b\u3093: ''{0}''\u3002"}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "\u3053\u306e\u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u540d\u306e\u5024\u306e\u578b\u306f\u3001\u671f\u5f85\u3055\u308c\u308b\u5024\u306e\u578b\u3068\u4e0d\u9069\u5408\u3067\u3059\u3002"}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "\u66f8\u304d\u8fbc\u307e\u308c\u308b\u30c7\u30fc\u30bf\u306e\u51fa\u529b\u5b9b\u5148\u304c\u30cc\u30eb\u3067\u3059\u3002"}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "\u30b5\u30dd\u30fc\u30c8\u3055\u308c\u306a\u3044\u30a8\u30f3\u30b3\u30fc\u30c9\u304c\u691c\u51fa\u3055\u308c\u307e\u3057\u305f\u3002"}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "\u30ce\u30fc\u30c9\u3092\u76f4\u5217\u5316\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002"}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "CDATA \u30bb\u30af\u30b7\u30e7\u30f3\u306b 1 \u3064\u4ee5\u4e0a\u306e\u7d42\u4e86\u30de\u30fc\u30ab\u30fc ']]>' \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002"}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "\u6574\u5f62\u5f0f\u6027\u30c1\u30a7\u30c3\u30ab\u30fc\u306e\u30a4\u30f3\u30b9\u30bf\u30f3\u30b9\u3092\u4f5c\u6210\u3067\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002 well-formed \u30d1\u30e9\u30e1\u30fc\u30bf\u30fc\u306e\u8a2d\u5b9a\u306f true \u3067\u3057\u305f\u304c\u3001\u6574\u5f62\u5f0f\u6027\u306e\u691c\u67fb\u306f\u5b9f\u884c\u3067\u304d\u307e\u305b\u3093\u3002" - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "\u30ce\u30fc\u30c9 ''{0}'' \u306b\u7121\u52b9\u306a XML \u6587\u5b57\u304c\u3042\u308a\u307e\u3059\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "\u30b3\u30e1\u30f3\u30c8\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\u51e6\u7406\u547d\u4ee4\u30c7\u30fc\u30bf\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "CDATA \u30bb\u30af\u30b7\u30e7\u30f3\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "\u30ce\u30fc\u30c9\u306e\u6587\u5b57\u30c7\u30fc\u30bf\u306e\u5185\u5bb9\u306b\u7121\u52b9\u306a XML \u6587\u5b57 (Unicode: 0x{0}) \u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "''{1}'' \u3068\u3044\u3046\u540d\u524d\u306e {0} \u30ce\u30fc\u30c9\u306e\u4e2d\u306b\u7121\u52b9\u306a XML \u6587\u5b57\u304c\u898b\u3064\u304b\u308a\u307e\u3057\u305f\u3002" - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "\u30b9\u30c8\u30ea\u30f3\u30b0 \"--\" \u306f\u30b3\u30e1\u30f3\u30c8\u5185\u3067\u306f\u4f7f\u7528\u3067\u304d\u307e\u305b\u3093\u3002" - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "\u8981\u7d20\u578b \"{0}\" \u306b\u95a2\u9023\u3057\u305f\u5c5e\u6027 \"{1}\" \u306e\u5024\u306b\u306f ''<'' \u6587\u5b57\u3092\u542b\u3081\u3066\u306f\u3044\u3051\u307e\u305b\u3093\u3002" - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "\u89e3\u6790\u5bfe\u8c61\u5916\u5b9f\u4f53\u53c2\u7167 \"&{0};\" \u306f\u8a31\u53ef\u3055\u308c\u307e\u305b\u3093\u3002" - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "\u5c5e\u6027\u5024\u3067\u306e\u5916\u90e8\u5b9f\u4f53\u53c2\u7167 \"&{0};\" \u306f\u8a31\u53ef\u3055\u308c\u307e\u305b\u3093\u3002" - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "\u63a5\u982d\u90e8 \"{0}\" \u306f\u540d\u524d\u7a7a\u9593 \"{1}\" \u306b\u7d50\u5408\u3067\u304d\u307e\u305b\u3093\u3002" - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "\u8981\u7d20 \"{0}\" \u306e\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u30cc\u30eb\u3067\u3059\u3002" - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "\u5c5e\u6027 \"{0}\" \u306e\u30ed\u30fc\u30ab\u30eb\u540d\u304c\u30cc\u30eb\u3067\u3059\u3002" - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "\u5b9f\u4f53\u30ce\u30fc\u30c9 \"{0}\" \u306e\u7f6e\u63db\u30c6\u30ad\u30b9\u30c8\u306b\u3001\u672a\u7d50\u5408\u306e\u63a5\u982d\u90e8 \"{2}\" \u3092\u6301\u3064\u8981\u7d20\u30ce\u30fc\u30c9 \"{1}\" \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002" - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "\u5b9f\u4f53\u30ce\u30fc\u30c9 \"{0}\" \u306e\u7f6e\u63db\u30c6\u30ad\u30b9\u30c8\u306b\u3001\u672a\u7d50\u5408\u306e\u63a5\u982d\u90e8 \"{2}\" \u3092\u6301\u3064\u5c5e\u6027\u30ce\u30fc\u30c9 \"{1}\" \u304c\u542b\u307e\u308c\u3066\u3044\u307e\u3059\u3002" - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ko.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ko.java deleted file mode 100644 index d5beb1ffe..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ko.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_ko extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "''{0}'' \uba54\uc2dc\uc9c0 \ud0a4\uac00 ''{1}'' \uba54\uc2dc\uc9c0 \ud074\ub798\uc2a4\uc5d0 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.BAD_MSGFORMAT, - "''{1}'' \uba54\uc2dc\uc9c0 \ud074\ub798\uc2a4\uc5d0 \uc788\ub294 ''{0}'' \uba54\uc2dc\uc9c0\uc758 \ud615\uc2dd\uc774 \uc798\ubabb \ub418\uc5c8\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "''{0}'' \uc9c1\ub82c \ud504\ub85c\uadf8\ub7a8 \ud074\ub798\uc2a4\uac00 org.xml.sax.ContentHandler\ub97c \uad6c\ud604\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "[ {0} ] \uc790\uc6d0\uc744 \ucc3e\uc744 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4.\n{1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "[ {0} ] \uc790\uc6d0\uc774 {1} \n {2} \t {3}\uc744(\ub97c) \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\ubc84\ud37c \ud06c\uae30 <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\uc798\ubabb\ub41c UTF-16 \ub300\ub9ac\uc790(surrogate)\uac00 \ubc1c\uacac\ub418\uc5c8\uc2b5\ub2c8\ub2e4: {0} ?" }, - - { MsgKey.ER_OIERROR, - "IO \uc624\ub958" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "\ud558\uc704 \ub178\ub4dc\uac00 \uc0dd\uc131\ub41c \uc774\ud6c4 \ub610\ub294 \uc694\uc18c\uac00 \uc791\uc131\ub418\uae30 \uc774\uc804\uc5d0 {0} \uc18d\uc131\uc744 \ucd94\uac00\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. \uc18d\uc131\uc774 \ubb34\uc2dc\ub429\ub2c8\ub2e4." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "''{0}'' \uc811\ub450\ubd80\uc5d0 \ub300\ud55c \uc774\ub984 \uacf5\uac04\uc774 \uc120\uc5b8\ub418\uc9c0 \uc54a\uc558\uc2b5\ub2c8\ub2e4." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "''{0}'' \uc18d\uc131\uc774 \uc694\uc18c\uc758 \uc678\ubd80\uc5d0 \uc788\uc2b5\ub2c8\ub2e4." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "''{0}''=''{1}'' \uc774\ub984 \uacf5\uac04 \uc120\uc5b8\uc774 \uc694\uc18c\uc758 \uc678\ubd80\uc5d0 \uc788\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "''{0}''(CLASSPATH \ud655\uc778)\uc744(\ub97c) \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc73c\ubbc0\ub85c, \ud604\uc7ac \uae30\ubcf8\uac12\ub9cc\uc744 \uc0ac\uc6a9\ud558\ub294 \uc911\uc785\ub2c8\ub2e4." }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "{1}\uc758 \uc9c0\uc815\ub41c \ucd9c\ub825 \uc778\ucf54\ub529\uc5d0 \ud45c\uc2dc\ub418\uc9c0 \uc54a\uc740 \ubb34\uacb0\uc131 \uac12 {0}\uc758 \ubb38\uc790\ub97c \ucd9c\ub825\ud558\uc2ed\uc2dc\uc624. " }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "''{1}'' \ucd9c\ub825 \uba54\uc18c\ub4dc(CLASSPATH \ud655\uc778)\uc5d0 \ub300\ud55c ''{0}'' \ud2b9\uc131 \ud30c\uc77c\uc744 \ub85c\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_INVALID_PORT, - "\uc798\ubabb\ub41c \ud3ec\ud2b8 \ubc88\ud638" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "\ud638\uc2a4\ud2b8\uac00 \ub110(null)\uc774\uba74 \ud3ec\ud2b8\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "\ud638\uc2a4\ud2b8\uac00 \uc644\uc804\ud55c \uc8fc\uc18c\uac00 \uc544\ub2d9\ub2c8\ub2e4." }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "\uc2a4\ud0a4\ub9c8\uac00 \uc77c\uce58\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "\ub110(null) \ubb38\uc790\uc5f4\uc5d0\uc11c \uc2a4\ud0a4\ub9c8\ub97c \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\uacbd\ub85c\uc5d0 \uc798\ubabb\ub41c \uc774\uc2a4\ucf00\uc774\ud504 \uc21c\uc11c\uac00 \uc788\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "\uacbd\ub85c\uc5d0 \uc798\ubabb\ub41c \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "\ub2e8\ud3b8\uc5d0 \uc798\ubabb\ub41c \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "\uacbd\ub85c\uac00 \ub110(null)\uc774\uba74 \ub2e8\ud3b8\uc744 \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "\uc77c\ubc18 URI\uc5d0 \ub300\ud574\uc11c\ub9cc \ub2e8\ud3b8\uc744 \uc124\uc815\ud560 \uc218 \uc788\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "URI\uc5d0 \uc2a4\ud0a4\ub9c8\uac00 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "\ube48 \ub9e4\uac1c\ubcc0\uc218\ub85c URI\ub97c \ucd08\uae30\ud654\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "\uacbd\ub85c \ubc0f \ub2e8\ud3b8 \ub458 \ub2e4\uc5d0 \ub2e8\ud3b8\uc744 \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "\uacbd\ub85c \ubc0f \uc870\ud68c \ubb38\uc790\uc5f4\uc5d0 \uc870\ud68c \ubb38\uc790\uc5f4\uc744 \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "\ud638\uc2a4\ud2b8\ub97c \uc9c0\uc815\ud558\uc9c0 \uc54a\uc740 \uacbd\uc6b0\uc5d0\ub294 \ud3ec\ud2b8\ub97c \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "\ud638\uc2a4\ud2b8\ub97c \uc9c0\uc815\ud558\uc9c0 \uc54a\uc740 \uacbd\uc6b0\uc5d0\ub294 Userinfo\ub97c \uc9c0\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "\uacbd\uace0: \uc694\uccad\ub41c \ucd9c\ub825 \ubb38\uc11c\uc758 \ubc84\uc804\uc740 ''{0}''\uc785\ub2c8\ub2e4. \ud558\uc9c0\ub9cc \uc774 XML \ubc84\uc804\uc740 \uc9c0\uc6d0\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. \ucd9c\ub825 \ubb38\uc11c\uc758 \ubc84\uc804\uc740 ''1.0''\uc774 \ub429\ub2c8\ub2e4." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "\uc2a4\ud0a4\ub9c8\uac00 \ud544\uc694\ud569\ub2c8\ub2e4." }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "SerializerFactory\uc5d0 \uc804\ub2ec\ub41c \ud2b9\uc131 \uc624\ube0c\uc81d\ud2b8\uc5d0 ''{0}'' \ud2b9\uc131\uc774 \uc5c6\uc2b5\ub2c8\ub2e4." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "\uacbd\uace0: ''{0}'' \uc778\ucf54\ub529\uc740 Java Runtime\uc744 \uc9c0\uc6d0\ud558\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "''{0}'' \ub9e4\uac1c\ubcc0\uc218\ub97c \uc778\uc2dd\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "''{0}'' \ub9e4\uac1c\ubcc0\uc218\ub294 \uc778\uc2dd\ud560 \uc218 \uc788\uc73c\ub098 \uc694\uccad\ub41c \uac12\uc744 \uc124\uc815\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."}, - - {MsgKey.ER_STRING_TOO_LONG, - "\uacb0\uacfc \ubb38\uc790\uc5f4\uc774 \ub108\ubb34 \uae38\uc5b4 DOMString\uc5d0 \ub9de\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4: ''{0}'' "}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "\uc774 \ub9e4\uac1c\ubcc0\uc218 \uc774\ub984\uc5d0 \ub300\ud55c \uac12 \uc720\ud615\uc774 \uc608\uc0c1 \uac12 \uc720\ud615\uacfc \ud638\ud658\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "\ub370\uc774\ud130\ub97c \uae30\ub85d\ud560 \ucd9c\ub825 \ub300\uc0c1\uc774 \ub110(null)\uc785\ub2c8\ub2e4."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "\uc9c0\uc6d0\ub418\uc9c0 \uc54a\ub294 \uc778\ucf54\ub529\uc774 \ubc1c\uacac\ub418\uc5c8\uc2b5\ub2c8\ub2e4."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "\ub178\ub4dc\ub97c \uc9c1\ub82c\ud654\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "CDATA \uc139\uc158\uc5d0 \uc885\ub8cc \ud45c\uc2dc \ubb38\uc790\uc778 ']]>'\uac00 \ud558\ub098 \uc774\uc0c1 \ud3ec\ud568\ub418\uc5b4 \uc788\uc2b5\ub2c8\ub2e4."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Well-Formedness \uac80\uc0ac\uae30\uc758 \uc778\uc2a4\ud134\uc2a4\ub97c \uc791\uc131\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4. Well-Formed \ub9e4\uac1c\ubcc0\uc218\uac00 true\ub85c \uc124\uc815\ub418\uc5c8\uc9c0\ub9cc Well-Formedness \uac80\uc0ac\ub97c \uc218\ud589\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "''{0}'' \ub178\ub4dc\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "\uc124\uba85\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\ucc98\ub9ac \uba85\ub839\uc5b4 \ub370\uc774\ud130\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4 " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "CDATASection\uc758 \ub0b4\uc6a9\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "\ub178\ub4dc\uc758 \ubb38\uc790 \ub370\uc774\ud130 \ub0b4\uc6a9\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790(Unicode: 0x{0})\uac00 \uc788\uc2b5\ub2c8\ub2e4. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "\uc774\ub984\uc774 ''{1}''\uc778 {0} \ub178\ub4dc\uc5d0 \uc720\ud6a8\ud558\uc9c0 \uc54a\uc740 XML \ubb38\uc790\uac00 \uc788\uc2b5\ub2c8\ub2e4. " - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "\uc124\uba85 \ub0b4\uc5d0\uc11c\ub294 \"--\" \ubb38\uc790\uc5f4\uc774 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "\"{0}\" \uc694\uc18c \uc720\ud615\uacfc \uc5f0\uad00\ub41c \"{1}\" \uc18d\uc131\uac12\uc5d0 ''<'' \ubb38\uc790\uac00 \ud3ec\ud568\ub418\uba74 \uc548\ub429\ub2c8\ub2e4." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "\"&{0};\"\uc758 \uad6c\ubd84 \ubd84\uc11d\ub418\uc9c0 \uc54a\uc740 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\ub294 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. " - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "\uc18d\uc131\uac12\uc5d0\ub294 \"&{0};\" \uc678\ubd80 \uc5d4\ud2f0\ud2f0 \ucc38\uc870\uac00 \ud5c8\uc6a9\ub418\uc9c0 \uc54a\uc2b5\ub2c8\ub2e4. " - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "\"{0}\" \uc811\ub450\ubd80\ub97c \"{1}\" \uc774\ub984 \uacf5\uac04\uc5d0 \ubc14\uc778\ub4dc\ud560 \uc218 \uc5c6\uc2b5\ub2c8\ub2e4." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "\"{0}\" \uc694\uc18c\uc758 \ub85c\uceec \uc774\ub984\uc774 \ub110(null)\uc785\ub2c8\ub2e4." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "\"{0}\" \uc18d\uc131\uc758 \ub85c\uceec \uc774\ub984\uc774 \ub110(null)\uc785\ub2c8\ub2e4." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "\"{0}\" \uc5d4\ud2f0\ud2f0 \ub178\ub4dc\uc758 \ub300\uccb4 \ud14d\uc2a4\ud2b8\uc5d0 \ubc14\uc778\ub4dc\ub418\uc9c0 \uc54a\uc740 \uc811\ub450\ubd80 \"{2}\"\uc744(\ub97c) \uac16\ub294 \"{1}\" \uc694\uc18c \ub178\ub4dc\uac00 \uc788\uc2b5\ub2c8\ub2e4." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "\"{0}\" \uc5d4\ud2f0\ud2f0 \ub178\ub4dc\uc758 \ub300\uccb4 \ud14d\uc2a4\ud2b8\uc5d0 \ubc14\uc778\ub4dc\ub418\uc9c0 \uc54a\uc740 \uc811\ub450\ubd80 \"{2}\"\uc744(\ub97c) \uac16\ub294 \"{1}\" \uc18d\uc131 \ub178\ub4dc\uac00 \uc788\uc2b5\ub2c8\ub2e4." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pl.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pl.java deleted file mode 100644 index 7d4c150b4..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pl.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_pl extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "Klucz komunikatu ''{0}'' nie znajduje si\u0119 w klasie komunikat\u00f3w ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Nie powiod\u0142o si\u0119 sformatowanie komunikatu ''{0}'' w klasie komunikat\u00f3w ''{1}''." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "Klasa szereguj\u0105ca ''{0}'' nie implementuje org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Nie mo\u017cna znale\u017a\u0107 zasobu [ {0} ].\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Zas\u00f3b [ {0} ] nie m\u00f3g\u0142 za\u0142adowa\u0107: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Wielko\u015b\u0107 buforu <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Wykryto niepoprawny odpowiednik UTF-16: {0} ?" }, - - { MsgKey.ER_OIERROR, - "B\u0142\u0105d we/wy" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Nie mo\u017cna doda\u0107 atrybutu {0} po bezpo\u015brednich w\u0119z\u0142ach potomnych ani przed wyprodukowaniem elementu. Atrybut zostanie zignorowany." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "Nie zadeklarowano przestrzeni nazw dla przedrostka ''{0}''." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Atrybut ''{0}'' znajduje si\u0119 poza elementem." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Deklaracja przestrzeni nazw ''{0}''=''{1}'' znajduje si\u0119 poza elementem." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Nie mo\u017cna za\u0142adowa\u0107 ''{0}'' (sprawd\u017a CLASSPATH) - u\u017cywane s\u0105 teraz warto\u015bci domy\u015blne" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Pr\u00f3ba wyprowadzenia znaku warto\u015bci ca\u0142kowitej {0}, kt\u00f3ry nie jest reprezentowany w podanym kodowaniu wyj\u015bciowym {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Nie mo\u017cna za\u0142adowa\u0107 pliku w\u0142a\u015bciwo\u015bci ''{0}'' dla metody wyj\u015bciowej ''{1}'' (sprawd\u017a CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "Niepoprawny numer portu" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Nie mo\u017cna ustawi\u0107 portu, kiedy host jest pusty" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Host nie jest poprawnie skonstruowanym adresem" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Schemat nie jest zgodny." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Nie mo\u017cna ustawi\u0107 schematu z pustego ci\u0105gu znak\u00f3w" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\u015acie\u017cka zawiera nieznan\u0105 sekwencj\u0119 o zmienionym znaczeniu" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "\u015acie\u017cka zawiera niepoprawny znak {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment zawiera niepoprawny znak" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Nie mo\u017cna ustawi\u0107 fragmentu, kiedy \u015bcie\u017cka jest pusta" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment mo\u017cna ustawi\u0107 tylko dla og\u00f3lnego URI" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Nie znaleziono schematu w URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Nie mo\u017cna zainicjowa\u0107 URI z pustymi parametrami" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Nie mo\u017cna poda\u0107 fragmentu jednocze\u015bnie w \u015bcie\u017cce i fragmencie" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "Tekstu zapytania nie mo\u017cna poda\u0107 w tek\u015bcie \u015bcie\u017cki i zapytania" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Nie mo\u017cna poda\u0107 portu, je\u015bli nie podano hosta" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Nie mo\u017cna poda\u0107 informacji o u\u017cytkowniku, je\u015bli nie podano hosta" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Ostrze\u017cenie: Wymagan\u0105 wersj\u0105 dokumentu wyj\u015bciowego jest ''{0}''. Ta wersja XML nie jest obs\u0142ugiwana. Wersj\u0105 dokumentu wyj\u015bciowego b\u0119dzie ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Schemat jest wymagany!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "Obiekt klasy Properties przekazany do klasy SerializerFactory nie ma w\u0142a\u015bciwo\u015bci ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Ostrze\u017cenie: dekodowany ''{0}'' nie jest obs\u0142ugiwany przez \u015brodowisko wykonawcze Java." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Parametr ''{0}'' nie zosta\u0142 rozpoznany."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Parametr ''{0}'' zosta\u0142 rozpoznany, ale nie mo\u017cna ustawi\u0107 \u017c\u0105danej warto\u015bci."}, - - {MsgKey.ER_STRING_TOO_LONG, - "Wynikowy \u0142a\u0144cuch jest zbyt d\u0142ugi, aby si\u0119 zmie\u015bci\u0107 w obiekcie DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Typ warto\u015bci parametru o tej nazwie jest niezgodny z oczekiwanym typem warto\u015bci. "}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "Docelowe miejsce zapisu danych wyj\u015bciowych by\u0142o puste (null)."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Napotkano nieobs\u0142ugiwane kodowanie."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Nie mo\u017cna przekszta\u0142ci\u0107 w\u0119z\u0142a do postaci szeregowej."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "Sekcja CDATA zawiera jeden lub kilka znacznik\u00f3w zako\u0144czenia ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Nie mo\u017cna utworzy\u0107 instancji obiektu sprawdzaj\u0105cego Well-Formedness. Parametr well-formed ustawiono na warto\u015b\u0107 true, ale nie mo\u017cna by\u0142o dokona\u0107 sprawdzenia poprawno\u015bci konstrukcji." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "W\u0119ze\u0142 ''{0}'' zawiera niepoprawne znaki XML." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "W komentarzu znaleziono niepoprawny znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "W danych instrukcji przetwarzania znaleziono niepoprawny znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "W sekcji CDATA znaleziono niepoprawny znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "W tre\u015bci danych znakowych w\u0119z\u0142a znaleziono niepoprawny znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "W {0} o nazwie ''{1}'' znaleziono niepoprawne znaki XML." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "Ci\u0105g znak\u00f3w \"--\" jest niedozwolony w komentarzu." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "Warto\u015b\u0107 atrybutu \"{1}\" zwi\u0105zanego z typem elementu \"{0}\" nie mo\u017ce zawiera\u0107 znaku ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Odwo\u0142anie do encji nieprzetwarzanej \"&{0};\" jest niedozwolone." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "Odwo\u0142anie do zewn\u0119trznej encji \"&{0};\" jest niedozwolone w warto\u015bci atrybutu." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "Nie mo\u017cna zwi\u0105za\u0107 przedrostka \"{0}\" z przestrzeni\u0105 nazw \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Nazwa lokalna elementu \"{0}\" jest pusta (null)." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Nazwa lokalna atrybutu \"{0}\" jest pusta (null)." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "Tekst zast\u0119puj\u0105cy w\u0119z\u0142a encji \"{0}\" zawiera w\u0119ze\u0142 elementu \"{1}\" o niezwi\u0105zanym przedrostku \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Tekst zast\u0119puj\u0105cy w\u0119z\u0142a encji \"{0}\" zawiera w\u0119ze\u0142 atrybutu \"{1}\" o niezwi\u0105zanym przedrostku \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pt_BR.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pt_BR.java deleted file mode 100644 index 523bd3e3f..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_pt_BR.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_pt_BR extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "A chave de mensagem ''{0}'' n\u00e3o est\u00e1 na classe de mensagem ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "O formato da mensagem ''{0}'' na classe de mensagem ''{1}'' falhou." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "A classe de serializador ''{0}'' n\u00e3o implementa org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "O recurso [ {0} ] n\u00e3o p\u00f4de ser encontrado.\n{1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "O recurso [ {0} ] n\u00e3o p\u00f4de carregar: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Tamanho do buffer <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Detectado substituto UTF-16 inv\u00e1lido: {0} ?" }, - - { MsgKey.ER_OIERROR, - "Erro de E/S" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Imposs\u00edvel incluir atributo {0} depois de n\u00f3s filhos ou antes da gera\u00e7\u00e3o de um elemento. O atributo ser\u00e1 ignorado." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "O espa\u00e7o de nomes do prefixo ''{0}'' n\u00e3o foi declarado. " }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Atributo ''{0}'' fora do elemento. " }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Declara\u00e7\u00e3o de espa\u00e7o de nomes ''{0}''=''{1}'' fora do elemento. " }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "N\u00e3o foi poss\u00edvel carregar ''{0}'' (verifique CLASSPATH) agora , utilizando somente os padr\u00f5es" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Tentativa de processar o caractere de um valor integral {0} que n\u00e3o \u00e9 representado na codifica\u00e7\u00e3o de sa\u00edda especificada de {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "N\u00e3o foi poss\u00edvel carregar o arquivo de propriedade ''{0}'' para o m\u00e9todo de sa\u00edda ''{1}'' (verifique CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "N\u00famero de porta inv\u00e1lido" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "A porta n\u00e3o pode ser definida quando o host \u00e9 nulo" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "O host n\u00e3o \u00e9 um endere\u00e7o formado corretamente" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "O esquema n\u00e3o est\u00e1 em conformidade." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Imposs\u00edvel definir esquema a partir da cadeia nula" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "O caminho cont\u00e9m seq\u00fc\u00eancia de escape inv\u00e1lida" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "O caminho cont\u00e9m caractere inv\u00e1lido: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "O fragmento cont\u00e9m caractere inv\u00e1lido" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "O fragmento n\u00e3o pode ser definido quando o caminho \u00e9 nulo" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "O fragmento s\u00f3 pode ser definido para um URI gen\u00e9rico" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Nenhum esquema encontrado no URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Imposs\u00edvel inicializar URI com par\u00e2metros vazios" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "O fragmento n\u00e3o pode ser especificado no caminho e fragmento" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "A cadeia de consulta n\u00e3o pode ser especificada na cadeia de consulta e caminho" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Port n\u00e3o pode ser especificado se host n\u00e3o for especificado" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Userinfo n\u00e3o pode ser especificado se host n\u00e3o for especificado" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Aviso: A vers\u00e3o do documento de sa\u00edda precisa ser ''{0}''. Essa vers\u00e3o do XML n\u00e3o \u00e9 suportada. A vers\u00e3o do documento de sa\u00edda ser\u00e1 ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "O esquema \u00e9 obrigat\u00f3rio!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "O objeto Properties transmitido para SerializerFactory n\u00e3o tem uma propriedade ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Aviso: A codifica\u00e7\u00e3o ''{0}'' n\u00e3o \u00e9 suportada pelo Java Runtime." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "O par\u00e2metro ''{0}'' n\u00e3o \u00e9 reconhecido."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "O par\u00e2metro ''{0}'' \u00e9 reconhecido, mas o valor pedido n\u00e3o pode ser definido. "}, - - {MsgKey.ER_STRING_TOO_LONG, - "A cadeia resultante \u00e9 muito longa para caber em uma DOMString: ''{0}''. "}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "O tipo de valor para este nome de par\u00e2metro \u00e9 incompat\u00edvel com o tipo de valor esperado. "}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "O destino de sa\u00edda para os dados a serem gravados era nulo. "}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Uma codifica\u00e7\u00e3o n\u00e3o suportada foi encontrada. "}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "O n\u00f3 n\u00e3o p\u00f4de ser serializado."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "A Se\u00e7\u00e3o CDATA cont\u00e9m um ou mais marcadores de t\u00e9rmino ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Uma inst\u00e2ncia do verificador Well-Formedness n\u00e3o p\u00f4de ser criada. O par\u00e2metro well-formed foi definido como true, mas a verifica\u00e7\u00e3o well-formedness n\u00e3o pode ser executada." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "O n\u00f3 ''{0}'' cont\u00e9m caracteres XML inv\u00e1lidos. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado no coment\u00e1rio. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado no processo instructiondata." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado nos conte\u00fados do CDATASection. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "Um caractere XML inv\u00e1lido (Unicode: 0x{0}) foi encontrado no conte\u00fado dos dados de caractere dos n\u00f3s. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "Um caractere inv\u00e1lido foi encontrado no {0} do n\u00f3 denominado ''{1}''." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "A cadeia \"--\" n\u00e3o \u00e9 permitida dentro dos coment\u00e1rios. " - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "O valor do atributo \"{1}\" associado a um tipo de elemento \"{0}\" n\u00e3o deve conter o caractere ''<''. " - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "A refer\u00eancia de entidade n\u00e3o analisada \"&{0};\" n\u00e3o \u00e9 permitida. " - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "A refer\u00eancia de entidade externa \"&{0};\" n\u00e3o \u00e9 permitida em um valor de atributo. " - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "O prefixo \"{0}\" n\u00e3o pode ser vinculado ao espa\u00e7o de nomes \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "O nome local do elemento \"{0}\" \u00e9 nulo." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "O nome local do atributo \"{0}\" \u00e9 nulo." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "O texto de substitui\u00e7\u00e3o do n\u00f3 de entidade \"{0}\" cont\u00e9m um n\u00f3 de elemento \"{1}\" com um prefixo n\u00e3o vinculado \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "O texto de substitui\u00e7\u00e3o do n\u00f3 de entidade \"{0}\" cont\u00e9m um n\u00f3 de atributo \"{1}\" com um prefixo n\u00e3o vinculado \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ru.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ru.java deleted file mode 100644 index 42c77602a..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_ru.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_ru extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "\u041a\u043b\u044e\u0447 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f ''{0}'' \u043d\u0435 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0441\u044f \u043a \u043a\u043b\u0430\u0441\u0441\u0443 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "\u0424\u043e\u0440\u043c\u0430\u0442 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f ''{0}'' \u0432 \u043a\u043b\u0430\u0441\u0441\u0435 \u0441\u043e\u043e\u0431\u0449\u0435\u043d\u0438\u044f ''{1}'' \u0432\u044b\u0437\u0432\u0430\u043b \u043e\u0448\u0438\u0431\u043a\u0443. " }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "\u041a\u043b\u0430\u0441\u0441 \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u0430\u0442\u043e\u0440\u0430 ''{0}'' \u043d\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u0442 org.xml.sax.ContentHandler. " }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "\u0420\u0435\u0441\u0443\u0440\u0441 [ {0} ] \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0440\u0435\u0441\u0443\u0440\u0441 [ {0} ]: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\u0420\u0430\u0437\u043c\u0435\u0440 \u0431\u0443\u0444\u0435\u0440\u0430 <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u043e \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 UTF-16: {0} ?" }, - - { MsgKey.ER_OIERROR, - "\u041e\u0448\u0438\u0431\u043a\u0430 \u0432\u0432\u043e\u0434\u0430-\u0432\u044b\u0432\u043e\u0434\u0430" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "\u0410\u0442\u0440\u0438\u0431\u0443\u0442 {0} \u043d\u0435\u043b\u044c\u0437\u044f \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u043f\u043e\u0441\u043b\u0435 \u0434\u043e\u0447\u0435\u0440\u043d\u0438\u0445 \u0443\u0437\u043b\u043e\u0432 \u0438 \u0434\u043e \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. \u0410\u0442\u0440\u0438\u0431\u0443\u0442 \u0431\u0443\u0434\u0435\u0442 \u043f\u0440\u043e\u0438\u0433\u043d\u043e\u0440\u0438\u0440\u043e\u0432\u0430\u043d. " }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "\u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u043e \u0438\u043c\u0435\u043d \u0434\u043b\u044f \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u0430 ''{0}'' \u043d\u0435 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u043e. " }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "\u0410\u0442\u0440\u0438\u0431\u0443\u0442 ''{0}'' \u0432\u043d\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. " }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "\u041e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0438\u043c\u0435\u043d ''{0}''=''{1}'' \u0432\u043d\u0435 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430. " }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "\u041d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c ''{0}'' (\u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 CLASSPATH), \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "\u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u0441\u0438\u043c\u0432\u043e\u043b\u0430, \u0438\u043d\u0442\u0435\u0433\u0440\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 {0} \u043a\u043e\u0442\u043e\u0440\u043e\u0433\u043e \u043d\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043e \u0432 \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0435 \u0432\u044b\u0432\u043e\u0434\u0430 {1}. " }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044c \u0444\u0430\u0439\u043b \u0441\u0432\u043e\u0439\u0441\u0442\u0432 ''{0}'' \u0434\u043b\u044f \u043c\u0435\u0442\u043e\u0434\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 ''{1}'' (\u043f\u0440\u043e\u0432\u0435\u0440\u044c\u0442\u0435 CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "\u041d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u043d\u043e\u043c\u0435\u0440 \u043f\u043e\u0440\u0442\u0430" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043f\u043e\u0440\u0442 \u0434\u043b\u044f \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u0430\u0434\u0440\u0435\u0441\u0430 \u0445\u043e\u0441\u0442\u0430" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "\u041d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d \u0430\u0434\u0440\u0435\u0441 \u0445\u043e\u0441\u0442\u0430" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "\u0421\u0445\u0435\u043c\u0430 \u043d\u0435 \u043a\u043e\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u0430." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0441\u0445\u0435\u043c\u0443 \u0434\u043b\u044f \u043f\u0443\u0441\u0442\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0438" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\u0412 \u0438\u043c\u0435\u043d\u0438 \u043f\u0443\u0442\u0438 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0435\u0442\u0441\u044f \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430\u044f Esc-\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "\u0412 \u0438\u043c\u0435\u043d\u0438 \u043f\u0443\u0442\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u0434\u043b\u044f \u043f\u0443\u0441\u0442\u043e\u0433\u043e \u043f\u0443\u0442\u0438" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "\u0424\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u0448\u0430\u0431\u043b\u043e\u043d\u0430 URI" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "\u0412 URI \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u043d\u0430 \u0441\u0445\u0435\u043c\u0430" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c URI \u0441 \u043f\u0443\u0441\u0442\u044b\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442 \u043e\u0434\u043d\u043e\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0434\u043b\u044f \u043f\u0443\u0442\u0438 \u0438 \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0430" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "\u041d\u0435\u043b\u044c\u0437\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0441\u0442\u0440\u043e\u043a\u0443 \u0437\u0430\u043f\u0440\u043e\u0441\u0430 \u0432 \u0441\u0442\u0440\u043e\u043a\u0435 \u043f\u0443\u0442\u0438 \u0438 \u0437\u0430\u043f\u0440\u043e\u0441\u0430" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "\u041d\u0435\u043b\u044c\u0437\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u043f\u043e\u0440\u0442, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \u0445\u043e\u0441\u0442" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "\u041d\u0435\u043b\u044c\u0437\u044f \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u0435, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0437\u0430\u0434\u0430\u043d \u0445\u043e\u0441\u0442" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435: \u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0432\u0435\u0440\u0441\u0438\u044f \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 ''{0}''. \u042d\u0442\u0430 \u0432\u0435\u0440\u0441\u0438\u044f XML \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f. \u0412\u0435\u0440\u0441\u0438\u0435\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430 \u0432\u044b\u0432\u043e\u0434\u0430 \u0431\u0443\u0434\u0435\u0442 ''1.0''. " }, - - { MsgKey.ER_SCHEME_REQUIRED, - "\u041d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u0430 \u0441\u0445\u0435\u043c\u0430!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "\u041e\u0431\u044a\u0435\u043a\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432, \u043f\u0435\u0440\u0435\u0434\u0430\u043d\u043d\u044b\u0439 \u0432 SerializerFactory, \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0441\u0432\u043e\u0439\u0441\u0442\u0432\u043e\u043c ''{0}''. " }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "\u041f\u0440\u0435\u0434\u0443\u043f\u0440\u0435\u0436\u0434\u0435\u043d\u0438\u0435: \u041a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430 ''{0}'' \u043d\u0435 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0440\u0435\u0434\u043e\u0439 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f Java." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 ''{0}'' \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d. "}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 ''{0}'' \u0440\u0430\u0441\u043f\u043e\u0437\u043d\u0430\u043d, \u043d\u043e \u0437\u0430\u043f\u0440\u043e\u0448\u0435\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c. "}, - - {MsgKey.ER_STRING_TOO_LONG, - "\u0421\u0442\u0440\u043e\u043a\u0430 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u043b\u0438\u043d\u043d\u0430\u044f \u0434\u043b\u044f \u0440\u0430\u0437\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432 DOMString: ''{0}''. "}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "\u0422\u0438\u043f \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u0441 \u044d\u0442\u0438 \u0438\u043c\u0435\u043d\u0435\u043c \u043d\u0435\u0441\u043e\u0432\u043c\u0435\u0441\u0442\u0438\u043c \u0441 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u043c \u0442\u0438\u043f\u043e\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f. "}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "\u041d\u0435 \u0443\u043a\u0430\u0437\u0430\u043d \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043a\u0430\u0442\u0430\u043b\u043e\u0433 \u0434\u043b\u044f \u0432\u044b\u0432\u043e\u0434\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. "}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "\u041e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0430 \u043d\u0435\u043f\u043e\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u043c\u0430\u044f \u043a\u043e\u0434\u0438\u0440\u043e\u0432\u043a\u0430. "}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0443\u0437\u0435\u043b. "}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "\u0420\u0430\u0437\u0434\u0435\u043b CDATA \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043e\u0434\u0438\u043d \u0438\u043b\u0438 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u043c\u0430\u0440\u043a\u0435\u0440\u043e\u0432 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u0435\u043b\u0435\u0439 ']]>'. "}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "\u041d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u044d\u043a\u0437\u0435\u043c\u043f\u043b\u044f\u0440 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438. \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0438\u043c\u0435\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 true, \u043d\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u043e\u0441\u0442\u0438 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043d\u0435 \u0443\u0434\u0430\u043b\u043e\u0441\u044c. " - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "\u0423\u0437\u0435\u043b ''{0}'' \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b XML. " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "\u0412 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b XML (\u042e\u043d\u0438\u043a\u043e\u0434: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\u041f\u0440\u0438 \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0435 instructiondata \u0431\u044b\u043b \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b XML (\u042e\u043d\u0438\u043a\u043e\u0434: 0x{0}). " - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "\u0412 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u043c CDATASection \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b XML (\u042e\u043d\u0438\u043a\u043e\u0434: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "\u0412 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u043c\u043e\u043c \u0441\u0438\u043c\u0432\u043e\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0443\u0437\u043b\u0430 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0439 \u0441\u0438\u043c\u0432\u043e\u043b XML (\u042e\u043d\u0438\u043a\u043e\u0434: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "\u041d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u044b\u0435 \u0441\u0438\u043c\u0432\u043e\u043b\u044b XML \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u044b \u0432 \u0443\u0437\u043b\u0435 {0} \u0441 \u0438\u043c\u0435\u043d\u0435\u043c ''{1}''. " - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "\u0421\u0442\u0440\u043e\u043a\u0430 \"--\" \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u0438. " - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \"{1}\", \u0441\u0432\u044f\u0437\u0430\u043d\u043d\u043e\u0433\u043e \u0441 \u0442\u0438\u043f\u043e\u043c \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \"{0}\", \u043d\u0435 \u0434\u043e\u043b\u0436\u043d\u043e \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0441\u0438\u043c\u0432\u043e\u043b ''<''. " - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "\u041d\u0435\u043e\u0431\u0440\u0430\u0431\u043e\u0442\u0430\u043d\u043d\u0430\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \"&{0};\" \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430. " - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "\u0412\u043d\u0435\u0448\u043d\u044f\u044f \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \"&{0};\" \u043d\u0435\u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c\u0430 \u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430. " - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "\u041f\u0440\u0435\u0444\u0438\u043a\u0441 \"{0}\" \u043d\u0435 \u043c\u043e\u0436\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c\u0441\u044f \u0432 \u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0435 \u0438\u043c\u0435\u043d \"{1}\". " - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430 \"{0}\" \u043f\u0443\u0441\u0442\u043e. " - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "\u041b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0435 \u0438\u043c\u044f \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u0430 \"{0}\" \u043f\u0443\u0441\u0442\u043e. " - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "\u0422\u0435\u043a\u0441\u0442 \u0437\u0430\u043c\u0435\u043d\u044b \u0434\u043b\u044f \u0443\u0437\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \"{0}\" \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u0437\u0435\u043b \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \"{1}\" \u0441 \u043d\u0435\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \"{2}\". " - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "\u0422\u0435\u043a\u0441\u0442 \u0437\u0430\u043c\u0435\u043d\u044b \u0434\u043b\u044f \u0443\u0437\u043b\u0430 \u0437\u0430\u043f\u0438\u0441\u0438 \"{0}\" \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0443\u0437\u0435\u043b \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u043e\u0432 \"{1}\" \u0441 \u043d\u0435\u0441\u0432\u044f\u0437\u0430\u043d\u043d\u044b\u043c \u043f\u0440\u0435\u0444\u0438\u043a\u0441\u043e\u043c \"{2}\". " - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sk.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sk.java deleted file mode 100644 index 3b12f70a7..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sk.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_sk extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "K\u013e\u00fa\u010d spr\u00e1vy ''{0}'' sa nenach\u00e1dza v triede spr\u00e1v ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Zlyhal form\u00e1t spr\u00e1vy ''{0}'' v triede spr\u00e1v ''{1}''." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "Trieda serializ\u00e1tora ''{0}'' neimplementuje org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Prostriedok [ {0} ] nemohol by\u0165 n\u00e1jden\u00fd.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Prostriedok [ {0} ] sa nedal na\u010d\u00edta\u0165: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Ve\u013ekos\u0165 vyrovn\u00e1vacej pam\u00e4te <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Bolo zisten\u00e9 neplatn\u00e9 nahradenie UTF-16: {0} ?" }, - - { MsgKey.ER_OIERROR, - "chyba IO" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Nie je mo\u017en\u00e9 prida\u0165 atrib\u00fat {0} po uzloch potomka alebo pred vytvoren\u00edm elementu. Atrib\u00fat bude ignorovan\u00fd." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "N\u00e1zvov\u00fd priestor pre predponu ''{0}'' nebol deklarovan\u00fd." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Atrib\u00fat ''{0}'' je mimo prvku." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Deklar\u00e1cia n\u00e1zvov\u00e9ho priestoru ''{0}''=''{1}'' je mimo prvku." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Nebolo mo\u017en\u00e9 zavies\u0165 ''{0}'' (skontrolujte CLASSPATH), teraz sa pou\u017e\u00edvaj\u00fa iba \u0161tandardn\u00e9 nastavenia" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Pokus o v\u00fdstup znaku integr\u00e1lnej hodnoty {0}, ktor\u00e1 nie je reprezentovan\u00e1 v zadanom v\u00fdstupnom k\u00f3dovan\u00ed {1}." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Nebolo mo\u017en\u00e9 zavies\u0165 s\u00fabor vlastnost\u00ed ''{0}'' pre v\u00fdstupn\u00fa met\u00f3du ''{1}'' (skontrolujte CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "Neplatn\u00e9 \u010d\u00edslo portu" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Nem\u00f4\u017ee by\u0165 stanoven\u00fd port, ak je hostite\u013e nulov\u00fd" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Hostite\u013e nie je spr\u00e1vne form\u00e1tovan\u00e1 adresa" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Nezhodn\u00e1 sch\u00e9ma." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Nie je mo\u017en\u00e9 stanovi\u0165 sch\u00e9mu z nulov\u00e9ho re\u0165azca" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Cesta obsahuje neplatn\u00fa \u00fanikov\u00fa sekvenciu" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Cesta obsahuje neplatn\u00fd znak: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment obsahuje neplatn\u00fd znak" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Ak je cesta nulov\u00e1, nem\u00f4\u017ee by\u0165 stanoven\u00fd fragment" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment m\u00f4\u017ee by\u0165 stanoven\u00fd len pre v\u0161eobecn\u00e9 URI" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "V URI nebola n\u00e1jden\u00e1 \u017eiadna sch\u00e9ma" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Nie je mo\u017en\u00e9 inicializova\u0165 URI s pr\u00e1zdnymi parametrami" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment nem\u00f4\u017ee by\u0165 zadan\u00fd v ceste, ani vo fragmente" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "Re\u0165azec dotazu nem\u00f4\u017ee by\u0165 zadan\u00fd v ceste a re\u0165azci dotazu" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Ak nebol zadan\u00fd hostite\u013e, mo\u017eno nebol zadan\u00fd port" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Ak nebol zadan\u00fd hostite\u013e, mo\u017eno nebolo zadan\u00e9 userinfo" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Varovanie: Verzia v\u00fdstupn\u00e9ho dokumentu mus\u00ed by\u0165 povinne ''{0}''. T\u00e1to verzia XML nie je podporovan\u00e1. Verzia v\u00fdstupn\u00e9ho dokumentu bude ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Je po\u017eadovan\u00e1 sch\u00e9ma!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "Objekt Properties, ktor\u00fd pre\u0161iel do SerializerFactory, nem\u00e1 vlastnos\u0165 ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Varovanie: Java runtime nepodporuje k\u00f3dovanie ''{0}''." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Parameter ''{0}'' nebol rozpoznan\u00fd."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Parameter ''{0}'' bol rozpoznan\u00fd, ale vy\u017eadovan\u00e1 hodnota sa ned\u00e1 nastavi\u0165."}, - - {MsgKey.ER_STRING_TOO_LONG, - "V\u00fdsledn\u00fd re\u0165azec je pr\u00edli\u0161 dlh\u00fd a nezmest\u00ed sa do DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Typ hodnoty pre tento n\u00e1zov parametra je nekompatibiln\u00fd s o\u010dak\u00e1van\u00fdm typom hodnoty."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "Cie\u013e v\u00fdstupu pre zap\u00edsanie \u00fadajov bol null."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Bolo zaznamenan\u00e9 nepodporovan\u00e9 k\u00f3dovanie."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Uzol nebolo mo\u017en\u00e9 serializova\u0165."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "\u010cas\u0165 CDATA obsahuje jeden alebo viacer\u00e9 ozna\u010dova\u010de konca ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Nebolo mo\u017en\u00e9 vytvori\u0165 in\u0161tanciu kontrol\u00f3ra Well-Formedness. Parameter well-formed bol nastaven\u00fd na hodnotu true, ale kontrola well-formedness sa ned\u00e1 vykona\u0165." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Uzol ''{0}'' obsahuje neplatn\u00e9 znaky XML." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "V koment\u00e1ri bol n\u00e1jden\u00fd neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "Pri spracovan\u00ed d\u00e1t in\u0161trukci\u00ed sa na\u0161iel neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "V obsahu CDATASection sa na\u0161iel neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "V obsahu znakov\u00fdch d\u00e1t uzla sa na\u0161iel neplatn\u00fd znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "V uzle {0} s n\u00e1zvom ''{1}'' sa na\u0161iel neplatn\u00fd znak XML." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "Re\u0165azec \"--\" nie je povolen\u00fd v r\u00e1mci koment\u00e1rov." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "Hodnota atrib\u00fatu \"{1}\", ktor\u00e1 je priraden\u00e1 k prvku typu \"{0}\", nesmie obsahova\u0165 znak ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Neanalyzovan\u00fd odkaz na entitu \"&{0};\" nie je povolen\u00fd." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "Odkaz na extern\u00fa entitu \"&{0};\" nie je povolen\u00fd v hodnote atrib\u00fatu." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "Predpona \"{0}\" nem\u00f4\u017ee by\u0165 naviazan\u00e1 na n\u00e1zvov\u00fd priestor \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Lok\u00e1lny n\u00e1zov prvku \"{0}\" je null." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Lok\u00e1lny n\u00e1zov atrib\u00fatu \"{0}\" je null." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "N\u00e1hradn\u00fd text pre uzol entity \"{0}\" obsahuje uzol prvku \"{1}\" s nenaviazanou predponou \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "N\u00e1hradn\u00fd text uzla entity \"{0}\" obsahuje uzol atrib\u00fatu \"{1}\" s nenaviazanou predponou \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sl.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sl.java deleted file mode 100644 index e1059e648..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sl.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_sl extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "Klju\u010d sporo\u010dila ''{0}'' ni v rezredu sporo\u010dila ''{1}''" }, - - { MsgKey.BAD_MSGFORMAT, - "Format sporo\u010dila ''{0}'' v razredu sporo\u010dila ''{1}'' je spodletel." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "Razred serializerja ''{0}'' ne izvede org.xml.sax.ContentHandler." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Vira [ {0} ] ni mogo\u010de najti.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Sredstva [ {0} ] ni bilo mogo\u010de nalo\u017eiti: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Velikost medpomnilnika <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "Zaznan neveljaven nadomestek UTF-16: {0} ?" }, - - { MsgKey.ER_OIERROR, - "Napaka V/I" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Atributa {0} ne morem dodati za podrejenimi vozli\u0161\u010di ali pred izdelavo elementa. Atribut bo prezrt." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "Imenski prostor za predpono ''{0}'' ni bil naveden." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "Atribut ''{0}'' je zunaj elementa." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "Deklaracija imenskega prostora ''{0}''=''{1}'' je zunaj elementa." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "Ni bilo mogo\u010de nalo\u017eiti ''{0}'' (preverite CLASSPATH), trenutno se uporabljajo samo privzete vrednosti" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Poskus izpisa znaka integralne vrednosti {0}, ki v navedenem izhodnem kodiranju {1} ni zastopan." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "Datoteke z lastnostmi ''{0}'' ni bilo mogo\u010de nalo\u017eiti za izhodno metodo ''{1}'' (preverite CLASSPATH)" }, - - { MsgKey.ER_INVALID_PORT, - "Neveljavna \u0161tevilka vrat" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Ko je gostitelj NULL, nastavitev vrat ni mogo\u010da" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Naslov gostitelja ni pravilno oblikovan" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Shema ni skladna." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Ni mogo\u010de nastaviti sheme iz niza NULL" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Pot vsebuje neveljavno zaporedje za izhod" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Pot vsebuje neveljaven znak: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment vsebuje neveljaven znak" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Ko je pot NULL, nastavitev fragmenta ni mogo\u010da" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment je lahko nastavljen samo za splo\u0161ni URI" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Ne najdem sheme v URI" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Ni mogo\u010de inicializirati URI-ja s praznimi parametri" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment ne more biti hkrati naveden v poti in v fragmentu" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "Poizvedbeni niz ne more biti naveden v nizu poti in poizvedbenem nizu" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Vrata ne morejo biti navedena, \u010de ni naveden gostitelj" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Informacije o uporabniku ne morejo biti navedene, \u010de ni naveden gostitelj" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Opozorilo: Zahtevana razli\u010dica izhodnega dokumenta je ''{0}''. Ta razli\u010dica XML ni podprta. Razli\u010dica izhodnega dokumenta bo ''1.0''." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "Zahtevana je shema!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "Predmet Properties (lastnosti), ki je prene\u0161en v SerializerFactory, nima lastnosti ''{0}''." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Opozorilo: Izvajalno okolje Java ne podpira kodiranja ''{0}''." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "Parameter ''{0}'' ni prepoznan."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "Parameter ''{0}'' je prepoznan, vendar pa zahtevane vrednosti ni mogo\u010de nastaviti."}, - - {MsgKey.ER_STRING_TOO_LONG, - "Nastali niz je predolg za DOMString: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Tip vrednosti za to ime parametra je nezdru\u017eljiv s pri\u010dakovanim tipom vrednosti."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "Izhodno mesto za vpisovanje podatkov je bilo ni\u010d."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Odkrito je nepodprto kodiranje."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "Vozli\u0161\u010da ni mogo\u010de serializirati."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "Odsek CDATA vsebuje enega ali ve\u010d ozna\u010devalnikov prekinitve ']]>'."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Primerka preverjevalnika Well-Formedness ni bilo mogo\u010de ustvariti. Parameter well-formed je bil nastavljen na True, ampak ni mogo\u010de preveriti well-formedness." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "Vozli\u0161\u010de ''{0}'' vsebuje neveljavne znake XML." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "V komentarju je bil najden neveljaven XML znak (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "V podatkih navodila za obdelavo je bil najden neveljaven znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "V vsebini odseka CDATASection je bil najden neveljaven znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "V podatkovni vsebini znaka vozli\u0161\u010da je bil najden neveljaven znak XML (Unicode: 0x{0})." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "V vozli\u0161\u010du {0} z imenom ''{1}'' je bil najden neveljaven znak XML." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "Niz \"--\" ni dovoljen v komentarjih." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "Vrednost atributa \"{1}\", ki je povezan s tipom elementa \"{0}\", ne sme vsebovati znaka ''<''." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "Neraz\u010dlenjeni sklic entitete \"&{0};\" ni dovoljen." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "Zunanji sklic entitete \"&{0};\" ni dovoljen v vrednosti atributa." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "Predpona \"{0}\" ne more biti povezana z imenskim prostorom \"{1}\"." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "Lokalno ime elementa \"{0}\" je ni\u010d." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "Lokalno ime atributa \"{0}\" je ni\u010d." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "Besedilo za zamenjavo za vozli\u0161\u010de entitete \"{0}\" vsebuje vozli\u0161\u010de elementa \"{1}\" z nevezano predpono \"{2}\"." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "Besedilo za zamenjavo za vozli\u0161\u010de entitete \"{0}\" vsebuje vozli\u0161\u010de atributa \"{1}\" z nevezano predpono \"{2}\"." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sv.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sv.java deleted file mode 100644 index a300948f1..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_sv.java +++ /dev/null @@ -1,98 +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.utils; - -import java.util.ListResourceBundle; - -public class SerializerMessages_sv extends ListResourceBundle { - public Object[][] getContents() { - Object[][] contents = new Object[][] { - // BAD_MSGKEY needs translation - // BAD_MSGFORMAT needs translation - // ER_SERIALIZER_NOT_CONTENTHANDLER needs translation - // ER_RESOURCE_COULD_NOT_FIND needs translation - // ER_RESOURCE_COULD_NOT_LOAD needs translation - // ER_BUFFER_SIZE_LESSTHAN_ZERO needs translation - // ER_INVALID_UTF16_SURROGATE needs translation - // ER_OIERROR needs translation - // ER_ILLEGAL_ATTRIBUTE_POSITION needs translation - // ER_NAMESPACE_PREFIX needs translation - // ER_STRAY_ATTRIBUTE needs translation - // ER_STRAY_NAMESPACE needs translation - // ER_COULD_NOT_LOAD_RESOURCE needs translation - // ER_ILLEGAL_CHARACTER needs translation - // ER_COULD_NOT_LOAD_METHOD_PROPERTY needs translation - { MsgKey.ER_INVALID_PORT, - "Ogiltigt portnummer"}, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Port kan inte s\u00e4ttas n\u00e4r v\u00e4rd \u00e4r null"}, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "V\u00e4rd \u00e4r inte en v\u00e4lformulerad adress"}, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "Schemat \u00e4r inte likformigt."}, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Kan inte s\u00e4tta schema fr\u00e5n null-str\u00e4ng"}, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "V\u00e4g inneh\u00e5ller ogiltig flyktsekvens"}, - - { MsgKey.ER_PATH_INVALID_CHAR, - "V\u00e4g inneh\u00e5ller ogiltigt tecken: {0}"}, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Fragment inneh\u00e5ller ogiltigt tecken"}, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Fragment kan inte s\u00e4ttas n\u00e4r v\u00e4g \u00e4r null"}, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Fragment kan bara s\u00e4ttas f\u00f6r en allm\u00e4n URI"}, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "Schema saknas i URI: {0}"}, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Kan inte initialisera URI med tomma parametrar"}, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Fragment kan inte anges i b\u00e5de v\u00e4gen och fragmentet"}, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "F\u00f6rfr\u00e5gan-str\u00e4ng kan inte anges i v\u00e4g och f\u00f6rfr\u00e5gan-str\u00e4ng"}, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Port f\u00e5r inte anges om v\u00e4rden inte \u00e4r angiven"}, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Userinfo f\u00e5r inte anges om v\u00e4rden inte \u00e4r angiven"}, - - { MsgKey.ER_SCHEME_REQUIRED, - "Schema kr\u00e4vs!"} - - }; - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_tr.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_tr.java deleted file mode 100644 index acdd90f9e..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_tr.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_tr extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "''{0}'' ileti anahtar\u0131 ''{1}'' ileti s\u0131n\u0131f\u0131nda yok" }, - - { MsgKey.BAD_MSGFORMAT, - "''{1}'' ileti s\u0131n\u0131f\u0131ndaki ''{0}'' iletisinin bi\u00e7imi ba\u015far\u0131s\u0131z." }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "''{0}'' diziselle\u015ftirme s\u0131n\u0131f\u0131 org.xml.sax.ContentHandler s\u0131n\u0131f\u0131n\u0131 ger\u00e7ekle\u015ftirmiyor." }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "Kaynak [ {0} ] bulunamad\u0131.\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "Kaynak [ {0} ] y\u00fckleyemedi: {1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "Arabellek b\u00fcy\u00fckl\u00fc\u011f\u00fc <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "UTF-16 yerine kullan\u0131lan de\u011fer ge\u00e7ersiz: {0} ?" }, - - { MsgKey.ER_OIERROR, - "G\u00c7 hatas\u0131" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "Alt d\u00fc\u011f\u00fcmlerden sonra ya da bir \u00f6\u011fe \u00fcretilmeden \u00f6nce {0} \u00f6zniteli\u011fi eklenemez. \u00d6znitelik yoksay\u0131lacak." }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "''{0}'' \u00f6nekine ili\u015fkin ad alan\u0131 bildirilmedi." }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "''{0}'' \u00f6zniteli\u011fi \u00f6\u011fenin d\u0131\u015f\u0131nda." }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "''{0}''=''{1}'' ad alan\u0131 bildirimi \u00f6\u011fenin d\u0131\u015f\u0131nda." }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "''{0}'' y\u00fcklenemedi (CLASSPATH de\u011fi\u015fkeninizi inceleyin), yaln\u0131zca varsay\u0131lanlar kullan\u0131l\u0131yor" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "Belirtilen {1} \u00e7\u0131k\u0131\u015f kodlamas\u0131nda g\u00f6sterilmeyen {0} t\u00fcmlev de\u011feri karakteri \u00e7\u0131k\u0131\u015f giri\u015fimi." }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "''{1}'' \u00e7\u0131k\u0131\u015f y\u00f6ntemi i\u00e7in ''{0}'' \u00f6zellik dosyas\u0131 y\u00fcklenemedi (CLASSPATH de\u011fi\u015fkenini inceleyin)" }, - - { MsgKey.ER_INVALID_PORT, - "Kap\u0131 numaras\u0131 ge\u00e7ersiz" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "Anasistem bo\u015f de\u011ferliyken kap\u0131 tan\u0131mlanamaz" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "Anasistem do\u011fru bi\u00e7imli bir adres de\u011fil" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "\u015eema uyumlu de\u011fil." }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "Bo\u015f de\u011ferli dizgiden \u015fema tan\u0131mlanamaz" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "Yol ge\u00e7ersiz ka\u00e7\u0131\u015f dizisi i\u00e7eriyor" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "Yol ge\u00e7ersiz karakter i\u00e7eriyor: {0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "Par\u00e7a ge\u00e7ersiz karakter i\u00e7eriyor" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "Yol bo\u015f de\u011ferliyken par\u00e7a tan\u0131mlanamaz" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "Par\u00e7a yaln\u0131zca soysal URI i\u00e7in tan\u0131mlanabilir" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "URI i\u00e7inde \u015fema bulunamad\u0131" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "Bo\u015f de\u011fi\u015ftirgelerle URI kullan\u0131ma haz\u0131rlanamaz" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "Par\u00e7a hem yolda, hem de par\u00e7ada belirtilemez" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "Yol ve sorgu dizgisinde sorgu dizgisi belirtilemez" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "Anasistem belirtilmediyse kap\u0131 belirtilemez" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "Anasistem belirtilmediyse kullan\u0131c\u0131 bilgisi belirtilemez" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "Uyar\u0131: \u00c7\u0131k\u0131\u015f belgesinin s\u00fcr\u00fcm\u00fcn\u00fcn ''{0}'' olmas\u0131 isteniyor. Bu XML s\u00fcr\u00fcm\u00fc desteklenmez. \u00c7\u0131k\u0131\u015f dosyas\u0131n\u0131n s\u00fcr\u00fcm\u00fc ''1.0'' olacak." }, - - { MsgKey.ER_SCHEME_REQUIRED, - "\u015eema gerekli!" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "SerializerFactory''ye ge\u00e7irilen Properties nesnesinin bir ''{0}'' \u00f6zelli\u011fi yok." }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "Uyar\u0131: ''{0}'' kodlamas\u0131 Java Runtime taraf\u0131ndan desteklenmiyor." }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "''{0}'' de\u011fi\u015ftirgesi tan\u0131nm\u0131yor."}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "''{0}'' de\u011fi\u015ftirgesi tan\u0131n\u0131yor, ancak istenen de\u011fer tan\u0131mlanam\u0131yor."}, - - {MsgKey.ER_STRING_TOO_LONG, - "Sonu\u00e7 dizgisi DOMString i\u00e7in \u00e7ok uzun: ''{0}''."}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "Bu de\u011fi\u015ftirge ad\u0131na ili\u015fkin de\u011fer tipi, beklenen de\u011fer tipiyle uyumlu de\u011fil."}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "Yaz\u0131lacak verilerin \u00e7\u0131k\u0131\u015f hedefi bo\u015f de\u011ferli."}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "Desteklenmeyen bir kodlama saptand\u0131."}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "D\u00fc\u011f\u00fcm diziselle\u015ftirilemedi."}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "CDATA k\u0131sm\u0131nda bir ya da daha \u00e7ok ']]>' sonland\u0131rma imleyicisi var."}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "Well-Formedness denet\u015feyicisinin somut \u00f6rne\u011fi yarat\u0131lamad\u0131. well-formed de\u011fi\u015ftirgesi true de\u011ferine ayarland\u0131, ancak do\u011fru bi\u00e7im denetimi ger\u00e7ekle\u015ftirilemiyor." - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "''{0}'' d\u00fc\u011f\u00fcm\u00fc ge\u00e7ersiz XML karakterleri i\u00e7eriyor." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "A\u00e7\u0131klamada ge\u00e7ersiz bir XML karakteri (Unicode: 0x{0}) saptand\u0131." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\u0130\u015fleme y\u00f6nergesi verilerinde ge\u00e7ersiz bir XML karakteri (Unicode: 0x{0}) saptand\u0131." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "CDATASection i\u00e7eri\u011finde ge\u00e7ersiz bir XML karakteri (Unicode: 0x{0}) saptand\u0131." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "D\u00fc\u011f\u00fcm\u00fcn karakter verileri i\u00e7eri\u011finde ge\u00e7ersiz bir XML karakteri (Unicode: 0x{0}) saptand\u0131." - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "''{1}'' adl\u0131 {0} d\u00fc\u011f\u00fcm\u00fcnde ge\u00e7ersiz XML karakteri saptand\u0131." - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "A\u00e7\u0131klamalar i\u00e7inde \"--\" dizgisine izin verilmez." - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "\"{0}\" \u00f6\u011fe tipiyle ili\u015fkilendirilen \"{1}\" \u00f6zniteli\u011finin de\u011feri ''<'' karakteri i\u00e7ermemelidir." - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "\"&{0};\" ayr\u0131\u015ft\u0131r\u0131lmam\u0131\u015f varl\u0131k ba\u015fvurusuna izin verilmez." - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "\u00d6znitelik de\u011ferinde \"&{0};\" d\u0131\u015f varl\u0131k ba\u015fvurusuna izin verilmez." - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "\"{0}\" \u00f6neki \"{1}\" ad alan\u0131na ba\u011flanam\u0131yor." - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "\"{0}\" \u00f6\u011fesinin yerel ad\u0131 bo\u015f de\u011ferli." - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "\"{0}\" \u00f6zniteli\u011finin yerel ad\u0131 bo\u015f de\u011ferli." - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "\"{0}\" varl\u0131k d\u00fc\u011f\u00fcm\u00fcn\u00fcn yerine koyma metninde, ba\u011flanmam\u0131\u015f \"{2}\" \u00f6neki bulunan bir \u00f6\u011fe d\u00fc\u011f\u00fcm\u00fc (\"{1}\") var." - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "\"{0}\" varl\u0131k d\u00fc\u011f\u00fcm\u00fcn\u00fcn yerine koyma metninde, ba\u011flanmam\u0131\u015f \"{2}\" \u00f6neki bulunan bir \u00f6znitelik d\u00fc\u011f\u00fcm\u00fc (\"{1}\") var." - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh.java deleted file mode 100644 index db970ceb2..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh.java +++ /dev/null @@ -1,291 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_zh extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "\u6d88\u606f\u5bc6\u94a5\u201c{0}\u201d\u4e0d\u5728\u6d88\u606f\u7c7b\u201c{1}\u201d\u4e2d" }, - - { MsgKey.BAD_MSGFORMAT, - "\u6d88\u606f\u7c7b\u201c{1}\u201d\u4e2d\u7684\u6d88\u606f\u201c{0}\u201d\u7684\u683c\u5f0f\u65e0\u6548\u3002" }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "\u4e32\u884c\u5668\u7c7b\u201c{0}\u201d\u4e0d\u80fd\u5b9e\u73b0 org.xml.sax.ContentHandler\u3002" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "\u627e\u4e0d\u5230\u8d44\u6e90 [ {0} ]\u3002\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "\u8d44\u6e90 [ {0} ] \u65e0\u6cd5\u88c5\u5165\uff1a{1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\u7f13\u51b2\u533a\u5927\u5c0f <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\u68c0\u6d4b\u5230\u65e0\u6548\u7684 UTF-16 \u8d85\u5927\u5b57\u7b26\u96c6\uff1a{0}\uff1f" }, - - { MsgKey.ER_OIERROR, - "IO \u9519\u8bef" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "\u5728\u751f\u6210\u5b50\u8282\u70b9\u4e4b\u540e\u6216\u5728\u751f\u6210\u5143\u7d20\u4e4b\u524d\u65e0\u6cd5\u6dfb\u52a0\u5c5e\u6027 {0}\u3002\u5c06\u5ffd\u7565\u5c5e\u6027\u3002" }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "\u5c1a\u672a\u58f0\u660e\u524d\u7f00\u201c{0}\u201d\u7684\u540d\u79f0\u7a7a\u95f4\u3002" }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "\u5c5e\u6027\u201c{0}\u201d\u5728\u5143\u7d20\u5916\u3002" }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "\u540d\u79f0\u7a7a\u95f4\u58f0\u660e\u201c{0}\u201d=\u201c{1}\u201d\u5728\u5143\u7d20\u5916\u3002" }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "\u65e0\u6cd5\u88c5\u5165\u201c{0}\u201d\uff08\u68c0\u67e5 CLASSPATH\uff09\uff0c\u73b0\u5728\u53ea\u4f7f\u7528\u7f3a\u7701\u503c" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "\u5c1d\u8bd5\u8f93\u51fa\u6574\u6570\u503c {0}\uff08\u5b83\u4e0d\u662f\u4ee5\u6307\u5b9a\u7684 {1} \u8f93\u51fa\u7f16\u7801\u8868\u793a\uff09\u7684\u5b57\u7b26\u3002" }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "\u65e0\u6cd5\u4e3a\u8f93\u51fa\u65b9\u6cd5\u201c{1}\u201d\u88c5\u5165\u5c5e\u6027\u6587\u4ef6\u201c{0}\u201d\uff08\u68c0\u67e5 CLASSPATH\uff09" }, - - { MsgKey.ER_INVALID_PORT, - "\u7aef\u53e3\u53f7\u65e0\u6548" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "\u4e3b\u673a\u4e3a\u7a7a\u65f6\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u7aef\u53e3" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "\u4e3b\u673a\u4e0d\u662f\u683c\u5f0f\u6b63\u786e\u7684\u5730\u5740" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "\u6a21\u5f0f\u4e0d\u4e00\u81f4\u3002" }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "\u65e0\u6cd5\u4ece\u7a7a\u5b57\u7b26\u4e32\u8bbe\u7f6e\u6a21\u5f0f" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\u8def\u5f84\u5305\u542b\u65e0\u6548\u7684\u8f6c\u4e49\u5e8f\u5217" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "\u8def\u5f84\u5305\u542b\u65e0\u6548\u7684\u5b57\u7b26\uff1a{0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "\u7247\u6bb5\u5305\u542b\u65e0\u6548\u7684\u5b57\u7b26" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "\u8def\u5f84\u4e3a\u7a7a\u65f6\uff0c\u65e0\u6cd5\u8bbe\u7f6e\u7247\u6bb5" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "\u53ea\u80fd\u4e3a\u7c7b\u5c5e URI \u8bbe\u7f6e\u7247\u6bb5" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "URI \u4e2d\u627e\u4e0d\u5230\u4efb\u4f55\u6a21\u5f0f" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "\u4e0d\u80fd\u4ee5\u7a7a\u53c2\u6570\u521d\u59cb\u5316 URI" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "\u8def\u5f84\u548c\u7247\u6bb5\u4e2d\u90fd\u4e0d\u80fd\u6307\u5b9a\u7247\u6bb5" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "\u8def\u5f84\u548c\u67e5\u8be2\u5b57\u7b26\u4e32\u4e2d\u4e0d\u80fd\u6307\u5b9a\u67e5\u8be2\u5b57\u7b26\u4e32" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u4e3b\u673a\uff0c\u5219\u4e0d\u53ef\u4ee5\u6307\u5b9a\u7aef\u53e3" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "\u5982\u679c\u6ca1\u6709\u6307\u5b9a\u4e3b\u673a\uff0c\u5219\u4e0d\u53ef\u4ee5\u6307\u5b9a\u7528\u6237\u4fe1\u606f" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "\u8b66\u544a\uff1a\u8981\u6c42\u8f93\u51fa\u6587\u6863\u7684\u7248\u672c\u662f\u201c{0}\u201d\u3002\u4e0d\u652f\u6301\u6b64 XML \u7248\u672c\u3002\u8f93\u51fa\u6587\u6863\u7684\u7248\u672c\u5c06\u4f1a\u662f\u201c1.0\u201d\u3002" }, - - { MsgKey.ER_SCHEME_REQUIRED, - "\u6a21\u5f0f\u662f\u5fc5\u9700\u7684\uff01" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "\u4f20\u9012\u7ed9 SerializerFactory \u7684 Properties \u5bf9\u8c61\u4e0d\u5177\u6709\u5c5e\u6027\u201c{0}\u201d\u3002" }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "\u672a\u8bc6\u522b\u51fa\u53c2\u6570\u201c{0}\u201d\u3002"}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "\u5df2\u8bc6\u522b\u51fa\u53c2\u6570\u201c{0}\u201d\uff0c\u4f46\u65e0\u6cd5\u8bbe\u7f6e\u8bf7\u6c42\u7684\u503c\u3002"}, - - {MsgKey.ER_STRING_TOO_LONG, - "\u4ea7\u751f\u7684\u5b57\u7b26\u4e32\u8fc7\u957f\u4e0d\u80fd\u88c5\u5165 DOMString\uff1a\u201c{0}\u201d\u3002"}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "\u6b64\u53c2\u6570\u540d\u79f0\u7684\u503c\u7c7b\u578b\u4e0e\u671f\u671b\u7684\u503c\u7c7b\u578b\u4e0d\u517c\u5bb9\u3002"}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "\u5c06\u8981\u5199\u5165\u6570\u636e\u7684\u8f93\u51fa\u76ee\u6807\u4e3a\u7a7a\u3002"}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "\u9047\u5230\u4e0d\u53d7\u652f\u6301\u7684\u7f16\u7801\u3002"}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "\u65e0\u6cd5\u5c06\u8282\u70b9\u5e8f\u5217\u5316\u3002 "}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "CDATA \u90e8\u5206\u5305\u542b\u4e00\u4e2a\u6216\u591a\u4e2a\u7ec8\u6b62\u6807\u8bb0\u201c]]>\u201d\u3002"}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "\u65e0\u6cd5\u521b\u5efa\u683c\u5f0f\u6b63\u786e\u6027\u68c0\u67e5\u5668\u7684\u5b9e\u4f8b\u3002\u201c\u683c\u5f0f\u6b63\u786e\u201d\u53c2\u6570\u5df2\u8bbe\u7f6e\u4e3a true\uff0c\u4f46\u65e0\u6cd5\u6267\u884c\u683c\u5f0f\u6b63\u786e\u6027\u68c0\u67e5\u3002" - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "\u8282\u70b9\u201c{0}\u201d\u5305\u542b\u65e0\u6548\u7684 XML \u5b57\u7b26\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "\u5728\u6ce8\u91ca\u4e2d\u627e\u5230\u65e0\u6548\u7684 XML \u5b57\u7b26 (Unicode: 0x''{0})''\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\u5728\u5904\u7406\u6307\u4ee4\u6570\u636e\u4e2d\u627e\u5230\u65e0\u6548\u7684 XML \u5b57\u7b26 (Unicode: 0x''{0})''\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "\u5728 CDATA \u90e8\u5206\u7684\u5185\u5bb9\u4e2d\u627e\u5230\u65e0\u6548\u7684 XML \u5b57\u7b26 (Unicode: 0x''{0})''\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "\u5728\u8282\u70b9\u7684\u5b57\u7b26\u6570\u636e\u5185\u5bb9\u4e2d\u627e\u5230\u65e0\u6548\u7684 XML \u5b57\u7b26 (Unicode: 0x''{0})''\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "\u540d\u79f0\u4e3a\u201c{1})\u201d\u7684\u201c{0})\u201d\u4e2d\u627e\u5230\u65e0\u6548\u7684 XML \u5b57\u7b26\u3002" - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "\u6ce8\u91ca\u4e2d\u4e0d\u5141\u8bb8\u6709\u5b57\u7b26\u4e32\u201c--\u201d\u3002" - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "\u4e0e\u5143\u7d20\u7c7b\u578b\u201c{0}\u201d\u5173\u8054\u7684\u5c5e\u6027\u201c{1}\u201d\u7684\u503c\u4e0d\u5f97\u5305\u542b\u201c<\u201d\u5b57\u7b26\u3002" - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "\u4e0d\u5141\u8bb8\u6709\u672a\u89e3\u6790\u7684\u5b9e\u4f53\u5f15\u7528\u201c&{0};\u201d\u3002" - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "\u5c5e\u6027\u503c\u4e2d\u4e0d\u5141\u8bb8\u6709\u5916\u90e8\u5b9e\u4f53\u5f15\u7528\u201c&{0};\u201d\u3002" - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "\u524d\u7f00\u201c{0}\u201d\u4e0d\u80fd\u7ed1\u5b9a\u5230\u540d\u79f0\u7a7a\u95f4\u201c{1}\u201d\u3002" - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "\u5143\u7d20\u201c{0}\u201d\u7684\u5c40\u90e8\u540d\u4e3a\u7a7a\u3002" - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "\u5c5e\u6027\u201c{0}\u201d\u7684\u5c40\u90e8\u540d\u4e3a\u7a7a\u3002" - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "\u5b9e\u4f53\u8282\u70b9\u201c{0}\u201d\u7684\u66ff\u4ee3\u6587\u672c\u4e2d\u5305\u542b\u5143\u7d20\u8282\u70b9\u201c{1}\u201d\uff0c\u8be5\u8282\u70b9\u5177\u6709\u672a\u7ed1\u5b9a\u7684\u524d\u7f00\u201c{2}\u201d\u3002" - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "\u5b9e\u4f53\u8282\u70b9\u201c{0}\u201d\u7684\u66ff\u4ee3\u6587\u672c\u4e2d\u5305\u542b\u5c5e\u6027\u8282\u70b9\u201c{1}\u201d\uff0c\u8be5\u8282\u70b9\u5177\u6709\u672a\u7ed1\u5b9a\u7684\u524d\u7f00\u201c{2}\u201d\u3002" - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_CN.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_CN.java deleted file mode 100644 index 681147f04..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_CN.java +++ /dev/null @@ -1,28 +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.utils; - -import java.util.ListResourceBundle; - -public class SerializerMessages_zh_CN extends SerializerMessages_zh -{ -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_TW.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_TW.java deleted file mode 100644 index f1f385740..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SerializerMessages_zh_TW.java +++ /dev/null @@ -1,293 +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.utils; - -import java.util.ListResourceBundle; -import java.util.Locale; -import java.util.MissingResourceException; -import java.util.ResourceBundle; - -/** - * An instance of this class is a ListResourceBundle that - * has the required getContents() method that returns - * an array of message-key/message associations. - *

- * The message keys are defined in {@link MsgKey}. The - * messages that those keys map to are defined here. - *

- * The messages in the English version are intended to be - * translated. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public class SerializerMessages_zh_TW extends ListResourceBundle { - - /* - * This file contains error and warning messages related to - * Serializer Error Handling. - * - * General notes to translators: - - * 1) A stylesheet is a description of how to transform an input XML document - * into a resultant XML document (or HTML document or text). The - * stylesheet itself is described in the form of an XML document. - - * - * 2) An element is a mark-up tag in an XML document; an attribute is a - * modifier on the tag. For example, in - * "elem" is an element name, "attr" and "attr2" are attribute names with - * the values "val" and "val2", respectively. - * - * 3) A namespace declaration is a special attribute that is used to associate - * a prefix with a URI (the namespace). The meanings of element names and - * attribute names that use that prefix are defined with respect to that - * namespace. - * - * - */ - - /** The lookup table for error messages. */ - public Object[][] getContents() { - Object[][] contents = new Object[][] { - { MsgKey.BAD_MSGKEY, - "\u8a0a\u606f\u9375 ''{0}'' \u4e0d\u5728\u8a0a\u606f\u985e\u5225 ''{1}'' \u4e2d" }, - - { MsgKey.BAD_MSGFORMAT, - "\u8a0a\u606f\u985e\u5225 ''{1}'' \u4e2d\u7684\u8a0a\u606f ''{0}'' \u683c\u5f0f\u5316\u5931\u6557\u3002" }, - - { MsgKey.ER_SERIALIZER_NOT_CONTENTHANDLER, - "Serializer \u985e\u5225 ''{0}'' \u4e0d\u5be6\u4f5c org.xml.sax.ContentHandler\u3002" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_FIND, - "\u627e\u4e0d\u5230\u8cc7\u6e90 [ {0} ]\u3002\n {1}" }, - - { MsgKey.ER_RESOURCE_COULD_NOT_LOAD, - "\u7121\u6cd5\u8f09\u5165\u8cc7\u6e90 [ {0} ]\uff1a{1} \n {2} \t {3}" }, - - { MsgKey.ER_BUFFER_SIZE_LESSTHAN_ZERO, - "\u7de9\u885d\u5340\u5927\u5c0f <=0" }, - - { MsgKey.ER_INVALID_UTF16_SURROGATE, - "\u5075\u6e2c\u5230\u7121\u6548\u7684 UTF-16 \u4ee3\u7406\uff1a{0}?" }, - - { MsgKey.ER_OIERROR, - "IO \u932f\u8aa4" }, - - { MsgKey.ER_ILLEGAL_ATTRIBUTE_POSITION, - "\u5728\u7522\u751f\u5b50\u9805\u7bc0\u9ede\u4e4b\u5f8c\uff0c\u6216\u5728\u7522\u751f\u5143\u7d20\u4e4b\u524d\uff0c\u4e0d\u53ef\u65b0\u589e\u5c6c\u6027 {0}\u3002\u5c6c\u6027\u6703\u88ab\u5ffd\u7565\u3002" }, - - /* - * Note to translators: The stylesheet contained a reference to a - * namespace prefix that was undefined. The value of the substitution - * text is the name of the prefix. - */ - { MsgKey.ER_NAMESPACE_PREFIX, - "\u5b57\u9996 ''{0}'' \u7684\u540d\u7a31\u7a7a\u9593\u5c1a\u672a\u5ba3\u544a\u3002" }, - - /* - * Note to translators: This message is reported if the stylesheet - * being processed attempted to construct an XML document with an - * attribute in a place other than on an element. The substitution text - * specifies the name of the attribute. - */ - { MsgKey.ER_STRAY_ATTRIBUTE, - "\u5c6c\u6027 ''{0}'' \u8d85\u51fa\u5143\u7d20\u5916\u3002" }, - - /* - * Note to translators: As with the preceding message, a namespace - * declaration has the form of an attribute and is only permitted to - * appear on an element. The substitution text {0} is the namespace - * prefix and {1} is the URI that was being used in the erroneous - * namespace declaration. - */ - { MsgKey.ER_STRAY_NAMESPACE, - "\u540d\u7a31\u7a7a\u9593\u5ba3\u544a ''{0}''=''{1}'' \u8d85\u51fa\u5143\u7d20\u5916\u3002" }, - - { MsgKey.ER_COULD_NOT_LOAD_RESOURCE, - "\u7121\u6cd5\u8f09\u5165 ''{0}''\uff08\u6aa2\u67e5 CLASSPATH\uff09\uff0c\u76ee\u524d\u53ea\u4f7f\u7528\u9810\u8a2d\u503c" }, - - { MsgKey.ER_ILLEGAL_CHARACTER, - "\u8a66\u5716\u8f38\u51fa\u4e0d\u662f\u4ee5\u6307\u5b9a\u7684\u8f38\u51fa\u7de8\u78bc {1} \u5448\u73fe\u7684\u6574\u6578\u503c {0} \u7684\u5b57\u5143\u3002" }, - - { MsgKey.ER_COULD_NOT_LOAD_METHOD_PROPERTY, - "\u7121\u6cd5\u8f09\u5165\u8f38\u51fa\u65b9\u6cd5 ''{1}''\uff08\u6aa2\u67e5 CLASSPATH\uff09\u7684\u5167\u5bb9\u6a94 ''{0}''" }, - - { MsgKey.ER_INVALID_PORT, - "\u7121\u6548\u7684\u57e0\u7de8\u865f" }, - - { MsgKey.ER_PORT_WHEN_HOST_NULL, - "\u4e3b\u6a5f\u70ba\u7a7a\u503c\u6642\uff0c\u7121\u6cd5\u8a2d\u5b9a\u57e0" }, - - { MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, - "\u4e3b\u6a5f\u6c92\u6709\u5b8c\u6574\u7684\u4f4d\u5740" }, - - { MsgKey.ER_SCHEME_NOT_CONFORMANT, - "\u7db1\u8981\u4e0d\u662f conformant\u3002" }, - - { MsgKey.ER_SCHEME_FROM_NULL_STRING, - "\u7121\u6cd5\u5f9e\u7a7a\u5b57\u4e32\u8a2d\u5b9a\u7db1\u8981" }, - - { MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, - "\u8def\u5f91\u5305\u542b\u7121\u6548\u7684\u8df3\u812b\u5b57\u5143" }, - - { MsgKey.ER_PATH_INVALID_CHAR, - "\u8def\u5f91\u5305\u542b\u7121\u6548\u7684\u5b57\u5143\uff1a{0}" }, - - { MsgKey.ER_FRAG_INVALID_CHAR, - "\u7247\u6bb5\u5305\u542b\u7121\u6548\u7684\u5b57\u5143" }, - - { MsgKey.ER_FRAG_WHEN_PATH_NULL, - "\u8def\u5f91\u70ba\u7a7a\u503c\u6642\uff0c\u7121\u6cd5\u8a2d\u5b9a\u7247\u6bb5" }, - - { MsgKey.ER_FRAG_FOR_GENERIC_URI, - "\u53ea\u80fd\u5c0d\u901a\u7528\u7684 URI \u8a2d\u5b9a\u7247\u6bb5" }, - - { MsgKey.ER_NO_SCHEME_IN_URI, - "\u5728 URI \u627e\u4e0d\u5230\u7db1\u8981" }, - - { MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, - "\u7121\u6cd5\u4ee5\u7a7a\u767d\u53c3\u6578\u8d77\u59cb\u8a2d\u5b9a URI" }, - - { MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, - "\u7247\u6bb5\u7121\u6cd5\u540c\u6642\u5728\u8def\u5f91\u548c\u7247\u6bb5\u4e2d\u6307\u5b9a" }, - - { MsgKey.ER_NO_QUERY_STRING_IN_PATH, - "\u5728\u8def\u5f91\u53ca\u67e5\u8a62\u5b57\u4e32\u4e2d\u4e0d\u53ef\u6307\u5b9a\u67e5\u8a62\u5b57\u4e32" }, - - { MsgKey.ER_NO_PORT_IF_NO_HOST, - "\u5982\u679c\u6c92\u6709\u6307\u5b9a\u4e3b\u6a5f\uff0c\u4e0d\u53ef\u6307\u5b9a\u57e0" }, - - { MsgKey.ER_NO_USERINFO_IF_NO_HOST, - "\u5982\u679c\u6c92\u6709\u6307\u5b9a\u4e3b\u6a5f\uff0c\u4e0d\u53ef\u6307\u5b9a Userinfo" }, - { MsgKey.ER_XML_VERSION_NOT_SUPPORTED, - "\u8b66\u544a\uff1a\u8f38\u51fa\u6587\u4ef6\u7684\u7248\u672c\u8981\u6c42\u662f ''{0}''\u3002\u672a\u652f\u63f4\u9019\u500b\u7248\u672c\u7684 XML\u3002\u8f38\u51fa\u6587\u4ef6\u7684\u7248\u672c\u6703\u662f ''1.0''\u3002" }, - - { MsgKey.ER_SCHEME_REQUIRED, - "\u7db1\u8981\u662f\u5fc5\u9700\u7684\uff01" }, - - /* - * Note to translators: The words 'Properties' and - * 'SerializerFactory' in this message are Java class names - * and should not be translated. - */ - { MsgKey.ER_FACTORY_PROPERTY_MISSING, - "\u50b3\u905e\u5230 SerializerFactory \u7684 Properties \u7269\u4ef6\u6c92\u6709 ''{0}'' \u5167\u5bb9\u3002" }, - - { MsgKey.ER_ENCODING_NOT_SUPPORTED, - "\u8b66\u544a\uff1aJava \u57f7\u884c\u6642\u671f\u4e0d\u652f\u63f4\u7de8\u78bc ''{0}''\u3002" }, - - {MsgKey.ER_FEATURE_NOT_FOUND, - "\u7121\u6cd5\u8fa8\u8b58\u53c3\u6578 ''{0}''\u3002"}, - - {MsgKey.ER_FEATURE_NOT_SUPPORTED, - "\u53ef\u8fa8\u8b58 ''{0}'' \u53c3\u6578\uff0c\u4f46\u6240\u8981\u6c42\u7684\u503c\u7121\u6cd5\u8a2d\u5b9a\u3002"}, - - {MsgKey.ER_STRING_TOO_LONG, - "\u7d50\u679c\u5b57\u4e32\u904e\u9577\uff0c\u7121\u6cd5\u7f6e\u5165 DOMString: ''{0}'' \u4e2d\u3002"}, - - {MsgKey.ER_TYPE_MISMATCH_ERR, - "\u9019\u500b\u53c3\u6578\u540d\u7a31\u7684\u503c\u985e\u578b\u8207\u671f\u671b\u503c\u985e\u578b\u4e0d\u76f8\u5bb9\u3002"}, - - {MsgKey.ER_NO_OUTPUT_SPECIFIED, - "\u8cc7\u6599\u8981\u5beb\u5165\u7684\u8f38\u51fa\u76ee\u7684\u5730\u70ba\u7a7a\u503c\u3002"}, - - {MsgKey.ER_UNSUPPORTED_ENCODING, - "\u767c\u73fe\u4e0d\u652f\u63f4\u7684\u7de8\u78bc\u3002"}, - - {MsgKey.ER_UNABLE_TO_SERIALIZE_NODE, - "\u7bc0\u9ede\u7121\u6cd5\u5e8f\u5217\u5316\u3002"}, - - {MsgKey.ER_CDATA_SECTIONS_SPLIT, - "CDATA \u5340\u6bb5\u5305\u542b\u4e00\u6216\u591a\u500b\u7d42\u6b62\u6a19\u8a18 ']]>'\u3002"}, - - {MsgKey.ER_WARNING_WF_NOT_CHECKED, - "\u7121\u6cd5\u5efa\u7acb\u300c\u5f62\u5f0f\u5b8c\u6574\u300d\u6aa2\u67e5\u7a0b\u5f0f\u7684\u5be6\u4f8b\u3002Well-formed \u53c3\u6578\u96d6\u8a2d\u70ba true\uff0c\u4f46\u7121\u6cd5\u57f7\u884c\u5f62\u5f0f\u5b8c\u6574\u6aa2\u67e5\u3002" - }, - - {MsgKey.ER_WF_INVALID_CHARACTER, - "\u7bc0\u9ede ''{0}'' \u5305\u542b\u7121\u6548\u7684 XML \u5b57\u5143\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_COMMENT, - "\u5728\u8a3b\u89e3\u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_PI, - "\u5728\u8655\u7406\u7a0b\u5e8f instructiondata \u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_CDATA, - "\u5728 CDATASection \u7684\u5167\u5bb9\u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_TEXT, - "\u5728\u7bc0\u9ede\u7684\u5b57\u5143\u8cc7\u6599\u5167\u5bb9\u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143 (Unicode: 0x{0})\u3002" - }, - - { MsgKey.ER_WF_INVALID_CHARACTER_IN_NODE_NAME, - "\u5728\u540d\u70ba ''{1}'' \u7684 ''{0}'' \u4e2d\u767c\u73fe\u7121\u6548\u7684 XML \u5b57\u5143\u3002" - }, - - { MsgKey.ER_WF_DASH_IN_COMMENT, - "\u8a3b\u89e3\u4e2d\u4e0d\u5141\u8a31\u4f7f\u7528\u5b57\u4e32 \"--\"\u3002" - }, - - {MsgKey.ER_WF_LT_IN_ATTVAL, - "\u8207\u5143\u7d20\u985e\u578b \"{0}\" \u76f8\u95dc\u806f\u7684\u5c6c\u6027 \"{1}\" \u503c\u4e0d\u53ef\u5305\u542b ''<'' \u5b57\u5143\u3002" - }, - - {MsgKey.ER_WF_REF_TO_UNPARSED_ENT, - "\u4e0d\u5141\u8a31\u4f7f\u7528\u672a\u5256\u6790\u7684\u5be6\u9ad4\u53c3\u7167 \"&{0};\"\u3002" - }, - - {MsgKey.ER_WF_REF_TO_EXTERNAL_ENT, - "\u5c6c\u6027\u503c\u4e2d\u4e0d\u5141\u8a31\u4f7f\u7528\u5916\u90e8\u5be6\u9ad4\u53c3\u7167 \"&{0};\"\u3002" - }, - - {MsgKey.ER_NS_PREFIX_CANNOT_BE_BOUND, - "\u5b57\u9996 \"{0}\" \u7121\u6cd5\u9023\u7d50\u5230\u540d\u7a31\u7a7a\u9593 \"{1}\"\u3002" - }, - - {MsgKey.ER_NULL_LOCAL_ELEMENT_NAME, - "\u5143\u7d20 \"{0}\" \u7684\u672c\u7aef\u540d\u7a31\u662f\u7a7a\u503c\u3002" - }, - - {MsgKey.ER_NULL_LOCAL_ATTR_NAME, - "\u5c6c\u6027 \"{0}\" \u7684\u672c\u7aef\u540d\u7a31\u662f\u7a7a\u503c\u3002" - }, - - { MsgKey.ER_ELEM_UNBOUND_PREFIX_IN_ENTREF, - "\u5be6\u9ad4\u7bc0\u9ede \"{0}\" \u7684\u53d6\u4ee3\u6587\u5b57\u5305\u542b\u9644\u6709\u5df2\u5207\u65b7\u9023\u7d50\u5b57\u9996 \"{2}\" \u7684\u5143\u7d20\u7bc0\u9ede \"{1}\"\u3002" - }, - - { MsgKey.ER_ATTR_UNBOUND_PREFIX_IN_ENTREF, - "\u5be6\u9ad4\u7bc0\u9ede \"{0}\" \u7684\u53d6\u4ee3\u6587\u5b57\u5305\u542b\u9644\u6709\u5df2\u5207\u65b7\u9023\u7d50\u5b57\u9996 \"{2}\" \u7684\u5c6c\u6027\u7bc0\u9ede \"{1}\"\u3002" - }, - - }; - - return contents; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java b/serializer/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java deleted file mode 100644 index 2bf687462..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/StringToIntTable.java +++ /dev/null @@ -1,203 +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.utils; - -/** - * A very simple lookup table that stores a list of strings, the even - * number strings being keys, and the odd number strings being values. - * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * - * This class is not a public API, it is only public so it can be used - * in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public final class StringToIntTable -{ - - public static final int INVALID_KEY = -10000; - - /** Block size to allocate */ - private int m_blocksize; - - /** Array of strings this table points to. Associated with ints - * in m_values */ - private String m_map[]; - - /** Array of ints this table points. Associated with strings from - * m_map. */ - private int m_values[]; - - /** Number of ints in the table */ - private int m_firstFree = 0; - - /** Size of this table */ - private int m_mapSize; - - /** - * Default constructor. Note that the default - * block size is very small, for small lists. - */ - public StringToIntTable() - { - - m_blocksize = 8; - m_mapSize = m_blocksize; - m_map = new String[m_blocksize]; - m_values = new int[m_blocksize]; - } - - /** - * Construct a StringToIntTable, using the given block size. - * - * @param blocksize Size of block to allocate - */ - public StringToIntTable(int blocksize) - { - - m_blocksize = blocksize; - m_mapSize = blocksize; - m_map = new String[blocksize]; - m_values = new int[m_blocksize]; - } - - /** - * Get the length of the list. - * - * @return the length of the list - */ - public final int getLength() - { - return m_firstFree; - } - - /** - * Append a string onto the vector. - * - * @param key String to append - * @param value The int value of the string - */ - public final void put(String key, int value) - { - - if ((m_firstFree + 1) >= m_mapSize) - { - m_mapSize += m_blocksize; - - String newMap[] = new String[m_mapSize]; - - System.arraycopy(m_map, 0, newMap, 0, m_firstFree + 1); - - m_map = newMap; - - int newValues[] = new int[m_mapSize]; - - System.arraycopy(m_values, 0, newValues, 0, m_firstFree + 1); - - m_values = newValues; - } - - m_map[m_firstFree] = key; - m_values[m_firstFree] = value; - - m_firstFree++; - } - - /** - * Tell if the table contains the given string. - * - * @param key String to look for - * - * @return The String's int value - * - */ - public final int get(String key) - { - - for (int i = 0; i < m_firstFree; i++) - { - if (m_map[i].equals(key)) - return m_values[i]; - } - - return INVALID_KEY; - } - - /** - * Tell if the table contains the given string. Ignore case. - * - * @param key String to look for - * - * @return The string's int value - */ - public final int getIgnoreCase(String key) - { - - if (null == key) - return INVALID_KEY; - - for (int i = 0; i < m_firstFree; i++) - { - if (m_map[i].equalsIgnoreCase(key)) - return m_values[i]; - } - - return INVALID_KEY; - } - - /** - * Tell if the table contains the given string. - * - * @param key String to look for - * - * @return True if the string is in the table - */ - public final boolean contains(String key) - { - - for (int i = 0; i < m_firstFree; i++) - { - if (m_map[i].equals(key)) - return true; - } - - return false; - } - - /** - * Return array of keys in the table. - * - * @return Array of strings - */ - public final String[] keys() - { - String [] keysArr = new String[m_firstFree]; - - for (int i = 0; i < m_firstFree; i++) - { - keysArr[i] = m_map[i]; - } - - return keysArr; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/SystemIDResolver.java b/serializer/src/main/java/org/apache/xml/serializer/utils/SystemIDResolver.java deleted file mode 100644 index 48906ea75..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/SystemIDResolver.java +++ /dev/null @@ -1,302 +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.utils; - -import java.io.File; - -import javax.xml.transform.TransformerException; - -import org.apache.xml.serializer.utils.URI.MalformedURIException; - -/** - * This class is used to resolve relative URIs and SystemID - * strings into absolute URIs. - * - *

This is a generic utility for resolving URIs, other than the - * fact that it's declared to throw TransformerException. Please - * see code comments for details on how resolution is performed.

- * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * - * This class is not a public API, it is only public because it is - * used in org.apache.xml.serializer. - * - * @xsl.usage internal - */ -public final class SystemIDResolver -{ - - /** - * Get an absolute URI from a given relative URI (local path). - * - *

The relative URI is a local filesystem path. The path can be - * absolute or relative. If it is a relative path, it is resolved relative - * to the system property "user.dir" if it is available; if not (i.e. in an - * Applet perhaps which throws SecurityException) then we just return the - * relative path. The space and backslash characters are also replaced to - * generate a good absolute URI.

- * - * @param localPath The relative URI to resolve - * - * @return Resolved absolute URI - */ - public static String getAbsoluteURIFromRelative(String localPath) - { - if (localPath == null || localPath.length() == 0) - return ""; - - // If the local path is a relative path, then it is resolved against - // the "user.dir" system property. - String absolutePath = localPath; - if (!isAbsolutePath(localPath)) - { - try - { - absolutePath = getAbsolutePathFromRelativePath(localPath); - } - // user.dir not accessible from applet - catch (SecurityException se) - { - return "file:" + localPath; - } - } - - String urlString; - if (null != absolutePath) - { - if (absolutePath.startsWith(File.separator)) - urlString = "file://" + absolutePath; - else - urlString = "file:///" + absolutePath; - } - else - urlString = "file:" + localPath; - - return replaceChars(urlString); - } - - /** - * Return an absolute path from a relative path. - * - * @param relativePath A relative path - * @return The absolute path - */ - private static String getAbsolutePathFromRelativePath(String relativePath) - { - return new File(relativePath).getAbsolutePath(); - } - - /** - * Return true if the systemId denotes an absolute URI . - * - * @param systemId The systemId string - * @return true if the systemId is an an absolute URI - */ - public static boolean isAbsoluteURI(String systemId) - { - /** http://www.ietf.org/rfc/rfc2396.txt - * Authors should be aware that a path segment which contains a colon - * character cannot be used as the first segment of a relative URI path - * (e.g., "this:that"), because it would be mistaken for a scheme name. - **/ - /** - * %REVIEW% Can we assume here that systemId is a valid URI? - * It looks like we cannot ( See discussion of this common problem in - * Bugzilla Bug 22777 ). - **/ - //"fix" for Bugzilla Bug 22777 - if(isWindowsAbsolutePath(systemId)){ - return false; - } - - final int fragmentIndex = systemId.indexOf('#'); - final int queryIndex = systemId.indexOf('?'); - final int slashIndex = systemId.indexOf('/'); - final int colonIndex = systemId.indexOf(':'); - - //finding substring before '#', '?', and '/' - int index = systemId.length() -1; - if(fragmentIndex > 0) - index = fragmentIndex; - if((queryIndex > 0) && (queryIndex 0) && (slashIndex 0) && (colonIndex 2 - && systemId.charAt(1) == ':' - && Character.isLetter(systemId.charAt(0)) - && (systemId.charAt(2) == '\\' || systemId.charAt(2) == '/')) - return true; - else - return false; - } - - /** - * Replace spaces with "%20" and backslashes with forward slashes in - * the input string to generate a well-formed URI string. - * - * @param str The input string - * @return The string after conversion - */ - private static String replaceChars(String str) - { - StringBuffer buf = new StringBuffer(str); - int length = buf.length(); - for (int i = 0; i < length; i++) - { - char currentChar = buf.charAt(i); - // Replace space with "%20" - if (currentChar == ' ') - { - buf.setCharAt(i, '%'); - buf.insert(i+1, "20"); - length = length + 2; - i = i + 2; - } - // Replace backslash with forward slash - else if (currentChar == '\\') - { - buf.setCharAt(i, '/'); - } - } - - return buf.toString(); - } - - /** - * Take a SystemID string and try to turn it into a good absolute URI. - * - * @param systemId A URI string, which may be absolute or relative. - * - * @return The resolved absolute URI - */ - public static String getAbsoluteURI(String systemId) - { - String absoluteURI = systemId; - if (isAbsoluteURI(systemId)) - { - // Only process the systemId if it starts with "file:". - if (systemId.startsWith("file:")) - { - String str = systemId.substring(5); - - // Resolve the absolute path if the systemId starts with "file:///" - // or "file:/". Don't do anything if it only starts with "file://". - if (str != null && str.startsWith("/")) - { - if (str.startsWith("///") || !str.startsWith("//")) - { - // A Windows path containing a drive letter can be relative. - // A Unix path starting with "file:/" is always absolute. - int secondColonIndex = systemId.indexOf(':', 5); - if (secondColonIndex > 0) - { - String localPath = systemId.substring(secondColonIndex-1); - try { - if (!isAbsolutePath(localPath)) - absoluteURI = systemId.substring(0, secondColonIndex-1) + - getAbsolutePathFromRelativePath(localPath); - } - catch (SecurityException se) { - return systemId; - } - } - } - } - else - { - return getAbsoluteURIFromRelative(systemId.substring(5)); - } - - return replaceChars(absoluteURI); - } - else - return systemId; - } - else - return getAbsoluteURIFromRelative(systemId); - - } - - - /** - * Take a SystemID string and try to turn it into a good absolute URI. - * - * @param urlString SystemID string - * @param base The URI string used as the base for resolving the systemID - * - * @return The resolved absolute URI - * @throws TransformerException thrown if the string can't be turned into a URI. - */ - public static String getAbsoluteURI(String urlString, String base) - throws TransformerException - { - if (base == null) - return getAbsoluteURI(urlString); - - String absoluteBase = getAbsoluteURI(base); - URI uri = null; - try - { - URI baseURI = new URI(absoluteBase); - uri = new URI(baseURI, urlString); - } - catch (MalformedURIException mue) - { - throw new TransformerException(mue); - } - - return replaceChars(uri.toString()); - } - -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/URI.java b/serializer/src/main/java/org/apache/xml/serializer/utils/URI.java deleted file mode 100644 index 2c8794d39..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/URI.java +++ /dev/null @@ -1,1653 +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.utils; - -import java.io.IOException; -import java.io.Serializable; - - -/** - * A class to represent a Uniform Resource Identifier (URI). This class - * is designed to handle the parsing of URIs and provide access to - * the various components (scheme, host, port, userinfo, path, query - * string and fragment) that may constitute a URI. - *

- * Parsing of a URI specification is done according to the URI - * syntax described in RFC 2396 - * . Every URI consists - * of a scheme, followed by a colon (':'), followed by a scheme-specific - * part. For URIs that follow the "generic URI" syntax, the scheme- - * specific part begins with two slashes ("//") and may be followed - * by an authority segment (comprised of user information, host, and - * port), path segment, query segment and fragment. Note that RFC 2396 - * no longer specifies the use of the parameters segment and excludes - * the "user:password" syntax as part of the authority segment. If - * "user:password" appears in a URI, the entire user/password string - * is stored as userinfo. - *

- * For URIs that do not follow the "generic URI" syntax (e.g. mailto), - * the entire scheme-specific part is treated as the "path" portion - * of the URI. - *

- * Note that, unlike the java.net.URL class, this class does not provide - * any built-in network access functionality nor does it provide any - * scheme-specific functionality (for example, it does not know a - * default port for a specific scheme). Rather, it only knows the - * grammar and basic set of operations that can be applied to a URI. - * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * - * A minor change from the original is that this class no longer implements - * Serializable, and the serialVersionUID magic field is dropped, and - * the class is no longer "public". - * - * @xsl.usage internal - */ -final class URI -{ - /** - * MalformedURIExceptions are thrown in the process of building a URI - * or setting fields on a URI when an operation would result in an - * invalid URI specification. - * - */ - public static class MalformedURIException extends IOException - { - - /** - * Constructs a MalformedURIException with no specified - * detail message. - */ - public MalformedURIException() - { - super(); - } - - /** - * Constructs a MalformedURIException with the - * specified detail message. - * - * @param p_msg the detail message. - */ - public MalformedURIException(String p_msg) - { - super(p_msg); - } - } - - /** reserved characters */ - private static final String RESERVED_CHARACTERS = ";/?:@&=+$,"; - - /** - * URI punctuation mark characters - these, combined with - * alphanumerics, constitute the "unreserved" characters - */ - private static final String MARK_CHARACTERS = "-_.!~*'() "; - - /** scheme can be composed of alphanumerics and these characters */ - private static final String SCHEME_CHARACTERS = "+-."; - - /** - * userinfo can be composed of unreserved, escaped and these - * characters - */ - private static final String USERINFO_CHARACTERS = ";:&=+$,"; - - /** Stores the scheme (usually the protocol) for this URI. - * @serial */ - private String m_scheme = null; - - /** If specified, stores the userinfo for this URI; otherwise null. - * @serial */ - private String m_userinfo = null; - - /** If specified, stores the host for this URI; otherwise null. - * @serial */ - private String m_host = null; - - /** If specified, stores the port for this URI; otherwise -1. - * @serial */ - private int m_port = -1; - - /** If specified, stores the path for this URI; otherwise null. - * @serial */ - private String m_path = null; - - /** - * If specified, stores the query string for this URI; otherwise - * null. - * @serial - */ - private String m_queryString = null; - - /** If specified, stores the fragment for this URI; otherwise null. - * @serial */ - private String m_fragment = null; - - /** Indicate whether in DEBUG mode */ - private static boolean DEBUG = false; - - /** - * Construct a new and uninitialized URI. - */ - public URI(){} - - /** - * Construct a new URI from another URI. All fields for this URI are - * set equal to the fields of the URI passed in. - * - * @param p_other the URI to copy (cannot be null) - */ - public URI(URI p_other) - { - initialize(p_other); - } - - /** - * Construct a new URI from a URI specification string. If the - * specification follows the "generic URI" syntax, (two slashes - * following the first colon), the specification will be parsed - * accordingly - setting the scheme, userinfo, host,port, path, query - * string and fragment fields as necessary. If the specification does - * not follow the "generic URI" syntax, the specification is parsed - * into a scheme and scheme-specific part (stored as the path) only. - * - * @param p_uriSpec the URI specification string (cannot be null or - * empty) - * - * @throws MalformedURIException if p_uriSpec violates any syntax - * rules - */ - public URI(String p_uriSpec) throws MalformedURIException - { - this((URI) null, p_uriSpec); - } - - /** - * Construct a new URI from a base URI and a URI specification string. - * The URI specification string may be a relative URI. - * - * @param p_base the base URI (cannot be null if p_uriSpec is null or - * empty) - * @param p_uriSpec the URI specification string (cannot be null or - * empty if p_base is null) - * - * @throws MalformedURIException if p_uriSpec violates any syntax - * rules - */ - public URI(URI p_base, String p_uriSpec) throws MalformedURIException - { - initialize(p_base, p_uriSpec); - } - - /** - * Construct a new URI that does not follow the generic URI syntax. - * Only the scheme and scheme-specific part (stored as the path) are - * initialized. - * - * @param p_scheme the URI scheme (cannot be null or empty) - * @param p_schemeSpecificPart the scheme-specific part (cannot be - * null or empty) - * - * @throws MalformedURIException if p_scheme violates any - * syntax rules - */ - public URI(String p_scheme, String p_schemeSpecificPart) - throws MalformedURIException - { - - if (p_scheme == null || p_scheme.trim().length() == 0) - { - throw new MalformedURIException( - "Cannot construct URI with null/empty scheme!"); - } - - if (p_schemeSpecificPart == null - || p_schemeSpecificPart.trim().length() == 0) - { - throw new MalformedURIException( - "Cannot construct URI with null/empty scheme-specific part!"); - } - - setScheme(p_scheme); - setPath(p_schemeSpecificPart); - } - - /** - * Construct a new URI that follows the generic URI syntax from its - * component parts. Each component is validated for syntax and some - * basic semantic checks are performed as well. See the individual - * setter methods for specifics. - * - * @param p_scheme the URI scheme (cannot be null or empty) - * @param p_host the hostname or IPv4 address for the URI - * @param p_path the URI path - if the path contains '?' or '#', - * then the query string and/or fragment will be - * set from the path; however, if the query and - * fragment are specified both in the path and as - * separate parameters, an exception is thrown - * @param p_queryString the URI query string (cannot be specified - * if path is null) - * @param p_fragment the URI fragment (cannot be specified if path - * is null) - * - * @throws MalformedURIException if any of the parameters violates - * syntax rules or semantic rules - */ - public URI(String p_scheme, String p_host, String p_path, String p_queryString, String p_fragment) - throws MalformedURIException - { - this(p_scheme, null, p_host, -1, p_path, p_queryString, p_fragment); - } - - /** - * Construct a new URI that follows the generic URI syntax from its - * component parts. Each component is validated for syntax and some - * basic semantic checks are performed as well. See the individual - * setter methods for specifics. - * - * @param p_scheme the URI scheme (cannot be null or empty) - * @param p_userinfo the URI userinfo (cannot be specified if host - * is null) - * @param p_host the hostname or IPv4 address for the URI - * @param p_port the URI port (may be -1 for "unspecified"; cannot - * be specified if host is null) - * @param p_path the URI path - if the path contains '?' or '#', - * then the query string and/or fragment will be - * set from the path; however, if the query and - * fragment are specified both in the path and as - * separate parameters, an exception is thrown - * @param p_queryString the URI query string (cannot be specified - * if path is null) - * @param p_fragment the URI fragment (cannot be specified if path - * is null) - * - * @throws MalformedURIException if any of the parameters violates - * syntax rules or semantic rules - */ - public URI(String p_scheme, String p_userinfo, String p_host, int p_port, String p_path, String p_queryString, String p_fragment) - throws MalformedURIException - { - - if (p_scheme == null || p_scheme.trim().length() == 0) - { - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_SCHEME_REQUIRED, null)); //"Scheme is required!"); - } - - if (p_host == null) - { - if (p_userinfo != null) - { - throw new MalformedURIException( - Utils.messages.createMessage(MsgKey.ER_NO_USERINFO_IF_NO_HOST, null)); //"Userinfo may not be specified if host is not specified!"); - } - - if (p_port != -1) - { - throw new MalformedURIException( - Utils.messages.createMessage(MsgKey.ER_NO_PORT_IF_NO_HOST, null)); //"Port may not be specified if host is not specified!"); - } - } - - if (p_path != null) - { - if (p_path.indexOf('?') != -1 && p_queryString != null) - { - throw new MalformedURIException( - Utils.messages.createMessage(MsgKey.ER_NO_QUERY_STRING_IN_PATH, null)); //"Query string cannot be specified in path and query string!"); - } - - if (p_path.indexOf('#') != -1 && p_fragment != null) - { - throw new MalformedURIException( - Utils.messages.createMessage(MsgKey.ER_NO_FRAGMENT_STRING_IN_PATH, null)); //"Fragment cannot be specified in both the path and fragment!"); - } - } - - setScheme(p_scheme); - setHost(p_host); - setPort(p_port); - setUserinfo(p_userinfo); - setPath(p_path); - setQueryString(p_queryString); - setFragment(p_fragment); - } - - /** - * Initialize all fields of this URI from another URI. - * - * @param p_other the URI to copy (cannot be null) - */ - private void initialize(URI p_other) - { - - m_scheme = p_other.getScheme(); - m_userinfo = p_other.getUserinfo(); - m_host = p_other.getHost(); - m_port = p_other.getPort(); - m_path = p_other.getPath(); - m_queryString = p_other.getQueryString(); - m_fragment = p_other.getFragment(); - } - - /** - * Initializes this URI from a base URI and a URI specification string. - * See RFC 2396 Section 4 and Appendix B for specifications on parsing - * the URI and Section 5 for specifications on resolving relative URIs - * and relative paths. - * - * @param p_base the base URI (may be null if p_uriSpec is an absolute - * URI) - * @param p_uriSpec the URI spec string which may be an absolute or - * relative URI (can only be null/empty if p_base - * is not null) - * - * @throws MalformedURIException if p_base is null and p_uriSpec - * is not an absolute URI or if - * p_uriSpec violates syntax rules - */ - private void initialize(URI p_base, String p_uriSpec) - throws MalformedURIException - { - - if (p_base == null - && (p_uriSpec == null || p_uriSpec.trim().length() == 0)) - { - throw new MalformedURIException( - Utils.messages.createMessage(MsgKey.ER_CANNOT_INIT_URI_EMPTY_PARMS, null)); //"Cannot initialize URI with empty parameters."); - } - - // just make a copy of the base if spec is empty - if (p_uriSpec == null || p_uriSpec.trim().length() == 0) - { - initialize(p_base); - - return; - } - - String uriSpec = p_uriSpec.trim(); - int uriSpecLen = uriSpec.length(); - int index = 0; - - // check for scheme - int colonIndex = uriSpec.indexOf(':'); - if (colonIndex < 0) - { - if (p_base == null) - { - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_NO_SCHEME_IN_URI, new Object[]{uriSpec})); //"No scheme found in URI: "+uriSpec); - } - } - else - { - initializeScheme(uriSpec); - uriSpec = uriSpec.substring(colonIndex+1); - uriSpecLen = uriSpec.length(); - } - - // two slashes means generic URI syntax, so we get the authority - if (uriSpec.startsWith("//")) - { - index += 2; - - int startPos = index; - - // get authority - everything up to path, query or fragment - char testChar = '\0'; - - while (index < uriSpecLen) - { - testChar = uriSpec.charAt(index); - - if (testChar == '/' || testChar == '?' || testChar == '#') - { - break; - } - - index++; - } - - // if we found authority, parse it out, otherwise we set the - // host to empty string - if (index > startPos) - { - initializeAuthority(uriSpec.substring(startPos, index)); - } - else - { - m_host = ""; - } - } - - initializePath(uriSpec.substring(index)); - - // Resolve relative URI to base URI - see RFC 2396 Section 5.2 - // In some cases, it might make more sense to throw an exception - // (when scheme is specified is the string spec and the base URI - // is also specified, for example), but we're just following the - // RFC specifications - if (p_base != null) - { - - // check to see if this is the current doc - RFC 2396 5.2 #2 - // note that this is slightly different from the RFC spec in that - // we don't include the check for query string being null - // - this handles cases where the urispec is just a query - // string or a fragment (e.g. "?y" or "#s") - - // see which - // identified this as a bug in the RFC - if (m_path.length() == 0 && m_scheme == null && m_host == null) - { - m_scheme = p_base.getScheme(); - m_userinfo = p_base.getUserinfo(); - m_host = p_base.getHost(); - m_port = p_base.getPort(); - m_path = p_base.getPath(); - - if (m_queryString == null) - { - m_queryString = p_base.getQueryString(); - } - - return; - } - - // check for scheme - RFC 2396 5.2 #3 - // if we found a scheme, it means absolute URI, so we're done - if (m_scheme == null) - { - m_scheme = p_base.getScheme(); - } - - // check for authority - RFC 2396 5.2 #4 - // if we found a host, then we've got a network path, so we're done - if (m_host == null) - { - m_userinfo = p_base.getUserinfo(); - m_host = p_base.getHost(); - m_port = p_base.getPort(); - } - else - { - return; - } - - // check for absolute path - RFC 2396 5.2 #5 - if (m_path.length() > 0 && m_path.startsWith("/")) - { - return; - } - - // if we get to this point, we need to resolve relative path - // RFC 2396 5.2 #6 - String path = new String(); - String basePath = p_base.getPath(); - - // 6a - get all but the last segment of the base URI path - if (basePath != null) - { - int lastSlash = basePath.lastIndexOf('/'); - - if (lastSlash != -1) - { - path = basePath.substring(0, lastSlash + 1); - } - } - - // 6b - append the relative URI path - path = path.concat(m_path); - - // 6c - remove all "./" where "." is a complete path segment - index = -1; - - while ((index = path.indexOf("/./")) != -1) - { - path = path.substring(0, index + 1).concat(path.substring(index + 3)); - } - - // 6d - remove "." if path ends with "." as a complete path segment - if (path.endsWith("/.")) - { - path = path.substring(0, path.length() - 1); - } - - // 6e - remove all "/../" where "" is a complete - // path segment not equal to ".." - index = -1; - - int segIndex = -1; - String tempString = null; - - while ((index = path.indexOf("/../")) > 0) - { - tempString = path.substring(0, path.indexOf("/../")); - segIndex = tempString.lastIndexOf('/'); - - if (segIndex != -1) - { - if (!tempString.substring(segIndex++).equals("..")) - { - path = path.substring(0, segIndex).concat(path.substring(index - + 4)); - } - } - } - - // 6f - remove ending "/.." where "" is a - // complete path segment - if (path.endsWith("/..")) - { - tempString = path.substring(0, path.length() - 3); - segIndex = tempString.lastIndexOf('/'); - - if (segIndex != -1) - { - path = path.substring(0, segIndex + 1); - } - } - - m_path = path; - } - } - - /** - * Initialize the scheme for this URI from a URI string spec. - * - * @param p_uriSpec the URI specification (cannot be null) - * - * @throws MalformedURIException if URI does not have a conformant - * scheme - */ - private void initializeScheme(String p_uriSpec) throws MalformedURIException - { - - int uriSpecLen = p_uriSpec.length(); - int index = 0; - String scheme = null; - char testChar = '\0'; - - while (index < uriSpecLen) - { - testChar = p_uriSpec.charAt(index); - - if (testChar == ':' || testChar == '/' || testChar == '?' - || testChar == '#') - { - break; - } - - index++; - } - - scheme = p_uriSpec.substring(0, index); - - if (scheme.length() == 0) - { - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_NO_SCHEME_INURI, null)); //"No scheme found in URI."); - } - else - { - setScheme(scheme); - } - } - - /** - * Initialize the authority (userinfo, host and port) for this - * URI from a URI string spec. - * - * @param p_uriSpec the URI specification (cannot be null) - * - * @throws MalformedURIException if p_uriSpec violates syntax rules - */ - private void initializeAuthority(String p_uriSpec) - throws MalformedURIException - { - - int index = 0; - int start = 0; - int end = p_uriSpec.length(); - char testChar = '\0'; - String userinfo = null; - - // userinfo is everything up @ - if (p_uriSpec.indexOf('@', start) != -1) - { - while (index < end) - { - testChar = p_uriSpec.charAt(index); - - if (testChar == '@') - { - break; - } - - index++; - } - - userinfo = p_uriSpec.substring(start, index); - - index++; - } - - // host is everything up to ':' - String host = null; - - start = index; - - while (index < end) - { - testChar = p_uriSpec.charAt(index); - - if (testChar == ':') - { - break; - } - - index++; - } - - host = p_uriSpec.substring(start, index); - - int port = -1; - - if (host.length() > 0) - { - - // port - if (testChar == ':') - { - index++; - - start = index; - - while (index < end) - { - index++; - } - - String portStr = p_uriSpec.substring(start, index); - - if (portStr.length() > 0) - { - for (int i = 0; i < portStr.length(); i++) - { - if (!isDigit(portStr.charAt(i))) - { - throw new MalformedURIException( - portStr + " is invalid. Port should only contain digits!"); - } - } - - try - { - port = Integer.parseInt(portStr); - } - catch (NumberFormatException nfe) - { - - // can't happen - } - } - } - } - - setHost(host); - setPort(port); - setUserinfo(userinfo); - } - - /** - * Initialize the path for this URI from a URI string spec. - * - * @param p_uriSpec the URI specification (cannot be null) - * - * @throws MalformedURIException if p_uriSpec violates syntax rules - */ - private void initializePath(String p_uriSpec) throws MalformedURIException - { - - if (p_uriSpec == null) - { - throw new MalformedURIException( - "Cannot initialize path from null string!"); - } - - int index = 0; - int start = 0; - int end = p_uriSpec.length(); - char testChar = '\0'; - - // path - everything up to query string or fragment - while (index < end) - { - testChar = p_uriSpec.charAt(index); - - if (testChar == '?' || testChar == '#') - { - break; - } - - // check for valid escape sequence - if (testChar == '%') - { - if (index + 2 >= end ||!isHex(p_uriSpec.charAt(index + 1)) - ||!isHex(p_uriSpec.charAt(index + 2))) - { - throw new MalformedURIException( - Utils.messages.createMessage(MsgKey.ER_PATH_CONTAINS_INVALID_ESCAPE_SEQUENCE, null)); //"Path contains invalid escape sequence!"); - } - } - else if (!isReservedCharacter(testChar) - &&!isUnreservedCharacter(testChar)) - { - if ('\\' != testChar) - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_PATH_INVALID_CHAR, new Object[]{String.valueOf(testChar)})); //"Path contains invalid character: " - //+ testChar); - } - - index++; - } - - m_path = p_uriSpec.substring(start, index); - - // query - starts with ? and up to fragment or end - if (testChar == '?') - { - index++; - - start = index; - - while (index < end) - { - testChar = p_uriSpec.charAt(index); - - if (testChar == '#') - { - break; - } - - if (testChar == '%') - { - if (index + 2 >= end ||!isHex(p_uriSpec.charAt(index + 1)) - ||!isHex(p_uriSpec.charAt(index + 2))) - { - throw new MalformedURIException( - "Query string contains invalid escape sequence!"); - } - } - else if (!isReservedCharacter(testChar) - &&!isUnreservedCharacter(testChar)) - { - throw new MalformedURIException( - "Query string contains invalid character:" + testChar); - } - - index++; - } - - m_queryString = p_uriSpec.substring(start, index); - } - - // fragment - starts with # - if (testChar == '#') - { - index++; - - start = index; - - while (index < end) - { - testChar = p_uriSpec.charAt(index); - - if (testChar == '%') - { - if (index + 2 >= end ||!isHex(p_uriSpec.charAt(index + 1)) - ||!isHex(p_uriSpec.charAt(index + 2))) - { - throw new MalformedURIException( - "Fragment contains invalid escape sequence!"); - } - } - else if (!isReservedCharacter(testChar) - &&!isUnreservedCharacter(testChar)) - { - throw new MalformedURIException( - "Fragment contains invalid character:" + testChar); - } - - index++; - } - - m_fragment = p_uriSpec.substring(start, index); - } - } - - /** - * Get the scheme for this URI. - * - * @return the scheme for this URI - */ - public String getScheme() - { - return m_scheme; - } - - /** - * Get the scheme-specific part for this URI (everything following the - * scheme and the first colon). See RFC 2396 Section 5.2 for spec. - * - * @return the scheme-specific part for this URI - */ - public String getSchemeSpecificPart() - { - - StringBuffer schemespec = new StringBuffer(); - - if (m_userinfo != null || m_host != null || m_port != -1) - { - schemespec.append("//"); - } - - if (m_userinfo != null) - { - schemespec.append(m_userinfo); - schemespec.append('@'); - } - - if (m_host != null) - { - schemespec.append(m_host); - } - - if (m_port != -1) - { - schemespec.append(':'); - schemespec.append(m_port); - } - - if (m_path != null) - { - schemespec.append((m_path)); - } - - if (m_queryString != null) - { - schemespec.append('?'); - schemespec.append(m_queryString); - } - - if (m_fragment != null) - { - schemespec.append('#'); - schemespec.append(m_fragment); - } - - return schemespec.toString(); - } - - /** - * Get the userinfo for this URI. - * - * @return the userinfo for this URI (null if not specified). - */ - public String getUserinfo() - { - return m_userinfo; - } - - /** - * Get the host for this URI. - * - * @return the host for this URI (null if not specified). - */ - public String getHost() - { - return m_host; - } - - /** - * Get the port for this URI. - * - * @return the port for this URI (-1 if not specified). - */ - public int getPort() - { - return m_port; - } - - /** - * Get the path for this URI (optionally with the query string and - * fragment). - * - * @param p_includeQueryString if true (and query string is not null), - * then a "?" followed by the query string - * will be appended - * @param p_includeFragment if true (and fragment is not null), - * then a "#" followed by the fragment - * will be appended - * - * @return the path for this URI possibly including the query string - * and fragment - */ - public String getPath(boolean p_includeQueryString, - boolean p_includeFragment) - { - - StringBuffer pathString = new StringBuffer(m_path); - - if (p_includeQueryString && m_queryString != null) - { - pathString.append('?'); - pathString.append(m_queryString); - } - - if (p_includeFragment && m_fragment != null) - { - pathString.append('#'); - pathString.append(m_fragment); - } - - return pathString.toString(); - } - - /** - * Get the path for this URI. Note that the value returned is the path - * only and does not include the query string or fragment. - * - * @return the path for this URI. - */ - public String getPath() - { - return m_path; - } - - /** - * Get the query string for this URI. - * - * @return the query string for this URI. Null is returned if there - * was no "?" in the URI spec, empty string if there was a - * "?" but no query string following it. - */ - public String getQueryString() - { - return m_queryString; - } - - /** - * Get the fragment for this URI. - * - * @return the fragment for this URI. Null is returned if there - * was no "#" in the URI spec, empty string if there was a - * "#" but no fragment following it. - */ - public String getFragment() - { - return m_fragment; - } - - /** - * Set the scheme for this URI. The scheme is converted to lowercase - * before it is set. - * - * @param p_scheme the scheme for this URI (cannot be null) - * - * @throws MalformedURIException if p_scheme is not a conformant - * scheme name - */ - public void setScheme(String p_scheme) throws MalformedURIException - { - - if (p_scheme == null) - { - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_SCHEME_FROM_NULL_STRING, null)); //"Cannot set scheme from null string!"); - } - - if (!isConformantSchemeName(p_scheme)) - { - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_SCHEME_NOT_CONFORMANT, null)); //"The scheme is not conformant."); - } - - m_scheme = p_scheme.toLowerCase(); - } - - /** - * Set the userinfo for this URI. If a non-null value is passed in and - * the host value is null, then an exception is thrown. - * - * @param p_userinfo the userinfo for this URI - * - * @throws MalformedURIException if p_userinfo contains invalid - * characters - */ - public void setUserinfo(String p_userinfo) throws MalformedURIException - { - - if (p_userinfo == null) - { - m_userinfo = null; - } - else - { - if (m_host == null) - { - throw new MalformedURIException( - "Userinfo cannot be set when host is null!"); - } - - // userinfo can contain alphanumerics, mark characters, escaped - // and ';',':','&','=','+','$',',' - int index = 0; - int end = p_userinfo.length(); - char testChar = '\0'; - - while (index < end) - { - testChar = p_userinfo.charAt(index); - - if (testChar == '%') - { - if (index + 2 >= end ||!isHex(p_userinfo.charAt(index + 1)) - ||!isHex(p_userinfo.charAt(index + 2))) - { - throw new MalformedURIException( - "Userinfo contains invalid escape sequence!"); - } - } - else if (!isUnreservedCharacter(testChar) - && USERINFO_CHARACTERS.indexOf(testChar) == -1) - { - throw new MalformedURIException( - "Userinfo contains invalid character:" + testChar); - } - - index++; - } - } - - m_userinfo = p_userinfo; - } - - /** - * Set the host for this URI. If null is passed in, the userinfo - * field is also set to null and the port is set to -1. - * - * @param p_host the host for this URI - * - * @throws MalformedURIException if p_host is not a valid IP - * address or DNS hostname. - */ - public void setHost(String p_host) throws MalformedURIException - { - - if (p_host == null || p_host.trim().length() == 0) - { - m_host = p_host; - m_userinfo = null; - m_port = -1; - } - else if (!isWellFormedAddress(p_host)) - { - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_HOST_ADDRESS_NOT_WELLFORMED, null)); //"Host is not a well formed address!"); - } - - m_host = p_host; - } - - /** - * Set the port for this URI. -1 is used to indicate that the port is - * not specified, otherwise valid port numbers are between 0 and 65535. - * If a valid port number is passed in and the host field is null, - * an exception is thrown. - * - * @param p_port the port number for this URI - * - * @throws MalformedURIException if p_port is not -1 and not a - * valid port number - */ - public void setPort(int p_port) throws MalformedURIException - { - - if (p_port >= 0 && p_port <= 65535) - { - if (m_host == null) - { - throw new MalformedURIException( - Utils.messages.createMessage(MsgKey.ER_PORT_WHEN_HOST_NULL, null)); //"Port cannot be set when host is null!"); - } - } - else if (p_port != -1) - { - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_INVALID_PORT, null)); //"Invalid port number!"); - } - - m_port = p_port; - } - - /** - * Set the path for this URI. If the supplied path is null, then the - * query string and fragment are set to null as well. If the supplied - * path includes a query string and/or fragment, these fields will be - * parsed and set as well. Note that, for URIs following the "generic - * URI" syntax, the path specified should start with a slash. - * For URIs that do not follow the generic URI syntax, this method - * sets the scheme-specific part. - * - * @param p_path the path for this URI (may be null) - * - * @throws MalformedURIException if p_path contains invalid - * characters - */ - public void setPath(String p_path) throws MalformedURIException - { - - if (p_path == null) - { - m_path = null; - m_queryString = null; - m_fragment = null; - } - else - { - initializePath(p_path); - } - } - - /** - * Append to the end of the path of this URI. If the current path does - * not end in a slash and the path to be appended does not begin with - * a slash, a slash will be appended to the current path before the - * new segment is added. Also, if the current path ends in a slash - * and the new segment begins with a slash, the extra slash will be - * removed before the new segment is appended. - * - * @param p_addToPath the new segment to be added to the current path - * - * @throws MalformedURIException if p_addToPath contains syntax - * errors - */ - public void appendPath(String p_addToPath) throws MalformedURIException - { - - if (p_addToPath == null || p_addToPath.trim().length() == 0) - { - return; - } - - if (!isURIString(p_addToPath)) - { - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_PATH_INVALID_CHAR, new Object[]{p_addToPath})); //"Path contains invalid character!"); - } - - if (m_path == null || m_path.trim().length() == 0) - { - if (p_addToPath.startsWith("/")) - { - m_path = p_addToPath; - } - else - { - m_path = "/" + p_addToPath; - } - } - else if (m_path.endsWith("/")) - { - if (p_addToPath.startsWith("/")) - { - m_path = m_path.concat(p_addToPath.substring(1)); - } - else - { - m_path = m_path.concat(p_addToPath); - } - } - else - { - if (p_addToPath.startsWith("/")) - { - m_path = m_path.concat(p_addToPath); - } - else - { - m_path = m_path.concat("/" + p_addToPath); - } - } - } - - /** - * Set the query string for this URI. A non-null value is valid only - * if this is an URI conforming to the generic URI syntax and - * the path value is not null. - * - * @param p_queryString the query string for this URI - * - * @throws MalformedURIException if p_queryString is not null and this - * URI does not conform to the generic - * URI syntax or if the path is null - */ - public void setQueryString(String p_queryString) - throws MalformedURIException - { - - if (p_queryString == null) - { - m_queryString = null; - } - else if (!isGenericURI()) - { - throw new MalformedURIException( - "Query string can only be set for a generic URI!"); - } - else if (getPath() == null) - { - throw new MalformedURIException( - "Query string cannot be set when path is null!"); - } - else if (!isURIString(p_queryString)) - { - throw new MalformedURIException( - "Query string contains invalid character!"); - } - else - { - m_queryString = p_queryString; - } - } - - /** - * Set the fragment for this URI. A non-null value is valid only - * if this is a URI conforming to the generic URI syntax and - * the path value is not null. - * - * @param p_fragment the fragment for this URI - * - * @throws MalformedURIException if p_fragment is not null and this - * URI does not conform to the generic - * URI syntax or if the path is null - */ - public void setFragment(String p_fragment) throws MalformedURIException - { - - if (p_fragment == null) - { - m_fragment = null; - } - else if (!isGenericURI()) - { - throw new MalformedURIException( - Utils.messages.createMessage(MsgKey.ER_FRAG_FOR_GENERIC_URI, null)); //"Fragment can only be set for a generic URI!"); - } - else if (getPath() == null) - { - throw new MalformedURIException( - Utils.messages.createMessage(MsgKey.ER_FRAG_WHEN_PATH_NULL, null)); //"Fragment cannot be set when path is null!"); - } - else if (!isURIString(p_fragment)) - { - throw new MalformedURIException(Utils.messages.createMessage(MsgKey.ER_FRAG_INVALID_CHAR, null)); //"Fragment contains invalid character!"); - } - else - { - m_fragment = p_fragment; - } - } - - /** - * Determines if the passed-in Object is equivalent to this URI. - * - * @param p_test the Object to test for equality. - * - * @return true if p_test is a URI with all values equal to this - * URI, false otherwise - */ - public boolean equals(Object p_test) - { - - if (p_test instanceof URI) - { - URI testURI = (URI) p_test; - - if (((m_scheme == null && testURI.m_scheme == null) || (m_scheme != null && testURI.m_scheme != null && m_scheme.equals( - testURI.m_scheme))) && ((m_userinfo == null && testURI.m_userinfo == null) || (m_userinfo != null && testURI.m_userinfo != null && m_userinfo.equals( - testURI.m_userinfo))) && ((m_host == null && testURI.m_host == null) || (m_host != null && testURI.m_host != null && m_host.equals( - testURI.m_host))) && m_port == testURI.m_port && ((m_path == null && testURI.m_path == null) || (m_path != null && testURI.m_path != null && m_path.equals( - testURI.m_path))) && ((m_queryString == null && testURI.m_queryString == null) || (m_queryString != null && testURI.m_queryString != null && m_queryString.equals( - testURI.m_queryString))) && ((m_fragment == null && testURI.m_fragment == null) || (m_fragment != null && testURI.m_fragment != null && m_fragment.equals( - testURI.m_fragment)))) - { - return true; - } - } - - return false; - } - - /** - * Get the URI as a string specification. See RFC 2396 Section 5.2. - * - * @return the URI string specification - */ - public String toString() - { - - StringBuffer uriSpecString = new StringBuffer(); - - if (m_scheme != null) - { - uriSpecString.append(m_scheme); - uriSpecString.append(':'); - } - - uriSpecString.append(getSchemeSpecificPart()); - - return uriSpecString.toString(); - } - - /** - * Get the indicator as to whether this URI uses the "generic URI" - * syntax. - * - * @return true if this URI uses the "generic URI" syntax, false - * otherwise - */ - public boolean isGenericURI() - { - - // presence of the host (whether valid or empty) means - // double-slashes which means generic uri - return (m_host != null); - } - - /** - * Determine whether a scheme conforms to the rules for a scheme name. - * A scheme is conformant if it starts with an alphanumeric, and - * contains only alphanumerics, '+','-' and '.'. - * - * - * @param p_scheme The sheme name to check - * @return true if the scheme is conformant, false otherwise - */ - public static boolean isConformantSchemeName(String p_scheme) - { - - if (p_scheme == null || p_scheme.trim().length() == 0) - { - return false; - } - - if (!isAlpha(p_scheme.charAt(0))) - { - return false; - } - - char testChar; - - for (int i = 1; i < p_scheme.length(); i++) - { - testChar = p_scheme.charAt(i); - - if (!isAlphanum(testChar) && SCHEME_CHARACTERS.indexOf(testChar) == -1) - { - return false; - } - } - - return true; - } - - /** - * Determine whether a string is syntactically capable of representing - * a valid IPv4 address or the domain name of a network host. A valid - * IPv4 address consists of four decimal digit groups separated by a - * '.'. A hostname consists of domain labels (each of which must - * begin and end with an alphanumeric but may contain '-') separated - * & by a '.'. See RFC 2396 Section 3.2.2. - * - * - * @param p_address The address string to check - * @return true if the string is a syntactically valid IPv4 address - * or hostname - */ - public static boolean isWellFormedAddress(String p_address) - { - - if (p_address == null) - { - return false; - } - - String address = p_address.trim(); - int addrLength = address.length(); - - if (addrLength == 0 || addrLength > 255) - { - return false; - } - - if (address.startsWith(".") || address.startsWith("-")) - { - return false; - } - - // rightmost domain label starting with digit indicates IP address - // since top level domain label can only start with an alpha - // see RFC 2396 Section 3.2.2 - int index = address.lastIndexOf('.'); - - if (address.endsWith(".")) - { - index = address.substring(0, index).lastIndexOf('.'); - } - - if (index + 1 < addrLength && isDigit(p_address.charAt(index + 1))) - { - char testChar; - int numDots = 0; - - // make sure that 1) we see only digits and dot separators, 2) that - // any dot separator is preceded and followed by a digit and - // 3) that we find 3 dots - for (int i = 0; i < addrLength; i++) - { - testChar = address.charAt(i); - - if (testChar == '.') - { - if (!isDigit(address.charAt(i - 1)) - || (i + 1 < addrLength &&!isDigit(address.charAt(i + 1)))) - { - return false; - } - - numDots++; - } - else if (!isDigit(testChar)) - { - return false; - } - } - - if (numDots != 3) - { - return false; - } - } - else - { - - // domain labels can contain alphanumerics and '-" - // but must start and end with an alphanumeric - char testChar; - - for (int i = 0; i < addrLength; i++) - { - testChar = address.charAt(i); - - if (testChar == '.') - { - if (!isAlphanum(address.charAt(i - 1))) - { - return false; - } - - if (i + 1 < addrLength &&!isAlphanum(address.charAt(i + 1))) - { - return false; - } - } - else if (!isAlphanum(testChar) && testChar != '-') - { - return false; - } - } - } - - return true; - } - - /** - * Determine whether a char is a digit. - * - * - * @param p_char the character to check - * @return true if the char is betweeen '0' and '9', false otherwise - */ - private static boolean isDigit(char p_char) - { - return p_char >= '0' && p_char <= '9'; - } - - /** - * Determine whether a character is a hexadecimal character. - * - * - * @param p_char the character to check - * @return true if the char is betweeen '0' and '9', 'a' and 'f' - * or 'A' and 'F', false otherwise - */ - private static boolean isHex(char p_char) - { - return (isDigit(p_char) || (p_char >= 'a' && p_char <= 'f') - || (p_char >= 'A' && p_char <= 'F')); - } - - /** - * Determine whether a char is an alphabetic character: a-z or A-Z - * - * - * @param p_char the character to check - * @return true if the char is alphabetic, false otherwise - */ - private static boolean isAlpha(char p_char) - { - return ((p_char >= 'a' && p_char <= 'z') - || (p_char >= 'A' && p_char <= 'Z')); - } - - /** - * Determine whether a char is an alphanumeric: 0-9, a-z or A-Z - * - * - * @param p_char the character to check - * @return true if the char is alphanumeric, false otherwise - */ - private static boolean isAlphanum(char p_char) - { - return (isAlpha(p_char) || isDigit(p_char)); - } - - /** - * Determine whether a character is a reserved character: - * ';', '/', '?', ':', '@', '&', '=', '+', '$' or ',' - * - * - * @param p_char the character to check - * @return true if the string contains any reserved characters - */ - private static boolean isReservedCharacter(char p_char) - { - return RESERVED_CHARACTERS.indexOf(p_char) != -1; - } - - /** - * Determine whether a char is an unreserved character. - * - * - * @param p_char the character to check - * @return true if the char is unreserved, false otherwise - */ - private static boolean isUnreservedCharacter(char p_char) - { - return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); - } - - /** - * Determine whether a given string contains only URI characters (also - * called "uric" in RFC 2396). uric consist of all reserved - * characters, unreserved characters and escaped characters. - * - * - * @param p_uric URI string - * @return true if the string is comprised of uric, false otherwise - */ - private static boolean isURIString(String p_uric) - { - - if (p_uric == null) - { - return false; - } - - int end = p_uric.length(); - char testChar = '\0'; - - for (int i = 0; i < end; i++) - { - testChar = p_uric.charAt(i); - - if (testChar == '%') - { - if (i + 2 >= end ||!isHex(p_uric.charAt(i + 1)) - ||!isHex(p_uric.charAt(i + 2))) - { - return false; - } - else - { - i += 2; - - continue; - } - } - - if (isReservedCharacter(testChar) || isUnreservedCharacter(testChar)) - { - continue; - } - else - { - return false; - } - } - - return true; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/Utils.java b/serializer/src/main/java/org/apache/xml/serializer/utils/Utils.java deleted file mode 100644 index b3da3bec8..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/Utils.java +++ /dev/null @@ -1,40 +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.utils; - -/** - * This class contains utilities used by the serializer. - * - * This class is not a public API, it is only public because it is - * used by the serializer. - * - * @xsl.usage internal - */ -public final class Utils -{ - /** - * A singleton Messages object is used to load the - * given resource bundle just once, it is - * used by multiple transformations as long as the JVM stays up. - */ - public static final Messages messages= - new Messages(SerializerMessages.class.getName()); -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/WrappedRuntimeException.java b/serializer/src/main/java/org/apache/xml/serializer/utils/WrappedRuntimeException.java deleted file mode 100644 index f4fce420c..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/WrappedRuntimeException.java +++ /dev/null @@ -1,81 +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.utils; - -/** - * This class is for throwing important checked exceptions - * over non-checked methods. It should be used with care, - * and in limited circumstances. - * - * This class is a copy of the one in org.apache.xml.utils. - * It exists to cut the serializers dependancy on that package. - * - * This class is not a public API, it is only public because it is - * used by org.apache.xml.serializer. - * @xsl.usage internal - */ -public final class WrappedRuntimeException extends RuntimeException -{ - static final long serialVersionUID = 7140414456714658073L; - - /** Primary checked exception. - * @serial */ - private Exception m_exception; - - /** - * Construct a WrappedRuntimeException from a - * checked exception. - * - * @param e Primary checked exception - */ - public WrappedRuntimeException(Exception e) - { - - super(e.getMessage()); - - m_exception = e; - } - - /** - * Constructor WrappedRuntimeException - * - * - * @param msg Exception information. - * @param e Primary checked exception - */ - public WrappedRuntimeException(String msg, Exception e) - { - - super(msg); - - m_exception = e; - } - - /** - * Get the checked exception that this runtime exception wraps. - * - * @return The primary checked exception - */ - public Exception getException() - { - return m_exception; - } -} diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/XML11Char.java b/serializer/src/main/java/org/apache/xml/serializer/utils/XML11Char.java deleted file mode 100644 index f6756cc15..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/XML11Char.java +++ /dev/null @@ -1,414 +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. - */ - -package org.apache.xml.serializer.utils; - -import java.util.Arrays; - -/** - * THIS IS A COPY OF THE XERCES-2J CLASS org.apache.xerces.utls.XMLChar - * - * This class defines the basic properties of characters in XML 1.1. The data - * in this class can be used to verify that a character is a valid - * XML 1.1 character or if the character is a space, name start, or name - * character. - *

- * A series of convenience methods are supplied to ease the burden - * of the developer. Using the character as an index into the XML11CHARS - * array and applying the appropriate mask flag (e.g. - * MASK_VALID), yields the same results as calling the - * convenience methods. There is one exception: check the comments - * for the isValid method for details. - * - * @author Glenn Marcy, IBM - * @author Andy Clark, IBM - * @author Arnaud Le Hors, IBM - * @author Neil Graham, IBM - * @author Michael Glavassevich, IBM - * - * @version $Id$ - */ -public class XML11Char { - - // - // Constants - // - - /** Character flags for XML 1.1. */ - private static final byte XML11CHARS [] = new byte [1 << 16]; - - /** XML 1.1 Valid character mask. */ - public static final int MASK_XML11_VALID = 0x01; - - /** XML 1.1 Space character mask. */ - public static final int MASK_XML11_SPACE = 0x02; - - /** XML 1.1 Name start character mask. */ - public static final int MASK_XML11_NAME_START = 0x04; - - /** XML 1.1 Name character mask. */ - public static final int MASK_XML11_NAME = 0x08; - - /** XML 1.1 control character mask */ - public static final int MASK_XML11_CONTROL = 0x10; - - /** XML 1.1 content for external entities (valid - "special" chars - control chars) */ - public static final int MASK_XML11_CONTENT = 0x20; - - /** XML namespaces 1.1 NCNameStart */ - public static final int MASK_XML11_NCNAME_START = 0x40; - - /** XML namespaces 1.1 NCName */ - public static final int MASK_XML11_NCNAME = 0x80; - - /** XML 1.1 content for internal entities (valid - "special" chars) */ - public static final int MASK_XML11_CONTENT_INTERNAL = MASK_XML11_CONTROL | MASK_XML11_CONTENT; - - // - // Static initialization - // - - static { - - // Initializing the Character Flag Array - // Code generated by: XML11CharGenerator. - - Arrays.fill(XML11CHARS, 1, 9, (byte) 17 ); // Fill 8 of value (byte) 17 - XML11CHARS[9] = 35; - XML11CHARS[10] = 3; - Arrays.fill(XML11CHARS, 11, 13, (byte) 17 ); // Fill 2 of value (byte) 17 - XML11CHARS[13] = 3; - Arrays.fill(XML11CHARS, 14, 32, (byte) 17 ); // Fill 18 of value (byte) 17 - XML11CHARS[32] = 35; - Arrays.fill(XML11CHARS, 33, 38, (byte) 33 ); // Fill 5 of value (byte) 33 - XML11CHARS[38] = 1; - Arrays.fill(XML11CHARS, 39, 45, (byte) 33 ); // Fill 6 of value (byte) 33 - Arrays.fill(XML11CHARS, 45, 47, (byte) -87 ); // Fill 2 of value (byte) -87 - XML11CHARS[47] = 33; - Arrays.fill(XML11CHARS, 48, 58, (byte) -87 ); // Fill 10 of value (byte) -87 - XML11CHARS[58] = 45; - XML11CHARS[59] = 33; - XML11CHARS[60] = 1; - Arrays.fill(XML11CHARS, 61, 65, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(XML11CHARS, 65, 91, (byte) -19 ); // Fill 26 of value (byte) -19 - Arrays.fill(XML11CHARS, 91, 93, (byte) 33 ); // Fill 2 of value (byte) 33 - XML11CHARS[93] = 1; - XML11CHARS[94] = 33; - XML11CHARS[95] = -19; - XML11CHARS[96] = 33; - Arrays.fill(XML11CHARS, 97, 123, (byte) -19 ); // Fill 26 of value (byte) -19 - Arrays.fill(XML11CHARS, 123, 127, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(XML11CHARS, 127, 133, (byte) 17 ); // Fill 6 of value (byte) 17 - XML11CHARS[133] = 35; - Arrays.fill(XML11CHARS, 134, 160, (byte) 17 ); // Fill 26 of value (byte) 17 - Arrays.fill(XML11CHARS, 160, 183, (byte) 33 ); // Fill 23 of value (byte) 33 - XML11CHARS[183] = -87; - Arrays.fill(XML11CHARS, 184, 192, (byte) 33 ); // Fill 8 of value (byte) 33 - Arrays.fill(XML11CHARS, 192, 215, (byte) -19 ); // Fill 23 of value (byte) -19 - XML11CHARS[215] = 33; - Arrays.fill(XML11CHARS, 216, 247, (byte) -19 ); // Fill 31 of value (byte) -19 - XML11CHARS[247] = 33; - Arrays.fill(XML11CHARS, 248, 768, (byte) -19 ); // Fill 520 of value (byte) -19 - Arrays.fill(XML11CHARS, 768, 880, (byte) -87 ); // Fill 112 of value (byte) -87 - Arrays.fill(XML11CHARS, 880, 894, (byte) -19 ); // Fill 14 of value (byte) -19 - XML11CHARS[894] = 33; - Arrays.fill(XML11CHARS, 895, 8192, (byte) -19 ); // Fill 7297 of value (byte) -19 - Arrays.fill(XML11CHARS, 8192, 8204, (byte) 33 ); // Fill 12 of value (byte) 33 - Arrays.fill(XML11CHARS, 8204, 8206, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(XML11CHARS, 8206, 8232, (byte) 33 ); // Fill 26 of value (byte) 33 - XML11CHARS[8232] = 35; - Arrays.fill(XML11CHARS, 8233, 8255, (byte) 33 ); // Fill 22 of value (byte) 33 - Arrays.fill(XML11CHARS, 8255, 8257, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(XML11CHARS, 8257, 8304, (byte) 33 ); // Fill 47 of value (byte) 33 - Arrays.fill(XML11CHARS, 8304, 8592, (byte) -19 ); // Fill 288 of value (byte) -19 - Arrays.fill(XML11CHARS, 8592, 11264, (byte) 33 ); // Fill 2672 of value (byte) 33 - Arrays.fill(XML11CHARS, 11264, 12272, (byte) -19 ); // Fill 1008 of value (byte) -19 - Arrays.fill(XML11CHARS, 12272, 12289, (byte) 33 ); // Fill 17 of value (byte) 33 - Arrays.fill(XML11CHARS, 12289, 55296, (byte) -19 ); // Fill 43007 of value (byte) -19 - Arrays.fill(XML11CHARS, 57344, 63744, (byte) 33 ); // Fill 6400 of value (byte) 33 - Arrays.fill(XML11CHARS, 63744, 64976, (byte) -19 ); // Fill 1232 of value (byte) -19 - Arrays.fill(XML11CHARS, 64976, 65008, (byte) 33 ); // Fill 32 of value (byte) 33 - Arrays.fill(XML11CHARS, 65008, 65534, (byte) -19 ); // Fill 526 of value (byte) -19 - - } // () - - // - // Public static methods - // - - /** - * @return true if the specified character is a space character - * as amdended in the XML 1.1 specification. - * - * @param c The character to check. - */ - public static boolean isXML11Space(int c) { - return (c < 0x10000 && (XML11CHARS[c] & MASK_XML11_SPACE) != 0); - } // isXML11Space(int):boolean - - /** - * @return true if the specified character is valid. This method - * also checks the surrogate character range from 0x10000 to 0x10FFFF. - *

- * If the program chooses to apply the mask directly to the - * XML11CHARS array, then they are responsible for checking - * the surrogate character range. - * - * @param c The character to check. - */ - public static boolean isXML11Valid(int c) { - return (c < 0x10000 && (XML11CHARS[c] & MASK_XML11_VALID) != 0) - || (0x10000 <= c && c <= 0x10FFFF); - } // isXML11Valid(int):boolean - - /** - * @return true if the specified character is invalid. - * - * @param c The character to check. - */ - public static boolean isXML11Invalid(int c) { - return !isXML11Valid(c); - } // isXML11Invalid(int):boolean - - /** - * @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". - * - * @param c The character to check. - */ - public static boolean isXML11ValidLiteral(int c) { - return ((c < 0x10000 && ((XML11CHARS[c] & MASK_XML11_VALID) != 0 && (XML11CHARS[c] & MASK_XML11_CONTROL) == 0)) - || (0x10000 <= c && c <= 0x10FFFF)); - } // isXML11ValidLiteral(int):boolean - - /** - * @return true if the specified character can be considered - * content in an external parsed entity. - * - * @param c The character to check. - */ - public static boolean isXML11Content(int c) { - return (c < 0x10000 && (XML11CHARS[c] & MASK_XML11_CONTENT) != 0) || - (0x10000 <= c && c <= 0x10FFFF); - } // isXML11Content(int):boolean - - /** - * @return true if the specified character can be considered - * content in an internal parsed entity. - * - * @param c The character to check. - */ - public static boolean isXML11InternalEntityContent(int c) { - return (c < 0x10000 && (XML11CHARS[c] & MASK_XML11_CONTENT_INTERNAL) != 0) || - (0x10000 <= c && c <= 0x10FFFF); - } // isXML11InternalEntityContent(int):boolean - - /** - * @return true if the specified character is a valid name start - * character as defined by production [4] in the XML 1.1 - * specification. - * - * @param c The character to check. - */ - public static boolean isXML11NameStart(int c) { - return (c < 0x10000 && (XML11CHARS[c] & MASK_XML11_NAME_START) != 0) - || (0x10000 <= c && c < 0xF0000); - } // isXML11NameStart(int):boolean - - /** - * @return true if the specified character is a valid name - * character as defined by production [4a] in the XML 1.1 - * specification. - * - * @param c The character to check. - */ - public static boolean isXML11Name(int c) { - return (c < 0x10000 && (XML11CHARS[c] & MASK_XML11_NAME) != 0) - || (c >= 0x10000 && c < 0xF0000); - } // isXML11Name(int):boolean - - /** - * @return true if the specified character is a valid NCName start - * character as defined by production [4] in Namespaces in XML - * 1.1 recommendation. - * - * @param c The character to check. - */ - public static boolean isXML11NCNameStart(int c) { - return (c < 0x10000 && (XML11CHARS[c] & MASK_XML11_NCNAME_START) != 0) - || (0x10000 <= c && c < 0xF0000); - } // isXML11NCNameStart(int):boolean - - /** - * @return true if the specified character is a valid NCName - * character as defined by production [5] in Namespaces in XML - * 1.1 recommendation. - * - * @param c The character to check. - */ - public static boolean isXML11NCName(int c) { - return (c < 0x10000 && (XML11CHARS[c] & MASK_XML11_NCNAME) != 0) - || (0x10000 <= c && c < 0xF0000); - } // isXML11NCName(int):boolean - - /** - * @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. - * - * @param c The character to check. - */ - public static boolean isXML11NameHighSurrogate(int c) { - return (0xD800 <= c && c <= 0xDB7F); - } - - /* - * [5] Name ::= NameStartChar NameChar* - */ - /** - * Check to see if a string is a valid Name according to [5] - * in the XML 1.1 Recommendation - * - * @param name string to check - * @return true if name is a valid Name - */ - public static boolean isXML11ValidName(String name) { - int length = name.length(); - if (length == 0) - return false; - int i = 1; - char ch = name.charAt(0); - if( !isXML11NameStart(ch) ) { - if ( length > 1 && isXML11NameHighSurrogate(ch) ) { - char ch2 = name.charAt(1); - if ( !XMLChar.isLowSurrogate(ch2) || - !isXML11NameStart(XMLChar.supplemental(ch, ch2)) ) { - return false; - } - i = 2; - } - else { - return false; - } - } - while (i < length) { - ch = name.charAt(i); - if ( !isXML11Name(ch) ) { - if ( ++i < length && isXML11NameHighSurrogate(ch) ) { - char ch2 = name.charAt(i); - if ( !XMLChar.isLowSurrogate(ch2) || - !isXML11Name(XMLChar.supplemental(ch, ch2)) ) { - return false; - } - } - else { - return false; - } - } - ++i; - } - return true; - } // isXML11ValidName(String):boolean - - - /* - * from the namespace 1.1 rec - * [4] NCName ::= NCNameStartChar NCNameChar* - */ - /** - * Check to see if a string is a valid NCName according to [4] - * from the XML Namespaces 1.1 Recommendation - * - * @param ncName string to check - * @return true if name is a valid NCName - */ - public static boolean isXML11ValidNCName(String ncName) { - int length = ncName.length(); - if (length == 0) - return false; - int i = 1; - char ch = ncName.charAt(0); - if( !isXML11NCNameStart(ch) ) { - if ( length > 1 && isXML11NameHighSurrogate(ch) ) { - char ch2 = ncName.charAt(1); - if ( !XMLChar.isLowSurrogate(ch2) || - !isXML11NCNameStart(XMLChar.supplemental(ch, ch2)) ) { - return false; - } - i = 2; - } - else { - return false; - } - } - while (i < length) { - ch = ncName.charAt(i); - if ( !isXML11NCName(ch) ) { - if ( ++i < length && isXML11NameHighSurrogate(ch) ) { - char ch2 = ncName.charAt(i); - if ( !XMLChar.isLowSurrogate(ch2) || - !isXML11NCName(XMLChar.supplemental(ch, ch2)) ) { - return false; - } - } - else { - return false; - } - } - ++i; - } - return true; - } // isXML11ValidNCName(String):boolean - - /* - * [7] Nmtoken ::= (NameChar)+ - */ - /** - * Check to see if a string is a valid Nmtoken according to [7] - * in the XML 1.1 Recommendation - * - * @param nmtoken string to check - * @return true if nmtoken is a valid Nmtoken - */ - public static boolean isXML11ValidNmtoken(String nmtoken) { - int length = nmtoken.length(); - if (length == 0) - return false; - for (int i = 0; i < length; ++i ) { - char ch = nmtoken.charAt(i); - if( !isXML11Name(ch) ) { - if ( ++i < length && isXML11NameHighSurrogate(ch) ) { - char ch2 = nmtoken.charAt(i); - if ( !XMLChar.isLowSurrogate(ch2) || - !isXML11Name(XMLChar.supplemental(ch, ch2)) ) { - return false; - } - } - else { - return false; - } - } - } - return true; - } // isXML11ValidName(String):boolean - -} // class XML11Char - diff --git a/serializer/src/main/java/org/apache/xml/serializer/utils/XMLChar.java b/serializer/src/main/java/org/apache/xml/serializer/utils/XMLChar.java deleted file mode 100644 index f38e8f096..000000000 --- a/serializer/src/main/java/org/apache/xml/serializer/utils/XMLChar.java +++ /dev/null @@ -1,1026 +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. - */ - -package org.apache.xml.serializer.utils; - -import java.util.Arrays; - -/** - * THIS IS A COPY OF THE XERCES-2J CLASS org.apache.xerces.utls.XMLChar - * - * This class defines the basic XML character properties. The data - * in this class can be used to verify that a character is a valid - * XML character or if the character is a space, name start, or name - * character. - *

- * A series of convenience methods are supplied to ease the burden - * of the developer. Because inlining the checks can improve per - * character performance, the tables of character properties are - * public. Using the character as an index into the CHARS - * array and applying the appropriate mask flag (e.g. - * MASK_VALID), yields the same results as calling the - * convenience methods. There is one exception: check the comments - * for the isValid method for details. - * - * @author Glenn Marcy, IBM - * @author Andy Clark, IBM - * @author Eric Ye, IBM - * @author Arnaud Le Hors, IBM - * @author Michael Glavassevich, IBM - * @author Rahul Srivastava, Sun Microsystems Inc. - * - * @version $Id$ - */ -public class XMLChar { - - // - // Constants - // - - /** Character flags. */ - private static final byte[] CHARS = new byte[1 << 16]; - - /** Valid character mask. */ - public static final int MASK_VALID = 0x01; - - /** Space character mask. */ - public static final int MASK_SPACE = 0x02; - - /** Name start character mask. */ - public static final int MASK_NAME_START = 0x04; - - /** Name character mask. */ - public static final int MASK_NAME = 0x08; - - /** Pubid character mask. */ - public static final int MASK_PUBID = 0x10; - - /** - * Content character mask. Special characters are those that can - * be considered the start of markup, such as '<' and '&'. - * The various newline characters are considered special as well. - * All other valid XML characters can be considered content. - *

- * This is an optimization for the inner loop of character scanning. - */ - public static final int MASK_CONTENT = 0x20; - - /** NCName start character mask. */ - public static final int MASK_NCNAME_START = 0x40; - - /** NCName character mask. */ - public static final int MASK_NCNAME = 0x80; - - // - // Static initialization - // - - static { - - // Initializing the Character Flag Array - // Code generated by: XMLCharGenerator. - - CHARS[9] = 35; - CHARS[10] = 19; - CHARS[13] = 19; - CHARS[32] = 51; - CHARS[33] = 49; - CHARS[34] = 33; - Arrays.fill(CHARS, 35, 38, (byte) 49 ); // Fill 3 of value (byte) 49 - CHARS[38] = 1; - Arrays.fill(CHARS, 39, 45, (byte) 49 ); // Fill 6 of value (byte) 49 - Arrays.fill(CHARS, 45, 47, (byte) -71 ); // Fill 2 of value (byte) -71 - CHARS[47] = 49; - Arrays.fill(CHARS, 48, 58, (byte) -71 ); // Fill 10 of value (byte) -71 - CHARS[58] = 61; - CHARS[59] = 49; - CHARS[60] = 1; - CHARS[61] = 49; - CHARS[62] = 33; - Arrays.fill(CHARS, 63, 65, (byte) 49 ); // Fill 2 of value (byte) 49 - Arrays.fill(CHARS, 65, 91, (byte) -3 ); // Fill 26 of value (byte) -3 - Arrays.fill(CHARS, 91, 93, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[93] = 1; - CHARS[94] = 33; - CHARS[95] = -3; - CHARS[96] = 33; - Arrays.fill(CHARS, 97, 123, (byte) -3 ); // Fill 26 of value (byte) -3 - Arrays.fill(CHARS, 123, 183, (byte) 33 ); // Fill 60 of value (byte) 33 - CHARS[183] = -87; - Arrays.fill(CHARS, 184, 192, (byte) 33 ); // Fill 8 of value (byte) 33 - Arrays.fill(CHARS, 192, 215, (byte) -19 ); // Fill 23 of value (byte) -19 - CHARS[215] = 33; - Arrays.fill(CHARS, 216, 247, (byte) -19 ); // Fill 31 of value (byte) -19 - CHARS[247] = 33; - Arrays.fill(CHARS, 248, 306, (byte) -19 ); // Fill 58 of value (byte) -19 - Arrays.fill(CHARS, 306, 308, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 308, 319, (byte) -19 ); // Fill 11 of value (byte) -19 - Arrays.fill(CHARS, 319, 321, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 321, 329, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[329] = 33; - Arrays.fill(CHARS, 330, 383, (byte) -19 ); // Fill 53 of value (byte) -19 - CHARS[383] = 33; - Arrays.fill(CHARS, 384, 452, (byte) -19 ); // Fill 68 of value (byte) -19 - Arrays.fill(CHARS, 452, 461, (byte) 33 ); // Fill 9 of value (byte) 33 - Arrays.fill(CHARS, 461, 497, (byte) -19 ); // Fill 36 of value (byte) -19 - Arrays.fill(CHARS, 497, 500, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 500, 502, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 502, 506, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 506, 536, (byte) -19 ); // Fill 30 of value (byte) -19 - Arrays.fill(CHARS, 536, 592, (byte) 33 ); // Fill 56 of value (byte) 33 - Arrays.fill(CHARS, 592, 681, (byte) -19 ); // Fill 89 of value (byte) -19 - Arrays.fill(CHARS, 681, 699, (byte) 33 ); // Fill 18 of value (byte) 33 - Arrays.fill(CHARS, 699, 706, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 706, 720, (byte) 33 ); // Fill 14 of value (byte) 33 - Arrays.fill(CHARS, 720, 722, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 722, 768, (byte) 33 ); // Fill 46 of value (byte) 33 - Arrays.fill(CHARS, 768, 838, (byte) -87 ); // Fill 70 of value (byte) -87 - Arrays.fill(CHARS, 838, 864, (byte) 33 ); // Fill 26 of value (byte) 33 - Arrays.fill(CHARS, 864, 866, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 866, 902, (byte) 33 ); // Fill 36 of value (byte) 33 - CHARS[902] = -19; - CHARS[903] = -87; - Arrays.fill(CHARS, 904, 907, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[907] = 33; - CHARS[908] = -19; - CHARS[909] = 33; - Arrays.fill(CHARS, 910, 930, (byte) -19 ); // Fill 20 of value (byte) -19 - CHARS[930] = 33; - Arrays.fill(CHARS, 931, 975, (byte) -19 ); // Fill 44 of value (byte) -19 - CHARS[975] = 33; - Arrays.fill(CHARS, 976, 983, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 983, 986, (byte) 33 ); // Fill 3 of value (byte) 33 - CHARS[986] = -19; - CHARS[987] = 33; - CHARS[988] = -19; - CHARS[989] = 33; - CHARS[990] = -19; - CHARS[991] = 33; - CHARS[992] = -19; - CHARS[993] = 33; - Arrays.fill(CHARS, 994, 1012, (byte) -19 ); // Fill 18 of value (byte) -19 - Arrays.fill(CHARS, 1012, 1025, (byte) 33 ); // Fill 13 of value (byte) 33 - Arrays.fill(CHARS, 1025, 1037, (byte) -19 ); // Fill 12 of value (byte) -19 - CHARS[1037] = 33; - Arrays.fill(CHARS, 1038, 1104, (byte) -19 ); // Fill 66 of value (byte) -19 - CHARS[1104] = 33; - Arrays.fill(CHARS, 1105, 1117, (byte) -19 ); // Fill 12 of value (byte) -19 - CHARS[1117] = 33; - Arrays.fill(CHARS, 1118, 1154, (byte) -19 ); // Fill 36 of value (byte) -19 - CHARS[1154] = 33; - Arrays.fill(CHARS, 1155, 1159, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 1159, 1168, (byte) 33 ); // Fill 9 of value (byte) 33 - Arrays.fill(CHARS, 1168, 1221, (byte) -19 ); // Fill 53 of value (byte) -19 - Arrays.fill(CHARS, 1221, 1223, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1223, 1225, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 1225, 1227, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1227, 1229, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 1229, 1232, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 1232, 1260, (byte) -19 ); // Fill 28 of value (byte) -19 - Arrays.fill(CHARS, 1260, 1262, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1262, 1270, (byte) -19 ); // Fill 8 of value (byte) -19 - Arrays.fill(CHARS, 1270, 1272, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1272, 1274, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 1274, 1329, (byte) 33 ); // Fill 55 of value (byte) 33 - Arrays.fill(CHARS, 1329, 1367, (byte) -19 ); // Fill 38 of value (byte) -19 - Arrays.fill(CHARS, 1367, 1369, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[1369] = -19; - Arrays.fill(CHARS, 1370, 1377, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 1377, 1415, (byte) -19 ); // Fill 38 of value (byte) -19 - Arrays.fill(CHARS, 1415, 1425, (byte) 33 ); // Fill 10 of value (byte) 33 - Arrays.fill(CHARS, 1425, 1442, (byte) -87 ); // Fill 17 of value (byte) -87 - CHARS[1442] = 33; - Arrays.fill(CHARS, 1443, 1466, (byte) -87 ); // Fill 23 of value (byte) -87 - CHARS[1466] = 33; - Arrays.fill(CHARS, 1467, 1470, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[1470] = 33; - CHARS[1471] = -87; - CHARS[1472] = 33; - Arrays.fill(CHARS, 1473, 1475, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[1475] = 33; - CHARS[1476] = -87; - Arrays.fill(CHARS, 1477, 1488, (byte) 33 ); // Fill 11 of value (byte) 33 - Arrays.fill(CHARS, 1488, 1515, (byte) -19 ); // Fill 27 of value (byte) -19 - Arrays.fill(CHARS, 1515, 1520, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 1520, 1523, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 1523, 1569, (byte) 33 ); // Fill 46 of value (byte) 33 - Arrays.fill(CHARS, 1569, 1595, (byte) -19 ); // Fill 26 of value (byte) -19 - Arrays.fill(CHARS, 1595, 1600, (byte) 33 ); // Fill 5 of value (byte) 33 - CHARS[1600] = -87; - Arrays.fill(CHARS, 1601, 1611, (byte) -19 ); // Fill 10 of value (byte) -19 - Arrays.fill(CHARS, 1611, 1619, (byte) -87 ); // Fill 8 of value (byte) -87 - Arrays.fill(CHARS, 1619, 1632, (byte) 33 ); // Fill 13 of value (byte) 33 - Arrays.fill(CHARS, 1632, 1642, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 1642, 1648, (byte) 33 ); // Fill 6 of value (byte) 33 - CHARS[1648] = -87; - Arrays.fill(CHARS, 1649, 1720, (byte) -19 ); // Fill 71 of value (byte) -19 - Arrays.fill(CHARS, 1720, 1722, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1722, 1727, (byte) -19 ); // Fill 5 of value (byte) -19 - CHARS[1727] = 33; - Arrays.fill(CHARS, 1728, 1743, (byte) -19 ); // Fill 15 of value (byte) -19 - CHARS[1743] = 33; - Arrays.fill(CHARS, 1744, 1748, (byte) -19 ); // Fill 4 of value (byte) -19 - CHARS[1748] = 33; - CHARS[1749] = -19; - Arrays.fill(CHARS, 1750, 1765, (byte) -87 ); // Fill 15 of value (byte) -87 - Arrays.fill(CHARS, 1765, 1767, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 1767, 1769, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[1769] = 33; - Arrays.fill(CHARS, 1770, 1774, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 1774, 1776, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 1776, 1786, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 1786, 2305, (byte) 33 ); // Fill 519 of value (byte) 33 - Arrays.fill(CHARS, 2305, 2308, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2308] = 33; - Arrays.fill(CHARS, 2309, 2362, (byte) -19 ); // Fill 53 of value (byte) -19 - Arrays.fill(CHARS, 2362, 2364, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2364] = -87; - CHARS[2365] = -19; - Arrays.fill(CHARS, 2366, 2382, (byte) -87 ); // Fill 16 of value (byte) -87 - Arrays.fill(CHARS, 2382, 2385, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2385, 2389, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 2389, 2392, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2392, 2402, (byte) -19 ); // Fill 10 of value (byte) -19 - Arrays.fill(CHARS, 2402, 2404, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2404, 2406, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2406, 2416, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 2416, 2433, (byte) 33 ); // Fill 17 of value (byte) 33 - Arrays.fill(CHARS, 2433, 2436, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2436] = 33; - Arrays.fill(CHARS, 2437, 2445, (byte) -19 ); // Fill 8 of value (byte) -19 - Arrays.fill(CHARS, 2445, 2447, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2447, 2449, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2449, 2451, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2451, 2473, (byte) -19 ); // Fill 22 of value (byte) -19 - CHARS[2473] = 33; - Arrays.fill(CHARS, 2474, 2481, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2481] = 33; - CHARS[2482] = -19; - Arrays.fill(CHARS, 2483, 2486, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2486, 2490, (byte) -19 ); // Fill 4 of value (byte) -19 - Arrays.fill(CHARS, 2490, 2492, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2492] = -87; - CHARS[2493] = 33; - Arrays.fill(CHARS, 2494, 2501, (byte) -87 ); // Fill 7 of value (byte) -87 - Arrays.fill(CHARS, 2501, 2503, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2503, 2505, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2505, 2507, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2507, 2510, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 2510, 2519, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[2519] = -87; - Arrays.fill(CHARS, 2520, 2524, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2524, 2526, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2526] = 33; - Arrays.fill(CHARS, 2527, 2530, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 2530, 2532, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2532, 2534, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2534, 2544, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 2544, 2546, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2546, 2562, (byte) 33 ); // Fill 16 of value (byte) 33 - CHARS[2562] = -87; - Arrays.fill(CHARS, 2563, 2565, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2565, 2571, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 2571, 2575, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2575, 2577, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2577, 2579, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2579, 2601, (byte) -19 ); // Fill 22 of value (byte) -19 - CHARS[2601] = 33; - Arrays.fill(CHARS, 2602, 2609, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2609] = 33; - Arrays.fill(CHARS, 2610, 2612, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2612] = 33; - Arrays.fill(CHARS, 2613, 2615, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2615] = 33; - Arrays.fill(CHARS, 2616, 2618, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2618, 2620, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2620] = -87; - CHARS[2621] = 33; - Arrays.fill(CHARS, 2622, 2627, (byte) -87 ); // Fill 5 of value (byte) -87 - Arrays.fill(CHARS, 2627, 2631, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2631, 2633, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2633, 2635, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2635, 2638, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 2638, 2649, (byte) 33 ); // Fill 11 of value (byte) 33 - Arrays.fill(CHARS, 2649, 2653, (byte) -19 ); // Fill 4 of value (byte) -19 - CHARS[2653] = 33; - CHARS[2654] = -19; - Arrays.fill(CHARS, 2655, 2662, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 2662, 2674, (byte) -87 ); // Fill 12 of value (byte) -87 - Arrays.fill(CHARS, 2674, 2677, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 2677, 2689, (byte) 33 ); // Fill 12 of value (byte) 33 - Arrays.fill(CHARS, 2689, 2692, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2692] = 33; - Arrays.fill(CHARS, 2693, 2700, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2700] = 33; - CHARS[2701] = -19; - CHARS[2702] = 33; - Arrays.fill(CHARS, 2703, 2706, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[2706] = 33; - Arrays.fill(CHARS, 2707, 2729, (byte) -19 ); // Fill 22 of value (byte) -19 - CHARS[2729] = 33; - Arrays.fill(CHARS, 2730, 2737, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2737] = 33; - Arrays.fill(CHARS, 2738, 2740, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2740] = 33; - Arrays.fill(CHARS, 2741, 2746, (byte) -19 ); // Fill 5 of value (byte) -19 - Arrays.fill(CHARS, 2746, 2748, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2748] = -87; - CHARS[2749] = -19; - Arrays.fill(CHARS, 2750, 2758, (byte) -87 ); // Fill 8 of value (byte) -87 - CHARS[2758] = 33; - Arrays.fill(CHARS, 2759, 2762, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2762] = 33; - Arrays.fill(CHARS, 2763, 2766, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 2766, 2784, (byte) 33 ); // Fill 18 of value (byte) 33 - CHARS[2784] = -19; - Arrays.fill(CHARS, 2785, 2790, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 2790, 2800, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 2800, 2817, (byte) 33 ); // Fill 17 of value (byte) 33 - Arrays.fill(CHARS, 2817, 2820, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[2820] = 33; - Arrays.fill(CHARS, 2821, 2829, (byte) -19 ); // Fill 8 of value (byte) -19 - Arrays.fill(CHARS, 2829, 2831, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2831, 2833, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2833, 2835, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2835, 2857, (byte) -19 ); // Fill 22 of value (byte) -19 - CHARS[2857] = 33; - Arrays.fill(CHARS, 2858, 2865, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[2865] = 33; - Arrays.fill(CHARS, 2866, 2868, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2868, 2870, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2870, 2874, (byte) -19 ); // Fill 4 of value (byte) -19 - Arrays.fill(CHARS, 2874, 2876, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[2876] = -87; - CHARS[2877] = -19; - Arrays.fill(CHARS, 2878, 2884, (byte) -87 ); // Fill 6 of value (byte) -87 - Arrays.fill(CHARS, 2884, 2887, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2887, 2889, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2889, 2891, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 2891, 2894, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 2894, 2902, (byte) 33 ); // Fill 8 of value (byte) 33 - Arrays.fill(CHARS, 2902, 2904, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 2904, 2908, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2908, 2910, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2910] = 33; - Arrays.fill(CHARS, 2911, 2914, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 2914, 2918, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 2918, 2928, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 2928, 2946, (byte) 33 ); // Fill 18 of value (byte) 33 - Arrays.fill(CHARS, 2946, 2948, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[2948] = 33; - Arrays.fill(CHARS, 2949, 2955, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 2955, 2958, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2958, 2961, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[2961] = 33; - Arrays.fill(CHARS, 2962, 2966, (byte) -19 ); // Fill 4 of value (byte) -19 - Arrays.fill(CHARS, 2966, 2969, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2969, 2971, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[2971] = 33; - CHARS[2972] = -19; - CHARS[2973] = 33; - Arrays.fill(CHARS, 2974, 2976, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2976, 2979, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2979, 2981, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 2981, 2984, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2984, 2987, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 2987, 2990, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 2990, 2998, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[2998] = 33; - Arrays.fill(CHARS, 2999, 3002, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 3002, 3006, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3006, 3011, (byte) -87 ); // Fill 5 of value (byte) -87 - Arrays.fill(CHARS, 3011, 3014, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 3014, 3017, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3017] = 33; - Arrays.fill(CHARS, 3018, 3022, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 3022, 3031, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[3031] = -87; - Arrays.fill(CHARS, 3032, 3047, (byte) 33 ); // Fill 15 of value (byte) 33 - Arrays.fill(CHARS, 3047, 3056, (byte) -87 ); // Fill 9 of value (byte) -87 - Arrays.fill(CHARS, 3056, 3073, (byte) 33 ); // Fill 17 of value (byte) 33 - Arrays.fill(CHARS, 3073, 3076, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3076] = 33; - Arrays.fill(CHARS, 3077, 3085, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[3085] = 33; - Arrays.fill(CHARS, 3086, 3089, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[3089] = 33; - Arrays.fill(CHARS, 3090, 3113, (byte) -19 ); // Fill 23 of value (byte) -19 - CHARS[3113] = 33; - Arrays.fill(CHARS, 3114, 3124, (byte) -19 ); // Fill 10 of value (byte) -19 - CHARS[3124] = 33; - Arrays.fill(CHARS, 3125, 3130, (byte) -19 ); // Fill 5 of value (byte) -19 - Arrays.fill(CHARS, 3130, 3134, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3134, 3141, (byte) -87 ); // Fill 7 of value (byte) -87 - CHARS[3141] = 33; - Arrays.fill(CHARS, 3142, 3145, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3145] = 33; - Arrays.fill(CHARS, 3146, 3150, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 3150, 3157, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 3157, 3159, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 3159, 3168, (byte) 33 ); // Fill 9 of value (byte) 33 - Arrays.fill(CHARS, 3168, 3170, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3170, 3174, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3174, 3184, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3184, 3202, (byte) 33 ); // Fill 18 of value (byte) 33 - Arrays.fill(CHARS, 3202, 3204, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[3204] = 33; - Arrays.fill(CHARS, 3205, 3213, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[3213] = 33; - Arrays.fill(CHARS, 3214, 3217, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[3217] = 33; - Arrays.fill(CHARS, 3218, 3241, (byte) -19 ); // Fill 23 of value (byte) -19 - CHARS[3241] = 33; - Arrays.fill(CHARS, 3242, 3252, (byte) -19 ); // Fill 10 of value (byte) -19 - CHARS[3252] = 33; - Arrays.fill(CHARS, 3253, 3258, (byte) -19 ); // Fill 5 of value (byte) -19 - Arrays.fill(CHARS, 3258, 3262, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3262, 3269, (byte) -87 ); // Fill 7 of value (byte) -87 - CHARS[3269] = 33; - Arrays.fill(CHARS, 3270, 3273, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3273] = 33; - Arrays.fill(CHARS, 3274, 3278, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 3278, 3285, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 3285, 3287, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 3287, 3294, (byte) 33 ); // Fill 7 of value (byte) 33 - CHARS[3294] = -19; - CHARS[3295] = 33; - Arrays.fill(CHARS, 3296, 3298, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3298, 3302, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3302, 3312, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3312, 3330, (byte) 33 ); // Fill 18 of value (byte) 33 - Arrays.fill(CHARS, 3330, 3332, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[3332] = 33; - Arrays.fill(CHARS, 3333, 3341, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[3341] = 33; - Arrays.fill(CHARS, 3342, 3345, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[3345] = 33; - Arrays.fill(CHARS, 3346, 3369, (byte) -19 ); // Fill 23 of value (byte) -19 - CHARS[3369] = 33; - Arrays.fill(CHARS, 3370, 3386, (byte) -19 ); // Fill 16 of value (byte) -19 - Arrays.fill(CHARS, 3386, 3390, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3390, 3396, (byte) -87 ); // Fill 6 of value (byte) -87 - Arrays.fill(CHARS, 3396, 3398, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3398, 3401, (byte) -87 ); // Fill 3 of value (byte) -87 - CHARS[3401] = 33; - Arrays.fill(CHARS, 3402, 3406, (byte) -87 ); // Fill 4 of value (byte) -87 - Arrays.fill(CHARS, 3406, 3415, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[3415] = -87; - Arrays.fill(CHARS, 3416, 3424, (byte) 33 ); // Fill 8 of value (byte) 33 - Arrays.fill(CHARS, 3424, 3426, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3426, 3430, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3430, 3440, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3440, 3585, (byte) 33 ); // Fill 145 of value (byte) 33 - Arrays.fill(CHARS, 3585, 3631, (byte) -19 ); // Fill 46 of value (byte) -19 - CHARS[3631] = 33; - CHARS[3632] = -19; - CHARS[3633] = -87; - Arrays.fill(CHARS, 3634, 3636, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3636, 3643, (byte) -87 ); // Fill 7 of value (byte) -87 - Arrays.fill(CHARS, 3643, 3648, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 3648, 3654, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 3654, 3663, (byte) -87 ); // Fill 9 of value (byte) -87 - CHARS[3663] = 33; - Arrays.fill(CHARS, 3664, 3674, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3674, 3713, (byte) 33 ); // Fill 39 of value (byte) 33 - Arrays.fill(CHARS, 3713, 3715, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[3715] = 33; - CHARS[3716] = -19; - Arrays.fill(CHARS, 3717, 3719, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3719, 3721, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[3721] = 33; - CHARS[3722] = -19; - Arrays.fill(CHARS, 3723, 3725, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[3725] = -19; - Arrays.fill(CHARS, 3726, 3732, (byte) 33 ); // Fill 6 of value (byte) 33 - Arrays.fill(CHARS, 3732, 3736, (byte) -19 ); // Fill 4 of value (byte) -19 - CHARS[3736] = 33; - Arrays.fill(CHARS, 3737, 3744, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[3744] = 33; - Arrays.fill(CHARS, 3745, 3748, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[3748] = 33; - CHARS[3749] = -19; - CHARS[3750] = 33; - CHARS[3751] = -19; - Arrays.fill(CHARS, 3752, 3754, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3754, 3756, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[3756] = 33; - Arrays.fill(CHARS, 3757, 3759, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[3759] = 33; - CHARS[3760] = -19; - CHARS[3761] = -87; - Arrays.fill(CHARS, 3762, 3764, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 3764, 3770, (byte) -87 ); // Fill 6 of value (byte) -87 - CHARS[3770] = 33; - Arrays.fill(CHARS, 3771, 3773, (byte) -87 ); // Fill 2 of value (byte) -87 - CHARS[3773] = -19; - Arrays.fill(CHARS, 3774, 3776, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3776, 3781, (byte) -19 ); // Fill 5 of value (byte) -19 - CHARS[3781] = 33; - CHARS[3782] = -87; - CHARS[3783] = 33; - Arrays.fill(CHARS, 3784, 3790, (byte) -87 ); // Fill 6 of value (byte) -87 - Arrays.fill(CHARS, 3790, 3792, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 3792, 3802, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3802, 3864, (byte) 33 ); // Fill 62 of value (byte) 33 - Arrays.fill(CHARS, 3864, 3866, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 3866, 3872, (byte) 33 ); // Fill 6 of value (byte) 33 - Arrays.fill(CHARS, 3872, 3882, (byte) -87 ); // Fill 10 of value (byte) -87 - Arrays.fill(CHARS, 3882, 3893, (byte) 33 ); // Fill 11 of value (byte) 33 - CHARS[3893] = -87; - CHARS[3894] = 33; - CHARS[3895] = -87; - CHARS[3896] = 33; - CHARS[3897] = -87; - Arrays.fill(CHARS, 3898, 3902, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3902, 3904, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 3904, 3912, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[3912] = 33; - Arrays.fill(CHARS, 3913, 3946, (byte) -19 ); // Fill 33 of value (byte) -19 - Arrays.fill(CHARS, 3946, 3953, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 3953, 3973, (byte) -87 ); // Fill 20 of value (byte) -87 - CHARS[3973] = 33; - Arrays.fill(CHARS, 3974, 3980, (byte) -87 ); // Fill 6 of value (byte) -87 - Arrays.fill(CHARS, 3980, 3984, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 3984, 3990, (byte) -87 ); // Fill 6 of value (byte) -87 - CHARS[3990] = 33; - CHARS[3991] = -87; - CHARS[3992] = 33; - Arrays.fill(CHARS, 3993, 4014, (byte) -87 ); // Fill 21 of value (byte) -87 - Arrays.fill(CHARS, 4014, 4017, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 4017, 4024, (byte) -87 ); // Fill 7 of value (byte) -87 - CHARS[4024] = 33; - CHARS[4025] = -87; - Arrays.fill(CHARS, 4026, 4256, (byte) 33 ); // Fill 230 of value (byte) 33 - Arrays.fill(CHARS, 4256, 4294, (byte) -19 ); // Fill 38 of value (byte) -19 - Arrays.fill(CHARS, 4294, 4304, (byte) 33 ); // Fill 10 of value (byte) 33 - Arrays.fill(CHARS, 4304, 4343, (byte) -19 ); // Fill 39 of value (byte) -19 - Arrays.fill(CHARS, 4343, 4352, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[4352] = -19; - CHARS[4353] = 33; - Arrays.fill(CHARS, 4354, 4356, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[4356] = 33; - Arrays.fill(CHARS, 4357, 4360, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[4360] = 33; - CHARS[4361] = -19; - CHARS[4362] = 33; - Arrays.fill(CHARS, 4363, 4365, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[4365] = 33; - Arrays.fill(CHARS, 4366, 4371, (byte) -19 ); // Fill 5 of value (byte) -19 - Arrays.fill(CHARS, 4371, 4412, (byte) 33 ); // Fill 41 of value (byte) 33 - CHARS[4412] = -19; - CHARS[4413] = 33; - CHARS[4414] = -19; - CHARS[4415] = 33; - CHARS[4416] = -19; - Arrays.fill(CHARS, 4417, 4428, (byte) 33 ); // Fill 11 of value (byte) 33 - CHARS[4428] = -19; - CHARS[4429] = 33; - CHARS[4430] = -19; - CHARS[4431] = 33; - CHARS[4432] = -19; - Arrays.fill(CHARS, 4433, 4436, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 4436, 4438, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 4438, 4441, (byte) 33 ); // Fill 3 of value (byte) 33 - CHARS[4441] = -19; - Arrays.fill(CHARS, 4442, 4447, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 4447, 4450, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[4450] = 33; - CHARS[4451] = -19; - CHARS[4452] = 33; - CHARS[4453] = -19; - CHARS[4454] = 33; - CHARS[4455] = -19; - CHARS[4456] = 33; - CHARS[4457] = -19; - Arrays.fill(CHARS, 4458, 4461, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 4461, 4463, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 4463, 4466, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 4466, 4468, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[4468] = 33; - CHARS[4469] = -19; - Arrays.fill(CHARS, 4470, 4510, (byte) 33 ); // Fill 40 of value (byte) 33 - CHARS[4510] = -19; - Arrays.fill(CHARS, 4511, 4520, (byte) 33 ); // Fill 9 of value (byte) 33 - CHARS[4520] = -19; - Arrays.fill(CHARS, 4521, 4523, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[4523] = -19; - Arrays.fill(CHARS, 4524, 4526, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 4526, 4528, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 4528, 4535, (byte) 33 ); // Fill 7 of value (byte) 33 - Arrays.fill(CHARS, 4535, 4537, (byte) -19 ); // Fill 2 of value (byte) -19 - CHARS[4537] = 33; - CHARS[4538] = -19; - CHARS[4539] = 33; - Arrays.fill(CHARS, 4540, 4547, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 4547, 4587, (byte) 33 ); // Fill 40 of value (byte) 33 - CHARS[4587] = -19; - Arrays.fill(CHARS, 4588, 4592, (byte) 33 ); // Fill 4 of value (byte) 33 - CHARS[4592] = -19; - Arrays.fill(CHARS, 4593, 4601, (byte) 33 ); // Fill 8 of value (byte) 33 - CHARS[4601] = -19; - Arrays.fill(CHARS, 4602, 7680, (byte) 33 ); // Fill 3078 of value (byte) 33 - Arrays.fill(CHARS, 7680, 7836, (byte) -19 ); // Fill 156 of value (byte) -19 - Arrays.fill(CHARS, 7836, 7840, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 7840, 7930, (byte) -19 ); // Fill 90 of value (byte) -19 - Arrays.fill(CHARS, 7930, 7936, (byte) 33 ); // Fill 6 of value (byte) 33 - Arrays.fill(CHARS, 7936, 7958, (byte) -19 ); // Fill 22 of value (byte) -19 - Arrays.fill(CHARS, 7958, 7960, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 7960, 7966, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 7966, 7968, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 7968, 8006, (byte) -19 ); // Fill 38 of value (byte) -19 - Arrays.fill(CHARS, 8006, 8008, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 8008, 8014, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 8014, 8016, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 8016, 8024, (byte) -19 ); // Fill 8 of value (byte) -19 - CHARS[8024] = 33; - CHARS[8025] = -19; - CHARS[8026] = 33; - CHARS[8027] = -19; - CHARS[8028] = 33; - CHARS[8029] = -19; - CHARS[8030] = 33; - Arrays.fill(CHARS, 8031, 8062, (byte) -19 ); // Fill 31 of value (byte) -19 - Arrays.fill(CHARS, 8062, 8064, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 8064, 8117, (byte) -19 ); // Fill 53 of value (byte) -19 - CHARS[8117] = 33; - Arrays.fill(CHARS, 8118, 8125, (byte) -19 ); // Fill 7 of value (byte) -19 - CHARS[8125] = 33; - CHARS[8126] = -19; - Arrays.fill(CHARS, 8127, 8130, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 8130, 8133, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[8133] = 33; - Arrays.fill(CHARS, 8134, 8141, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 8141, 8144, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 8144, 8148, (byte) -19 ); // Fill 4 of value (byte) -19 - Arrays.fill(CHARS, 8148, 8150, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 8150, 8156, (byte) -19 ); // Fill 6 of value (byte) -19 - Arrays.fill(CHARS, 8156, 8160, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 8160, 8173, (byte) -19 ); // Fill 13 of value (byte) -19 - Arrays.fill(CHARS, 8173, 8178, (byte) 33 ); // Fill 5 of value (byte) 33 - Arrays.fill(CHARS, 8178, 8181, (byte) -19 ); // Fill 3 of value (byte) -19 - CHARS[8181] = 33; - Arrays.fill(CHARS, 8182, 8189, (byte) -19 ); // Fill 7 of value (byte) -19 - Arrays.fill(CHARS, 8189, 8400, (byte) 33 ); // Fill 211 of value (byte) 33 - Arrays.fill(CHARS, 8400, 8413, (byte) -87 ); // Fill 13 of value (byte) -87 - Arrays.fill(CHARS, 8413, 8417, (byte) 33 ); // Fill 4 of value (byte) 33 - CHARS[8417] = -87; - Arrays.fill(CHARS, 8418, 8486, (byte) 33 ); // Fill 68 of value (byte) 33 - CHARS[8486] = -19; - Arrays.fill(CHARS, 8487, 8490, (byte) 33 ); // Fill 3 of value (byte) 33 - Arrays.fill(CHARS, 8490, 8492, (byte) -19 ); // Fill 2 of value (byte) -19 - Arrays.fill(CHARS, 8492, 8494, (byte) 33 ); // Fill 2 of value (byte) 33 - CHARS[8494] = -19; - Arrays.fill(CHARS, 8495, 8576, (byte) 33 ); // Fill 81 of value (byte) 33 - Arrays.fill(CHARS, 8576, 8579, (byte) -19 ); // Fill 3 of value (byte) -19 - Arrays.fill(CHARS, 8579, 12293, (byte) 33 ); // Fill 3714 of value (byte) 33 - CHARS[12293] = -87; - CHARS[12294] = 33; - CHARS[12295] = -19; - Arrays.fill(CHARS, 12296, 12321, (byte) 33 ); // Fill 25 of value (byte) 33 - Arrays.fill(CHARS, 12321, 12330, (byte) -19 ); // Fill 9 of value (byte) -19 - Arrays.fill(CHARS, 12330, 12336, (byte) -87 ); // Fill 6 of value (byte) -87 - CHARS[12336] = 33; - Arrays.fill(CHARS, 12337, 12342, (byte) -87 ); // Fill 5 of value (byte) -87 - Arrays.fill(CHARS, 12342, 12353, (byte) 33 ); // Fill 11 of value (byte) 33 - Arrays.fill(CHARS, 12353, 12437, (byte) -19 ); // Fill 84 of value (byte) -19 - Arrays.fill(CHARS, 12437, 12441, (byte) 33 ); // Fill 4 of value (byte) 33 - Arrays.fill(CHARS, 12441, 12443, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 12443, 12445, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 12445, 12447, (byte) -87 ); // Fill 2 of value (byte) -87 - Arrays.fill(CHARS, 12447, 12449, (byte) 33 ); // Fill 2 of value (byte) 33 - Arrays.fill(CHARS, 12449, 12539, (byte) -19 ); // Fill 90 of value (byte) -19 - CHARS[12539] = 33; - Arrays.fill(CHARS, 12540, 12543, (byte) -87 ); // Fill 3 of value (byte) -87 - Arrays.fill(CHARS, 12543, 12549, (byte) 33 ); // Fill 6 of value (byte) 33 - Arrays.fill(CHARS, 12549, 12589, (byte) -19 ); // Fill 40 of value (byte) -19 - Arrays.fill(CHARS, 12589, 19968, (byte) 33 ); // Fill 7379 of value (byte) 33 - Arrays.fill(CHARS, 19968, 40870, (byte) -19 ); // Fill 20902 of value (byte) -19 - Arrays.fill(CHARS, 40870, 44032, (byte) 33 ); // Fill 3162 of value (byte) 33 - Arrays.fill(CHARS, 44032, 55204, (byte) -19 ); // Fill 11172 of value (byte) -19 - Arrays.fill(CHARS, 55204, 55296, (byte) 33 ); // Fill 92 of value (byte) 33 - Arrays.fill(CHARS, 57344, 65534, (byte) 33 ); // Fill 8190 of value (byte) 33 - - } // () - - // - // Public static methods - // - - /** - * @return true if the specified character is a supplemental character. - * - * @param c The character to check. - */ - public static boolean isSupplemental(int c) { - return (c >= 0x10000 && c <= 0x10FFFF); - } - - /** - * @return true the supplemental character corresponding to the given - * surrogates. - * - * @param h The high surrogate. - * @param l The low surrogate. - */ - public static int supplemental(char h, char l) { - return (h - 0xD800) * 0x400 + (l - 0xDC00) + 0x10000; - } - - /** - * @return the high surrogate of a supplemental character - * - * @param c The supplemental character to "split". - */ - public static char highSurrogate(int c) { - return (char) (((c - 0x00010000) >> 10) + 0xD800); - } - - /** - * @return the low surrogate of a supplemental character - * - * @param c The supplemental character to "split". - */ - public static char lowSurrogate(int c) { - return (char) (((c - 0x00010000) & 0x3FF) + 0xDC00); - } - - /** - * @return whether the given character is a high surrogate - * - * @param c The character to check. - */ - public static boolean isHighSurrogate(int c) { - return (0xD800 <= c && c <= 0xDBFF); - } - - /** - * @return whether the given character is a low surrogate - * - * @param c The character to check. - */ - public static boolean isLowSurrogate(int c) { - return (0xDC00 <= c && c <= 0xDFFF); - } - - - /** - * @return true if the specified character is valid. This method - * also checks the surrogate character range from 0x10000 to 0x10FFFF. - *

- * If the program chooses to apply the mask directly to the - * CHARS array, then they are responsible for checking - * the surrogate character range. - * - * @param c The character to check. - */ - public static boolean isValid(int c) { - return (c < 0x10000 && (CHARS[c] & MASK_VALID) != 0) || - (0x10000 <= c && c <= 0x10FFFF); - } // isValid(int):boolean - - /** - * @return true if the specified character is invalid. - * - * @param c The character to check. - */ - public static boolean isInvalid(int c) { - return !isValid(c); - } // isInvalid(int):boolean - - /** - * @return true if the specified character can be considered content. - * - * @param c The character to check. - */ - public static boolean isContent(int c) { - return (c < 0x10000 && (CHARS[c] & MASK_CONTENT) != 0) || - (0x10000 <= c && c <= 0x10FFFF); - } // isContent(int):boolean - - /** - * @return true if the specified character can be considered markup. - * Markup characters include '<', '&', and '%'. - * - * @param c The character to check. - */ - public static boolean isMarkup(int c) { - return c == '<' || c == '&' || c == '%'; - } // isMarkup(int):boolean - - /** - * @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. - */ - public static boolean isSpace(int c) { - return c <= 0x20 && (CHARS[c] & MASK_SPACE) != 0; - } // isSpace(int):boolean - - /** - * @return true if the specified character is a valid name start - * character as defined by production [5] in the XML 1.0 - * specification. - * - * @param c The character to check. - */ - public static boolean isNameStart(int c) { - return c < 0x10000 && (CHARS[c] & MASK_NAME_START) != 0; - } // isNameStart(int):boolean - - /** - * @return true if the specified character is a valid name - * character as defined by production [4] in the XML 1.0 - * specification. - * - * @param c The character to check. - */ - public static boolean isName(int c) { - return c < 0x10000 && (CHARS[c] & MASK_NAME) != 0; - } // isName(int):boolean - - /** - * @return true if the specified character is a valid NCName start - * character as defined by production [4] in Namespaces in XML - * recommendation. - * - * @param c The character to check. - */ - public static boolean isNCNameStart(int c) { - return c < 0x10000 && (CHARS[c] & MASK_NCNAME_START) != 0; - } // isNCNameStart(int):boolean - - /** - * @return true if the specified character is a valid NCName - * character as defined by production [5] in Namespaces in XML - * recommendation. - * - * @param c The character to check. - */ - public static boolean isNCName(int c) { - return c < 0x10000 && (CHARS[c] & MASK_NCNAME) != 0; - } // isNCName(int):boolean - - /** - * @return true if the specified character is a valid Pubid - * character as defined by production [13] in the XML 1.0 - * specification. - * - * @param c The character to check. - */ - public static boolean isPubid(int c) { - return c < 0x10000 && (CHARS[c] & MASK_PUBID) != 0; - } // isPubid(int):boolean - - /* - * [5] Name ::= (Letter | '_' | ':') (NameChar)* - */ - /** - * Check to see if a string is a valid Name according to [5] - * in the XML 1.0 Recommendation - * - * @param name string to check - * @return true if name is a valid Name - */ - public static boolean isValidName(String name) { - if (name.length() == 0) - return false; - char ch = name.charAt(0); - if( isNameStart(ch) == false) - return false; - for (int i = 1; i < name.length(); i++ ) { - ch = name.charAt(i); - if( isName( ch ) == false ){ - return false; - } - } - return true; - } // isValidName(String):boolean - - - /* - * from the namespace rec - * [4] NCName ::= (Letter | '_') (NCNameChar)* - */ - /** - * Check to see if a string is a valid NCName according to [4] - * from the XML Namespaces 1.0 Recommendation - * - * @param ncName string to check - * @return true if name is a valid NCName - */ - public static boolean isValidNCName(String ncName) { - if (ncName.length() == 0) - return false; - char ch = ncName.charAt(0); - if( isNCNameStart(ch) == false) - return false; - for (int i = 1; i < ncName.length(); i++ ) { - ch = ncName.charAt(i); - if( isNCName( ch ) == false ){ - return false; - } - } - return true; - } // isValidNCName(String):boolean - - /* - * [7] Nmtoken ::= (NameChar)+ - */ - /** - * Check to see if a string is a valid Nmtoken according to [7] - * in the XML 1.0 Recommendation - * - * @param nmtoken string to check - * @return true if nmtoken is a valid Nmtoken - */ - public static boolean isValidNmtoken(String nmtoken) { - if (nmtoken.length() == 0) - return false; - for (int i = 0; i < nmtoken.length(); i++ ) { - char ch = nmtoken.charAt(i); - if( ! isName( ch ) ){ - return false; - } - } - return true; - } // isValidName(String):boolean - - - - - - // encodings - - /** - * @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. - * - * @param ianaEncoding The IANA encoding name. - */ - public static boolean isValidIANAEncoding(String ianaEncoding) { - if (ianaEncoding != null) { - int length = ianaEncoding.length(); - if (length > 0) { - char c = ianaEncoding.charAt(0); - if ((c >= 'A' && c <= 'Z') || (c >= 'a' && c <= 'z')) { - for (int i = 1; i < length; i++) { - c = ianaEncoding.charAt(i); - if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && - (c < '0' || c > '9') && c != '.' && c != '_' && - c != '-') { - return false; - } - } - return true; - } - } - } - return false; - } // isValidIANAEncoding(String):boolean - - /** - * @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. - * - * @param javaEncoding The Java encoding name. - */ - public static boolean isValidJavaEncoding(String javaEncoding) { - if (javaEncoding != null) { - int length = javaEncoding.length(); - if (length > 0) { - for (int i = 1; i < length; i++) { - char c = javaEncoding.charAt(i); - if ((c < 'A' || c > 'Z') && (c < 'a' || c > 'z') && - (c < '0' || c > '9') && c != '.' && c != '_' && - c != '-') { - return false; - } - } - return true; - } - } - return false; - } // isValidIANAEncoding(String):boolean - - -} // class XMLChar diff --git a/serializer/src/main/resources/org/apache/xml/serializer/Encodings.properties b/serializer/src/main/resources/org/apache/xml/serializer/Encodings.properties deleted file mode 100644 index c1e3d8fcc..000000000 --- a/serializer/src/main/resources/org/apache/xml/serializer/Encodings.properties +++ /dev/null @@ -1,263 +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$ -# -# Each entry in this properties file is: -# 1) The Java name for the encoding -# 2) A comma separated list of the MIME names for the encoding, -# with the first one being the preferred MIME name. -# 3) An optional high char. Characters at or below this value are -# definately in the encoding, but characters above it may or may not be. -# This value is given only for performance reasons. -# A value of zero is the same as no value at all. -# -# For example this line in this file: -# ASCII ASCII,US-ASCII 0x007F -# Means the Java name for the encoding is "ASCII". The MIME names for this -# encoding which may appear in a stylesheet are "ASCII" or "US-ASCII" -# and the optional high code point value is given, and it is 0X007F -# which means that the contiguous block of chars from -# 0x0001 to 0x007F ( 127 in base 10) are all in the encoding. -# Higher values above this char might be in the encoding, although in the -# case of this particular encoding there are no higher chars. -# -# NOTE: When a Java or MIME names appears more than once in this -# table, priority is given to the first instance seen. For example, -# MIME name ISO-8859-1 will be mapped to Java name ISO8859-1. -# -# , -# -# -ASCII ASCII,US-ASCII 0x007F -# -# Big5, Traditional Chinese -Big5 BIG5,csBig5 0x007F -#Big5 with Hong Kong extensions, Traditional Chinese (incorporating 2001 revision) -Big5_HKSCS BIG5-HKSCS 0x007F -# USA, Canada (Bilingual, French), Netherlands, Portugal, Brazil, Australia -Cp037 EBCDIC-CP-US,EBCDIC-CP-CA,EBCDIC-CP-WT,EBCDIC-CP-NL,IBM037 0x0019 -# IBM Austria, Germany -Cp273 IBM273,csIBM273 0x0019 -Cp274 csIBM274,EBCDIC-BE -Cp275 csIBM275,EBCDIC-BR -# IBM Denmark, Norway -Cp277 EBCDIC-CP-DK,EBCDIC-CP-NO,IBM277,csIBM277 0x0019 -# IBM Finland, Sweden -Cp278 EBCDIC-CP-FI,EBCDIC-CP-SE,IBM278,csIBM278 0x0019 -# IBM Italy -Cp280 EBCDIC-CP-IT,IBM280,csIBM280 0x0019 -Cp281 EBCDIC-JP-E,csIBM281 -# IBM Catalan/Spain, Spanish Latin America -Cp284 EBCDIC-CP-ES,IBM284,csIBM284 0x0019 -# IBM United Kingdom, Ireland -Cp285 EBCDIC-CP-GB,IBM284,csIBM285 0x0019 -Cp290 EBCDIC-JP-kana,IBM290,csIBM290 0x0019 -# IBM France -Cp297 EBCDIC-CP-FR,IBM297,csIBM297 0x0019 -# IBM Arabic -Cp420 EBCDIC-CP-AR1,IBM420,csIBM420 0x0019 -Cp423 EBCDIC-CP-GR,IBM423,csIBM423 -# IBM Hebrew -Cp424 EBCDIC-CP-HE,IBM424,csIBM424 0x0019 -Cp437 437,IBM437,csPC8CodePage437 0x007F -# EBCDIC 500V1 -Cp500 EBCDIC-CP-CH,EBCDIC-CP-BE,IBM500,csIBM500 0x0019 -# PC Baltic -Cp775 IBM775,csPC775Baltic 0x007F -# IBM Thailand extended SBCS -Cp838 IBM-Thai,838,csIBMThai 0x0019 -# MS-DOS Latin-1 -Cp850 850,csPC850Multilingual,IBM850 0x007F -Cp851 851,IBM851,csIBM851 -# MS-DOS Latin-2 -Cp852 IBM852,852,csPCp852 0x007F -# IBM Cyrillic -Cp855 IBM855,855,csIBM855 0x007F -# IBM Turkish -Cp857 IBM857,857,csIBM857 0x007F -# Variant of Cp850 with Euro character -Cp858 IBM00858 0x007F -# MS-DOS Portuguese -Cp860 860,csIBM860,IBM860 0x007F -# MS-DOS Icelandic -Cp861 IBM861,861,csIBM861,cp-is 0x007F -# -Cp862 IBM862,862,csPCi62LatinHebrew 0x007F -# MS-DOS Canadian French -Cp863 IBM863,863,csIBM863 0x007F -# PC Arabic -Cp864 IBM864,864,csIBM864 0x007F -# MS-DOS Nordic -Cp865 IBM865,865,csIBM865 0x007F -# MS-DOS Russian -Cp866 IBM866,866,csIBM866 0x007F -# MS-DOS Pakistan -Cp868 IBM868,cp-ar,csIBM868 0x007F -# IBM Modern Greek -Cp869 IBM869,869,cp-gr,csIBM869 0x007F -# IBM Multilingual Latin-2 -Cp870 EBCDIC-CP-ROECE,EBCDIC-CP-YU,IBM870,csIBM870 0x0019 -# IBM Iceland -Cp871 EBCDIC-CP-IS,IBM871,csIBM871 0x0019 -Cp880 EBCDIC-Cyrillic,IBM880,csIBM880 -Cp891 IBM891,csIBM891 -Cp903 IBM903,csIBM903 -Cp904 IBM904,csIBM904 -Cp905 IBM905,csIBM905,EBCDIC-CP-TR -# IBM Pakistan (Urdu) -Cp918 EBCDIC-CP-AR2,IBM918,csIBM918 0x0019 -# GBK, Simplified Chinese -Cp936 GBK,MS936,WINDOWS-936 -# IBM Latin-5, Turkey -Cp1026 IBM1026,csIBM1026 0x0019 -# Latin-1 character set for EBCDIC hosts -Cp1047 IBM1047,IBM-1047 0x0019 -# Variant of Cp037 with Euro character -Cp1140 IBM01140 0x0019 -# Variant of Cp273 with Euro character -Cp1141 IBM01141 0x0019 -# Variant of Cp277 with Euro character -Cp1142 IBM01142 0x0019 -# Variant of Cp278 with Euro character -Cp1143 IBM01143 0x0019 -# Variant of Cp280 with Euro character -Cp1144 IBM01144 0x0019 -# Variant of Cp284 with Euro character -Cp1145 IBM01145 0x0019 -# Variant of Cp285 with Euro character -Cp1146 IBM01146 0x0019 -# Variant of Cp297 with Euro character -Cp1147 IBM01147 0x0019 -# Variant of Cp500 with Euro character -Cp1148 IBM01148 0x0019 -# Variant of Cp871 with Euro character -Cp1149 IBM01149 0x0019 -Cp1250 WINDOWS-1250 0x007F -Cp1251 WINDOWS-1251 0x007F -Cp1252 WINDOWS-1252 0x007F -Cp1253 WINDOWS-1253 0x007F -Cp1254 WINDOWS-1254 0x007F -# Windows Hebrew -Cp1255 WINDOWS-1255 0x007F -# Windows Arabic -Cp1256 WINDOWS-1256 0x007F -Cp1257 WINDOWS-1257 0x007F -# Windows Vietnamese -Cp1258 WINDOWS-1258 0x007F -EUC-CN EUC-CN 0x007F -EUC_CN EUC-CN 0x007F -# -#JISX 0201, 0208 and 0212, EUC encoding Japanese -EUC-JP EUC-JP 0x007F -EUC_JP EUC-JP 0x007F -# KS C 5601, EUC encoding, Korean -EUC-KR EUC-KR 0x007F -EUC_KR EUC-KR 0x007F -# CNS11643 (Plane 1-7,15), EUC encoding, Traditional Chinese -EUC-TW EUC-TW 0x007F -EUC_TW EUC-TW,x-EUC-TW 0x007F -EUCJIS EUC-JP 0x007F -# -# GB2312, EUC encoding, Simplified Chinese -GB2312 GB2312 0x007F - -# GB2312 and CNS11643 in ISO 2022 CN form, Simplified and Traditional Chinese (conversion to Unicode only) -ISO2022CN ISO-2022-CN -# JIS X 0201, 0208, in ISO 2022 form, Japanese -ISO2022JP ISO-2022-JP -# ISO 2022 KR, Korean -ISO2022KR ISO-2022-KR 0x007F -# -# -ISO8859-1 ISO-8859-1 0x00FF -ISO8859_1 ISO-8859-1 0x00FF -8859-1 ISO-8859-1 0x00FF -8859_1 ISO-8859-1 0x00FF -# -ISO8859-2 ISO-8859-2 0x00A0 -ISO8859_2 ISO-8859-2 0x00A0 -8859-2 ISO-8859-2 0x00A0 -8859_2 ISO-8859-2 0x00A0 -# -# Latin Alphabet No. 3 -ISO8859-3 ISO-8859-3 0x00A0 -ISO8859_3 ISO-8859-3 0x00A0 -8859-3 ISO-8859-3 0x00A0 -8859_3 ISO-8859-3 0x00A0 -# -ISO8859-4 ISO-8859-4 0x00A0 -ISO8859_4 ISO-8859-4 0x00A0 -8859-4 ISO-8859-4 0x00A0 -8859_4 ISO-8859-4 0x00A0 -# -ISO8859-5 ISO-8859-5 0x00A0 -ISO8859_5 ISO-8859-5 0x00A0 -8859-5 ISO-8859-5 0x00A0 -8859_5 ISO-8859-5 0x00A0 -# -# Latin/Arabic Alphabet -ISO8859-6 ISO-8859-6 0x00A0 -ISO8859_6 ISO-8859-6 0x00A0 -8859-6 ISO-8859-6 0x00A0 -8859_6 ISO-8859-6 0x00A0 -# -ISO8859-7 ISO-8859-7 0x00A0 -ISO8859_7 ISO-8859-7 0x00A0 -8859-7 ISO-8859-7 0x00A0 -8859_7 ISO-8859-7 0x00A0 -# -ISO8859-8 ISO-8859-8 0x00A0 -ISO8859_8 ISO-8859-8 0x00A0 -8859-8 ISO-8859-8 0x00A0 -8859_8 ISO-8859-8 0x00A0 -# -ISO8859-9 ISO-8859-9 0x00CF -ISO8859_9 ISO-8859-9 0x00CF -8859-9 ISO-8859-9 0x00CF -8859_9 ISO-8859-9 0x00CF -# -ISO8859-10 ISO-8859-10 0x007E -ISO8859_10 ISO-8859-10 0x007E -ISO8859-11 ISO-8859-11 0x007E -ISO8859_11 ISO-8859-11 0x007E -ISO8859-12 ISO-8859-12 0x007F -ISO8859_12 ISO-8859-12 0x007F -ISO8859-13 ISO-8859-13 0x00A0 -ISO8859_13 ISO-8859-13 0x00A0 -ISO8859-14 ISO-8859-14 0x007E -ISO8859_14 ISO-8859-14 0x007E -ISO8859-15 ISO-8859-15 0x00A3 -ISO8859_15 ISO-8859-15 0x00A3 -JIS ISO-2022-JP 0x007F -KOI8_R KOI8-R 0x007F -KSC5601 EUC-KR 0x007F -KS_C_5601-1987 KS_C_5601-1987,iso-ir-149,KS_C_5601-1989,KSC_5601,csKSC56011987 0x007F -MacTEC MacRoman -# Windows Japanese -MS932 windows-31j -# Shift-JIS, Japanese -SJIS SHIFT_JIS 0x007F -# TIS620, Thai -TIS620 TIS-620 -UTF8 UTF-8 0xFFFF -Unicode UNICODE,UTF-16 0xFFFF - -# note that more character set names and their aliases -# can be found at http://www.iana.org/assignments/character-sets - diff --git a/serializer/src/main/resources/org/apache/xml/serializer/HTMLEntities.properties b/serializer/src/main/resources/org/apache/xml/serializer/HTMLEntities.properties deleted file mode 100644 index db273c956..000000000 --- a/serializer/src/main/resources/org/apache/xml/serializer/HTMLEntities.properties +++ /dev/null @@ -1,311 +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$ -# -# @version $Revision$ $Date$ -# This file must be encoded in UTF-8; see CharInfo.java -# -# Character entity references for markup-significant -# -quot=34 -amp=38 -lt=60 -gt=62 -nbsp=160 -# -# Character entity references for ISO 8859-1 characters -# -iexcl=161 -cent=162 -pound=163 -curren=164 -yen=165 -brvbar=166 -sect=167 -uml=168 -copy=169 -ordf=170 -laquo=171 -not=172 -shy=173 -reg=174 -macr=175 -deg=176 -plusmn=177 -sup2=178 -sup3=179 -acute=180 -micro=181 -para=182 -middot=183 -cedil=184 -sup1=185 -ordm=186 -raquo=187 -frac14=188 -frac12=189 -frac34=190 -iquest=191 -Agrave=192 -Aacute=193 -Acirc=194 -Atilde=195 -Auml=196 -Aring=197 -AElig=198 -Ccedil=199 -Egrave=200 -Eacute=201 -Ecirc=202 -Euml=203 -Igrave=204 -Iacute=205 -Icirc=206 -Iuml=207 -ETH=208 -Ntilde=209 -Ograve=210 -Oacute=211 -Ocirc=212 -Otilde=213 -Ouml=214 -times=215 -Oslash=216 -Ugrave=217 -Uacute=218 -Ucirc=219 -Uuml=220 -Yacute=221 -THORN=222 -szlig=223 -agrave=224 -aacute=225 -acirc=226 -atilde=227 -auml=228 -aring=229 -aelig=230 -ccedil=231 -egrave=232 -eacute=233 -ecirc=234 -euml=235 -igrave=236 -iacute=237 -icirc=238 -iuml=239 -eth=240 -ntilde=241 -ograve=242 -oacute=243 -ocirc=244 -otilde=245 -ouml=246 -divide=247 -oslash=248 -ugrave=249 -uacute=250 -ucirc=251 -uuml=252 -yacute=253 -thorn=254 -yuml=255 -# -# Character entity references for symbols, mathematical symbols, and Greek letters -# -# Latin Extended -- Netscape can't handle -# fnof 402 -# -# Greek - Netscape can't handle these -# Alpha 913 -# Beta 914 -# Gamma 915 -# Delta 916 -# Epsilon 917 -# Zeta 918 -# Eta 919 -# Theta 920 -# Iota 921 -# Kappa 922 -# Lambda 923 -# Mu 924 -# Nu 925 -# Xi 926 -# Omicron 927 -# Pi 928 -# Rho 929 -# Sigma 931 -# Tau 932 -# Upsilon 933 -# Phi 934 -# Chi 935 -# Psi 936 -# Omega 937 -# alpha 945 -# beta 946 -# gamma 947 -# delta 948 -# epsilon 949 -# zeta 950 -# eta 951 -# theta 952 -# iota 953 -# kappa 954 -# lambda 955 -# mu 956 -# nu 957 -# xi 958 -# omicron 959 -# pi 960 -# rho 961 -# sigmaf 962 -# sigma 963 -# tau 964 -# upsilon 965 -# phi 966 -# chi 967 -# psi 968 -# omega 969 -# thetasym 977 -# upsih 978 -# piv 982 -# -# General Punctuation -bull=8226 -hellip=8230 -prime=8242 -Prime=8243 -oline=8254 -frasl=8260 -# -# Letterlike Symbols -weierp=8472 -image=8465 -real=8476 -trade=8482 -alefsym=8501 -# -# Arrows -larr=8592 -uarr=8593 -rarr=8594 -darr=8595 -harr=8596 -crarr=8629 -lArr=8656 -uArr=8657 -rArr=8658 -dArr=8659 -hArr=8660 -# -# Mathematical Operators -forall=8704 -part=8706 -exist=8707 -empty=8709 -nabla=8711 -isin=8712 -notin=8713 -ni=8715 -prod=8719 -sum=8721 -minus=8722 -lowast=8727 -radic=8730 -prop=8733 -infin=8734 -ang=8736 -and=8743 -or=8744 -cap=8745 -cup=8746 -int=8747 -there4=8756 -sim=8764 -cong=8773 -asymp=8776 -ne=8800 -equiv=8801 -le=8804 -ge=8805 -sub=8834 -sup=8835 -nsub=8836 -sube=8838 -supe=8839 -oplus=8853 -otimes=8855 -perp=8869 -sdot=8901 -# -# Miscellaneous Technical -lceil=8968 -rceil=8969 -lfloor=8970 -rfloor=8971 -lang=9001 -rang=9002 -# -# Geometric Shapes -loz=9674 -# -# Miscellaneous Symbols -spades=9824 -clubs=9827 -hearts=9829 -diams=9830 -# -# Character entity references for internationalization characters -# -# Latin Extended-A -# Netscape can't handle! -# OElig 338 -# oelig 339 - -#-- NN 4.7 does not seem to support these, so they might ought to be commented. -# Scaron 352 -# scaron 353 -# Yuml 376 -# -# Spacing Modifier Letters -- Netscape can't handle -# circ 710 -# tilde 732 -# -# General Punctuation -ensp=8194 -emsp=8195 -thinsp=8201 -zwnj=8204 -zwj=8205 -lrm=8206 -rlm=8207 -ndash=8211 -mdash=8212 -lsquo=8216 -rsquo=8217 -sbquo=8218 -ldquo=8220 -rdquo=8221 -bdquo=8222 -dagger=8224 -Dagger=8225 -permil=8240 -lsaquo=8249 -rsaquo=8250 -euro=8364 diff --git a/serializer/src/main/resources/org/apache/xml/serializer/XMLEntities.properties b/serializer/src/main/resources/org/apache/xml/serializer/XMLEntities.properties deleted file mode 100644 index 2ac3a0517..000000000 --- a/serializer/src/main/resources/org/apache/xml/serializer/XMLEntities.properties +++ /dev/null @@ -1,30 +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$ -# -# @version $Revision$ $Date$ -# This file must be encoded in UTF-8; see CharInfo.java -# -# Character entity references for markup-significant -# -quot=34 -amp=38 -lt=60 -gt=62 - diff --git a/serializer/src/main/resources/org/apache/xml/serializer/output_html.properties b/serializer/src/main/resources/org/apache/xml/serializer/output_html.properties deleted file mode 100644 index 078877236..000000000 --- a/serializer/src/main/resources/org/apache/xml/serializer/output_html.properties +++ /dev/null @@ -1,44 +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$ -# -# Specify defaults when method="html". These defaults use output_xml.properties -# as a base. -# - -# XSLT properties do not need namespace qualification. -method=html -indent=yes -media-type=text/html -version=4.0 - -# Xalan-specific output properties. These can be overridden in the stylesheet -# assigning a xalan namespace. For example: -# -# -# ... -# Note that the colon after the protocol needs to be escaped. -{http\u003a//xml.apache.org/xalan}indent-amount=0 -{http\u003a//xml.apache.org/xalan}content-handler=org.apache.xml.serializer.ToHTMLStream -{http\u003a//xml.apache.org/xalan}entities=org/apache/xml/serializer/HTMLEntities -{http\u003a//xml.apache.org/xalan}use-url-escaping=yes -{http\u003a//xml.apache.org/xalan}omit-meta-tag=no diff --git a/serializer/src/main/resources/org/apache/xml/serializer/output_text.properties b/serializer/src/main/resources/org/apache/xml/serializer/output_text.properties deleted file mode 100644 index 7864d4f5d..000000000 --- a/serializer/src/main/resources/org/apache/xml/serializer/output_text.properties +++ /dev/null @@ -1,37 +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$ -# -# Specify defaults when method="text". -# - -# XSLT properties do not need namespace qualification. -method=text -media-type=text/plain - -# Xalan-specific output properties. These can be overridden in the stylesheet -# assigning a xalan namespace. For example: -# -# -# ... -# Note that the colon after the protocol needs to be escaped. -{http\u003a//xml.apache.org/xalan}content-handler=org.apache.xml.serializer.ToTextStream diff --git a/serializer/src/main/resources/org/apache/xml/serializer/output_unknown.properties b/serializer/src/main/resources/org/apache/xml/serializer/output_unknown.properties deleted file mode 100644 index 995da3e50..000000000 --- a/serializer/src/main/resources/org/apache/xml/serializer/output_unknown.properties +++ /dev/null @@ -1,46 +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$ -# -# Specify defaults when no method="..." is specified. -# This type of output will quickly switch to "xml" or "html" -# depending on the first element name. -# - -# XSLT properties do not need namespace qualification. -method=xml -version=1.0 -encoding=UTF-8 -indent=no -omit-xml-declaration=no -standalone=no -media-type=text/xml - -# Xalan-specific output properties. These can be overridden in the stylesheet -# assigning a xalan namespace. For example: -# -# -# ... -# Note that the colon after the protocol needs to be escaped. -{http\u003a//xml.apache.org/xalan}indent-amount=0 -{http\u003a//xml.apache.org/xalan}content-handler=org.apache.xml.serializer.ToUnknownStream - diff --git a/serializer/src/main/resources/org/apache/xml/serializer/output_xml.properties b/serializer/src/main/resources/org/apache/xml/serializer/output_xml.properties deleted file mode 100644 index 237121e6d..000000000 --- a/serializer/src/main/resources/org/apache/xml/serializer/output_xml.properties +++ /dev/null @@ -1,55 +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$ -# -# Specify defaults when method="xml". These defaults serve as a base for -# other defaults, such as output_html and output_text. -# - -# XSLT properties do not need namespace qualification. -method=xml -version=1.0 -encoding=UTF-8 -indent=no -omit-xml-declaration=no -standalone=no -media-type=text/xml - -# Xalan-specific output properties. These can be overridden in the stylesheet -# assigning a xalan namespace. For example: -# -# -# ... -# Note that the colon after the protocol needs to be escaped. -# -# NOTE: Any change to formatting may break existing code which depends -# upon the previous default formatting. True, nobody likes the -# default of 0, but it's been there for two decades now and there is -# probably a LOT of code which expects it. Since the current behavior -# is not a bug, we really should at least try to census the user community -# on that before altering it. Not that our test suite is a perfect -# example of sensitivity to formatting. If we're going to alter it we should -# simultaneously update the tests and/or test framework to reflect it. -{http\u003a//xml.apache.org/xalan}indent-amount=0 -{http\u003a//xml.apache.org/xalan}content-handler=org.apache.xml.serializer.ToXMLStream -{http\u003a//xml.apache.org/xalan}entities=org/apache/xml/serializer/XMLEntities - diff --git a/serializer/src/main/resources/org/apache/xml/serializer/package.html b/serializer/src/main/resources/org/apache/xml/serializer/package.html deleted file mode 100644 index d4dffd139..000000000 --- a/serializer/src/main/resources/org/apache/xml/serializer/package.html +++ /dev/null @@ -1,43 +0,0 @@ - - - - Xalan Serializer Package. - -

Processes SAX events into streams.

- -

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}).

-

{@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. -

-

XML mapping from characters to entity references is defined in - XMLEntities.res. HTML entity reference mapping is defined in HTMLEntities.res. -

-

Encoding information is defined in {@link org.apache.xml.serializer.Encodings}.

- - - - diff --git a/serializer/src/main/resources/org/apache/xml/serializer/version.properties b/serializer/src/main/resources/org/apache/xml/serializer/version.properties deleted file mode 100644 index defbd4820..000000000 --- a/serializer/src/main/resources/org/apache/xml/serializer/version.properties +++ /dev/null @@ -1 +0,0 @@ -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 deleted file mode 100644 index 486af2b60..000000000 --- a/serializer/src/test/java/org/apache/xml/serializer/VersionTest.java +++ /dev/null @@ -1,132 +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. - */ -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 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 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 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 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/stylebook/dtd/blocks.ent b/stylebook/dtd/blocks.ent deleted file mode 100644 index 5f352d1bf..000000000 --- a/stylebook/dtd/blocks.ent +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - -%markupEntity; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/dtd/book.dtd b/stylebook/dtd/book.dtd deleted file mode 100644 index 2f49ce990..000000000 --- a/stylebook/dtd/book.dtd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - -%externalEntity; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/dtd/changes.dtd b/stylebook/dtd/changes.dtd deleted file mode 100644 index 661affa86..000000000 --- a/stylebook/dtd/changes.dtd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - -%markupEntity; - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/dtd/characters.ent b/stylebook/dtd/characters.ent deleted file mode 100644 index 036c06d5e..000000000 --- a/stylebook/dtd/characters.ent +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/dtd/document.dtd b/stylebook/dtd/document.dtd deleted file mode 100644 index f7cf5b121..000000000 --- a/stylebook/dtd/document.dtd +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - -%blocksEntity; - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/dtd/faqs.dtd b/stylebook/dtd/faqs.dtd deleted file mode 100644 index 565d99f4b..000000000 --- a/stylebook/dtd/faqs.dtd +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - -%blocksEntity; - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/dtd/links.ent b/stylebook/dtd/links.ent deleted file mode 100644 index 63b002fff..000000000 --- a/stylebook/dtd/links.ent +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/dtd/markup.ent b/stylebook/dtd/markup.ent deleted file mode 100644 index 66319e5f7..000000000 --- a/stylebook/dtd/markup.ent +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - -%externalEntity; - - -%charEntity; - - -%linksEntity; - - - - - - - \ No newline at end of file diff --git a/stylebook/dtd/spec.dtd b/stylebook/dtd/spec.dtd deleted file mode 100644 index 260c80fc5..000000000 --- a/stylebook/dtd/spec.dtd +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/dtd/xsl-html40s.dtd b/stylebook/dtd/xsl-html40s.dtd deleted file mode 100644 index 611f56e0f..000000000 --- a/stylebook/dtd/xsl-html40s.dtd +++ /dev/null @@ -1,1520 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/graphics/button-a.gif b/stylebook/graphics/button-a.gif deleted file mode 100644 index 5d0b8c242..000000000 Binary files a/stylebook/graphics/button-a.gif and /dev/null differ diff --git a/stylebook/graphics/button-b.gif b/stylebook/graphics/button-b.gif deleted file mode 100644 index 06e03811a..000000000 Binary files a/stylebook/graphics/button-b.gif and /dev/null differ diff --git a/stylebook/loader.xml b/stylebook/loader.xml deleted file mode 100644 index a416d8426..000000000 --- a/stylebook/loader.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/stylebook/loaderdesign.xml b/stylebook/loaderdesign.xml deleted file mode 100644 index 975055b39..000000000 --- a/stylebook/loaderdesign.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/stylebook/resources/bottom.gif b/stylebook/resources/bottom.gif deleted file mode 100644 index f39031efa..000000000 Binary files a/stylebook/resources/bottom.gif and /dev/null differ diff --git a/stylebook/resources/button-asf-hi.gif b/stylebook/resources/button-asf-hi.gif deleted file mode 100644 index 08b880a74..000000000 Binary files a/stylebook/resources/button-asf-hi.gif and /dev/null differ diff --git a/stylebook/resources/button-asf-lo.gif b/stylebook/resources/button-asf-lo.gif deleted file mode 100644 index 134580f37..000000000 Binary files a/stylebook/resources/button-asf-lo.gif and /dev/null differ diff --git a/stylebook/resources/button-w3c-hi.gif b/stylebook/resources/button-w3c-hi.gif deleted file mode 100644 index 3bf0be395..000000000 Binary files a/stylebook/resources/button-w3c-hi.gif and /dev/null differ diff --git a/stylebook/resources/button-w3c-lo.gif b/stylebook/resources/button-w3c-lo.gif deleted file mode 100644 index d383d3dd9..000000000 Binary files a/stylebook/resources/button-w3c-lo.gif and /dev/null differ diff --git a/stylebook/resources/button-xml-hi.gif b/stylebook/resources/button-xml-hi.gif deleted file mode 100644 index 01d095ce4..000000000 Binary files a/stylebook/resources/button-xml-hi.gif and /dev/null differ diff --git a/stylebook/resources/button-xml-lo.gif b/stylebook/resources/button-xml-lo.gif deleted file mode 100644 index 5719c7ef0..000000000 Binary files a/stylebook/resources/button-xml-lo.gif and /dev/null differ diff --git a/stylebook/resources/close.gif b/stylebook/resources/close.gif deleted file mode 100644 index 48a9782ce..000000000 Binary files a/stylebook/resources/close.gif and /dev/null differ diff --git a/stylebook/resources/dot.gif b/stylebook/resources/dot.gif deleted file mode 100644 index 6227d1d86..000000000 Binary files a/stylebook/resources/dot.gif and /dev/null differ diff --git a/stylebook/resources/join.gif b/stylebook/resources/join.gif deleted file mode 100644 index 02e7611bb..000000000 Binary files a/stylebook/resources/join.gif and /dev/null differ diff --git a/stylebook/resources/line.gif b/stylebook/resources/line.gif deleted file mode 100644 index fd25c3943..000000000 Binary files a/stylebook/resources/line.gif and /dev/null differ diff --git a/stylebook/resources/logo.gif b/stylebook/resources/logo.gif deleted file mode 100644 index 53538c3f6..000000000 Binary files a/stylebook/resources/logo.gif and /dev/null differ diff --git a/stylebook/resources/right.gif b/stylebook/resources/right.gif deleted file mode 100644 index bcb50e386..000000000 Binary files a/stylebook/resources/right.gif and /dev/null differ diff --git a/stylebook/resources/script.js b/stylebook/resources/script.js deleted file mode 100644 index ebadeb2b8..000000000 --- a/stylebook/resources/script.js +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index e7749432f..000000000 Binary files a/stylebook/resources/separator.gif and /dev/null differ diff --git a/stylebook/resources/void.gif b/stylebook/resources/void.gif deleted file mode 100644 index 75b945d25..000000000 Binary files a/stylebook/resources/void.gif and /dev/null differ diff --git a/stylebook/sources/design/design2_0_0.xml b/stylebook/sources/design/design2_0_0.xml deleted file mode 100644 index e91b69f24..000000000 --- a/stylebook/sources/design/design2_0_0.xml +++ /dev/null @@ -1,293 +0,0 @@ - - - - -

xmllogo.gif

-

Author: Scott Boag
State: In Progress

-
    -
  • Introduction
  • -
  • Xalan Requirements
  • -
  • Overview of Architecture
  • -
  • Process Module
  • -
  • Templates Module
  • -
  • Transformer Module
  • -
      -
    • Stree Module
    • -
    • Extensions Module
    • -
    -
  • XPath Module
  • -
    • XPath Database Connection
    -
  • Utils Package
  • -
  • Other Packages
  • -
  • Xalan Stylesheet Complilation to Java
  • Future Optimizations
  • Coding Conventions
  • - -
  • Xalan-J 2.0 Javadoc
  • -
- -

This document presents the basic design for Xalan-J 2.0, which is a - refactoring - 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.

-

The main goals of this redesign are - to:

    -
  1. Make the design and code more understandable by Open Source - people.
  2. -
  3. Reduce code size and complexity.
  4. -
  5. By simplifying the code, make optimization easier.
  6. -
  7. Make modules generally more localized, and less tangled with other - modules.
  8. -
  9. Conform to the javax.xml.transform (TrAX [Transformations for XML]) interfaces.
  10. -
  11. Increase the ability to incrementally produce the result tree.
-

The techniques used toward these goals are to:

-
    -
  1. In general, flatten the hierarchy of packages, in order to make the - structure more apparent from the top-level view.
  2. -
  3. Break the construction and the validation of the XSLT stylesheet from - the stylesheet objects themselves.
  4. -
  5. Drive the construction of the stylesheet through a table, so that it - is less prone to error.
  6. -
  7. Break the transformation process into a separate package, away from - the stylesheet objects.
  8. -
  9. Create this design document, as a starting point for people interested in - approaching the code.
  10. -
-

The goals are not:

-
    -
  1. 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 much easier to add - features once this work is completed.
  2. -
  3. To optimize code for the sake of optimization. However, we - expect that the code will be faster once this work is complete.
  4. -
-

How well we've achieved the goals will be measured by feedback from the - Xalan-dev list, and by software metrics tools.

-

Please note that the diagrams in this design document are meant to be - useful abstractions, and may not always be exact.

-
- -

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.

  1. Java, C++ Versions.
  2. XSLT 1.0 conformance, and beyond. (i.e. conform to the current W3C recommendation).
  3. Have design and Code understandable by Open Source Community.
  4. Ability to interoperate with standard APIs. (SAX2, DOM2, JAXP) [this is currently Less of an issue with C++].
  5. High Performance (Raw performance, Incremental ability, Scaleability to large documents, Reduction of Garbage Collection for the Java version.)
  6. Tooling API (Access stylesheet data structures, Access source node from result event, Ask runtime questions, Debugging API).
  7. Support addressing of XML in standalone fashion (i.e. XPath API).
  8. Extensibility (Ability to call Java, Ability to call JavaScript, other languages).
  9. Multiple data sources (JDBC, LDAP, other data sources, Direct XML repository coupling).
- -

The following diagram shows the XSLT abstract processing model. A transformation expressed in XSLT describes rules for transforming a Source Tree 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. - -

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.

xslt_abstract.gif

The primary interface for Xalan 2.0 external usage is defined in the javax.xml.transform interfaces. These interfaces define a standard and powerful interface to perform tree-based transformations.

-

The internal architecture of Xalan 2.0 is divided into four major modules, and various smaller - modules. The main modules are:

- - - The module that processes the stylesheet, and provides the main - entry point into Xalan. - - - - The module that defines the stylesheet structures, including the - Stylesheet object, template element instructions, and Attribute Value - Templates. - - - - The module that applies the source tree to the Templates, and - produces a result tree. - - - - The module that processes both XPath expressions, and XSLT Match - patterns. - -

In addition to the above modules, Xalan implements the - javax.xml.transform interfaces, and depends on the - SAX2 and DOM packages. -

trax.gif

There is also a general utilities package that contains both XML utility - classes such as QName, but generally useful classes such as - StringToIntTable.

-

In the diagram below, the dashed lines denote visibility. All packages - access the SAX2 and DOM packages.

-

xalan1_1x1.gif

-

In addition to the above packages, there are the following additional - packages:

- - - This package has a client applet. I suspect this should be moved - into the samples directory. - - - - This holds classes belonging to the Xalan extensions mechanism, - which allows Java code and script to be called from within a stylesheet. - - - - - This is the built-in Xalan extensions library, which holds - extensions such as Redirect (which allows a stylesheet to produce multiple - output files). - - - - This holds resource files needed by Xalan, such as error message - resources. - - - - - 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. - - - - This package holds the Xalan2 command line processor. - -

A more conceptual view of this architecture is as follows:

Picture of conceptual architecture.

- -

The org.apache.xalan.processor module implements the - javax.xml.transform.TransformerFactory interface, which provides a - factory method for creating a concrete Processor instance, and provides methods - for creating a javax.xml.transform.Templates 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.

-

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.

-

The schema's root class is - org.apache.xalan.processor.XSLTSchema, and it is here that the - XSLT schema structure is defined. XSLTSchema uses - org.apache.xalan.processor.XSLTElementDef to define elements, and - org.apache.xalan.processor.XSLTAttributeDef 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 - org.apache.xalan.processor.XSLTElementProcessor, and a sometimes a - Class object, with which it can create objects that derive from - org.apache.xalan.templates.ElemTemplateElement. 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.

-

The implementation of the javax.xml.transform.TransformerFactory - interface is in org.apache.xalan.processor.TransformerFactoryImpl, - which creates a org.apache.xalan.processor.StylesheetHandler - instance. This instance acts as the ContentHandler for the parse events, and is - handed to the org.xml.sax.XMLReader, which the StylesheetProcessor - uses to parse the XSLT document. The StylesheetHandler then receives the parse - events, which maintains the state of the construction, and passes the events on - to the appropriate XSLTElementProcessor for the given event, as dictated by the - XSLTElementDef that is associated with the given event.

-
- -

The org.apache.xalan.templates module implements the - javax.xml.transform.Templates 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. -

-

The base class of all templates objects that are associated with an XSLT element is the ElemTemplateElement object, which in turn implements UnImplNode. A ElemTemplateElement object must be immutable once it's constructed, so that it may be shared among multiple threads concurrently. Ideally, a ElemTemplateElement 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 ElemTemplateElement class has an execute method where it performs it's transformation duties. A ElemTemplateElement also knows it's position in the source stylesheet, and can answer questions about current namespace nodes.

A StylesheetRoot, which implements the - Templates interface, is a type of StylesheetComposed, - which is a Stylesheet composed of itself and all included - Stylesheet objects. A StylesheetRoot has a global - imports list, which is a list of all imported StylesheetComposed - instances. From each StylesheetComposed object, one can iterate - through the list of directly or indirectly included Stylesheet - objects, and one call also iterate through the list of all - StylesheetComposed objects of lesser import precedence. - StylesheetRoot is a StylesheetComposed, which is a - Stylesheet.

-

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 Stylesheet - object, and never takes into account included or imported stylesheets. The - StylesheetComposed derivative object, if it is a root - Stylesheet or imported Stylesheet, has "composed" - getter methods that do take into account imported and included stylesheets, for - some of these properties.

- -
- -

The Transformer module is in charge of run-time transformations. The TransformerImpl object, which implements the TrAX Transformer interface, and has an association with a StylesheetRoot object, begins the processing of the source tree (or provides a ContentHandler reference via the SourceTreeHandler), 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 ElemTemplateElement.execute(...) methods.

Result Tree events are fed into a ResultTreeHandler object, which acts as a layer between the direct calls to the result -tree content handler (often a Serializer), and the Transformer. 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.

Other important classes in this package are:

The Counter 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 CountersTable class is a table of counters, keyed by ElemNumber objects, each - of which has a list of Counter objects.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.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.

Even though the following modules are defined in the org.apache.xalan package, instead of the transformer package, they are defined in this section as they are mostly related to runtime transformation.

- -

The Stree module implements the default Source Tree for Xalan, that is to be transformed. It implements read-only DOM2 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 StartDocument 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 endElement event has occurred.

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

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).

- - -

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 ContentHandler to turn parser events coming from the transform, into a stream of XML, HTML, or plain text. The serializers also implement the Serializer which allows the transform process to set XSLT output properties and the output stream or Writer.

- -

This package contains an implementation of Xalan Extension Mechanism, which uses the Bean Scripting Framework. - -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 Xalan-J 2 extension documentation 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.

[More needed... -sb]

- -

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.

xalan ---> xpath

-

The XPath module first compiles the XPath strings into expression trees, and then executes these expressions via a call to the XPath execute(...) function.

Major classes are:

Represents a compiled XPath. Major function is XObject execute(XPathContext xctxt, Node contextNode, - PrefixResolver namespaceContext).The methods in this class are convenience methods into the - low-level XPath API.Used as the runtime execution context for XPath.Used as a helper for handling DOM issues. May be subclassed to take advantage - of specific DOM implementations.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.The base-class of all expression objects, allowing polymorphic behaviors.

The general architecture of the XPath module is divided into the compiler, and categories of expression objects.

xpath modules

The most important module is the axes module. This module implements the DOM2 NodeIterator interface, and is meant to allow XPath clients to either override the default behavior or to replace this behavior.

The LocPathIterator and UnionPathIterator classes implement the NodeIterator interface, and polymorphically use AxesWalker derived objects to execute each step in the path. The whole trick is to execute the LocationPath 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 AxesWalkers traverses child nodes (think carefully about what happens when a "//foo/baz" expression is executed). Optimization is done by implementing specialized iterators and AxesWalkers for certain types of operations. The decision as to what type of iterator or walker will be created is done in the WalkerFactory class.

[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.]

- -

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 LocationPath 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 XLocator interface, in Xalan 2 this interface is no longer used, and has been replaced by the DOM2 NodeIterator interface. An application or extension should be able to install their own NodeIterator for a given document.

data.gif

[More to do]

- -

This package contains general utilities for use by both the xalan and xpath packages.

- - Implementation of Xalan Applet [should we keep this?]. - - - - - Implementation of Xalan-specific extensions.Contains strings that require internationalization. - -

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.

compilation.gif

- -

This section enumerates some optimizations that we're planning to do in future versions of Xalan.

Likely near term optimizations (next six months?):

  1. 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.
  2. Eliminate redundent expressions (xsl:when, variable sets, rooted patterns, etc.).
  3. 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.
  4. Reduce size of Stree nodes.
  5. Implement our own NamespaceSupport class (the SAX2 one is too expensive).
  6. More specialization of itterators and walkers.
  7. Full Java compilation support.
  8. Schema Awareness (if "//foo", the Schema can tell us where to look, but we need standard interface to Schemas).

Likely longer term optimizations (12-18 months?):

  1. On-the-fly indexing.
  2. 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.
- -

This section documents the coding conventions used in the Xalan - source.

-
    -
  1. 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.
  2. -
  3. Non-static member variables are prefixed with "m_".
  4. -
  5. static final member variables should always be upper case, without - the "m_" prefix. They need not have accessors.
  6. -
  7. Private member variables that are not accessed outside the class need - not have getter/setter methods declared.
  8. -
  9. 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.
  10. -
  11. Package-scoped member variables, public member variables, and - protected member variables should not be declared.
  12. -
-
- -
diff --git a/stylebook/sources/entities.ent b/stylebook/sources/entities.ent deleted file mode 100644 index b58c39218..000000000 --- a/stylebook/sources/entities.ent +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -&xslt4jc-short;'> - - -

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 Getting Started with &xslt4jc-short;, - &xslt4jc-short; - Release Notes, and &xslt4jc-short; Design.

-
'> - -For &xslt4jc-short; changes since &xslt4jc-short; was incorporated into &xslt4j;, see - &xslt4jc-short; software changes.'> - -If you are using &xslt4jc-short;, see - Setting the system classpath for &xslt4jc-short;.

'> - -translets'> - - -
    -
  • JAXPTransletOneTransformation
  • -
  • JAXPTransletMultipleTransformations
  • -
  • Other &xslt4jc-short; samples
  • -
-

You can use the JAXP interfaces to compile and run translets. - For an overview of the usage patterns these samples illustrate, see - Calling &xslt4jc-short; with the JAXP API.

- - -

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.

-

Run this sample from the translets subdirectory with

-

java JAXPTransletOneTransformation

-

View the result in todo.html.

-
- -

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.

-

Run this sample from the translets subdirectory with

-

java JAXPTransletMultipleTransformations

-

View the results in todo.html and todotoo.html.

-
- -

Other &xslt4jc-short; samples are located in the following samples subdirectories:

-
    -
  • CompiledServlet
  • -
  • CompiledBrazil
  • -
  • CompiledJAXP
  • -
  • CompiledApplet
  • -
  • CompiledEJB
  • -
-

For information about each of these samples, consult the README file in the subdirectory.

-

&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).

-

To run the Brazil-handler demo, download Brazil from sunlabs:

-

    http://research.sun.com/research/download/index.html

-

The translet must be specified as a pure class name, - accessible through the Brazil-handler's classpath. For - example:

-

    translet=mk054

-

The document must be specified as a valid URL. For example:

-

    document=http://server/path/to/filename.xml

-

If the file is local to the Brazil handler, it has to be - specified using the "file:filename.xml" format.

- In order to run the Brazil-handler demo, you also need to - make the Brazil and javax classes available from your - classpath -

To run the servlet demo, download the java extensions for servlets from Sun:

-

     - - http://java.sun.com/products/servlet/download.html

-
-
'> diff --git a/stylebook/sources/entities.src b/stylebook/sources/entities.src deleted file mode 100644 index b58c39218..000000000 --- a/stylebook/sources/entities.src +++ /dev/null @@ -1,117 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - -&xslt4jc-short;'> - - -

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 Getting Started with &xslt4jc-short;, - &xslt4jc-short; - Release Notes, and &xslt4jc-short; Design.

-
'> - -For &xslt4jc-short; changes since &xslt4jc-short; was incorporated into &xslt4j;, see - &xslt4jc-short; software changes.'> - -If you are using &xslt4jc-short;, see - Setting the system classpath for &xslt4jc-short;.

'> - -translets'> - - -
    -
  • JAXPTransletOneTransformation
  • -
  • JAXPTransletMultipleTransformations
  • -
  • Other &xslt4jc-short; samples
  • -
-

You can use the JAXP interfaces to compile and run translets. - For an overview of the usage patterns these samples illustrate, see - Calling &xslt4jc-short; with the JAXP API.

- - -

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.

-

Run this sample from the translets subdirectory with

-

java JAXPTransletOneTransformation

-

View the result in todo.html.

-
- -

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.

-

Run this sample from the translets subdirectory with

-

java JAXPTransletMultipleTransformations

-

View the results in todo.html and todotoo.html.

-
- -

Other &xslt4jc-short; samples are located in the following samples subdirectories:

-
    -
  • CompiledServlet
  • -
  • CompiledBrazil
  • -
  • CompiledJAXP
  • -
  • CompiledApplet
  • -
  • CompiledEJB
  • -
-

For information about each of these samples, consult the README file in the subdirectory.

-

&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).

-

To run the Brazil-handler demo, download Brazil from sunlabs:

-

    http://research.sun.com/research/download/index.html

-

The translet must be specified as a pure class name, - accessible through the Brazil-handler's classpath. For - example:

-

    translet=mk054

-

The document must be specified as a valid URL. For example:

-

    document=http://server/path/to/filename.xml

-

If the file is local to the Brazil handler, it has to be - specified using the "file:filename.xml" format.

- In order to run the Brazil-handler demo, you also need to - make the Brazil and javax classes available from your - classpath -

To run the servlet demo, download the java extensions for servlets from Sun:

-

     - - http://java.sun.com/products/servlet/download.html

-
-
'> diff --git a/stylebook/sources/xalan-apache-org-site.xml b/stylebook/sources/xalan-apache-org-site.xml deleted file mode 100644 index 3dc90e16b..000000000 --- a/stylebook/sources/xalan-apache-org-site.xml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/stylebook/sources/xalan-apache-org/index.xml b/stylebook/sources/xalan-apache-org/index.xml deleted file mode 100644 index c31b77948..000000000 --- a/stylebook/sources/xalan-apache-org/index.xml +++ /dev/null @@ -1,59 +0,0 @@ - - - - - - - -

Xalan has moved out of the XML project and is now a project in its own right. -You will find links to all the Xalan subprojects as well as our new charter on the menu -at the left of the screen.

-
- - -

-As our charter will tell you, the Apache Xalan Project is a collaborative software development -project dedicated to providing robust, full-featured, commercial-quality, and -freely available XSLT support on a wide variety of platforms.

-

There are currently two subprojects under the Apache Xalan Project: -Xalan C++, and -Xalan Java, representing -C++ and Java implementations of the W3C XSL Transformations (XSLT) -Version 1.0 and the XML Path Language (XPath) Version 1.0 -recommendations.

-
- - -

XSLT is the first part of the Extensible Stylesheet Language (XSL). -It includes the XSL Transformation (XSLT) vocabulary and XPath, a language for addressing parts of XML documents. -XSL also includes a vocabulary for specifying formatting semantics, however, -this is not part of the Apache Xalan Project. For more information on formatting objects, see the -Apache XML FOP (Formatting Objects Project). -

-

XSLT implementations, sometimes referred to as XSLT processors, use an XSL stylesheet to transform -XML documents into HTML, text, or other XML document types. In structural terms, an XSL stylesheet -specifies the transformation of one tree of nodes (the XML input) into another tree of nodes (the output or -transformation result).

-
- - -

Xalan C++ and Xalan Java are made available under the -Apache Software License, Version 2.0.

-
- -
diff --git a/stylebook/sources/xalan-collate.xsl b/stylebook/sources/xalan-collate.xsl deleted file mode 100644 index e8eea57bd..000000000 --- a/stylebook/sources/xalan-collate.xsl +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - - - - - - - - - diff --git a/stylebook/sources/xalan-jlocal.xml b/stylebook/sources/xalan-jlocal.xml deleted file mode 100644 index 1c536a97d..000000000 --- a/stylebook/sources/xalan-jlocal.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/sources/xalan-jsite.xml b/stylebook/sources/xalan-jsite.xml deleted file mode 100644 index 469811eee..000000000 --- a/stylebook/sources/xalan-jsite.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/sources/xalan/DONE b/stylebook/sources/xalan/DONE deleted file mode 100644 index e69de29bb..000000000 diff --git a/stylebook/sources/xalan/bugreporting.xml b/stylebook/sources/xalan/bugreporting.xml deleted file mode 100644 index 2cae981b3..000000000 --- a/stylebook/sources/xalan/bugreporting.xml +++ /dev/null @@ -1,69 +0,0 @@ - - - - - -

Before you report a bug, please, read the following instructions:

-
    -
  • If doubt exists whether the behaviour in question is a bug or a feature, - please post a message to the - xalan-j-users@xml.apache.org - list for clarification.
  • -
  • To help eliminate duplicate or invalid bug reports, please take a quick look at - bugs in JIRA to see whether the bug has been already reported and/or fixed. - You can also download the - latest code - and check if you can reproduce the bug.
  • -
  • Report bugs against the newest release.
  • -
-

We strongly encourage you to write patches for problems you find and attach - them to your JIRA issue. Being specific in the description of your bug report, and - providing enough information to reproduce the bug will improve the likelihood that - bugs, adding enhancements, and addressing outstanding design issues, we need your - active participation in the ongoing development of Xalan Java.

-
- - -

- The old bug tracking system, - bugzilla, - is still available but please only use it to look up old bugs. - Bugzilla has been replaced by JIRA - and old bugzilla bugs have been migrated to JIRA as issues. -

-
- - -

After reading the instructions above, click - here to submit a bug report using JIRA. -

-

- Note that the functionality shown by the JIRA user interface changes depending on whether - you Log In or not. In particular, to have the CREATE NEW ISSUE link - you will need to click the Log In in small font, in the top right corner - of the page and log in. -

-

- - If you had a bugzilla account previously, and had used it with Xalan bugzilla bugs, - your account should be migrated to JIRA. In this case, do not create a new account, - but use the same e-mail account name and click on "Forgot Password" on the JIRA home page. - -

-
-
diff --git a/stylebook/sources/xalan/commandline.xml b/stylebook/sources/xalan/commandline.xml deleted file mode 100644 index afb78ec30..000000000 --- a/stylebook/sources/xalan/commandline.xml +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - -
    -
  • Command line options for &xslt4jc-short;
  • -
- - -

To perform a transformation, you can call &xslt4j; from the command line (or script), - an applet, an application, or a servlet (see Usage Patterns).

-

The org.apache.xalan.xslt.Process main() method provides a command-line interface - for performing XSL transformation. To perform a transformation from the command line or a script, - do the following:

-
    -
  1. Download &xslt4j;.

  2. -
  3. Set the Java classpath to include xalan.jar, serializer.jar, xml-apis.jar, and - &xml4j-jar; -- or another conformant XML Parser -- (see Plugging in - the Transformer and XML parser).

  4. -
  5. Call java and the Process class with the appropriate flags and - arguments (described below). The following command line, for example, includes the -IN, -XSL, - and -OUT flags with their accompanying arguments -- the XML source document, the XSL - stylesheet, and the output file:

    - java org.apache.xalan.xslt.Process -IN foo.xml -XSL foo.xsl -OUT foo.out -
-

The command line utility can take the following flags and arguments (the flags are case insensitive):

- - Common Options - --XSLTC (use &xslt4jc-short; for transformation) --IN inputXMLURL --XSL XSLTransformationURL --OUT outputFileName --V (Version info) --EDUMP [optional filename] (Do stackdump on error.) --XML (Use XML formatter and add XML header.) --TEXT (Use simple Text formatter.) --HTML (Use HTML formatter.) --PARAM name expression (Set a stylesheet parameter) --MEDIA mediaType (use media attribute to find stylesheet associated with a document) --FLAVOR flavorName (Explicitly use s2s=SAX or d2d=DOM to do transform) --DIAG (Print overall milliseconds transform took) --URIRESOLVER full class name (URIResolver to be used to resolve URIs) --ENTITYRESOLVER full class name (EntityResolver to be used to resolve entities) --CONTENTHANDLER full class name (ContentHandler to be used to serialize output) --SECURE (set the secure processing feature to true) - - Options for &xslt4ji; - --QC (Quiet Pattern Conflicts Warnings) --TT (Trace the templates as they are being called) --TG (Trace each generation event) --TS (Trace each selection event) --TTC (Trace the template children as they are being processed) --TCLASS (TraceListener class for trace extensions) --L (use line numbers for source document) --INCREMENTAL (request incremental DTM construction by setting - http://xml.apache.org/xalan/features/incremental to true) --NOOPTIMIMIZE (request no stylesheet optimization proccessing by setting - http://xml.apache.org/xalan/features/optimize to false) --RL recursionlimit (assert numeric limit on stylesheet recursion depth) - - Options for &xslt4jc-long; (&xslt4jc-short;) - --XO [optional transletName] (assign the name to the generated translet) --XD destinationDirectory (specify a destination directory for translet) --XJ jarfile (package translet classes into a jar file of name <jarfile>) --XP package (specify a package name prefix for all generated translet classes) --XN (enable XSL template inlining into one big method) --XX (turn on additional debugging message output) --XT (use translet to transform if possible) - -

Use -XSLTC if you want to transform with &xslt4jc-short;. Please refer to - this document for a detailed description on - &xslt4jc-short; related options.

-

Use -IN to specify the XML source document.

-

Use -XSL to specify the XSL stylesheet file.

-

Use -TEXT if you want the output to include only element values (not element tags with element names and - attributes).

-

Use -HTML to write 4.0 transitional HTML (some elements, such as <br>, are - not well formed XML).

-

To set stylesheet parameters from the command line, use
- java org.apache.xalan.xslt.Process -PARAM name value

-

The value is passed to the transformer as a String.

-

For information about incremental and optimized stylesheet processing, see DTM settings.

-

Use -L to obtain access to a SourceLocator that a stylesheet extension can use to get information about the location - of nodes in the source document. For more information, see NodeInfo extension functions - and source_location.

-

Use -URIRESOLVER with a fully qualified class name to utilize a custom implementation of the - URIResolver JAXP interface to resolve URIs for - xsl:include, xsl:import, and the document() function.

-

Use -ENTITYRESOLVER with a fully qualified class name to utilize a custom implementation of the - EntityResolver SAX interface to handle external entity references.

-

Use -CONTENTHANDLER with a fully qualified class name to utilize a custom implementation of the - ContentHandler SAX interface to serialize output. - If this same class implements the org.xml.sax.ext.LexicalHandler - interface and the output method is "xml", it will also receive lexical information about the XML document during serialization.

- If you want to validate an XML document (verify that it adheres to its DOCTYPE declaration), you can use the - Validate utility shipped with &xslt4j-current;. -
-
diff --git a/stylebook/sources/xalan/commandline_xsltc.xml b/stylebook/sources/xalan/commandline_xsltc.xml deleted file mode 100644 index 30921661d..000000000 --- a/stylebook/sources/xalan/commandline_xsltc.xml +++ /dev/null @@ -1,261 +0,0 @@ - - - - - - - - -
    -
  • Options
  • -
  • Examples
  • -
  • Simple FAQs
  • -
  • Using options from the JAXP transform APIs
  • -
- - - -

The org.apache.xalan.xslt.Process command line now supports &xslt4jc-short; for transformation. -You can use the new -XSLTC option to enable the &xslt4jc-short; support.

-

The following existing options can be used with -XSLTC:

-

-IN, -XSL, -OUT, -V, -EDUMP, -XML, -TEXT, -HTML, -PARAM,
--MEDIA, -FLAVOR, -DIAG, -URIRESOLVER, -ENTITYRESOLVER,
--CONTENTHANDLER

- -

The following existing options do not work with -XSLTC. If any of them is used -with -XSLTC, a message is printed and the option is ignored.

-

-QC, -TT, -TG, -TS, -TTC, -TCLASS, -L, -INCREMENTAL,
--NOOPTIMIMIZE, -RL

- -

We also have a new set of options for -XSLTC. They are all two letter options. The first -letter is X and the second letter is the same as the corresponding option in the &xslt4jc-short; command line -org.apache.xalan.xsltc.cmdline.Compile.

- -

These new options can only be used with -XSLTC. If any of them is used -with &xslt4ji;, a message is printed and the option is ignored.

- -

Here is the list of the new options:

-
    -
  • -XO [optional translet_name]
    - Assign the name to the generated translet. If the translet_name is omitted, the translet is - generated using the default name (same as the xsl).
  • -
  • -XD destination_directory
    - Specify a destination directory for translet. The generated translet classes will be put - under the specified destination directory.
  • -
  • -XJ jar_name
    - Package translet classes into a jar file of name <jar_name>
  • -
  • -XP package_name
    - Specify a package name prefix for all generated translet classes
  • -
  • -XN
    - Enable XSL template inlining into one big method
  • -
  • -XX
    - Turn on additional debugging message output
  • -
  • -XT
    - Use translet to transform if possible
  • -
-The translet name is the same as the name of the Java class that -implements the translet. If the name specified by the -XO option -or derived from the URL for the stylesheet contains characters that are not -permitted in a Java class name, any such character will be replaced with an -underscore. For example, if the translet name specified by the -XO -option is my-stylesheet, or if the URL of the stylesheet is -http://example.org/my-stylesheet.xsl, the translet will actually -be namedmy_stylesheet. - -
- - - - -

You can just add the -XSLTC option to your existing option list so that it will do -the same thing as before, but using &xslt4jc-short;.

- -

Here is a simple example on how to use &xslt4jc-short;:

-

> java org.apache.xalan.xslt.Process -in test.xml -xsl test.xsl -xsltc

-

&xslt4jc-short; compiles the stylesheet on the fly and uses the bytecode in memory to transform the input xml. -No translet class is generated in this simple usage pattern.

-

If you want to generate translet classes from the stylesheet, you can use the -XO option:

-

> java org.apache.xalan.xslt.Process -in test.xml -xsl test.xsl -xsltc -xo

- -

This example still uses the stylesheet for transformation, but it also generates the -translet class "test.class".

- -

You can use the -XJ, -XP or -XD options to further customize the translet -generation behavior. Translets will be generated if any of the options -XO, -XJ or --XT is used.

-

> java org.apache.xalan.xslt.Process -in test.xml -xsl test.xsl -xsltc -xo newTranslet -xd temp -xp org.apache.test -xj translets.jar

- -

The above command line uses the xsl for transformation. It also generates translet classes in -the name of newTranslet, using a package prefix of org.apache.test, and packages the translets -into the jar file translets.jar under the temp directory.

- -

All of the examples above use the stylesheet to do the transformation. If the translets are -already generated, you can use the -XT option to specify that you want to use the existing translets for transformation. -The -XT option has a makefile like feature in that it will compare the timestamps of the translet -and the stylesheet. If the translet is newer, it is used for the transformation, otherwise the stylesheet is -used and the translet is regenerated.

- -

The translet is loaded from the specified destination directory or the current directory, using -the specified translet name or the xsl base name, depending on whether the -XD or --XO option is used. The options -XO, -XD, -XP and -XJ -can be used with the -XT option to tell &xslt4jc-short; how to find the translet classes. The translets -are directly read in as bytecode. You do not need to add the translet directory or the jar file to your -classpath.

-

Example:

-

> java org.apache.xalan.xslt.Process -in test.xml -xsl test.xsl -xsltc -xt -xj translets.jar -xd temp

- -

This command line will search for the translet test.class inside the jar file temp/translets.jar. If it is -found and newer than test.xsl, it is used for the transformation; otherwise the xsl is used and the -translet is generated and packaged in the same jar.

- -

Here is how the makefile feature for the -XT option works:

-
    -
  1. If the xsl does not exist, use the translet
  2. -
  3. If the translet does not exist, use the xsl and generate a new translet
  4. -
  5. If both exist and the translet is newer, use the translet for transformation
  6. -
  7. If both exist and the xsl is newer, use the xsl for transformation and regenerate the translet
  8. -
-
- - - - -

Q: If I use the -XT option, how can I tell if it is using the translet or the stylesheet for transformation?

-

A: Use the -XX option. When &xslt4jc-short; uses the translet for transformation, you will see a debug -message like "Tranform using translet ..." or "Tranform using translet ... from jar file ...".

- -

Q: I want to use a translet for transformation, and I don't have the stylesheet.

-

A: Suppose the translet class is c:\translets\myTranslet.class, you can use the following command line:

-

> java org.apache.xalan.xslt.Process -in test.xml -xsltc -xt -xo myTranslet -xd c:\translets

-

If you use -XT option, the -XSL option can be omitted. You have to specify the translet name -using the -XO option because there is no default translet name in this situation.

- -

Q: I only want to compile the stylesheet. I don't want to do a transformation.

-

A: JAXP has no notion of compiling a stylesheet. However, you can achieve the same effect by -running a dummy transformation and tell &xslt4jc-short; to save the translet class. Example:

-

> java org.apache.xalan.xslt.Process -xsl test.xsl -xsltc
-xo

-

This command runs a transformation on an empty input and generates the translet test.class.

-
- - - -

You can use some of the attributes in the TransformerFactoryImpl class of &xslt4jc-short; to -customize the translet behaviors from JAXP.

- -

Here is the list of attributes in org.apache.xalan.xsltc.trax.TransformerFactoryImpl -and their corresponding Process command line options:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
AttributesProcess command line optionsDefault values
translet-name-XOGregorSamsa
destination-directory-XDnull
package-name-XPnull
jar-name-XJnull
generate-transletfalse
auto-translet-XTfalse
use-classpathfalse
enable-inlining-XNfalse
debug-XXfalse
- -

You can set the attributes using the JAXP interface TransformerFactory.setAttribute(String name, Object value). -The four attributes translet-name, destination-directory, package-name and jar-name are transient. -They only apply to the next newTemplates() or newTransformer() call. Their values are reset to -the default after the call.

- -

The generate-translet attribute does not have a corresponding command line option. This attribute is -implied when the -XO or -XJ option is used. The purpose is to make the command line -usage syntax a little bit simpler. Setting the generate-attribute attribute to true from JAXP is -equivalent to using the -XO option without the optional translet name from the Process command line.

- -

If the use-classpath attribute is set to true, the translet will be loaded -from the CLASSPATH. This attribute is typically used in a case when the translets are packaged in a -prebuilt jar file which is included in the CLASSPATH. You can set the translet-name attribute -to indicate which translet to use. If this attribute is not set, the name of the translet is taken from -the base name of the stylesheet. The jar-name attribute is not used in this situation.

- -

The following example shows you how to do the same thing from JAXP for the question 2 in the FAQ.

- - -// set the system property javax.xml.transform.TransformerFactory in order to use &xslt4jc-short; -String key = "javax.xml.transform.TransformerFactory"; -String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; -Properties props = System.getProperties(); -props.put(key, value); -System.setProperties(props); - -TransformerFactory tfactory = null; -try { - tfactory = TransformerFactory.newInstance(); -} -catch (TransformerFactoryConfigurationError pfe) { pfe.printStackTrace(); } - -// set the translet name -tfactory.setAttribute("translet-name", "myTranslet"); - -// set the destination directory -tfactory.setAttribute("destination-directory", "c:\\translets"); - -// use the translet for transformation if possible -tfactory.setAttribute("auto-translet", "true"); - -// You can create a Templates object from an empty Source if the translet is specified. -Templates templates = tfactory.newTemplates(new StreamSource()); - -
-
diff --git a/stylebook/sources/xalan/contact_us.xml b/stylebook/sources/xalan/contact_us.xml deleted file mode 100644 index 43a93046c..000000000 --- a/stylebook/sources/xalan/contact_us.xml +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -
    -
  • Getting in touch
  • -
  • Reporting bugs
  • -
  • User mailing list
  • -
  • Developer mailing list
  • -
  • Subscribe to a mailing list
  • -
- - - -

- Your feedback is more than welcome. Offers of help are even more so! - Perhaps you would like to - take on an active role in the ongoing development, - testing, and documentation of &xslt4j;? -

-

- Please email your comments, questions, suggestions, - and offers to join the Xalan team to - (xalan-dev@xml.apache.org).

-
- - -

- If you need to contact the Xalan team to report a bug please see - this bug reporting page. -

-
- - - -

- If you think you have encountered a bug, but you aren't sure because - it might be a usage problem, or if you have other questions about Xalan - post a note to - xalan-j-users@xml.apache.org - This mailing list pertains to only to the Java version of Xalan. -

-

- To view a history of posts to xalan-j-users you can go to - - xalan-j-users mail archives at Apache or - xalan-j-users mail archives at MARC. -

-
- - - -

- The participating developers of the Xalan meet and discuss issues, - code changes/additions, etc. at - xalan-dev@xml.apache.org. - This mailing list pertains to both the Java and C++ versions of Xalan. -

-

- To view a history of posts to xalan-dev you can go to - - xalan-dev mail archives at Apache or - xalan-dev mail archives at MARC. -

-
- - -

- You may want to subscribe to a mailing list before posting a note, so that if - others post a response to the mailing list you will get copied. -

-

- To subscribe an email account to the Xalan user mailing list send a note to - j-users-subscribe@xalan.apache.org from that account. -

-

- To subscribe to the Xalan developer mailing list send a note to - dev-subscribe@xalan.apache.org. -

-

- For either of these mailing lists, doing the same but replacing - subscribe with help will return a message - telling you more about configuring your subscription's behavior. -

-

- To stop receiving mail from one of these lists, do the same but replace - subscribe with unsubscribe. -

-

- For more information on XML related Apache mailing lists go to - Apache mailing lists. -

-
-
diff --git a/stylebook/sources/xalan/downloads.xml b/stylebook/sources/xalan/downloads.xml deleted file mode 100644 index d02af5418..000000000 --- a/stylebook/sources/xalan/downloads.xml +++ /dev/null @@ -1,362 +0,0 @@ - - - - - -
    -
  • Downloading the latest release
  • -
  • Downloading what else you might need
  • -
  • Where do I get &xml4j;?
  • -
  • How do I view Xalan code in a browser?
  • -
  • How do I download the latest development code to build myself?
  • -
  • Using ant
  • -
  • Rebuilding a sample application
  • -
  • Where do I download previous releases?
  • -
- - -

You can download the pre-built binary distributions from one of the - mirror sites at . -

- -

Xalan-J has two processors, - an interpretive one, Xalan Interpretive, and a compiled one, Xalan Compiled (XSLTC). - Your choice of which binary distribution to download depends on which - of the processors you want to use. - There are 2 binary distributions available; you only need to choose one of them. - Both binary distributions contain xml-apis.jar and &xml4j-jar; from .

-
    -
  • The first binary distribution, &xslt4j-dist-bin;.zip or - &xslt4j-dist-bin;.tar.gz, - contains the Xalan Interpretive processor, the Xalan Compiled processor (XSLTC) and the - runtime support packages in a single jar, called xalan.jar. - The reason to use this distribution would be that you don't know - which processor you are going to use, or might be using both. -


  • -
  • The second binary distribution, &xslt4j-dist-bin;-2jars.zip or - &xslt4j-dist-bin;-2jars.tar.gz - contains the Xalan Interpretive processor in xalan.jar, and the Xalan Compiled - processor (XSLTC) and the runtime support packages in xsltc.jar. - The reason to using this distribution is that you want more control. - If you are using just XSLTC you can put xsltc.jar on the classpath - and not xalan.jar. If you are using just the interpretive processor - you can put xalan xalan.jar on the classpath and not xsltc.jar. Of course - you can put both xalan.jar and xsltc.jar from this distribution - on your classpath if you want to use both. -
  • -
- - -

- We provide two distributions: a binary distribution, and a source distribution. - You can also download a source distribution from one of the same - mirror sites at . The difference - is that a binary distribution contains -bin in its name, - whereas a source distribution contain -src in its name. -

- -

To use &xslt4j;, you need the following which are available from - either a binary or source distribution:

-
    -
  • xml-apis.jar JAXP APIs
  • -
  • &xml4j-jar; (or another XML Parser)
  • -
  • xalan.jar
  • -
  • xsltc.jar the XSLTC processor, if you choose a 2jars distribution
  • -
  • serializer.jar which are the serializer classes of - &xslt4j;
  • -
-

- 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 Maven to build &xslt4j;, - including xalan.jar, serializer.jar - and other things, see Using Ant for more - details. -

- -
- - -

To use &xslt4j;, you need the following:

-
    -
  • The JDK or JRE 1.3.x, 1.4.x, or 5.x
  • -
-

- You can get the JDK or JRE from - IBM developerWorks or java.sun.com. -

-

If you plan to run XSLT extensions - through extension functions or elements, and you want to implement - that support in languages - other than Java, then you will need an implementation of the Bean Scripting Framework (BSF). - An open source implementation is available for download from Apache. See the - Apache Jakarta - BSF project. If you plan to run XSLT extensions implemented in scripting - languages, you will need bsf.jar and one or more additional files as indicated in - extensions language requirements. -

-
- - - -

- The &xslt4j-current; has been tested with &xml4j-used;. -

-

Important: You may experience unpredictable anomalies - if your &xslt4j; and &xml4j; builds are not in synch. - If you download an update to &xslt4j;, check the - release notes - to determine which version of &xml4j; you should use. -

- - You can use &xslt4j; with other XML parsers that implement - the . - See Plugging in the Transformer and XML parser. - -

- The &xslt4j; download includes &xml4j-jar; from &xml4j-used;. In conjunction with xml-apis.jar, - this is all you need to run &xslt4j; with the &xml4j; XML parser. You can, however, download the - complete &xml4j; binary or source distribution from the . - If you cannot find &xml4j-used; at that location, have a look at the - Apache archive location for - Xerces Java. -

- - If you plan to use a different XML parser, see Plugging - in a Transformer and XML parser. - -
- - - -

- If you wish to view some of Xalan's files in a browser without downloading the - whole project you can view it at - http://svn.apache.org/viewvc/xalan/ - or at - http://svn.apache.org/repos/asf/xalan/. - The link with "viewvc" in it is slightly prettier. -

-

- The java/trunk and test/trunk subdirectories are the ones with the latest development code. -

-
- - - - -

- If you have downloaded a source distribution, or obtained source code - using subversion, this section may be of interest to you. -

-

- If you wish to download Xalan and build it yourself, perhaps because you want to - apply a patch and test it, you will need a subversion client and anonymous access - to the repository. - Don't worry, everyone has anonymous access. - You can find pre-built binaries of subversion clients for different - operating systems here: - - http://subversion.tigris.org/project_packages.html#binary-packages. - See - - http://www.apache.org/dev/version-control.html - for more information on Apache and subversion. -

-

- Once the subverion client is installed on your local machine you - can use the command line client program svn - to get the latest Xalan-J using a command line something like this: - - svn checkout http://svn.apache.org/repos/asf/xalan/java/trunk java - - where the argument after checkout is the Subversion repository location, - in this case the location of the latest development code, and the last argument, - in this case java is the location of the local directory that the repository is - copied to. -

-

- Similarly for the test harness, you can download the latest test harness with a Subversion command - something like this: - - svn checkout http://svn.apache.org/repos/asf/xalan/test/trunk test - -

-

- Those two commands will put a copy of the latest parts in the local - directories java and test, - which are sibling directories. If you - want to test your build with - 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 java - directory and issue the command: - - mvnbuild.sh - - or, on windows, - - mvnbuild.bat - - This is equivalent to - - mvn clean package site - -

-

- The mvnbuild.bat batch file, or mvnbuild.sh shell script (depending on - your operating system) use maven and the buildfiles pom.xml. See - the section Using ant for more information. -

-

- If you want to test the jars you just built in the directory java/build, change to - directory xalan-test and issue this command: - - build jar extensions.classes - build smoketest - - The first target, jar builds the test harness and only needs to be done - once after the test repository is checked out. - The second target builds plug-in extensions used to test that capability. - The third target, smoketest, - runs the Xalan-J intepretive smoketest. - Running the build smoketest or other targets in the test directory - automatically looks for the jars in the directory ../java/build - and that is why it is easiest to download the projects into suggested sibling - directories with the given names. -

-

- Towards the end of the console output you will see two CONGRATULATIONS! messages if all - goes well. The end of the console output should look like this: - - . - . - . -minitest-pass: - [echo] [minitest] CONGRATULATIONS! The Minitest passed! - [echo] [minitest] See details in smoketest/Minitest.xml - -smoketest-notpass: - -smoketest-pass: - [echo] [minitest] CONGRATULATIONS! The Smoketest passed! - [echo] [minitest] Details are in smoketest/results-conf.xml, smoketest/results-api.xml, smoketest/extensions/results-extensions.xml - -smoketest: - -BUILD SUCCESSFUL -Total time: 2 minutes 4 seconds -build completed! - -

-

- Don't be fooled by the BUILD SUCCESSFUL messages, look for the two CONGRATULATIONS! - messages. If you run the smoketest for XSLTC with build smoketest.xsltc you wil - only get one CONGRATULATIONS! message if all goes well. -

-
- - - -

- WARNING: THIS SECTION REFERS TO THE OLD ANT-BASED BUILD OF XALAN. - IT NEEDS TO BE REWRITTEN FOR MAVEN-BASED BUILD -

-

- If you have downloaded a source distribution, or obtained source code - using subversion, this section may be of interest to you. -

- -

Apache is a flexible, powerful, and easy-to-use Java build tool that we include with the - &xslt4j; distribution. The Ant JAR file is in the tools directory, and the cross-platform XML build file (build.xml) is in - the root directory along with a Windows32 batch file (build.bat) and a UNIX shell file (build.sh). The build file defines - the "targets" that you can use Ant to build. The batch and shell files set up the classpath and launch Ant with the target - (and any other arguments) you provide.

-

Instructions for using Ant

-
    -
  1. Set the JAVA_HOME environment variable to the JDK root directory.

    - JDK 1.3.1 or higher is required to build &xslt4j;. You must put tools.jar from the JDK - bin directory on the classpath.

  2. -
  3. Depending on your environment, run the batch file (build.bat) or shell file (build.sh) - from the &xslt4j; root directory, optionally with arguments (see the table of targets below).

    - The batch/shell file adds several JAR files to the classpath and launches Ant with any arguments - you provide. If you provide no target, Ant compiles the source files and rebuilds xalan.jar - (the "jar" target).
  4. -
- -

The &xslt4j; source code tree is in the src directory. -

-

- If you are using Ant, the target is jar (the default). -

- -

You can also set up your classpath manually (see build.bat or build.sh for the details), and - then run Ant as follows:

- java org.apache.tools.ant.Main target

- where target is nothing (for the default target) or one of the following.

- - - - - - - - - - - - -
Ant TargetWhat Ant does
compilecompiles &xslt4j; in build/classes.
jar (the default)creates xalan.jar and serializer.jar in the build directory
serializer.jarcreates serializer.jar in the build directory
xsltc.jarcreates xsltc.jar in the build directory
samplescompiles and jars the sample apps in build/xalansamples.jar
servletcompiles and jars the sample servlet in build/xalanservlet.jar
docscreates the HTML User's Guide in build/docs
javadocsgenerates the API documentation in ./build/docs/apidocs
fulldistgenerates a complete distribution tree with zip and tar.gz distribution files in build
cleanpurges the build and distribution
-

If you build a target that depends on other targets, Ant creates those other targets in the correct order. -

-

Building without Ant

-

If you want to do the build without Ant, keep the following in mind: -

-
    -
  • Set the classpath to include the src directory, &xml4j-jar;, and xml-apis.jar.
  • -
  • Use a Java compiler (such as the IBM Just-In-Time compiler or the Sun javac) to compile all the .java files in the src - tree.
  • -
  • Use the jar utility to store the resulting .class files in xalan.jar
  • -
- -
- - - -

If you modify a sample and want to recompile it, you can run the Java compiler in the directory containing the - example. Be sure xalan.jar, serializer.jar, xml-apis.jar, and &xml4j-jar; are on the classpath.

-

To recompile and run the class files in the servlet subdirectory, the javax.servlet and - javax.servlet.http packages must also be on the classpath. These packages are available via - the servlet.jar file found in Apache Tomcat ( see ).

-

After recompiling a sample, you can use the jar utility to place your new .class files in - xalansamples.jar.

-

You can use Ant with the samples target to recompile the samples and place the unpackaged class files in xalansamples.jar. - For more information, see Using Ant.

- To rebuild (and to run) the sample servlet, the javax.servlet and javax.servlet.http packages must be on your - classpath. -
- - - -

- To access previous releases, see the . -

-
- -
diff --git a/stylebook/sources/xalan/dtm.xml b/stylebook/sources/xalan/dtm.xml deleted file mode 100644 index 8ea23366a..000000000 --- a/stylebook/sources/xalan/dtm.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - -
    -
  • Introduction
  • -
  • Performance settings
  • -
- -

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.

-

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.

-

In general, the "read" APIs to DTM resemble those of the W3C Document Object Model - () 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.

-

DTM is intended to be a read-only model, and so does not attempt to replicate the DOM's write or - create-node operations.

-

The details of constructing a DTM vary depending on which implementation of this API you are - using. Two reference implementations are currently available:

-
    -
  • SAX2DTM (built via a SAX stream)
  • -
  • DOM2DTM (which provides DTM access to an existing DOM)
  • -
-

Both DTMs can be built incrementally (see incremental transforms). - When operating incrementally, the DTM allows the &xslt4j; 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.

-

For the convenience of user-written extensions, a proxy mechanism presents the contents of the - DTM as a read-only subset of the DOM.

-
- - - -

&xslt4j; implements two DTM performance features that you can control with the TransformerFactory - setAttribute(String name, Object value) method.

- - - - - - - - - - - - - - - - -
Attribute name (URL)Default settingDescription
"http://xml.apache.org/xalan/features/incremental"falseincremental transforms
"http://xml.apache.org/xalan/features/optimize"trueoptimized transforms
-

Both of these DTM settings are described below.

- -

- - -

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.

- 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. - The incremental feature is not currently supported by the XSLT Compiling processor, XSLTC. -

Example: setting incremental transforms to true (for the XSLT Interpretive processor):

- 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); - ... -
- - - -

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.

-
-
- - -

The DTM also provides a setting that you can use to track location information for each node in - the source document. See "http://apache.org/xalan/features/source_location"

-
-
diff --git a/stylebook/sources/xalan/extensions.xml b/stylebook/sources/xalan/extensions.xml deleted file mode 100644 index 3b3ceea15..000000000 --- a/stylebook/sources/xalan/extensions.xml +++ /dev/null @@ -1,902 +0,0 @@ - - - - - - - -
    -
  • Introduction
  • -
  • Supported languages
  • -
  • The basic pattern
  • -
  • Setting up the runtime environment
  • -
  • Syntax
  • -
  • Using an extension element
  • -
  • Using extension functions
  • -
  • Alternative: using the abbreviated syntax for extensions implemented in Java
  • -
  • Examples: basic JavaScript example, using the java namespace, using a Java Hashtable, using a JavaScript array
  • -
-Unless otherwise specified, the &xslt4j; extensions discussed in this section refers to -the &xslt4j; Interpretive processor. See Extensions for &xslt4jc-short; for -more information.

- - -

For those situations where you would like to augment the functionality of XSLT with calls to a - procedural language, &xslt4j; supports the creation and use of extension elements and extension - functions. &xslt4j; also provides a growing extensions library - available for your use. An extension (a collection of elements and functions) inhabits a namespace, - either a namespace you declare and designate as an extensions namespace, or one of the predefined - namespaces that &xslt4j; provides. For information about XML namespaces, see - Namespaces in XML.

-

Extension elements: Unlike a literal result element, which the stylesheet simply - transfers to the result tree, an extension element performs an action. For example, you can use - the Redirect extension elements shipped with &xslt4j; to redirect portions of your transformation - output to one or more files. Extension elements may contain attributes, text nodes, other elements, - basically any valid XML. Extension elements may perform quite sophisticated actions, given that - the extension routine (the implementation) has direct access to the XSLT processor context object - and to the element. In many cases the implementation returns void or null; if it does return a - value, that value is placed in the transformation result tree.

-

Extension functions: You can think of extension functions as extending the core library - of functions that XPath provides. An extension function passes arguments to the extension - implementation and returns a value. You can use extension functions to return values that XSLT - can interact with directly (node-set, result tree fragment, string, boolean, and number) as well - as values (of any type) that you pass in turn to other extension functions. Extension functions - written in Java can also access certain items in the XSLT execution environment through an - ExpressionContext - interface.

-

XSLT extensions are specified in the XSLT - Recommendation. This document focuses on the &xslt4j; implementation of those - requirements, not on XSLT extensions in general. For additional information on extensions, - consult the Recommendation or the other resources listed in Getting up to speed with XSLT.

-
- - -

Extensions written in Java are directly supported by &xslt4j;. For extensions written in languages - other than Java, &xslt4j; uses the , an architecture for incorporating - scripting into Java applications and applets. BSF allows an application to take advantage of - scripting while being independent of any specific scripting language. To date, we have tested - extensions implemented in JavaScript. The set of scripting languages supported using BSF is determined - by the BSF implementation you are using. If you are using Jakarta BSF, please refer to - Jakarta BSF Supported Languages for other - scripting languages with BSF support.

-

BSF requires the file bsf.jar on the classpath. The bsf.jar file is provided, by the XalanJ src - distribution. If required, that can also be downloaded from the - Apache Commons BSF project web site. The BSF jar file is required only if you have extensions written in languages other than Java. - The additional JAR files or DLLs required to support extensions written in other languages are - listed at the Apache Commons BSF project web site at - Related Projects. These files are available from the sources indicated and are not shipped - with &xslt4j;.

- -

By default Xalan-Java assumes BSF support is provided by the Apache Commons BSF implementation. There are three - ways of specifying the class that provides the BSF Manager service:.

-
  • Set the system property org.apache.xalan.extensions.bsf.BSFManager;
  • -
  • In the property file "/lib/xalan.properties" in the JRE directory, add the key - org.apache.xalan.extensions.bsf.BSFManager with the value that is the fully qualified BSF - implementation class name;
  • -
  • Include a META-INF/services/org.apache.xalan.extensions.bsf.BSFManager - file in your classpath;
  • -
-
- -

Let's examine a simple example. The stylesheet below uses an extension element and an - extension function to transform an element in the XML source into a statement in the output - indicating the date by which a customer can expect a response to a given enquiry.

- -

The source element contains a numdays attribute. The extension element contains a multiplier - attribute, which is used to set a variable in the extension. The extension function computes the - deadline, that is the current date plus numdays * multiplier. So for <deadline numdays="3"/> - (in the XML source) and <my-ext:timelapse multiplier="2"/> (in the stylesheet), the - extension computes a deadline 6 days from now, and the stylesheet template transforms the - deadline element into a string along the lines of <p>We have logged your enquiry - and will respond by April 29, 2000 12:07:16 PM EST.</p>

-The extension function could include both numdays and multiplier as arguments, thus bypassing - the need for the extension element, but the purpose here is to illustrate the usage pattern for - extension elements. -

As you review this stylesheet, please note the following:

-
    -
  1. The declaration of the xalan namespace, which provides support for the component and - component/script elements:

    - xmlns:xalan="http://xml.apache.org/xalan"

  2. -
  3. The declaration of a namespace for this extension:

    - xmlns:my-ext="ext1"

  4. -
  5. The designation of this namespace prefix as an extension prefix. This causes any element in the - namespace associated with this prefix to be treated as an extension element rather than a literal - result element.

    - extension-element-prefixes="my-ext"

  6. -
  7. The xalan:component with attributes designating the namespace prefix and the elements and - functions this extension provides.

  8. -
  9. The xalan:script subelement with a JavaScript implementation of the extension. For Java - extensions, the xalan:script element has a src attribute that you set to identify the Java class.
  10. -
- -<?xml version="1.0"?> -<!--Namespaces are global if you set them in the stylesheet element--> -<xsl:stylesheet - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0" - xmlns:xalan="http://xml.apache.org/xalan" - xmlns:my-ext="ext1" - extension-element-prefixes="my-ext"> - - <!--The component and its script are in the xalan namespace and define the - implementation of the extension.--> - <xalan:component prefix="my-ext" elements="timelapse" functions="getdate"> - <xalan:script lang="javascript"> - var multiplier=1; - // The methods or functions that implement extension elements always take 2 - // arguments. The first argument is the XSL Processor context; the second - // argument is the element node. - function timelapse(xslProcessorContext, elem) - { - multiplier=parseInt(elem.getAttribute("multiplier")); - // The element return value is placed in the result tree. - // If you do not want a return value, return null. - return null; - } - function getdate(numdays) - { - var d = new Date(); - var totalDays = parseInt(numdays) * multiplier; - d.setDate(d.getDate() + totalDays); - return d.toLocaleString(); - } - </xalan:script> - </xalan:component> - - <xsl:template match="deadline"> - <p><my-ext:timelapse multiplier="2"/>We have logged your enquiry and will - respond by <xsl:value-of select="my-ext:getdate(string(@numdays))"/>.</p> - </xsl:template> - -</xsl:stylesheet> - -
- - -

To run the preceding example, bsf.jar and Mozilla Rhino jar must be on the classpath. - The Mozilla Rhino jar, is provided by the XalanJ src distribution. Mozilla Rhino is an - implementation of JavaScript in Java (please see, - Mozilla Rhino project page for more information, about Mozilla Rhino project). Remember that - bsf.jar must be on the classpath to run any extension written in a language other than Java. - For extensions implemented in a scripting language, see the additional requirements in - Supported languages.

-
- - -

You can always use the pattern illustrated above to set up and use extension elements and extension - functions. For extension elements and functions implemented in Java, it is recommended that you use - the abbreviated syntax, described in Alternative: using the abbreviated - syntax for extensions implemented in Java. Unless you are using the abbreviated syntax, do - the following:

- -


xmlns:xalan="http://xml.apache.org/xalan"

-

The xalan namespace provides support for the xalan:component element and xalan:script subelement.

-The old namespace http://xml.apache.org/xslt is still supported for backward compatibility. -
- -


xmlns:prefix=URI

-

The prefix identifies the namespace, and URI is an arbitrary (but unique) -string that matches the value of the prefix attribute of an xalan:component element in the -stylesheet.
-Example: xmlns:ext1="xyz"

-
- -


This step is required only if you are using extension elements. If you are using extension -functions only, you can skip this step.

-

In the stylesheet element, write:

-

extension-element-prefixes="prefix-1 prefix-2 ..."

-

In a literal result element or extension element include the xsl prefix:

-

xsl:extension-element-prefixes="prefix1 prefix2 ..."

-

Keep in mind that where you declare namespaces and designate extension prefixes determines the scope of those namespaces.To make your extensions available throughout the stylesheet, include these settings and attribute in the stylesheet element.

-
- -


By default, namespace declarations are included in the transformation output. To exclude -namespaces from the output, use

-

exclude-result-prefixes="prefix-1 prefix-2 ..."

-

in the stylesheet element or

-

xsl:exclude-result-prefixes="prefix-1 prefix-2 ..."

-

in a literal result element or extension element.

-
- -


In the scope of the xalan namespace declaration:

-

<xalan:component prefix="prefix"
-     functions="func-1 func-2 ...func-n"
-     elements="elem-1 elem-2 ...elem-n">
-   <!--See xalan:script below-->
- </xalan:component>

-

where func-1 func-2 ... func-n and elem-1 elem-2 ... elem-n designate the -functions and elements the extension provides and the stylesheet uses. You can use the function-available -and element-available functions to determine at run time whether a function or element designated in the -xalan:component is actually available.

-If the component is implemented in Java, the values of the functions and elements attributes are -ignored. The function-available and element-available functions use reflection to examine the actual -Java methods. -
- - -


In each xalan:component, you must include exactly one xalan:script element. If the extension -is implemented in JavaScript:

-

<xalan:script lang="javascript" >
-  <!--The implementation script-->
-</xalan:script>

-

For other scripting languages supported by BSF, use the same approach as for JavaScript. -The src attribute is also supported in the xalan:script element. If it is present, the script will -be loaded from the URL specified in the src attribute. Otherwise the script is taken from the text child -of the xalan:script element.

-

If the extension is implemented in Java, you have three choices for the format of the src attribute -in the xalan:script element.

-

<xalan:script lang="javaclass" src="xalan://FQCN"/> -
where FQCN is the fully qualified class name. -
Example: <xalan:script lang="javaclass" src="xalan://java.util.Hashtable"/>

-

<xalan:script lang="javaclass" src="xalan://PJPN"/> -
where PJPN is the beginning of or the complete name of a java package. -
Example: <xalan:script lang="javaclass" src="java.util"/>

-

<xalan:script lang="javaclass" src="http://xml.apache.org/xalan/java"/>

-

The different formats for the value of the src attribute when using Java extensions are more fully -explained in Declare the namespace.

-
- -<!ELEMENT xalan:component (xalan:script)> -<!ATTLIST xalan:component - prefix CDATA #REQUIRED - elements NMTOKENS #IMPLIED - functions NMTOKENS #IMPLIED> - -<!ELEMENT xalan:script (#PCDATA | EMPTY)?> -<!ATTLIST xalan:script - lang CDATA #REQUIRED - src CDATA #IMPLIED> - -
- -

Extension elements pass the extension two objects:

-
    -
  • -org.apache.xalan.extensions.XSLProcessorContext, which provides access to the XSL processor, -the XML source tree, the stylesheet tree, the current context node, and the current mode (if any). -

  • -
  • -org.apache.xalan.templates.ElemExtensionCall, which provides the API for interacting with -the extension element.
  • -
-

You can use the ElemExtensionCall getAttribute(String name) method, for example, to read element -attributes in their raw form. Use the getAttribute(String name, Node sourceNode, XSLTEngineImpl -processor) method to evaluate the attribute as an attribute value template. Note that the method -names are the same but the method signatures are different. For full details, see the -Javadoc for the -ElemExtensionCall class.

- -

For each extension element in a namespace, the implementation must be a Java method with the -following signature, or the scripting language equivalent:

-

Type element(org.apache.xalan.extensions.XSLProcessorContext,
-             org.apache.xalan.templates.ElemExtensionCall extensionElement)

-

where Type designates the return type and element is the local part of the -extension element name (the element name without the namespace prefix). In the method signature, you -may also use superclasses of the indicated types.

-

If the extension element is implemented in a loosely typed scripting language, such as JavaScript, -the arguments and return value are untyped.

-

Caution: The value returned by an extension element is placed in the transformation result. -If you are not interested in a return value, use a public void Java method or return null from a -scripting language function.

-

Java example: public void myElement
-         (org.apache.xalan.extensions.XSLProcessorContext,
-          org.apache.xalan.templates.ElemExtensionCall extensionElement)

-

JavaScript example: function myElement(xslProcContext, element)

-

The Redirect extension in the extensions -library contains three extension elements.

-
- -
- -

Extension functions may include arguments of any type and return a value of any type.

-

XSLT recognizes five data types: node-set, result-tree-fragment, string, boolean, and number. You -can use XPath expressions to set variables with values of these types. You can also pass literals for -string, boolean, and number arguments. If you want to pass an argument of a type that XSLT does not -recognize, use another extension function to return an object of that type. The stylesheet that appears -in Formatting a date, for example uses extension functions -to return a Date object and a SimpleDateFormat object, and then uses these objects to call another -extension function.

- -

When calling an extension function written in a language other than Java, objects of the following -Java classes will always be passed to the extension function:

- - - - - - - - - - - - - - - - - - - - - - - - - -
XSLT TypeJava Type
Node-Setorg.w3c.dom.traversal.NodeIterator
Stringjava.lang.String
Booleanjava.lang.Boolean
Numberjava.lang.Double
Result Tree Fragmentorg.w3c.dom.DocumentFragment
-

Any non-XSLT type is passed without conversion.

-

When calling an extension function written in Java, the extension function signature can specify -any of the indicated Java types, as explained below:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
XSLT TypeJava Types
Node-Setorg.w3c.dom.traversal.NodeIterator, org.w3c.dom.NodeList, org.w3c.dom.Node or its - subclasses, java.lang.String, java.lang.Object, char, [double, float, long, int, short, byte,] - boolean
Stringjava.lang.String, java.lang.Object, char, [double, float, long, int, short, byte,] boolean
Booleanboolean, java.lang.Boolean, java.lang.Object, java.lang.String
Numberdouble, java.lang.Double, float, long, int, short,char, byte, boolean, java.lang.String, - java.lang.Object
Result Tree Fragmentorg.w3c.dom.traversal.NodeIterator, org.w3c.dom.NodeList, org.w3c.dom.Node or its subclasses, - java.lang.String, java.lang.Object, char, [double, float, long, int, short, byte,] boolean
Non-XSLT Typethe native type or any of its superclasses, double, float, long, int, short, char, byte, - java.lang.String
-

When calling extension functions written in Java, &xslt4j; selects the method to call as follows:

-
    -
  1. &xslt4j; selects all methods whose name matches the extension function name as specified in - Extension function Java calls.
  2. -
  3. From this list of methods, &xslt4j; determines which methods are qualified.
  4. -
  5. Each qualified method is assigned a score based on the table shown above. To assign the score - to a given method, &xslt4j; examines each of the XSLT argument types in the function invocation - in the stylesheet. For each argument, the appropriate row in the table above is selected. Then, - the corresponding Java parameter type in the method signature in the Java program is scored. - Types which appear earlier in the list are given a higher score. That is, the list appears in - order of scoring preference from highest to lowest. Types shown in square brackets have equal - priority.
  6. -
  7. The method with the highest score is invoked after the arguments are converted to the appropriate - type. If more than one method has the highest score, an exception is thrown.
  8. -
-

Any extension function written in Java can have a first parameter of -type org.apache.xalan.extensions.ExpressionContext. Any method with an -ExpressionContext as the first parameter will score higher than any method which does not have an -ExpressionContext as a first parameter.

-
- - - -

The &xslt4j; extension mechanism examines the class of the value returned from a function and - converts the value into an XSLT type according to the following table:

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Java TypesXSLT Type
org.w3c.dom.traversal.NodeIterator
org.apache.xml.dtm.DTM
org.apache.xml.dtm.DTMAxisIterator
org.apache.xml.dtm.DTMIterator
org.w3c.dom.Node
Node-Set
java.lang.StringString
java.lang.BooleanBoolean
java.lang.NumberNumber
org.w3c.dom.DocumentFragmentResult Tree Fragment
org.apache.xpath.objects.XObjectSpecified XSLT Type
All other classesNon-XSLT Type
-

Note that the above test is applied using instanceof so that any subclasses of the - classes listed above will be treated the same as the listed superclass. For example, a - java.lang.Double will be treated the same as a java.lang.Number and - will be converted to an XSLT Number.

- The return value conversion can somtimes cause confusion. For example, if your - extension function returns an object that is a subclass of NodeIterator, that object will be - converted by &xslt4j; to an XSLT Node-Set. If you later attempt to treat that object as a - non-XSLT object of your original class and try to invoke a method on that object, your method - invocation will fail. -
- - - -

The technique for instantiating Java objects and calling Java methods depends on the format of the - extension namespace that was declared. See Declare the - namespace for the three different formats of namespace declarations for Java extensions. - For each namespace format, the section below describes how to instantiate an object, how to invoke - an instance method, and how to invoke a static method. The sections below explain, for each syntax, - which methods are qualified for method selection as described in the preceeding section.

- -


To create an instance of an object: -
prefix:new (args)

-

where prefix is the extension namespace prefix. A new instance is to be created with - the args constructor arguments (if any). All constructor methods are qualified for method - selection. -
Example: <xsl:variable name="myType" -
       select="my-class:new()">

- -

To invoke an instance method on a specified object: -
prefix:methodName (object, args)

-

where prefix is the extension namespace prefix and methodName is the name of - the method to invoke on object with the args arguments. object must - be an object of the class indicated by the namespace declaration. Otherwise, the case shown - immediately below will apply. Only instance methods with the name methodName are - qualified methods. If a matching method is found, object will be used to identify the - object instance and args will be passed to the invoked method. -
-Example: <xsl:variable name="new-pop"
-     select="my-class:valueOf($myType, string(@population))">

- -

To invoke an instance method on a default object: -
prefix:methodName (args)

-

where prefix is the extension namespace prefix and methodName is the name of -the method to invoke with the args arguments. The first arg, if any, must not be -an object of the class indicated by the namespace declaration. Otherwise, the case shown immediately -above will apply. Only instance methods with the name methodName are qualified methods. If -a matching method is found, a default instance of the class will be created if it does not already -exist. -
-Example: <xsl:variable name="new-pop"
-     select="my-class:valueOf(string(@population))">

- -

To invoke a static method: -
prefix:methodName (args)

-

where prefix is the extension namespace prefix and methodName is the name of -the method to invoke with the args arguments. Only static methods with the name -methodName are qualified methods. If a matching method is found, args will -be passed to the invoked static method. -
-Example: <xsl:variable name="new-pop"
-     select="my-class:printit(string(@population))">

-
- -


To create an instance of an object: -
prefix:subpackage.class.new (args)

-

where prefix is the extension namespace prefix, subpackage is the rest of the -package name (the beginning of the package name was in the namespace declaration), and class -is the name of the class. A new instance is to be created with the args constructor -arguments (if any). All constructor methods are qualified for method selection. -
Example: <xsl:variable name="myType" -
       select="my-package:extclass.new()">

- -

To invoke an instance method on a specified instance: -
prefix:methodName (object, args)

-

where prefix is the extension namespace prefix and methodName is the name of -the method to invoke on object with the args arguments. Only instance methods of -the object with the name methodName are qualified methods. If a matching method -is found, object will be used to identify the object instance and args will be -passed to the invoked method. -
-Example: <xsl:variable name="new-pop"
-     select="my-package:valueOf($myType, string(@population))">

- -

To invoke a static method: -
prefix:subpackage.class.methodName (args)

-

where prefix is the extension namespace prefix, subpackage is the rest of -the package name (the beginning of the package name was in the namespace declaration), class -is the name of the class, and methodName is the name of the method to invoke with the -args arguments. Only static methods with the name methodName are qualified -methods. If a matching method is found, args will be passed to the invoked static method. -
-Example: <xsl:variable name="new-pop"
-     select="my-package:extclass.printit(string(@population))">

-Unlike the class format namespace, there is no concept of a default object since the namespace -declaration does not identify a unique class. -
- -


To create an instance of an object: -
prefix:FQCN.new (args)

-

where prefix is the extension namespace prefix for the Java namespace and FQCN -is the fully qualified class name of the class whose constructor is to be called. A new instance is to -be created with the args constructor arguments (if any). All constructor methods are -qualified for method selection. -
Example: <xsl:variable name="myHash" -
       select="java:java.util.Hashtable.new()">

- -

To invoke an instance method on a specified instance: -
prefix:methodName (object, args)

-

where prefix is the extension namespace prefix and methodName is the name of -the method to invoke on object with the args arguments. Only instance methods of -the object with the name methodName are qualified methods. If a matching method -is found, object will be used to identify the object instance and args will be -passed to the invoked method. -
-Example: <xsl:variable name="new-pop"
-     select="java:put($myHash, string(@region), $newpop)">

- -

To invoke a static method: -
prefix:FQCN.methodName (args)

-

where prefix is the extension namespace prefix, FQCN is the fully qualified -class name of the class whose static method is to be called, and methodName is the name of -the method to invoke with the args arguments. Only static methods with the name -methodName are qualified methods. If a matching method is found, args will be -passed to the invoked static method. -
-Example: <xsl:variable name="new-pop"
-     select="java:java.lang.Integer.valueOf(string(@population))">

-Unlike the class format namespace, there is no concept of a default object since the namespace -declaration does not identify a unique class. -
-
- - -

Please keep in mind that all LocationPath expressions return a node-set, even if the -expression only returns a single attribute or a text node (node-sets with one member). You can use -the XSLT string() function (as in the syntax examples above) to convert a node-set value to string, -and the number() function to convert a node-set value to number (a double).

-

If you want to pass a node-set to an extension function, set up a Java method to accept an -org.w3c.dom.NodeList (or an org.apache.xpath.NodeSet, which implements NodeList, if you want to modify -the nodes).

-

Suppose, for example, you have a myExtensions.ProcessNodes class with the following doSomething -method:

-

public static boolean doSomething(org.w3c.dom.NodeList nList)

-

Assuming you set up this extension in the node-ext namespace, any of the following extension calls -from a stylesheet are syntactically possible:

-

<!--Process the current node-->
-<xsl:variable name="success" select="node-ext:MyExtensions.ProcessNodes.doSomething(.)"/>

-

<!--Process all nodes in current context-->
-<xsl:variable name="success" select="node-ext:MyExtensions.ProcessNodes.doSomething(*)"/>

-

<!-- Process all nodes -->
-<xsl:variable name="success" select="node-ext:MyExtensions.ProcessNodes.doSomething(/*)"/>

-

<!--Process the foo/baz nodes in current context -->
-<xsl:variable name="success" select="node-ext:MyExtensions.ProcessNodes.doSomething(foo/baz)"/>

-

<!--Process the/foo/baz and /bar/saz nodes -->
-<xsl:variable name="success" select="node-ext:MyExtensions.ProcessNodes.doSomething(/foo/baz | /bar/saz)"/>

-

The NodeList is in fact a list of references into the XML document, so keep in mind that -getNextSibling(), for example, gets you the next sibling in the document, which may not be the next -Node in the NodeList.

-
- -

For each extension function in a namespace which is implemented in a language other than Java, the -implementation must include a method with the following signature, or the scripting language -equivalent:

-

public object function(args)

-

where object is the return type, function is the local part of the extension -function name (the function name without the namespace prefix), and args correspond to the -arguments in the function call.

-

In addition, for extension functions implemented in Java, the implementation may include either a -Java method with the signature shown above or one with the following signature:

-

public object function(org.apache.xalan.extensions.ExpressionContext, -args)

-
-
- -

For extension functions and extension elements implemented in Java, &xslt4j; permits an abbreviated -syntax. When you use the abbreviated syntax, you do not use an xalan:component to designate the -functions.

-

The abbreviated syntax supports the use of extension functions and extension elements implemented -in Java. You cannot use this syntax with extensions implemented in JavaScript or another scripting -language.

- - -

Declare the namespace for your extensions using one of the following three formats. The -technique for invoking an extension for each format is explained in -Extension function Java calls.

-

class format: xmlns:my-class="xalan://FQCN"

-

where FQCN is the fully qualified class name. -
Examples: xmlns:my-class="xalan://java.util.Hashtable" -
                -xmlns:my-class="xalan://mypackage.myclass"

-

package format: xmlns:my-class="xalan://PJPN"

-

where PJPN is a partial java package name. That is, it is the beginning of or the -complete name of a java package. -
Examples: xmlns:my-package="xalan://java.util" -
                -xmlns:my-package="xalan://mypackage"

-

Java format: xmlns:java="http://xml.apache.org/xalan/java"

-The old namespace http://xml.apache.org/xslt/java is still supported for backward compatibility. - -Although the namespace declarations for the class and package formats are shown with the -xalan:// prefix, the current implementation for those formats will simply use the string to the right -of the rightmost forward slash as the Java class name. This format, however, is the preferred -format for extension namespace declarations. -The class: prefix which was sometimes required in earlier versions of &xslt4j; is no longer -required. -These formats are also available when coding the src attribute of the xalan:script element -as explained in Set up the xalan:script element. -
- -

Use the declared prefix with the syntax described in Extension -function Java calls.

-

That is all. You do not include an xalan:component element. Using the abbreviated syntax clearly -involves less setup than using the xalan:component/xalan:script approach.

-We recommend that, for extensions coded in Java, the abbreviated syntax should always be used -since the xalan:component/xalan:script constructs add no functionality. -The abbreviated syntax is supported in &xslt4jc-short;, but the xalan:component/xalan:script constructs -are not. -
- -

This example uses extension functions to call the SimpleDateFormat class and the IntDate class. -IntDate uses String arguments to set up a Date object:

-import java.util.Date; -import java.util.Calendar; - -public class IntDate -{ - public static Date getDate(String year, String month, String day) - { - // Date(int, int, int) has been deprecated, so use Calendar to - // set the year, month, and day. - Calendar c = Calendar.getInstance(); - // Convert each argument to int. - c.set ( Integer.parseInt(year), - Integer.parseInt(month), - Integer.parseInt(day) ); - return c.getTime(); - } -} -

The template transforms date elements with four attributes. For example, it transforms -<date format="EEEE, MMM dd, yyyy" year="2000" month="4" day="27"/> -into <p>Date: Thursday, April 27, 2000.</p>.

-

As you review this stylesheet, please keep the following in mind:

-
    -
  • The exclude-result-prefixes stylesheet attribute prevents the java namespace declaration from - appearing in the output.
  • -
  • The XSLT type returned by any LocationPath expression is node-set, so the XSLT string - function is used to convert the format, year, month, and day attribute values from node-sets to - strings.
  • -
  • The format attribute provides a String argument for constructing a java.text.SimpleDateFormat - object.
  • -
  • The IntDate class uses String values provided by the year, month, and day attributes, to set the - date. XSLT can pass number values, but these are converted into doubles.
  • -
  • The formatter variable holds a SimpleDateFormat object, and the date variable holds a Date object. - XSLT does not understand either of these types, but they are used to call the SimpleDateFormat format - method. In that call, $formatter is the object, and $date is the argument. The syntax for calling - Java constructors and methods is described above in Extension - function Java calls.
  • -
-<?xml version="1.0"?> -<xsl:stylesheet - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - version="1.0" - xmlns:java="http://xml.apache.org/xalan/java" - exclude-result-prefixes="java"> - - <!--Other templates for transforming the rest of - the XML source documents--> - - <xsl:template match="date"> - <xsl:variable name="year" select="string(./@year)"/> - <xsl:variable name="month" select="string(./@month)"/> - <xsl:variable name="day" select="string(./@day)"/> - <xsl:variable name="format" select="string(./@format)"/> - - <xsl:variable name="formatter" - select="java:java.text.SimpleDateFormat.new($format)"/> - - <xsl:variable name="date" - select="java:IntDate.getDate($year, $month, $day)"/> - - <p>Date: <xsl:value-of select="java:format($formatter, $date)"/></p> - </xsl:template> -</xsl:stylesheet> - -
-
- -

This section contains two examples. The first example uses a Java extension to transform a set of -name elements into an alphabetical and numbered list. The second example uses a JavaScript script -to do the same. Both examples include equivalent extension elements and an extension function.

- - -

MyCounter.java

-Import java.util.*; - -public class MyCounter { - Hashtable counters = new Hashtable (); - - public MyCounter () - {} - - public void init - ( org.apache.xalan.extensions.XSLProcessorContext context, - org.apache.xalan.templates.ElemExtensionCall extElem ) - { - String name = extElem.getAttribute("name"); - String value = extElem.getAttribute("value"); - int val; - try - { - val = Integer.parseInt (value); - } - catch (NumberFormatException e) - { - e.printStackTrace (); - val = 0; - } - counters.put (name, new Integer (val)); - } - - public int read(String name) - { - Integer cval = (Integer) counters.get (name); - return (cval == null) ? 0 : cval.intValue (); - } - - public void incr - ( org.apache.xalan.extensions.XSLProcessorContext context, - org.apache.xalan.templates.ElemExtensionCall extElem) - { - String name = extElem.getAttribute("name"); - Integer cval = (Integer) counters.get(name); - int nval = (cval == null) ? 0 : (cval.intValue () + 1); - counters.put (name, new Integer (nval)); - } -} - -

An XML source document:

-<?xml version="1.0"?> -<doc> - <name first="David" last="Marston"/> - <name first="David" last="Bertoni"/> - <name first="Donald" last="Leslie"/> - <name first="Emily" last="Farmer"/> - <name first="Jack" last="Donohue"/> - <name first="Myriam" last="Midy"/> - <name first="Paul" last="Dick"/> - <name first="Robert" last="Weir"/> - <name first="Scott" last="Boag"/> - <name first="Shane" last="Curcuru"/> -</doc> -

The stylesheet:

-<?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:xalan="http://xml.apache.org/xalan" - xmlns:counter="MyCounter" - extension-element-prefixes="counter" - version="1.0"> - - <xalan:component prefix="counter" - elements="init incr" functions="read"> - <xalan:script lang="javaclass" src="xalan://MyCounter"/> - </xalan:component> - - <xsl:template match="/"> - <HTML> - <H1>Names in alphabetical order</H1> - <counter:init name="index" value="1"/> - <xsl:for-each select="doc/name"> - <xsl:sort select="@last"/> - <xsl:sort select="@first"/> - <p> - <xsl:text>[</xsl:text> - <xsl:value-of select="counter:read('index')"/> - <xsl:text>]. </xsl:text> - <xsl:value-of select="@last"/> - <xsl:text>, </xsl:text> - <xsl:value-of select="@first"/> - </p> - <counter:incr name="index"/> - </xsl:for-each> - </HTML> - </xsl:template> - -</xsl:stylesheet> - -

Transformation output:

-<HTML> -<H1>Names in alphabetical order</H1> -<p>[1]. Bertoni, David</p> -<p>[2]. Boag, Scott</p> -<p>[3]. Curcuru, Shane</p> -<p>[4]. Dick, Paul</p> -<p>[5]. Donohue, Jack</p> -<p>[6]. Farmer, Emily</p> -<p>[7]. Leslie, Donald</p> -<p>[8]. Marston, David</p> -<p>[9]. Midy, Myriam</p> -<p>[10]. Weir, Robert</p> -</HTML> -
- -

-<?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:xalan="http://xml.apache.org/xalan" - xmlns:counter="MyCounter" - extension-element-prefixes="counter" - version="1.0"> - - <xalan:component prefix="counter" - elements="init incr" functions="read"> - <xalan:script lang="javascript"> - var counters = new Array(); - - function init (xslproc, elem) { - name = elem.getAttribute ("name"); - value = parseInt(elem.getAttribute ("value")); - counters[name] = value; - return null; - } - - function read (name) { - // Return a string. - return "" + (counters[name]); - } - - function incr (xslproc, elem) - { - name = elem.getAttribute ("name"); - counters[name]++; - return null; - } - </xalan:script> - </xalan:component> - - <xsl:template match="/"> - <HTML> - <H1>Names in alphatebical order</H1> - <counter:init name="index" value="1"/> - <xsl:for-each select="doc/name"> - <xsl:sort select="@last"/> - <xsl:sort select="@first"/> - <p> - <xsl:text>[</xsl:text> - <xsl:value-of select="counter:read('index')"/> - <xsl:text>]. </xsl:text> - <xsl:value-of select="@last"/> - <xsl:text>, </xsl:text> - <xsl:value-of select="@first"/> - </p> - <counter:incr name="index"/> - </xsl:for-each> - </HTML> - </xsl:template> - -</xsl:stylesheet> - -

This stylesheet produces the same output as the preceding example with the Java extension.

-
-
-
diff --git a/stylebook/sources/xalan/extensions_xsltc.xml b/stylebook/sources/xalan/extensions_xsltc.xml deleted file mode 100644 index 3ad7227d4..000000000 --- a/stylebook/sources/xalan/extensions_xsltc.xml +++ /dev/null @@ -1,198 +0,0 @@ - - - - - - - -
    -
  • Introduction
  • -
  • Constraints
  • -
  • Java extension
  • -
  • EXSLT extensions
  • -
  • nodeset
  • -
  • output/redirect
  • -
- - -

&xslt4jc-short; supports the use of extension functions implemented in external Java classes. It also - supports the nodeset, output/redirect - and EXSLT extension functions. Extension support in &xslt4jc-short; is - still under development. It is currently not as complete as the extension support in the - &xslt4j; Interpretive processor. There are constraints in some areas.

-
- - - -

In addition to the constraints listed below for each particular extension, extension support - in &xslt4jc-short; also has the following limitations:

-
    -
  1. Extension element is not supported. - The extension element mechanism is closely related to the internal implementation of the XSLT processor. - The current extension element mechansim is designed for the &xslt4ji; processor. It does not work with &xslt4jc-short;.
  2. -
  3. The xalan:component and xalan:script extension elements are not supported at the moment. This has - the implication that you cannot use scripting languages (e.g. javascript) with &xslt4jc-short;.
  4. -
  5. The SQL extension is not supported in &xslt4jc-short; at the moment.
  6. -
-
- - - -

Java extension is supported in &xslt4jc-short;. Constructors, static and instance methods are all supported. - You can use any of the three namespace formats - (Java, package and class) in your stylesheet. -

-

The official namespace for the Java extension is http://xml.apache.org/xalan/java. The old &xslt4jc-short; Java namespace - http://xml.apache.org/xalan/xsltc/java and the old &xslt4j; namespace http://xml.apache.org/xslt/java - are also supported for backward compatibility.

-

All usage syntax for the &xslt4j; Interpretive processor also applies to &xslt4jc-short; with only one - exception: &xslt4jc-short; does not support the notion of default object - in class format namespace. - When using instance methods, you should always specify the class instance as the first argument - to the extension function.

-

The following example shows you how to call constructors, static, and nonstatic functions, - using different namespace formats:

- - <xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:date="http://xml.apache.org/xalan/java/java.util.Date" - xmlns:java_lang="http://xml.apache.org/xalan/java/java.lang" - exclude-result-prefixes="date java_lang"> - - <!-- - * test: construction of Date object using a parameter calculated - * by a static call to the java.lang.Math object. Then call - * a non-static method (getTime()) on the newly created Date - * object. Demonstrates calling constructors, static functions - * (Math.max) and non-static functions (getTime()). - * - * Output: - * <?xml version="1.0" encoding="UTF-8"?> - * Date of object: Sat Nov 30 17:32:41 EST 2002 - * Time of object: 1038695561000 - * - --> - - <xsl:template match="/"> - <!-- create Date object with calculated parameter --> - <xsl:variable name="dateObject" - select="date:new( - java_lang:Math.max(1027695561000,1038695561000) - )"/> - Date of object: <xsl:value-of select="$dateObject"/> - Time of object: <xsl:value-of select="date:getTime($dateObject)"/> - </xsl:template> - - </xsl:stylesheet> - - Always use the abbreviated syntax for Java extension, because the xalan:component/xalan:script - constructs are not supported in &xslt4jc-short;. -
- - - -

The following EXSLT extension modules are supported in &xslt4jc-short;:

-
    -
  • EXSLT common functions
  • -
  • EXSLT math functions
  • -
  • EXSLT set functions
  • -
  • EXSLT date-and-time functions
  • -
  • EXSLT string functions
  • -
-

The functions in the dynamic module - (e.g. evaluate) are not supported because of the &xslt4jc-short; design limitation. - Work is currently underway on user - defined EXSLT functions (with the function and result elements).

-

The nodeset and objectType extension functions in the common - module are implemented natively in &xslt4jc-short;. For all other EXSLT extension functions, - &xslt4jc-short; uses the same implementation as the &xslt4j; Interpretive processor. The implementation classes - are under org.apache.xalan.lib. - Depending on the packaging, these classes can be in a separate jar file (e.g. xalan.jar) from - the &xslt4jc-short; classes. In this case you need to add the jar file containing the EXSLT classes to your - classpath in order to use EXSLT extensions in &xslt4jc-short;.

-
- - - -

&xslt4jc-short; also supports the nodeset() extension function for transforming an RTF (result - tree fragment) into a node set.

-

The nodeset extension can be used as an &xslt4jc-short; extension function in the namespace - http://xml.apache.org/xalan/xsltc, a &xslt4j; extension function in the namespace - http://xml.apache.org/xalan, an EXSLT extension function in the namespace - http://exslt.org/common or as a standard XPATH function. When it is used as - an EXSLT extension function, you need to refer to the nodeset extension function as - node-set.

-

The following exmaple shows you how to use the nodeset extension - function in different namespaces:

- <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:xsltc-extension="http://xml.apache.org/xalan/xsltc" - xmlns:xalan="http://xml.apache.org/xalan" - xmlns:exslt="http://exslt.org/common" - version="1.0"> - <xsl:template match="/"> - <xsl:variable name="rtf"> - <docelem> - <elem1>elem1</elem1> - <elem2>elem2</elem2> - </docelem> - </xsl:variable> - <!-- Use nodeset as an XSLTC extension function --> - <xsl:value-of select="xsltc-extension:nodeset($rtf)/docelem/elem1"/> - <!-- Use nodeset as a &xslt4j; extension function --> - <xsl:value-of select="xalan:nodeset($rtf)/docelem/elem1"/> - <!-- Use nodeset as an EXSLT extension function --> - <xsl:value-of select="exslt:node-set($rtf)/docelem/elem1"/> - <!-- Use nodeset as standard function --> - <xsl:value-of select="nodeset($rtf)/docelem/elem1"/> - </xsl:template> -</xsl:stylesheet> -
-The preferred solution is to use the EXSLT node-set function so that it can work -with multiple XSLT processors. -
- - - -

&xslt4jc-short; supports the output extension element for redirecting the output to one - or more files. The output extension element is also aliased to the write extension element - in the namespace http://xml.apache.org/xalan/redirect. Therefore you can use - it in the same way as the redirect - extension in &xslt4j;.

-

You can use the file and append attributes with the output/redirect extension. The value of the file - attribute is an attribute value template. If the value of the append attribute is true or yes, the - output is appended to the file rather than overwriting the file.

-

The following example shows you how to use the output/redirect extension:

- <xsl:stylesheet - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:xsltc="http://xml.apache.org/xalan/xsltc" - xmlns:redirect="http://xml.apache.org/xalan/redirect" - extension-element-prefixes="xsltc redirect" - version="1.0"> - <xsl:template match="/"> - <xsl:text>This goes to standard output</xsl:text> - <xsltc:output file="blob.xml"> - <xsl:text>This ends up in the file 'blob.xml'</xsl:text> - </xsltc:output> - <redirect:write file="blob2.xml"> - <xsl:text>This ends up in the file 'blob2.xml'</xsl:text> - </redirect:write> - </xsl:template> -</xsl:stylesheet> -
- -
diff --git a/stylebook/sources/xalan/faq.xml b/stylebook/sources/xalan/faq.xml deleted file mode 100644 index 338f3710e..000000000 --- a/stylebook/sources/xalan/faq.xml +++ /dev/null @@ -1,763 +0,0 @@ - - - - - - - - Where do I go to learn about XSLT? - -

The definitive sources are the W3C XSLT and XPath recommendations: - and - . -

-

For a brief listing of tutorials, discussion forums, and other materials, see - Getting up to speed with XSLT. -

-
-
- - Where can I ask questions about XSLT? - -

xalan-dev and - xalan-j-users - are for Xalan-Java questions only. This is not the best - forum to ask general XSLT questions. The is an - excellent place to ask XSLT questions; please search - to ensure your question has not been already asked. -

-
-
- - What are TrAX and JAXP, and are they related? - -

-

TrAX is the Transformation API for XML. In November 2000, TrAX was revised and incorporated - into JAXP, the JAVA API for XML Processing. JAXP (including TrAX) provides users a standard, - vendor-neutral API for working with (and transforming) XML documents. You can use this API - to build applications that are not bound to the particular implementation details of a given - XML parser or XSL transformer.

-

&xslt4j; includes the JAXP packages, implements the TrAX portion of - that API (javax.xml.transform....), implements the XPath API of JAXP (javax.xml.xpath....), - and includes xercesImpl.jar from - , which implements the parser portion of the API - (javax.xml.parser....).

-

For more information, see Using the JAXP Transform APIs and - . -

-
-
-
- - - How do I see what version of &xslt4j; I'm running? How do I determine - which parser I'm using? - -

- -

-

- Using the EnvironmentCheck utility: To help diagnose classpath problems and also - determine which version of &xslt4j; is being used, try running - &xslt4j;'s environment checking utility. -

-

You can run this utility from the command line as follows:

-

- java org.apache.xalan.xslt.EnvironmentCheck [-out outFile] -

-

You can also call this utility from within your application. For example,

-

- boolean environmentOK = (new EnvironmentCheck()).checkEnvironment (yourPrintWriter); -

-

Be sure to run EnvironmentCheck in the environment where you are experiencing the problem. - For example, if you get a NoClassDefFound error from a command-line application, run - EnvironmentCheck on the command line with exactly the same classpath. If the error occurs - inside your Java application (or in a servlet, etc.), be sure to call the EnvironmentCheck - checkEnvironment(...) method from within your running application.

-

Best of all, you can call checkEnvironment from a stylesheet using extensions:

- -<?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" - xmlns:xalan="http://xml.apache.org/xalan" - exclude-result-prefixes="xalan"> -<xsl:output indent="yes"/> - -<xsl:template match="/"> - <out> - <xsl:copy-of select="xalan:checkEnvironment()"/> - </out> -</xsl:template> -</xsl:stylesheet> -
-
- - How do I see what version of the Serializer I'm running? - - -

- Xalan's serialier is now shared with Xerces. It may be packaged in Xalan, or Xerces, - or in the JRE itself. You can run the serializer's Version utility from the command line as follows: -

-

- java org.apache.xml.serializer.Version -

- The output should indicate which serializer you are using. -
-
- - Which version of &xml4j; should I be using? - -

has been tested with . - See Status. -

-
-
- - How do I run applications that use the &xslt4j; version 1 API with &xslt4j; - -

The &xslt4j; version 1 compatibility API has been deprecated and removed, so you - must use the &xslt4j; version 2 API. We strongly encourage you to use the - . For more information, see - the FAQ on TrAX and JAXP.

-
-
- - I'm having a problem building or running &xslt4j; on the JDK 1.3. - -

-

The JDK 1.3 automatically places everything in the lib/ext directory in front of everything - you place on the classpath. If this directory contains a version of DOM, JAXP, or Xerces - that predates the &xslt4j; distribution you are using, you may have problems!

-

The IBM JDK 1.3 includes an earlier version of xerces.jar in the lib/ext directory, a - version that does not implement the &jaxp13-short; interfaces and therefore does not work with the - current &xslt4j; release. Accordingly, you must either remove the - xerces.jar that is in that directory or replace it with the xercesImpl.jar that is included - with the &xslt4j; distribution.

-

The SUN JDK 1.3 includes a pre-1.1 version of the JAXP in crimson.jar. Either remove the - crimson.jar in that directory or overwrite it with a newer crimson.jar that includes and - implements the &jaxp13-short; interfaces.

-
-
- - I'm having a problem running &xslt4j; on JDK/JRE 1.4 or higher - -

-

JDK/JRE 1.4, and JDK/JRE 5.0 is packaged with an old version of Xalan-Java. The JDK/JRE - will attempt to use this version instead of any on the classpath. Unfortunately, - this causes problems when attempting to use a newer version of &xslt4j;.

-

You can always determine which version of &xslt4j; you are running - by using the EnvironmentCheck class or by using the - xalan:checkEnvironment extension function. It is highly recommended that you use this - method to verify the version of &xslt4j; you are running, especially - before opening a bug report.

-

To use a newer version of &xslt4j; and override the one packaged with the JDK:

-
    -
  • use the - . Place the xalan.jar, serializer.jar, xercesImpl.jar - and xml-apis.jar in the - <java-home>\lib\endorsed directory, where - <java-home> is where the runtime software is installed. -
  • -
-

The following methods - do not work: -

-
    -
  • Using the CLASSPATH environment variable or using -classpath to place the new classes - in the classpath.
  • -
  • Using the -jar option to explicitly execute the classes inside the new jar files.
  • -
-
-
- - I got java.lang.IllegalAccessError running &xslt4j; on Tomcat with JDK 1.4. - -

-

jakarta-tomcat 4.1.* is packed - with an old version of xercesImpl.jar. Based on the , you should - replace it with the newer xercesImpl.jar. You should add a newer xalan.jar and serializer.jar - to Tomcat as well. - Read the FAQ about Issues running &xslt4j; on JDK/JRE 1.4 or higher. Place the - xalan.jar, serializer.jar, and xercesImpl.jar in the <Tomcat_Home>\common\endorsed directory, where - <Tomcat_Home> is where the Tomcat application server is installed.

-
-
- - I got javax.xml.transform.TransformerException running my applet which uses &xslt4jc-short; in JRE 1.4. - -

-

To overwrite an older version of Xalan Java; packaged with JRE 1.4 or higher you can add a newer - xalan.jar and serializer.jar to the <jre-home>\lib\endorsed directory. Read the FAQ about - Issues running - &xslt4j; on JDK/JRE 1.4 or higer. If there is a META-INF/services/javax.xml.transform.TransformerFactory - file in xalan.jar (as there is in the Xalan Java distributions), then the TransformerFactoryImpl - setting in this file will be used by the JVM during the factory finder lookup procedure. - The TransformerFactoryImpl for the Xalan Java Interpretive processor is the default setting in the - META-INF/services/javax.xml.transform.TransformerFactory file, therefore, you will get an error - when your applet attempts to use the &xslt4jc-short; implementation.

-

To work around this problem, you can change the contents of the - META-INF/services/javax.xml.transform.TransformerFactory file in xalan.jar so that it refers to the - transformer factory class implementation for &xslt4jc-short;, org.apache.xalan.xsltc.trax.TransformerFactoryImpl.

-

Another solution is to create a jar that contains a META-INF/services/javax.xml.transform.TransformerFactory file - containing the value org.apache.xalan.xsltc.trax.TransformerFactoryImpl. Place the jar in the - <jre-home>\lib\endorsed directory. When you name your jar file, the ASCII code of the first - character should be smaller than the ASCII code of "X" to ensure that your jar will be loaded before - xalan.jar

-
-
- - How do I use the "signature" file to verify my download? - -

For each &xslt4j; download file there is a corresponding signature file. - The signature file for xalan-j_2_0_1.tar.gz, for example, is xalan-j_2_0_1.tar.gz.sig. -

-

The .sig files are PGP signatures of the actual .zip or .tar.gz - download files. You can use these files to verify the authenticity of the download. You do not - need the .sig file to use the corresponding download file.

-

To check the authenticity of a &xslt4j; distribution, you need a copy of - PGP which is available in a number of licenses, including some free - non-commercial licenses, either from an mit.edu site or on - the pgp.com site. Once you have a version of PGP installed, you - should be able to 'verify the signature' of the .sig file, which basically verifies that the - corresponding .zip or tar.gz file has not been changed since we signed it.

-

The PGP key can be found in - KEYS.

-
-
-
- - - What can I do to speed up transformations? - -

In the ongoing development of &xslt4j;, enhancing performance is - the primary goal of the &xslt4j; team. Here are some preliminary - suggestions for you to keep in mind as you set up your applications:

-
    -
  • Use a Templates object (with a different Transformers for each transformation) to - perform multiple transformations with the same set of stylesheet instructions (see - Multithreading). -
    -
    -
  • -
  • Set up your stylesheets to function efficiently. -
    -
    -
  • -
      -
    • Don't use "//" (descendant axes) patterns near the root of a large document. -
      -
      -
    • -
    • Use xsl:key elements and the key() function as an efficient way to retrieve node sets. -
      -
      -
    • -
    • Where possible, use pattern matching rather than xsl:if or xsl:when statements. -
      -
      -
    • -
    • xsl:for-each is fast because it does not require pattern matching. -
      -
      -
    • -
    • Keep in mind that xsl:sort prevents incremental processing. -
      -
      -
    • -
    • When you create variables,
      <xsl:variable name="fooElem" select="foo"/>
      is usually faster than -
      <xsl:variable name="fooElem"><xsl:value-of-select="foo"/></xsl:variable> -
      -
      -
    • -
    • Be careful using the last() function. -
      -
      -
    • -
    • The use of index predicates within match patterns can be expensive. -
      -
      -
    • -
    • Decoding and encoding is expensive. -
      -
      -
    • -
    -
  • For the ultimate in server-side scalability, perform transform operations on the client. - For examples, see - appletXMLtoHTML and - get-todo-list. -
  • -
-
-
- - What is the JAXP factory lookup procedure and does it affect performance? - -

JAXP uses an ordered lookup procedure to find factory implementations, such as - an implementation of javax.xml.transform.TransformerFactory. For information - on this procedure, refer to Section 3 Plugability in . -

-

In most cases, Factory classes need only be looked up once for an application, so - performance is not an issue. However, there may be scenarios where the lookup - procedure executes multiple times which could impact performance. In these cases, - users may want to set system properties or populate the jaxp.properties file in order - to shorten the time spent in the lookup procedure. -

-
-
-
- - - XPath isn't retrieving nodes that are in the default namespace I defined. How do I get them? - -

If you are looking for nodes in a namespace, the XPath expression must include a namespace - prefix that you have mapped to the namespace with an xmlns declaration. If you have declared - a default namespace, it does not have a prefix (see - XPath Node Tests). In order - to construct XPath expressions to retrieve nodes from this namespace, you must add a - namespace declaration that provides a prefix you can include in the XPath expressions.

-

Suppose, for example, you you want to locate nodes in a default namespace declared as follows: -
- xmlns="http://my-namespace" -

-

Add a namespace declaration with a prefix: -
- xmlns:foo="http://my-namespace" -

-

Then you can use foo: in your XPath expression.

-

Hint: Avoiding the use of default namespaces will prevent this problem from occuring.

-
-
- - - How do I set my parser to be namespace aware? - - -

-

If you use a TransformerFactory to process a stylesheet Source and generate a Transformer, - the TransformerFactory instructs the SAXParserFactory to set the parser's namespaceAware - property to true. But if you call the parser directly, you may need to set the namespaceAware - property yourself. for example:

- javax.xml.parsers.SAXParserFactory spFactory = - javax.xml.parsers.SAXParserFactory.newInstance(); -spFactory.setNamespaceAware(true); - For more information about setting the namespaceAware property, and SAX2 vs. JAXP default - settings, see JAXP FAQ: - Warning about namespace processing defaults. - -
-
-
- - - I'm getting a NoClassDefFound error. What has to be on the classpath? - -
    -
  1. xalan.jar, serializer.jar, xml-apis.jar, and xercesImpl.jar -- or the XML parser you are using -- must - always be on the classpath. -
    -
    -
  2. -
  3. To run the samples in the samples subdirectories, xalansamples.jar must be on the - classpath. To run the servlet samples, you must place xalanservlet.war - on a web server with a servlet engine and you must put the javax.servlet and - javax.servlet.http packages on the classpath. These packages - are available via the servlet.jar file found in Apache Tomcat ( see ). -
    -
    -
  4. -
  5. To run extensions which use the component and script extension elements (including the - samples in samples/extensions), bsf.jar must be on the classpath. To run extensions - implemented in JavaScript, js.jar must also be on the classpath. For information on what - you need to run extensions implemented in other scripting languages, see - Supported languages. -
  6. -
- You can check the correctness of your environment with the - EnvironmentCheck feature. -

For more information, see - Setting up the system classpath. -

-
-
- - Why do I get a "DOM006 Hierarchy request error" when I try to transform into a DOM Document node? - -

This error occurs when &xslt4j; tries to add a Node to a Document node - where it isn't allowed. For example, attempting to add non-whitespace text to the DOM Document - node produces this error.

-

The error can also occur when a Document node is created with the DOMImplementation - createDocument() method, which takes a qualified name as an argument and creates an element - node. If you then pass the returned Document node to &xslt4j;, you - get a "DOM006 Hierarchy request error" when &xslt4j; tries to add a - second element to the Document node. The solution is to either use the DocumentBuilder - newDocument() method to create a Document that does not contain an element node, or use a - DocumentFragment. It should be noted that the DocumentBuilder newDocument() method is - "Non-preferred" according to the &jaxp13-short; documentation.

-
-
- - Why am I getting a "Namespace not supported by SAXParser exception? - -

We have seen this problem arise for two quite different reasons:

-
    -
  • SAX1 interfaces are on your classpath in front of the SAX2 interfaces provided with - your XML parser. -
    -
    - or -
    -
    -
  • -
  • The parser you are using to process a stylesheet Source and generate a Transformer does - not have the namespaceAware property set to true.
  • -
-

- SAX1 on the classpath -

-

SAX1 should not be on your classpath. The SAX1 interfaces and implementations of the SAX1 - SAX parser are not namespace aware.

-

To help diagnose your classpath, you can use the - EnvironmentCheck - utility. If you are running under JDK 1.3, see - Issues running &xslt4j; on JDK - 1.3. If you are running a servlet, make sure the webserver is not placing SAX1 on the - classpath. -

-

When you create a Transformer, you must use a - namespace-aware parser to parse the stylesheet. -

-
-
- - I'm getting an error about my stylesheet missing the xsl:version attribute - what's wrong? - -

There are two common causes for this error.

-
    -
  1. Using the wrong URI for the xsl: prefix will cause this message. URIs, and namespace - URIs in particular, are case sensitive. Ensure the URI for the xsl namespace is - "http://www.w3.org/1999/XSL/Transform".

  2. -
  3. The parser you are using to process a stylesheet Source and generate a Transformer - does not have the namespaceAware property set to true.
    - When you create a Transformer, you must use a namespace-aware parser to parse the stylesheet.
  4. -
-
-
- - &xslt4j; dies with a java.lang.StackOverflowError when I run a deeply - recursive stylesheet. The same stylesheet worked fine in the past (or on other machines). - What's happening? - -

That may not be our fault. As of JDK 1.3.x, many Java Virtual Machine publishers reduced - the default size of a thread's call stack from 1MB to 256KB. This allows more threads to - run simultaneously, but it means that each thread is more limited in how deeply its function - calls can be nested.

-

Some JVMs may offer an option that allows you to raise this limit. For example, in Sun - JDK 1.3.1 you can start JVM with the -Xss1m option to allow each thread to use a full - megabyte. In IBM's JDK you can start with the -Xss1m and -Xoss1m options. Other JVMs - may set this in other ways, or may not allow you to control it at all; check the - documentation on your system for details.

-

Note too that on some platforms 1MB is an architectural upper limit on the stack size, so - setting -Xss2m (or equivalent) may not allow deeper recursion than -Xss1m.

-
-
- - I get a java.lang.OutOfMemoryError when I try to process multiple documents with the - document() function. What can I do? - -

As a general rule, &xslt4j; currently caches all of the documents - that you read in with the document() function during a transformation.

-

If your objective is to transform a series of documents, you can break the process into a - series of transformations. The - PipeDocument extension element - provides one strategy for batching a series of parallel transformations.

-

Another alternative is to place your document() call in the select attribute of an - xsl:for-each instruction element and use a custom PI (Processing Instruction) to turn off - document caching. Include an XPath expression in your document() call if you do not - need to process the entire document.

-

Sample stylesheet fragment:

- -<xsl:template match="doc"> - <xsl:for-each select="document(@href)/bar/zulu"> - <?xalan-doc-cache-off?> - <!-- process each document --> - <xsl:for-each> -</xsl:template> - PIs do not ordinarily uses namespaces, so "xalan:" is a 'fake' namespace we have - included to indicate that this is not a standard PI. -

If you include an XPath expression in your document() call, you can also turn on - incremental transform to eliminate the need - to read in the entire document. In fact, you can take advantage of the incremental transform - feature even if you are not turning off document caching. -

-

You can also increase your JVM heap size with the -Xmx or -mx flag, depending on which JVM - you are using (you can include both flags, and the JVM will ignore the one it doesn't - understand). For example, to give your JVM 64 meg, try -
- java -Xmx64m -mx64m - Class - -

-
-
- - Why do I get 'file not found' when I pass c:\path\filename.txt? - -

&xslt4j; often requires legal URLs as system identifiers, not local - pathnames (this is partly due to underlying parsers requiring this). A simple (but not always - correct!) way to change a local pathname into a URL in Java 1.1x is:

- - public static String filenameToURL(String filename) - { - File f = new File(filename); - String tmp = f.getAbsolutePath(); - if (File.separatorChar == '\\') - { - tmp = tmp.replace('\\', '/'); - } - // Note: gives incorrect results when filename already begins with -file:/// - return "file:///" + tmp; - } - -

For a slightly more detailed example, see org.apache.xml.utils.SystemIDResolver.

-
-
- - What does: "XSLT Error (javax.xml.transform.TransformerException): - org.apache.xml.dtm.DTMException: No more DTM IDs are available" mean? - -

It means you are probably using a very old version of Xalan or &xslt4j;, - likely the version 2.2D11 which was packaged in JDK1.4. Architectural changes made in - early 2002 should have eliminated this issue for almost all cases.

-

You should verify the version of &xslt4j; you are using by running - the EnvironmentCheck utility, - and read the FAQ about Issues running &xslt4j; - on JDK 1.4.

-
-
- - Why do I get a "java.lang.IllegalAccessError" or the message - "Could not load the property file 'output_xml.properties'" when I try - to transform using &xslt4jc-short; or &xslt4ji;? - -

These errors may occur if you use JDK 1.4 or later releases.

-

JRE 1.4 and later releases contain copies of &xslt4j;. In some - cases, the JRE includes only &xslt4ji;, while in other cases it also - includes &xslt4jc-short;. Typically, the copy of the processor packaged - with the JRE will be loaded in preference to any copy of &xslt4j; on - your class path.

-

Beginning with &xslt4j; 2.5, &xslt4ji; and &xslt4jc-short; are both - packaged in xalan.jar, and share some of the same classes. If you - are using a version of the JRE that contains &xslt4ji;, but not - &xslt4jc-short;, and you try to use &xslt4jc-short; on your class path, - classes from that version of &xslt4jc-short; may be loaded along with - classes from the version of &xslt4j; packaged with your JRE.

-

Because the classes may be from different versions of &xslt4j;, the - results may be unpredictable. In particular, a - java.lang.IllegalAccessError may be thrown, or an - org.apache.xml.utils.WrappedRuntimeException containing - the message: "Could not load the property file - 'output_xml.properties' for output method 'xml' (check - CLASSPATH)" may be thrown.

-

To work around those problems, please read the FAQ entitled - Issues running &xslt4j; on JDK 1.4.

-
-
-
- - - How do you chain together a series of transformations? - -

&xslt4j; supports two strategies for chaining together a series of - transformations such that the output of each transformation provides input for the next - transformation.

-
    -
  • For each transformation in the series, you can set one SAX ContentHandler to process - the input, and another ContentHandler to process the output. -
    -
    -
  • -
  • You can also set up a series of parent-child relationships between an XMLReader and - one or more XMLFilters.
  • -
-

For the details and links to examples, see - Using transformation output as input for - another transformation.

-
-
- - How do I validate an XSL stylesheet? - -

An XSL stylesheet is an XML document, so it can have a DOCTYPE and be subject to - validation, right?

-

The XSLT Recommendation includes a - DTD Fragment - for XSL Stylesheets with some indications of what you need to do to create a - complete DTD for a given stylesheet. Keep in mind that stylesheets can include literal - result elements and produce output that is not valid XML.

-

You can use the xsl:stylesheet doctype defined in xsl-html40s.dtd for stylesheets that - generate HTML.

-
-
- - Why is the output character encoding I set in the stylesheet not being used? - -

If you use a character output stream to instantiate the - StreamResult object - which holds the transformation output, the Writer uses its own encoding, not the encoding - you specify in the stylesheet.

-

If you want to use the stylesheet output encoding, do not use StreamResult(java.io.Writer) - to instantiate the holder for the output. Alternatively, you can specify the encoding when - you create a Writer (java.io.OutputStreamWriter). Once the Writer exists, you cannot change - its encoding. If the transformation is run in a servlet, it is possible - that the Writer is coming from the ServletResponse object. -

-

- If the stylesheet is run using the JAXP APIs and the Transformer's setOutputProperty() - method is invoked, it is possible to set the "encoding" property and - over-ride the value in the stylesheet. -

-
-
- - How do I get line numbers for errors in the XML or XSL input when I am performing a - transformation? - -

Use or mimic the command-line processor (org.apache.xalan.xslt.Process). -

-

A - TransformerException generally wraps another exception, often a SAXParseException. The command-line processor uses the static - org.apache.xml.utils.DefaultErrorHandler printLocation() method to chase down the exception cause and get a - SourceLocator that can usually report line and column number. -

-

Suppose you wanted to modify the ValidateXMLInput sample in the samples/Validate - subdirectory to include line and column numbers . All you need to do is call - DefaultErrorHandler.printLocation() in the the Handler internal class error() and warning() - methods. For example, replace

- public void error (SAXParseException spe) - throws SAXException -{ - System.out.println("SAXParseException error: " + spe.getMessage()); -} -

with

- public void error (SAXParseException spe) - throws SAXException -{ - PrintWriter pw = new PrintWriter(System.out, true); - org.apache.xml.utils.DefaultErrorHandler.printLocation(pw, spe); - pw.println("SAXParseException error: " + spe.getMessage()); -} -

You can also replicate code from the printLocation() method to obtain a SourceLocator, and - then use the SourceLocator getLineNumber() and getColumnNumber() methods. The - getRootSourceLocator() method below returns a SourceLocator.

- -import javax.xml.transform.SourceLocator; -import javax.xml.transform.TransformerException; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.apache.xml.utils.SAXSourceLocator; -import org.apache.xml.utils.WrappedRuntimeException; -.... -public static SourceLocator getRootSourceLocator(Throwable exception) -{ - SourceLocator locator = null; - Throwable cause = exception; - - // Try to find the locator closest to the cause. - do - { - if(cause instanceof SAXParseException) - { - locator = new SAXSourceLocator((SAXParseException)cause); - } - else if (cause instanceof TransformerException) - { - SourceLocator causeLocator = - ((TransformerException)cause).getLocator(); - if(null != causeLocator) - locator = causeLocator; - } - if(cause instanceof TransformerException) - cause = ((TransformerException)cause).getCause(); - else if(cause instanceof WrappedRuntimeException) - cause = ((WrappedRuntimeException)cause).getException(); - else if(cause instanceof SAXException) - cause = ((SAXException)cause).getException(); - else - cause = null; - } - while(null != cause); - - return locator; -} - - &xslt4j; exception handling: The exception architecture - in &xslt4j; and with transforms in general is tricky because of - multiple layers of exception handling, involving movement back and forth between SAX and - Transformer exceptions and across pipes. &xslt4j; often uses a - WrappedRuntimeException to throw over many layers of checked exceptions, in order not to - have every possible checked exception be declared for every function in the stack, which - means it has to catch this exception at the upper levels and unwrap the exception to pass - it on as a TransformerException. -
-
A &jaxp13-short; TransformerException often wraps another exception. Two of the - TransformerException structures that are frequently used to construct contained exceptions - in &jaxp13-short; do not set the locator. The locator is not set because we don't know the type - of exception that the Throwable argument represents. The solution is to chase up the - contained exceptions to find the root cause, which will usually have a location set for - you. This can be somewhat tricky, as not all the exceptions may be TransformerExceptions. - A good sample is in the DefaultHandler static printLocation() method, which the - &xslt4j; command-line processor uses to report errors. You can also - roll your own functions along the lines of the getRootSourceLocator() example above. -
-
-
- - My servlet cannot find classes that implement extension functions or elements. What can I do? - -

If you install xalan.jar in the webserver's lib directory (e.g., tomcat/lib), as - opposed to the servlet application's lib directory, then the &xslt4j; classes - are loaded by a classloader that does not see the classes in the application's classloader - (i.e., the extension classes, if you placed them there). The &xslt4j; - classes try to load the extension classes using their own classloader, and that attempt - fails.

-

Workaround: place xalan.jar in the servlet application's lib directory and NOT in the webserver's - lib directory. Another workaround is to place the extension classes also in the webserver's - lib directory, but you generally want to avoid cluttering that directory.

-

Thanks to Gunnlauger Thor Briem (gthb@dimon.is) for providing this information.

-
-
- - My stylesheet is named foo-bar.xsl, but &xslt4jc-short; - created a translet named foo_bar. Is that a bug? - -

No. The name of a translet is usually the name of the stylesheet, - the name specified using the translet-name attribute on - the &xslt4jc-short; TransformerFactory or the name - specified for the translet on the command-line invocation. - However, the name of the translet is also the name of a Java class. - Any character that is not permitted in a class name is replaced with - an underscore.

-
-
-
-
diff --git a/stylebook/sources/xalan/features.xml b/stylebook/sources/xalan/features.xml deleted file mode 100644 index 658007ba5..000000000 --- a/stylebook/sources/xalan/features.xml +++ /dev/null @@ -1,248 +0,0 @@ - - - - - -

Transform features are identified by URI Strings and fall into the following categories:

-
    -
  • Standard TransformationFactory features
  • -
  • Implementation-specific TransformerFactory attributes
  • -
- - -

defines objects and methods for processing input and producing -output in a variety of formats, including character streams, SAX event streams, and DOM Documents.

-

&jaxp13-short; defines the following features:

-
    -
  • StreamSource feature
  • -
  • StreamResult feature
  • -
  • DOMSource feature
  • -
  • DOMResult feature
  • -
  • SAXSource feature
  • -
  • SAXResult feature
  • -
  • SAXTransformerFactory feature
  • -
  • XMLFilter feature
  • -
  • Secure processing feature
  • -
-

You can use the - TransformerFactory.getFeature(String) -method to return a boolean indicating whether the implementation you are using supports the use of one of these objects or methods. For the String argument, provide the static String variable or literal URI String as detailed below.

-

You can use the -TransformerFactory.setFeature(String, boolean) -method to set the value of a feature. &xslt4j; only supports setting of the -XMLConstants.FEATURE_SECURE_PROCESSING -feature. For all other features, TransformerFactory exposes their values, but cannot change their states.

-

&xslt4j; supports all TransformerFactory features.

- - -

URI: "http://javax.xml.transform.stream.StreamSource/feature"

-

The implementation supports the processing of StreamSource input objects.

-

To determine whether your implementation supports this feature (&xslt4j; does), you can use the static StreamSource.FEATURE variable (equivalent to the URI String above) as follows:

-import javax.xml.transform.TransformerFactory; -import javax.xml.stream.StreamSource; - -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact.getFeature(StreamSource.FEATURE)){ - // Can process a StreamSource. - .. -} -

For a example that uses this feature, see SimpleTransform.

-
- -

URI: "http://javax.xml.transform.stream.StreamResult/feature"

-

The implementation supports the production of transformation output in the form of StreamResult objects.

-

To determine whether your implementation supports this feature (&xslt4j; does), you can use the static StreamResult.FEATURE variable (equivalent to the URI String above) as follows:

-import javax.xml.transform.TransformerFactory; -import javax.xml.stream.StreamResult; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact.getFeature(StreamResult.FEATURE)){ - // Can generate a StreamResult. - .. -} -

For a example that uses this feature, see SimpleTransform.

-
- -

URI: "http://javax.xml.transform.dom.DOMSource/feature"

-

The implementation supports the processing of XML input in the form of DOMSource objects.

-

To determine whether your implementation supports this feature (&xslt4j; does), you can use the static DOMSource.FEATURE string variable (equivalent to the URI String above) as follows:

-import javax.xml.transform.TransformerFactory; -import javax.xml.dom.DOMSource; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact.getFeature(DOMSource.FEATURE)){ - // Can process DOM input - .. -} -

For a example that uses this feature, see DOM2DOM.

-
- -

URI: "http://javax.xml.transform.dom.DOMResult/feature"

-

The implementation supports the production of transformation output in the form of DOMResult objects.

-

To determine whether your implementation supports this feature (&xslt4j; does), you can use the static DOMResult.FEATURE variable (equivalent to the URI String above) as follows:

-import javax.xml.transform.TransformerFactory; -import javax.xml.dom.DOMResult; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact.getFeature(DOMResult.FEATURE)){ - // Can generate DOM output. - .. -} -

For a example that uses this feature, see DOM2DOM.

-
- -

URI: "http://javax.xml.transform.dom.SAXSource/feature"

-

The implementation supports the processing of XML input in the form of SAXSource objects.

-

To determine whether your implementation supports this feature (&xslt4j; does), you can use the static SAXSource.FEATURE string variable (equivalent to the URI String above) as follows:

-import javax.xml.transform.TransformerFactory; -import javax.xml.sax.SAXSource; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact.getFeature(SAXSource.FEATURE)){ - // Can process SAX events. - .. -} -
- -

URI: "http://javax.xml.transform.dom.SAXResult/feature"

-

The implementation supports the production of transformation output in the form of SAXResult objects.

-

To determine whether your implementation supports this feature (&xslt4j; does), you can use the static SAXResult.FEATURE variable (equivalent to the URI String above) as follows:

-import javax.xml.transform.TransformerFactory; -import javax.xml.sax.SAXResult; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact.getFeature(SAXResult.FEATURE)){ - // Can output SAX events. - .. -} -

For a example that uses this feature, see SAX2SAX.

-
- -

URI: "http://javax.xml.transform.sax.SAXTransformerFactory/feature"

-

The implementation provides a SAXTransformerFactory. -You may safely cast the TransformerFactory returned by TransformerFactory.newInstance() to a SAXTransformerFactory.

-

To determine whether your implementation supports this feature (&xslt4j; does), you can use the static SAXTransformerFactory.FEATURE -variable (equivalent to the URI String above) as follows:

-import javax.xml.transform.TransformerFactory; -import javax.xml.sax.SAXTransformerFactory; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact.getFeature(SAXTransformerFactory.FEATURE)){ - SAXTransformerFactory saxTFact = (SAXTransformerFactory)tFact; - .. -} -

For a example that uses this feature, see SAX2SAX.

-
- -

URI: "http://javax.xml.transform.sax.SAXTransformerFactory/feature/xmlfilter"

-

The implementation supports the use of XMLFilter to use the output of one -transformation as input for another transformation. The SAXTransformerFactory newXMLFilter(Source) and newXMLFilter(Templates) methods -are supported.

-

To determine whether your implementation supports this feature (&xslt4j; does), you can use the static -SAXTransformerFactory.FEATURE_XMLFilter variable (equivalent to the URI String above) as follows:

-import javax.xml.transform.TransformerFactory; -import javax.xml.sax.SAXTransformerFactory; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact.getFeature(SAXTransformerFactory.FEATURE_XMLFILTER))){ - // Can use SAXTransformerFactory to get XMLFilters. - .. -} -

For an example that uses this feature to chain together a series of transformations, see -UseXMLFilters.

-
- - -

URI: "http://javax.xml.XMLConstants/feature/secure-processing"

-

&xslt4j; supports the secure processing feature in both the interpretive and &xslt4jc-short; -processors. When this feature is set to true, the implementation will apply a set of limits on the -XSLT/XML processing behavior to make the XSLT processor behave in a secure fashion. The limits are -implementation dependent. &xslt4j; applies the following limits when the secure processing feature -is set to true:

-

  • extension functions and extension elements are disabled.
  • -
  • parsers created by the XSLT processors will also have the secure processing feature set to true.
  • -

    -
    -
    - -

    A given implementation may provide TransformerFactory attributes for which you can set and get values. &xslt4j; uses the - DTM (Document Table Model) to support three attributes which can be set to true or false:

    -
      -
    • optimize attribute
    • -
    • incremental attribute
    • -
    • source_location attribute
    • -
    -

    To get an attribute setting, use the TransformerFactory.getAttribute(String) method, which returns an Object. For these three &xslt4j; -attributes, you can cast the return value to a boolean. To set an attribute, use the TransformerFactory.setAttribute(String, Object) method. -For the String argument, provide the static String variable or literal URI String as detailed below. For the Object argument, use -Boolean.TRUE or Boolean.FALSE (or the Strings "true" or "false").

    - -

    URI: "http://xml.apache.org/xalan/features/optimize"

    -

    Optimize stylesheet processing. By default, this attribute is set to true. You may need to set it to false for tooling applications. -For more information, see DTM optimize.

    -

    To turn optimization off, you can use the TransformerFactoryImpl.FEATURE_OPTIMIZE static variable (equivalent to the URI String above) -as follows:

    -import javax.xml.transform.TransformerFactory; -import org.apache.xalan.processor.TransformerFactoryImpl; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact instanceof TransformerFactoryImpl) { - tFact.setAttribute(TransformerFactoryImpl.FEATURE_OPTIMIZE, - Boolean.FALSE); -} -
    - -

    URI: "http://xml.apache.org/xalan/features/incremental"

    -

    Produce output incrementally, rather than waiting to finish parsing the input before generating any output. By default this attribute is set -to false. You can turn this attribute on to transform large documents where the stylesheet structure is optimized to execute individual templates -without having to parse the entire document. For more information, see DTM incremental.

    -

    To turn incremental transformations on, you can use the TransformerFactoryImpl.FEATURE_INCREMENTAL static variable (equivalent to the URI String above) as follows:

    -import javax.xml.transform.TransformerFactory; -import org.apache.xalan.processor.TransformerFactoryImpl; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact instanceof TransformerFactoryImpl) { - tFact.setAttribute(TransformerFactoryImpl.FEATURE_INCREMENTAL, - Boolean.FALSE); -} -The incremental feature is not currently supported by XSLTC. -
    - - -

    URI: "http://xml.apache.org/xalan/properties/source-location"

    -

    Provide a SourceLocator that can be used during a transformation -to obtain the location of individual nodes in a source document (system ID, line number, and column number).

    -

    By default, this attribute is set to false. Setting this attribute to true involves a substantial increase in storage cost per source -document node. If you want to use the NodeInfo extension functions (or some other mechanism) -to provide this information during a transform, you must set the attribute to true before generating the Transformer and processing the -stylesheet.

    -

    The command-line utility -L flag sets this attribute to true. To set the source_location attribute -programmatically, you can use the TransformerFactoryImpl.FEATURE_SOURCE_LOCATION static variable (equivalent to the URI String above) -as follows:

    -import javax.xml.transform.TransformerFactory; -import org.apache.xalan.transformer.TransformerImpl; -import org.apache.xalan.transformer.XalanProperties; -.. -TransformerFactory tFact = TransformerFactory.newInstance(); -if (tFact instanceof TransformerFactoryImpl) { - tFact.setAttribute(TransformerFactoryImpl.FEATURE_SOURCE_LOCATION, - Boolean.TRUE); -} -
    -
    -
    diff --git a/stylebook/sources/xalan/getstarted.xml b/stylebook/sources/xalan/getstarted.xml deleted file mode 100644 index 497dafda9..000000000 --- a/stylebook/sources/xalan/getstarted.xml +++ /dev/null @@ -1,109 +0,0 @@ - - - - - -
      -
    • Setting up the system classpath
    • -
    • Trying out the samples
    • -
    • Performing your own transformations from the command line
    • -
    • Setting up your own XSLT applications
    • -
    -Unless otherwise specified, the usage discussed in this section refers to -the &xslt4j; Interpretive processor. See Getting Started with XSLTC - for information on using the &xslt4j; Compiling processor.

    - - -

    At the very minimum, you must include xalan.jar, serializer.jar, xml-apis.jar, - and &xml4j-jar; -- or another conformant XML parser -- see Plugging in a Transformer and XML parser) on the system classpath. - To run the &xslt4ji; processor sample applications, include xalansamples.jar - (all samples other than the servlet) and xalanservlet.jar. All these JAR files are - distributed with &xslt4j;. To run Javascript extensions, include bsf.jar, which can - be obtained from the Apache Jakarta - BSF project. For extensions implemented in other scripting language, see - extensions language requirements - to identify any additional JAR files you must place on the classpath and where you can - get them.

    - -

    If you are using XSLTC, see Getting Starting with XSLTC.

    - -

    If you are using JDK or JRE 1.3.x or 1.4.x, include tools.jar on the classpath. If you - are using JDK or JRE 1.1.8 (supported for runtime only), then include classes.zip on the - classpath.

    -
    - - - -

    The &xslt4j; distribution includes a number of basic sample applications. These samples are easy - to run, and you can review the source files -- all of which are brief -- to see just how they - work.

    -

    To run the samples, do the following:

    -
      -
    1. Set up your classpath (see above), including xalansamples.jar and (for the servlet) - xalanservlet.jar.
    2. -
    3. Be sure the java executable is on your path.
    4. -
    5. Go to the samples subdirectory containing the sample (use the DOS shell if you are running - Windows).
    6. -
    7. Use the java executable to run the sample from the command line.
    8. -
    9. Examine the application source and result files.
    10. -
    -

    For example, go to the SimpleTransform subdirectory and issue the following command:

    -

    java SimpleTransform

    -

    The sample writes the transformation result to a file (birds.out). To see how the example works, - examine the source files: birds.xml, birds.xsl, and SimpleTransform.java.

    -

    The extensions examples require additional JAR files on the classpath, and the procedure for - running the sample applet and sample servlet is different. For more information about all the - samples, see &xslt4j; Samples.

    -
    - - - -

    org.apache.xalan.xslt.Process provides a basic utility for performing transformations from - the command line. You can use this utility, for example, to run several of the extensions samples. - The command line for most standard transformations is as follows:

    -

    java org.apache.xalan.xslt.Process -in xmlSource
    -     -xsl stylesheet -out outputfile

    -

    where xmlSource is the XML source file name, stylesheet is the XSL - stylesheet file name, and outputfile is the output file name.

    -

    If you want the output to be displayed on the screen, simply omit the -out flag and argument.

    -

    You can use this utility to try out XSL stylesheets you have written, to make sure they do what - you expect with the XML source files they are designed to transform. The utility provides useful - messages if the source file or stylesheet is not well formed. For more information, see - Command-Line Utility.

    -
    - - - -

    You can start by using your own XML source files and XSL stylesheets with the sample applications, - which illustrate a number of the basic usage patterns.

    -

    Here is the basic procedure to keep in mind when you set up a transformation:

    -
      -
    1. Use the TransformerFactory static newInstance() method to instantiate a TransformerFactory.

    2. -
    3. Use the TransformerFactory newTransformer(Source stylesheet) method to process the - transformation instructions in an XSLT stylesheet Source (producing under the covers a - Templates object) and generate - a Transformer.

    4. -
    5. Use the Transformer transform(Source xmlSource, Result transformResult) method to apply the - transformation instructions (the Templates object) to the XML Source and produce the - transformation Result.

    6. -
    -

    For more information about this procedure and its variations, see Basic - Usage Patterns.

    -
    -
    diff --git a/stylebook/sources/xalan/history.xml b/stylebook/sources/xalan/history.xml deleted file mode 100644 index cdcfa2beb..000000000 --- a/stylebook/sources/xalan/history.xml +++ /dev/null @@ -1,6783 +0,0 @@ - - - - - -

    The following sections list the core software changes in each release since &xslt4j; version 2.0.D01.

    -&history2xsltc; - -

    Core (Non-XSLTC) source code updates:

    -
      -
    • Committed by minchau@apache.org on 2004/03/04
      -Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorImport.java ProcessorInclude.java ProcessorLRE.java -ProcessorStylesheetElement.java StylesheetHandler.java XSLTElementDef.java xml-xalan/java/src/org/apache/xalan/templates -ElemExsltFunction.java
      -Committer's log entry: -Submitted by: Brian Minchau
      -Modified code for potential extension of classes with callbacks to the extensions.

    • - -
    • Committed by bhakti@apache.org on 2004/03/08
      -Modified: xml-xalan/java/src/org/apache/xml/serializer Encodings.properties
      -Committer's log entry: -Added a newline at the end of Encodings.properties to fix bug 27516.

    • - -
    • Committed by jycli@apache.org on 2004/03/11
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib/sql ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xslt -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/cmdline ObjectFactory.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/dom ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax ObjectFactory.java xml-xalan/java/src/org/apache/xml/dtm -ObjectFactory.java xml-xalan/java/src/org/apache/xml/dtm/ref ObjectFactory.java xml-xalan/java/src/org/apache/xml/serializer -ObjectFactory.java xml-xalan/java/src/org/apache/xml/utils ObjectFactory.java xml-xalan/java/src/org/apache/xpath/compiler -ObjectFactory.java xml-xalan/java/src/org/apache/xpath/functions ObjectFactory.java
      -Committer's log entry: -Fix a bug in the findProviderClass method of ObjectFactory -classes. The argument of SecurityManager.checkPackageAccess should be a string -value of a package name, instead of a class name.

    • - -
    • Committed by santiagopg@apache.org on 2004/03/23
      -Modified: xml-xalan/java/src/org/apache/xpath/compiler Compiler.java FunctionTable.java
      -Committer's log entry: -Patch to hide static function table in FunctionTable class. We do not want to expose this table to others.

    • - -
    • Committed by santiagopg@apache.org on 2004/03/23
      -Modified: xml-xalan/java/src/org/apache/xml/utils DOMBuilder.java
      -Committer's log entry: -The xmlns URI should also be used to add NS decls as attributes to a DOM. However, this was only done for attributes that started -with 'xmlns:' and not for 'xmlns' (i.e. not for decls of the default NS).

    • - -
    • Committed by igorh@apache.org on 2004/04/26
      -Modified: xml-xalan/java/src/org/apache/xpath XPathContext.java xml-xalan/java/src/org/apache/xpath/objects -DTMXRTreeFrag.java XRTreeFrag.java
      -Committer's log entry: -The problem is that about 1800 * Thread_num XRTreeFrag objects were created. -It took too long for finalizer to be executed to release the references.
      -A lot of the objects have the same DTMs (and one XPathContext per thread). -In my fix I am suggesting -a. to have new class DTMXRTreeFrag. The object of the class would -be created only for different DTMs (just 5 objects). -b. release the references to DTM and XPathContext from XPathContext.reset() -(and remove finalize() ).

    • - -
    • Committed by minchau@apache.org on 2004/04/27
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java xml-xalan/java/src/org/apache/xml/utils Trie.java
      -Committer's log entry: -PR: bugzilla 28435
      -Submitted by: Brian Minchau
      -Reviewed by: Henry Zongaro

    • - -
    • Committed by igorh@apache.org on 2004/04/28
      -Modified: xml-xalan/java/src/org/apache/xalan/templates AVT.java
      -Committer's log entry: -Scaling Problem in org/apache/xalan/templates/AVT.evaluate. The problem is that synchronized calls -StringBufferPool.get() and StringBufferPool.free(buf) are redundant if (null != m_simpleString). -The bug results in severe performance degradation in multi-thread test. -The fix is simple just not to the calls when (null != m_simpleString).

    • - -
    • Committed by mcnamara@apache.org on 2004/05/03
      -Modified: xml-xalan/java/xdocs/style/stylesheets designdoc2html.xsl
      -Committer's log entry: -Provide alternative text for images to address accessibility issues. -All images should contain a short alternative text description that represents -the function of the graphic.

    • - -
    • Committed by mcnamara@apache.org on 2004/05/03
      -Modified: xml-xalan/java/xdocs xml-site-style.tar.gz
      -Committer's log entry: -Update document2html.xsl within this tarball to provide alternative text for images to address accessibility issues. -All images should contain a short alternative text description that represents the function of the graphic.

    • - -
    • Committed by minchau@apache.org on 2004/05/03
      -Modified: xml-xalan/java/samples/SAX2SAX SAX2SAX.java xml-xalan/java/samples/Pipe Pipe.java -xml-xalan/java/samples/DOM2DOM DOM2DOM.java -xml-xalan/java/samples/UseStylesheetPI foo.xsl xml-xalan/java/samples/UseStylesheetParam foo.xsl -xml-xalan/java/samples/UseXMLFilters UseXMLFilters.java -xml-xalan/java/samples/Trace foo.xsl
      -Committer's log entry: -Clean up related to bugzilla 24304. -There is no longer a space after the XML header. To keep the output -of this sample the same as before properties were set on the -serializer (indent="yes" and standalone="no" ). -Submitted by: Brian Minchau
      -Reviewed by: Sarah McNamara

    • - -
    • Committed by igorh@apache.org on 2004/05/06
      -Modified: xml-xalan/java/src/org/apache/xalan/templates AVT.java
      -Committer's log entry: -The problem is that we use an object pool (shared between different threads) -to allocate FastStringBuffer objects. The problem results in a serious performance -degradation on Z/OS and seems to be invisible on AIX.
      -1 Differences in optimization of object pools for different JVMs and for different -platforms are known(I know it now too). It is not surprising that Z/OS and AIX -have different results.
      -2. a. Object pools should be used only for very heavy object which live for a long time -and could be reused in a lot of places.
      -b. Small local objects which size cannot be changed could be allocated on the -stack => creating them with new in the local scope could be a good idea.
      -c. Caching middle size objects which can grow in size seems as a good idea, -because such objects usually cannot be allocated on the stack. -This is actually the case for FastStringBuffer objects.
      -Solution: Create FastStringBuffer objects in a local scope and use caching whenever possible.

    • - -
    • Committed by minchau@apache.org on 2004/05/13
      -Modified: xml-xalan/java/src/org/apache/xalan/client XSLTProcessorApplet.java
      -Committer's log entry: -Submitted by: Brian Minchau
      -Reviewed by: Christine Li
      -Fixing binary compatibility (serialization/de-serialization) of XSLTProcessorApplet.

    • - -
    • Committed by minchau@apache.org on 2004/06/01
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      -Committer's log entry: -PR: bugzilla 29234
      -Submitted by: Brian Minchau
      -Reviewed by: Morris Kwan
      -This problem only showed up under XSLTC. When setting the -encoding a related field was not set. Fixed this by over-riding the -set method for the stream serializers.

    • - -
    • Committed by minchau@apache.org on 2004/06/07
      -Modified: xml-xalan/java/src/org/apache/xml/serializer WriterToUTF8Buffered.java
      -Committer's log entry: -PR: bugzilla 29372
      -Submitted by: J Desrochers (john@ASCnet.COM)
      -Reviewed by: Brian Minchau
      - -A safe fix for chunking up an array for output. The length was multiplied by the -chunk number (0,1,2... chunks) then divided by "chunks". John's fix uses a -"long" to do the arithemetic because multiplying by the chunk number first -could cause an overflow.

    • - -
    • Committed by zongaro@apache.org on 2004/06/17
      -Modified: xml-xalan/java/src/org/apache/xpath/axes ChildIterator.java
      -Committer's log entry: -Fix for Bugzilla bug 28879. Classes derived from NodeTest need to ensure -that initNodeTest is called to set the filter for the kinds of nodes accepted. -Without this change, ChildIterator will reject all nodes. - -Patch reviewed by Christine Li (jycli@ca.ibm.com).

    • - -
    • Committed by aruny@apache.org on 2004/07/15
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      -Committer's log entry: -Description: Improper Serialization of document type declaration in xml document.

    • - -
    • Committed by mkwan@apache.org on 2004/07/21
      -Modified: xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      -Committer's log entry: -Patch for bug 30056. Recover the performance degradation for xsl:copy and xsl:copy-of. -Reviewed by Henry Zongaro (zongaro@ca.ibm.com).

    • - -
    • Committed by minchau@apache.org on 2004/07/21
      -Modified: xml-xalan/java/src/org/apache/xml/serializer SerializerBase.java ToTextStream.java
      -Committer's log entry: -PR: bugzilla 29706
      -Submitted by: Brian Minchau
      -Reviewed by: Christine Li
      - -A fix to add a temporary vs. permanent output state to the serializer -(AKA result-tree-handler). In theory the XSLT processor should set the -temporary or permanent output state, but we observer that when the -encoding of a ToTextStream serializer is null, then such a serializer is -in temporary output state.
      - -In temorary output state we don't do any escaping or encoding or other -sorts of normalization on output. This will be done by another serializer -later on, and that one will be in permanent output state.

    • - -
    • Committed by minchau@apache.org on 2004/07/21
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      -Committer's log entry: -PR: bugzilla 30142
      -Submitted by: Bruno Dumon (bruno@outerthought.org)
      -Reviewed by: Brian Minchau
      - -Thanks to Bruno for this simple one-line, fix where we forgot to put -a space between the PUBLIC and SYSTEM ID's in a DOCTYPE declaration -in serialized HTML output.

    • - -
    • Committed by minchau@apache.org on 2004/07/22
      -Modified: xml-xalan/java/src/org/apache/xpath/objects XString.java
      -Committer's log entry: -Submitted by: Yash Talwar
      -Reviewed by: Brian Minchau
      -Fix for bugzilla 29655.

    • - -
    • Committed by minchau@apache.org on 2004/08/13
      -Modified: xml-xalan/java/src/org/apache/xalan/lib Redirect.java
      -Committer's log entry: -PR: 30658
      -Submitted by: Brian Minchau
      -Reviewed by: Morris Kwan

    • - -
    • Committed by minchau@apache.org on 2004/08/13
      -Modified: xml-xalan/java/src/org/apache/xalan/trace TraceManager.java
      -Committer's log entry: -PR: 30301
      -Submitted by: Brian Minchau
      -Reviewed by: Morris Kwan

    • - -
    • Committed by minchau@apache.org on 2004/08/13
      -Modified: xml-xalan/java/src/org/apache/xpath/objects XRTreeFragSelectWrapper.java xml-xalan/java/src/org/apache/xpath/res -XPATHErrorResources.java
      -Committer's log entry: -PR: 30262
      -Submitted by: Yash Talwar
      -Reviewed by: Henry Zongaro

    • - -
    • Committed by mcnamara@apache.org on 2004/08/17
      -Modified: xml-xalan/java/src/org/apache/xml/dtm DTMException.java xml-xalan/java/src/org/apache/xpath XPathException.java
      -Committer's log entry: -Fix for printStackTrace when using JDK 1.4.

    • - -
    • Committed by mcnamara@apache.org on 2004/08/17
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib/sql ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xslt -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/cmdline ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/dom -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -ObjectFactory.java xml-xalan/java/src/org/apache/xml/dtm ObjectFactory.java xml-xalan/java/src/org/apache/xml/dtm/ref ObjectFactory.java -xml-xalan/java/src/org/apache/xml/serializer ObjectFactory.java xml-xalan/java/src/org/apache/xml/utils ObjectFactory.java -xml-xalan/java/src/org/apache/xpath/compiler ObjectFactory.java xml-xalan/java/src/org/apache/xpath/functions ObjectFactory.java
      -Committer's log entry: -Fixing a potential memory leak. The reader used to read the service provider is never closed if an IOException is thrown while -reading from it. Adding a finally block so that the reader will always be closed. Patch reviewed by Christine Li.

    • - -
    • Committed by jycli@apache.org on 2004/08/17
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ObjectFactory.java
      -Committer's log entry: -Added serialVersionUID for classes which implement Serializable interface.

    • - -
    • Committed by jycli@apache.org on 2004/08/17
      -Modified: xml-xalan/java/src/org/apache/xalan/lib ObjectFactory.java xml-xalan/java/src/org/apache/xalan/lib/sql ObjectFactory.java
      -Committer's log entry: -Added serialVersionUID for classes which implement Serializable interface. Was reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2004/08/17
      -Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorAttributeSet.java ProcessorCharacters.java ProcessorDecimalFormat.java -ProcessorExsltFuncResult.java ProcessorExsltFunction.java ProcessorGlobalParamDecl.java ProcessorGlobalVariableDecl.java -ProcessorImport.java ProcessorInclude.java ProcessorKey.java ProcessorLRE.java ProcessorNamespaceAlias.java ProcessorOutputElem.java -ProcessorPreserveSpace.java ProcessorStripSpace.java ProcessorStylesheetDoc.java ProcessorStylesheetElement.java ProcessorTemplate.java -ProcessorTemplateElem.java ProcessorText.java ProcessorUnknown.java WhitespaceInfoPaths.java XSLTElementProcessor.java
      -Committer's log entry: -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2004/08/17
      -Modified: xml-xalan/java/src/org/apache/xalan/templates AVT.java AVTPart.java AVTPartSimple.java AVTPartXPath.java -DecimalFormatProperties.java ElemApplyImport.java ElemApplyTemplates.java ElemAttribute.java ElemAttributeSet.java -ElemCallTemplate.java ElemChoose.java ElemComment.java ElemCopy.java ElemCopyOf.java ElemElement.java ElemEmpty.java -ElemExsltFuncResult.java ElemExsltFunction.java ElemExtensionCall.java ElemExtensionDecl.java ElemExtensionScript.java -ElemFallback.java ElemForEach.java ElemIf.java ElemLiteralResult.java ElemMessage.java ElemNumber.java ElemOtherwise.java -ElemParam.java ElemPI.java ElemSort.java ElemTemplate.java ElemTemplateElement.java ElemText.java ElemTextLiteral.java -ElemUnknown.java ElemUse.java ElemValueOf.java ElemVariable.java ElemVariablePsuedo.java ElemWhen.java ElemWithParam.java -FuncDocument.java FuncFormatNumb.java FuncKey.java KeyDeclaration.java NamespaceAlias.java OutputProperties.java Stylesheet.java -StylesheetComposed.java StylesheetRoot.java TemplateList.java TemplateSubPatternAssociation.java WhiteSpaceInfo.java -XMLNSDecl.java XUnresolvedVariable.java XUnresolvedVariableSimple.java xml-xalan/java/src/org/apache/xalan/transformer -CountersTable.java KeyIterator.java KeyRefIterator.java xml-xalan/java/src/org/apache/xalan/xslt ObjectFactory.java
      -Committer's log entry: -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2004/08/17
      -Modified: xml-xalan/java/src/org/apache/xml/dtm DTMConfigurationException.java DTMDOMException.java ObjectFactory.java -xml-xalan/java/src/org/apache/xml/dtm/ref DTMNamedNodeMap.java IncrementalSAXSource_Filter.java ObjectFactory.java -xml-xalan/java/src/org/apache/xml/serializer ObjectFactory.java xml-xalan/java/src/org/apache/xml/utils MutableAttrListImpl.java -NameSpace.java NodeVector.java ObjectFactory.java ObjectPool.java QName.java SAXSourceLocator.java SerializableLocatorImpl.java -StopParseException.java StringVector.java URI.java WrappedRuntimeException.java WrongParserException.java
      -Committer's log entry: -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2004/08/17
      -Modified: xml-xalan/java/src/org/apache/xpath Expression.java FoundIndex.java NodeSetDTM.java XPath.java -XPathProcessorException.java xml-xalan/java/src/org/apache/xpath/axes AttributeIterator.java AxesWalker.java -BasicTestIterator.java ChildIterator.java ChildTestIterator.java DescendantIterator.java FilterExprIterator.java -FilterExprIteratorSimple.java FilterExprWalker.java IteratorPool.java LocPathIterator.java MatchPatternIterator.java -NodeSequence.java OneStepIterator.java OneStepIteratorForward.java PredicatedNodeTest.java ReverseAxesWalker.java -RTFIterator.java SelfIteratorNoPredicate.java UnionChildIterator.java UnionPathIterator.java WalkingIterator.java -WalkingIteratorSorted.java xml-xalan/java/src/org/apache/xpath/compiler ObjectFactory.java -xml-xalan/java/src/org/apache/xpath/functions FuncBoolean.java FuncCeiling.java FuncConcat.java FuncContains.java -FuncCount.java FuncCurrent.java FuncDoclocation.java FuncExtElementAvailable.java FuncExtFunction.java -FuncExtFunctionAvailable.java FuncFalse.java FuncFloor.java FuncGenerateId.java FuncId.java FuncLang.java -FuncLast.java FuncLocalPart.java FuncNamespace.java FuncNormalizeSpace.java FuncNot.java FuncNumber.java -FuncPosition.java FuncQname.java FuncRound.java FuncStartsWith.java FuncString.java FuncStringLength.java -FuncSubstring.java FuncSubstringAfter.java FuncSubstringBefore.java FuncSum.java FuncSystemProperty.java -Function.java Function2Args.java Function3Args.java FunctionDef1Arg.java FunctionMultiArgs.java FunctionOneArg.java -FuncTranslate.java FuncTrue.java FuncUnparsedEntityURI.java ObjectFactory.java WrongNumberArgsException.java -xml-xalan/java/src/org/apache/xpath/objects XBoolean.java XBooleanStatic.java XNodeSet.java XNodeSetForDOM.java -XNull.java XNumber.java XObject.java XRTreeFrag.java XRTreeFragSelectWrapper.java XString.java XStringForChars.java -XStringForFSB.java xml-xalan/java/src/org/apache/xpath/operations And.java Bool.java Div.java Equals.java Gt.java -Gte.java Lt.java Lte.java Minus.java Mod.java Mult.java Neg.java NotEquals.java Number.java Operation.java Or.java -Plus.java Quo.java String.java UnaryOperation.java Variable.java VariableSafeAbsRef.java -xml-xalan/java/src/org/apache/xpath/patterns ContextMatchStepPattern.java FunctionPattern.java NodeTest.java -StepPattern.java UnionPattern.java
      -Committer's log entry: -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by minchau@apache.org on 2004/08/26
      -Modified: xml-xalan/java/src/org/apache/xml/utils Trie.java
      -Committer's log entry: -Submitted by: Brian Minchau
      -No external changes to Trie, but some additional APIs to make for a lower case -only search in a Trie (possibly for future XHTML support where the element -names are lower-case only).

    • - -
    • Committed by minchau@apache.org on 2004/08/27
      -Modified: xml-xalan/java/src/org/apache/xml/serializer CharInfo.java ToHTMLStream.java ToStream.java
      -Committer's log entry: -Minor changes to CharInfo to map charaters to decorated entities (e.g. "&lt;" ) -rather than just entity names (e.g. "lt"), which is a minor performance improvement.

    • - -
    • Committed by mkwan@apache.org on 2004/08/30
      -Modified: xml-xalan/java/src/org/apache/xml/utils XMLReaderManager.java
      -Committer's log entry: -Fix a memory leak problem described in bugzilla 28082.

    • - -
    • Committed by minchau@apache.org on 2004/09/01
      -Modified: xml-xalan/java/src/org/apache/xml/serializer SerializerTraceWriter.java ToStream.java -WriterChain.java WriterToASCI.java WriterToUTF8Buffered.java
      -Committer's log entry: -Submitted by: Brian Minchau
      -Code clean up, to have an explicit interface, WriterChain, for writers that wrap other Writers or OutputStreams, -e.g. WriterToUTF8Buffered.

    • - -
    • Committed by minchau@apache.org on 2004/09/01
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToXMLStream.java
      -Committer's log entry: -Submitted by: Brian Minchau
      -Javadoc changes, and added a call in ToXMLStream.processingInstruction() -method to effectively consider that a startDocument() call was made, -if none was yet seen.

    • - -
    • Committed by minchau@apache.org on 2004/09/07
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToSAXHandler.java
      -Committer's log entry: -PR: bugzilla 27522
      -Submitted by: Brian Minchau
      -committing patch from bugzilla 27522.

    • - -
    • Committed by johng@apache.org on 2004/09/16
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql SQLDocument.java
      -Committer's log entry: -Fixed bug where JDBC execute was being called instead ofg executeQuery. -executeQuery will always retrurn a result set even if the query does not return any rows -where execute won't. This was causing a compatibility issue. -Added in Record skip code to help with pagination.
      -PR: http://nagoya.apache.org/jira/browse/XALANJ-1908
      -Submitted by: John Gentilin

    • - -
    • Committed by johng@apache.org on 2004/09/16
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql XConnection.java
      -Committer's log entry: -Fixed bug where the close document method could not locxate the SQL Document. -see http://nagoya.apache.org/jira/browse/XALANJ-1925.
      -Obtained from: Moraine Didier mailto://didier.moraine@winterthur.be
      -Submitted by: John Gentilin

    • - -
    • Committed by mcnamara@apache.org on 2004/09/17
      -Modified: xml-xalan/java build.xml
      -Committer's log entry: -Added new targets to support building the distribution packages (*-bin.tar.gz/.zip and *-src.tar.gz/.zip) -without building the user guide and api docs. -Reorganized some sections to make the targets more readable. -Renamed the "*-nojardepends" rules to either "*-compile" or "*-build" to make them more intuitive. -Reviewed by Christine Li.

    • - -
    • Committed by zongaro@apache.org on 2004/10/01
      -Modified: xml-xalan/java/src/org/apache/xpath/compiler XPathParser.java xml-xalan/java/src/org/apache/xpath/patterns NodeTest.java
      -Committer's log entry: -Patch from Yash Talwar (ytalwar@ca.ibm.com) for XALANJ-1186. -The existing code in the interpretive processor was handling namespace::pre by -resolving the namespace prefix "pre" in the stylesheet, and then looking for -namespace nodes with that same URI in the input document. In fact, it should -look for namespaces nodes in the input document that declare the prefix "pre", -without regard to the associated URI. The patch was reviewed by myself (zongaro@ca.ibm.com).

    • - -
    • Committed by minchau@apache.org on 2004/10/06
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLSAXHandler.java
      -Committer's log entry: -XSL Transformation drops content inside xsl:comment tags.
      -PR: XALANJ-1966
      -Submitted by: Yash Talwar
      -Reviewed by: Brian Minchau

    • - -
    • Committed by minchau@apache.org on 2004/10/06
      -Modified: xml-xalan/java/src/org/apache/xpath/operations Variable.java
      -Committer's log entry: -Null Pointer Exception on sorting using a variable.
      -PR: XALANJ-1942
      -Submitted by: Yash Talwar
      -Reviewed by: Brian Minchau

    • - -
    • Committed by minchau@apache.org on 2004/10/06
      -Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorNamespaceAlias.java xml-xalan/java/src/org/apache/xalan/res -XSLTErrorResources.java
      -Committer's log entry: -Null Pointer Exception when namespace-alias element says to use "#default" namespace but there is no default namespace. -PR: XALANJ-1967
      -Submitted by: Yash Talwar
      -Reviewed by: Brian Minchau

    • - -
    • Committed by zongaro@apache.org on 2004/10/13
      -Modified: xml-xalan/java build.xml
      -Committer's log entry: -At the suggestion of Joseph Kesselman, dropped contents of the org.apache.xml.utils.synthetic package, as they have never been used. -Patch reviewed by Christine Li (jycli@ca.ibm.com).

    • - -
    • Committed by jycli@apache.org on 2004/10/13
      -Modified: xml-xalan/java build.xml xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerGeneral.java -xml-xalan/java/xdocs/sources/xalan extensions.xml resources.xml
      -Committer's log entry: -Fixed of Bug report XalanJ-1822. Added alternative BSF implementation support for extension functions in languages other than Java -Patch reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by minchau@apache.org on 2004/10/14
      -Modified: xml-xalan/java/src/org/apache/xml/serializer/utils AttList.java BoolStack.java DOM2Helper.java Messages.java -SerializerMessages_en.java SerializerMessages.java StringToIntTable.java SystemIDResolver.java URI.java Utils.java -WrappedRuntimeException.java
      -Committer's log entry: -PR: XALANJ-1891
      -Submitted by: Brian Minchau
      -Reviewed by: Yash Talwar

    • - -
    • Committed by minchau@apache.org on 2004/10/14
      -Modified: xml-xalan/java/src/org/apache/xml/serializer/utils Messages.java SerializerMessages.java Utils.java
      -Committer's log entry: -Submitted by: Brian Minchau
      -Made some fields final or private to make the objects immutable, especially the messages.

    • - -
    • Committed by minchau@apache.org on 2004/10/14
      -Modified: xml-xalan/java/src/org/apache/xml/serializer AttributesImplSerializer.java CharInfo.java DOMSerializer.java ElemDesc.java -EmptySerializer.java EncodingInfo.java Encodings.java ExtendedContentHandler.java ExtendedLexicalHandler.java Method.java -NamespaceMappings.java ObjectFactory.java OutputPropertiesFactory.java OutputPropertyUtils.java SerializationHandler.java -Serializer.java SerializerBase.java SerializerConstants.java SerializerFactory.java SerializerTrace.java SerializerTraceWriter.java -ToHTMLSAXHandler.java ToHTMLStream.java ToSAXHandler.java ToStream.java ToTextSAXHandler.java ToTextStream.java ToUnknownStream.java -ToXMLSAXHandler.java ToXMLStream.java TreeWalker.java Utils.java Version.java WriterToASCI.java ElemContext.java TransformStateSetter.java
      -Committer's log entry: -Submitted by: Brian Minchau
      -Reviewed by: Yash Talwar
      -Source code changes to the serializer to make it independent of Xalan. -Mostly message and utility usage changes. -However multiple classes had their visibility reduced to less than "public".

    • - -
    • Committed by minchau@apache.org on 2004/10/14
      -Modified: xml-xalan/java/src/org/apache/xml/utils CharKey.java Trie.java
      -Committer's log entry: -PR: XALANJ-1891
      -Submitted by: Brian Minchau
      -Reviewed by: Yash Talwar
      -Deleting Charkey and Trie which were only used by the serializer. -These classes are migrated to the serializer package, in the case of -CharKey, it is now an inner private class.

    • - -
    • Committed by minchau@apache.org on 2004/10/15
      -Modified: xml-xalan/java/src MANIFEST.SERIALIZER
      -Committer's log entry: -PR: XALANJ-1891
      -Submitted by: Brian Minchau
      -Reviewed by: Sarah McNamara
      -Creating MANIFEST.SERIALIZER, a template like MANIFEST.MF but -for an independent serializer.jar that is not part of xalan.jar

    • - -
    • Committed by minchau@apache.org on 2004/10/15
      -Modified: xml-xalan/java build.xml
      -Committer's log entry: -PR: XALANJ-1891
      -Submitted by: Brian Minchau
      -Reviewed by: Sarah McNamara
      -Changes to java/build.xml so that the serializer.jar is built and used by Xalan. -The two new build targets are serializer.jar and serializer-dist.

    • - -
    • Committed by minchau@apache.org on 2004/10/15
      -Modified: xml-xalan/java/bin serializer.jar
      -Committer's log entry: -PR: XALANJ-1891
      -Submitted by: Brian Minchau
      -Reviewed by: Sarah McNamara, Yash Talwar
      -Checking in an initial serializer.jar into java/bin, hopefully this won't change too often.

    • - -
    • Committed by johng@apache.org on 2004/10/19
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql DefaultConnectionPool.java XConnection.java SQLDocument.java
      -Committer's log entry: -This patch makes the close() function behave better but still has a -problem when certain iterators are used. This code is at least safe -in all instaces. It also fixes a minor bug in the default connection pool.
      -Obtained from: John Gentilin
      -Submitted by: John Gentilin

    • - -
    • Committed by jycli@apache.org on 2004/10/21
      -Modified: xml-xalan/java/src/org/apache/xpath/objects XStringForFSB.java
      -Committer's log entry: -A patch to fix Bug XALANJ-1708. Reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2004/10/21
      -Modified: xml-xalan/java/src/org/apache/xpath/axes NodeSequence.java UnionPathIterator.java
      -Committer's log entry: -A fix for bug XALANJ-1810. Reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by mcnamara@apache.org on 2004/10/21
      -Modified: xml-xalan/java build.xml
      -Committer's log entry: -Fix the samples build. The samples.class.path needs to include the serializer.jar.

    • - -
    • Committed by mcnamara@apache.org on 2004/10/28
      -Modified: xml-xalan/java build.xml
      -Committer's log entry: -One more fix to enable builds with JDK 1.4.x. Need to add the serializer classes to the -xslt.boot.class.path.

    • - -
    • Committed by jycli@apache.org on 2004/11/02
      -Modified: xml-xalan/java/src/org/apache/xpath/axes DescendantIterator.java
      -Committer's log entry: -String comparison should use String.equals(), instead of ==. -Even == works fine for most of the cases, for a serializable object, two variable originally reference to the same string -after deserialization, they no longer reference the same string, although the values are the same. Fix for bug XalanJ-1550. -

    • - -
    • Committed by jycli@apache.org on 2004/11/02
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerGeneral.java
      -Committer's log entry: -The latest Rhino1_5R5 checks for the script language line/column no.>=0. Fixed for bug XALANJ-1887.

    • - -
    • Committed by jycli@apache.org on 2004/11/03
      -Modified: xml-xalan/java/src/META-INF/services org.apache.xalan.extensions.bsf.BSFManager
      -Committer's log entry: -Added a service provider configuration file to set the Apache BSF as the default implementation for scripting language support. -

    • - -
    • Committed by jycli@apache.org on 2004/11/03
      -Modified: xml-xalan/java/bin bsf.jar bsf.LICENSE.txt bsf.README.txt
      -Committer's log entry: -remove IBM bsf implementation from the distribution. Xalan is not going to ship any bsf implementation. If users need -IBM bsf, they can download it from Attic.

    • - -
    • Committed by minchau@apache.org on 2004/11/12
      -Modified: xml-xalan/java/src/org/apache/xpath/compiler Lexer.java XPathParser.java xml-xalan/java/src/org/apache/xpath/domapi -XPathEvaluatorImpl.java XPathExpressionImpl.java XPathNamespaceImpl.java XPathNSResolverImpl.java XPathResultImpl.java -XPathStylesheetDOM3Exception.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java
      -Committer's log entry: -PR: bug XALANJ-1985
      -Submitted by: Yash Talwar
      -Reviewed by: Brian Minchau
      -Support for DOM 3 API, for use by an XML Parser.

    • - -
    • Committed by zongaro@apache.org on 2004/11/19
      -Modified: xml-xalan/java/src/org/apache/xpath/objects XStringForFSB.java
      -Committer's log entry: -Patch for XALANJ-1955. The equals(Object) method contains a list of -instanceof checks, and then casts the Object argument to the tested type in -order to dispatch to a more specific equals method. In the case where the -Object argument was an XMLString, the code was actually casting "this" to -XMLString - thus testing this.equals(this), which will always be true.
      - -Reviewd by Joanne Tong (joannet@ca.ibm.com).

    • - -
    • Committed by zongaro@apache.org on 2004/11/19
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer KeyTable.java
      -Committer's log entry: -Patch for XALANJ-1368.
      -The method getKeyDeclaration was looping through all the xsl:key elements -defined, and returning the first with the required name. However, more than -one xsl:key element can specify the same name, and should be treated -cumulatively. Modified the method so that it returns all elements with the -required name, and the caller so that it tries to match against the patterns -associated with all such elements.
      - -Reviewed by Joanne Tong (joannet@ca.ibm.com).

    • - -
    • Committed by mkwan@apache.org on 2004/11/22
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      -Committer's log entry: -Fix a memory leak problem in DTMManager (XALANJ-1999).

    • - -
    • Committed by joannet@apache.org on 2004/12/13
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemApplyImport.java xml-xalan/java/src/org/apache/xalan/transformer -TransformerImpl.java
      -Committer's log entry: -Fixed XALANJ-1824. Changed current template rule when named template executes an xsl:apply-imports.

    • - -
    • Committed by joannet@apache.org on 2004/12/13
      -Modified: xml-xalan/java/src/org/apache/xalan/lib PipeDocument.java
      -Committer's log entry: -Fixed XALANJ-1662. Allow pipeDocument to throw exceptions.

    • - -
    • Committed by jycli@apache.org on 2004/12/15
      -Modified: Many files....
      -Committer's log entry: -Patch for bug report XALANJ-2008
      -Based on Sun's Security Code Guidelines, modified the code to improve the security. Major changes includes:
      -1. Added final modifier to static variables;
      -2. Reduced scope and added public get methods whenever it is appropriate;
      -3. Changed some static variable to instance variables;
      -4. Changed some interfaces to final classes, if those interfaces are used only to define constants
      -5. Removed the usage of System.exit;
      -6. For various org.apache.xml.utils.res.XResourceBundle, the getObject() methods return immutable array wrappers instead of arrays
      -7. Changed static methods of org.apache.xpath.compiler.FunctionTable to instance methods and the reference of a function table is passed -around the processing to create an XPath object;
      -8. Changed the flags of FEATURE_INCREMENTAL, FEATURE_OPTIMIZE and FEATURE_SOURCE_LOCATION to instance variables in TransformerFactorImpl. -So they will not be changed during a processing once a new Templates is created;

    • - -
    • Committed by mkwan@apache.org on 2004/12/15
      -Modified: xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xpath/functions FuncExtFunction.java
      -Committer's log entry: -Patch for bug XALANJ-1592. Submitted by Catya Alone (catyaa@hotmail.com). -Set the parent node for the arguments in extension functions.

    • - -
    • Committed by minchau@apache.org on 2004/12/16
      -Modified: xml-xalan/java/src/org/apache/xml/serializer/utils Messages.java
      -Committer's log entry: -Partial fix for bug XALANJ-2021.

    • - -
    • Committed by minchau@apache.org on 2004/12/16
      -Modified: xml-xalan/java/src/org/apache/xml/serializer/utils SerializerMessages.java
      -Committer's log entry: -Partial fix for bug XALANJ-2021 to make key/keyvalue consistent.

    • - -
    • Committed by minchau@apache.org on 2004/12/16
      -Modified: xml-xalan/java/src/org/apache/xml/serializer/utils SerializerMessages_ca.java SerializerMessages_cs.java -SerializerMessages_de.java SerializerMessages_es.java SerializerMessages_fr.java SerializerMessages_hu.java -SerializerMessages_it.java SerializerMessages_ja.java SerializerMessages_ko.java SerializerMessages_pl.java -SerializerMessages_pt_BR.java SerializerMessages_ru.java SerializerMessages_sv.java SerializerMessages_tr.java -SerializerMessages_zh_CN.java SerializerMessages_zh_TW.java
      -Committer's log entry: -Other languages, for XALANJ-2021.

    • - -
    • Committed by minchau@apache.org on 2004/12/16
      -Modified: xml-xalan/java/src/org/apache/xml/serializer/utils MsgKey.java
      -Committer's log entry: -A class containing only message keys, to be shared by all language -translations (including English). This is to prevent replication of these -keys during translation. Related to XALANJ-2021.

    • - -
    • Committed by minchau@apache.org on 2004/12/16
      -Modified: xml-xalan/java/src/org/apache/xml/serializer/utils SerializerMessages_ca.java SerializerMessages_cs.java -SerializerMessages_de.java -SerializerMessages_es.java SerializerMessages_fr.java SerializerMessages_hu.java SerializerMessages_it.java SerializerMessages_ja.java -SerializerMessages_ko.java SerializerMessages_pl.java SerializerMessages_pt_BR.java SerializerMessages_ru.java SerializerMessages_sv.java -SerializerMessages_tr.java SerializerMessages_zh_CN.java SerializerMessages_zh_TW.java
      -Committer's log entry: -Changes for moving the message keys, to be shared by all language -translations (including English). This is to prevent replication of these -keys during translation. Related to XALANJ-2021.

    • - -
    • Committed by minchau@apache.org on 2004/12/16
      -Modified: xml-xalan/java/src/org/apache/xml/serializer/utils Messages.java SerializerMessages.java URI.java -xml-xalan/java/src/org/apache/xml/serializer CharInfo.java OutputPropertiesFactory.java SerializerBase.java -SerializerFactory.java ToHTMLStream.java ToStream.java ToTextStream.java ToXMLStream.java
      Committer's log entry: -Changes for moving the message keys, to be shared by all language -translations (including English). This is to prevent replication of these -keys during translation. Related to XALANJ-2021.

    • - -
    • Committed by minchau@apache.org on 2004/12/16
      -Modified: xml-xalan/java/src/org/apache/xml/res XMLErrorResources.java
      -Committer's log entry: -Serializer messages were copied into a message file in the -org.apache.xml.serializer.utils package. -The serializer messages in this file are now "dead", so they are being deleted. -This is part of the cleanup with XALANJ-2021.

    • - -
    • Committed by zongaro@apache.org on 2004/12/22
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMNamedNodeMap.java DTMNodeProxy.java
      -Committer's log entry: -Applying patch for Jira bug report XALANJ-1427 on behalf of Yash Talwar (ytalwar@ca.ibm.com). - -Completing support for DOM Level 2 Core methods that were previously -unimplemented, and fixed some bugs in the implementation. The implementation -continues to be, of necessity, a read-only implementation.
      - -In particular, implemented the following:
      - - DTMNamedNodeMap.getNamedItem(String)
      - DTMNodeProxy.getElementsByTagName(String)
      - DTMNodeProxy.getElementsByTagNameNS(String,String)
      - DTMNodeProxy.getElementById(String,String)
      - DTMNodeProxy.getAttributeNodeNS(String,String)

    • - -
    • Committed by jycli@apache.org on 2005/01/05
      -Modified: xml-xalan/java/xdocs/sources/xalan faq.xml
      -Committer's log entry: -Added a FAQ about how to use XSLTC in applet when using JRE1.4. It is a fix for bug report XALANJ-1705. Patch reviewed and -modified by Sarah McNamara

    • - -
    • Committed by ilene@apache.org on 2005/01/10
      -Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java
      -Committer's log entry: -Fix for XALANJ-2013. Duplicate time zone string returned from EXSLT time() function.

    • - -
    • Committed by mcnamara@apache.org on 2005/01/10
      -Modified: xml-xalan/java/src manifest.xalan-interpretive
      -Committer's log entry: -New manifest file to resolve Jira bug report XALANJ-1853.

    • - -
    • Committed by mcnamara@apache.org on 2005/01/10
      -Modified: xml-xalan/java build.xml
      -Committer's log entry: -Fix for Jira bug report XALANJ-1853 . Use the new xalan interpretive manifest file -when building the standalone xalan.jar that only contains the interpretive processor.

    • - -
    • Committed by mcnamara@apache.org on 2005/01/10
      -Modified: xml-xalan/java/src MANIFEST.MF MANIFEST.SERIALIZER manifest.xsltc
      -Committer's log entry: -Fix for Jira bug report XALANJ-1852.

    • - -
    • Committed by zongaro@apache.org on 2005/01/20
      -Modified: xml-xalan/java/src/org/apache/xalan/serialize SerializerUtils.java
      -Committer's log entry: -Applying patch for Jira bug report XALANJ-1640.
      - -As it's currently written, SerializerUtils.outputResultTreeFragment loops -through the nodes in a result tree fragment, and for each one, it checks -whether the node is in some namespace. If it is not, the code undeclares the -default namespace by calling handler.startPrefixMapping("", ""). The problem -is that if the RTF that's being copied just consists of a text node (or PIs or -comments), that undeclaration of the default namespace hangs around until some -subsequent child element picks it up as one of its attributes, even if that -element is in some namespace - even what should be the default!
      - -The fix is to check whether the node that is being output is an element node -prior to issuing the handler.startPrefixMapping call - that ensures the prefix -mapping is not issued unless it's actually going to be used by the node that is -about to be serialized.
      - -This patch was reviewed by Brian Minchau (minchau@ca.ibm.com).

    • - -
    • Committed by zongaro@apache.org on 2005/01/24
      -Modified: xml-xalan/java/src/org/apache/xpath CachedXPathAPI.java
      -Committer's log entry: -Fix for Jira bug report XALANJ-1811.
      - -Updated Javadocs for constructors to make it clear that a single instance of -CachecXPathAPI must not be used by multiple threads without synchronization.
      - -Reviewed by Christine Li (jycli@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2005/01/27
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      -Committer's log entry: -Fix for Jira bug report XALANJ-1888.
      - -It is possible for the characters SAX event to specify a length of zero. Text -nodes should not be created in such situations. Changed the charactersFlush -method to guard against this case.
      - -Reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2005/01/27
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      -Committer's log entry: -Two part fix for Jira bug report XALANJ-1888.
      - -1) It is possible for the characters SAX event to specify a length of zero. -Text nodes should not be created in such situations. Changed the -charactersFlush method to guard against this case.
      - -2) Made a defensive change to references to m_dataOrQName. If the value in -this vector is to be interpreted as an index into m_data, it is stored as a -negative value (via calls to addNode). However, most references to elements of -m_dataOrQName were checking whether the value was non-positive, treating a -value of zero as an index into m_data as well. The zeroth entry into m_data is -an invalid entry.
      -The fix to charactersFlush described above should ensure that zero is never -stored in m_dataOrQName, but I thought it was just as well to duplicate the -interpretation used in storing values in m_dataOrQName.
      - -Reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2005/02/04
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemNumber.java
      -Committer's log entry: -Implement Errata E24, when the value attribute of xsl:number is NaN, infinite or less than 0.5. -More details please refer to bug report XALANJ-1979. Patch is reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2005/02/09
      -Modified: xml-xalan/java/src/org/apache/xpath/compiler XPathParser.java xml-xalan/java/src/org/apache/xpath/res -XPATHErrorResources.java
      -Committer's log entry: -Fix for Jira bug report XALANJ-1478.
      - -In the recursive descent parsing of an ill-formed XPath expression like "2+", -when the parser reaches the end of the expression while still looking for an -operand it ultimately ends up trying to see whether what remains can be parsed -as a location path. However, the LocationPath method was silently parsing the -end of an expression as a location path! Added an error for that situation.
      - -Reviewed by Brian Minchau (minchau@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2005/02/09
      -Modified: xml-xalan/java/samples/trax ExampleContentHandler.java
      -Committer's log entry: -Fix for Jira bug report XALANJ-2054.
      - -The sample ContentHandler code was printing the namespaceURI argument of -startElement and of endElement twice, but never printed the localName argument. -Fixed that typo.
      - -Reviewed by Brian Minchau (minchau@ca.ibm.com)

    • - - -
    • Committed by minchau@apache.org on 2005/02/11
      -Modified: xml-xalan/java/src/org/apache/xml/serializer AttributesImplSerializer.java EmptySerializer.java -ExtendedContentHandler.java NamespaceMappings.java SerializerBase.java ToStream.java ToTextSAXHandler.java -ToTextStream.java ToUnknownStream.java ToXMLSAXHandler.java ToXMLStream.java xml-xalan/java/src/org/apache/xalan/serialize -SerializerUtils.java xml-xalan/java/src/org/apache/xalan/templates ElemAttribute.java ElemLiteralResult.java
      -Committer's log entry: -Fix for XALANJ-1886. Multiple problems fixed related to collecting xsl:attributes -with over-ridden values and prefix/URI maps. With this fix, internally the -serializer correctly identifies attributes by their expanded QName, which -includes the URI rather than the prefix.

    • - -
    • Committed by minchau@apache.org on 2005/02/11
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java xml-xalan/java/src/org/apache/xml/serializer -TreeWalker.java
      -Committer's log entry: -Fix for XALANJ-1985, reviewed by Henry Zongaro. The problem was that a serialized DOM failed to declare a prefix/URI mapping.

    • - -
    • Committed by minchau@apache.org on 2005/02/11
      -Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorLRE.java
      -Committer's log entry: -Fix for XALANJ-2037. The trace information doesn't have the right location information in this case.

    • - -
    • Committed by minchau@apache.org on 2005/02/18
      -Modified: xml-xalan/java/src/org/apache/xml/serializer EmptySerializer.java ExtendedContentHandler.java SerializerBase.java
      -Committer's log entry: -Committing serializer.patch5.txt in JIRA issue XALANJ-1886, -that puts back an old attAttribute() method that takes 5 String arguments. -There is a new one that takes these 5 String arguments and a boolean to indicate if it is from an xsl:attribute -or not. I'm just restoring the old method. Patch reviewed by Henry Zongaro.

    • - -
    • Committed by minchau@apache.org on 2005/02/21
      -Modified: xml-xalan/java/src/org/apache/xml/serializer EmptySerializer.java SerializationHandler.java SerializerBase.java -ToStream.java
      -Committer's log entry: -Fix for XALANJ-2033 and XALANJ-2051 so that the serializer will serialize DTD -tags if desired. The patch was reviewed by Ilene Seeleman. -

    • Committed by ytalwar@apache.org on 2005/02/22
      -Modified: xml-xalan/java/src/org/apache/xml/utils URI.java
      -Committer's log entry: -The fix is for XALANJ-2059.
      - -The problem is that when href attribute has aboslute uri with jar scheme and -base uri is not null, then base uri is pre-appended to uri specified in href attribute. -The newer patch is according to RFC 2396. -The newer patch ignores base uri and directly make use of uri specifed href attribute, provided following conditions are met.
      -a)If uri specified in href attribute starts with / after the scheme and : - For example, href="file:/myDIR/myXSLFile.xsl.
      -b)If scheme specified for uri href attribute is not same as scheme for base uri.
      -c)If base uri is not hierarchical
      - -Henry Zongaro has helped creating this patch.

    • - -
    • Committed by ytalwar@apache.org on 2005/03/02
      -Modified: xml-xalan/java/src/org/apache/xml/serializer SerializerConstants.java ToStream.java ToXMLStream.java -xml-xalan/java/src/org/apache/xml/serializer/utils MsgKey.java SerializerMessages.java
      -Committer's log entry: -This patch fix XALANJ-2070. This patch add XML 1.1 support in term of following:
      -- Output Document can be of Version XML 1.1
      -- Control Characters in Range C0 and C1 are output as NCR.
      -- Namespaces in XML 1.1 can be IRIs.
      -- NCNames and QNames can conform to XML 1.1 specifications.
      -- NEL and LSEP characters are treated as new end of line character as per XML 1.1 specifications.
      - -Thanks to Brian Minchau for reviewing the patch. Brian Minchau and Henry Zongaro has also helped how XML 1.1 support should be done. -

    • - -
    • Committed by jycli@apache.org on 2005/03/03
      -Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java xml-xalan/java/src/org/apache/xalan/templates -ElemExtensionCall.java ElemLiteralResult.java
      -Committer's log entry: -Added implementation for getAttribute, getAttributeNS and getAttributes for LRE. A fix for bug report XALANJ-1526.

    • - -
    • Committed by mcnamara@apache.org on 2005/03/03
      -Modified: xml-xalan/java/xdocs/sources/design design2_0_0.xml
      -Committer's log entry: -Patch for XALANJ-1990. Fixes broken link to apidocs for Serializer.html.

    • - -
    • Committed by mcnamara@apache.org on 2005/03/03
      -Modified: xml-xalan/java/xdocs/sources/xalan usagepatterns.xml
      -Committer's log entry: -Patch for XALANJ-2026. Fixes typo in Debugger interface code example. -

    • Committed by minchau@apache.org on 2005/03/07
      -Modified: xml-xalan/java/src/org/apache/xml/serializer SerializerFactory.java xml-xalan/java/src/org/apache/xml/serializer/utils -MsgKey.java SerializerMessages.java
      -Committer's log entry: -Fix for XALANJ-2074, committing patch2 in that issue, which removes two -untranslated messages in SerializerFactory, and uses a new common message -in SerializerMessages.

    • - -
    • Committed by jycli@apache.org on 2005/03/10
      -Modified: xml-xalan/java/src/org/apache/xml/serializer CharInfo.java
      -Committer's log entry: -Marked the code to be privileged, which allows users to load -customized entity files in sandbox. Fixed bug report XALANJ-2068. -Patch was reviewed by Brian Minchau (minchau@ca.ibm.com)

    • - -
    • Committed by ytalwar@apache.org on 2005/03/10
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      -Committer's log entry: -This patch fixes XALANJ-1431. The patch has been reviewed by Brian. -The problem is that that when an empty attribute value is encountered, a text node is being created -with empty string. -Henry Zongaro has helped finding the XSLT 1.0 specs. that suggest a text node with empty string should not be created. -URL http://www.w3.org/TR/xslt#value-of has the following information: -"The xsl:value-of element is instantiated to create a text node in the result tree. The required select attribute is an -expression; this expression is evaluated and the resulting object is converted to a string as if by a call to the string -function. The string specifies the string-value of the created text node. If the string is empty, no text node will be -created. The created text node will be merged with any adjacent text nodes."

    • - -
    • Committed by zongaro@apache.org on 2005/03/14
      -Modified: xml-xalan/java/xdocs/sources/xalan builds.xml
      -Committer's log entry: -Patch for Jira bug report XALANJ-2079. Updated links to nightly Gump build. Reviewed by Brian Minchau.

    • - -
    • Committed by ytalwar@apache.org on 2005/03/23
      -Modified: xml-xalan/java/src/org/apache/xalan/processor XSLTAttributeDef.java xml-xalan/java/src/org/apache/xalan/templates -ElemAttribute.java ElemElement.java ElemPI.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java -AttributeSet.java CallTemplate.java DecimalFormatting.java Key.java Output.java ProcessingInstruction.java Template.java -VariableBase.java WithParam.java xpath.lex XslAttribute.java XslElement.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -Util.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java xml-xalan/java/src/org/apache/xml/serializer -WriterToUTF8Buffered.java xml-xalan/java/src/org/apache/xml/utils QName.java XML11Char.java
      -Committer's log entry: -This is resolve UTF-8 Charcater support and QName character support for XML 1.1 support in XALANJ-2070. -Henry Zongaro and Brian Minchau helped in fixing this part of the JIRA issue. -A new class org.apache.xml.utils.XML11Char has been included to support XML 1.1 characters. -Also a reference to org.apache.xml.utils.XMLChar has been replaced with a reference to -org.apache.xml.utils.XML11Char in almost all the places in Xalan. -org.apache.xml.serializer.WriterToUTF8Buffered has been update to support UTF-8 characters that can be represented in four bytes. -

    • - -
    • Committed by ytalwar@apache.org on 2005/03/30
      -Modified: xml-xalan/java/src/org/apache/xpath/domapi package.html
      -Committer's log entry: -This resolves XALANJ-2085. Sarah McNamara has reviewed this change.

    • - -
    • Committed by ytalwar@apache.org on 2005/04/01
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemNumber.java
      -Committer's log entry: -This is a fix for XALANJ-2089. -Christine Li has created this patch. -Brian Minchau helped in creating this patch. -Brian Minchau also reviewed this patch. -org.apache.xalan.templates.ElemNumber.java has raised some performance issue as -a static array to hold resources was removed earlier. However, the removal of static array is necessary -to fix a potential bug multithread environment, where a given thread can request different locale than another thread. - -This patch resolves the performance glicth that was found in internal testing.

    • - -
    • Committed by minchau@apache.org on 2005/04/07
      -Modified: xml-xalan/java/src/org/apache/xml/serializer CharInfo.java
      -Committer's log entry: -Commiting patch for XALANJ-2095, that tabs in text nodes in XML documents -are serialized to &#9; but should stay as a tab character.

    • - -
    • Committed by minchau@apache.org on 2005/04/07
      -Modified: xml-xalan/java/xdocs/sources/xalan usagepatterns.xml
      -Committer's log entry: -Patch from XALANJ-1924 applied. The one deprecated API used is replace -by the current one, but multiple typos in other examples are corrected.

    • - -
    • Committed by minchau@apache.org on 2005/04/07
      -Modified: xml-xalan/java/src/org/apache/xml/serializer Encodings.java
      -Committer's log entry: -Committing patch for XALANJ-2077. This performance modification is -estimated to shave 3% of the serialization stage of small documents. -Every little bit counts.

    • - -
    • Committed by minchau@apache.org on 2005/04/07
      -Modified: xml-xalan/java/src/org/apache/xml/serializer Encodings.java
      -Committer's log entry: -Appling fix for XALANJ-2086, which pointed out that findCharToByteConverterMethod() -always returned null. This bug was introduced some time ago during some security -fixes.

    • - -
    • Committed by minchau@apache.org on 2005/04/25
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      -Committer's log entry: -Fix for XALANJ-2109 applied (we won't \n to \r\n in an HTML attribute value on -Windows OS anymore, it will be left as is during serialization).

    • - -
    • Committed by minchau@apache.org on 2005/04/26
      -Modified: xml-xalan/java/src/org/apache/xml/utils XMLReaderManager.java
      -Committer's log entry: -Applying patch in XALANJ-2105.

    • - -
    • Committed by mkwan@apache.org on 2005/05/17
      -Modified: xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/templates ElemLiteralResult.java -xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -SmartTransformerFactoryImpl.java TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xml/dtm/ref DTMNodeProxy.java -xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTMdefaultNamespaceDeclarationNode.java xml-xalan/java/src/org/apache/xml/utils -UnImplNode.java xml-xalan/java/src/org/apache/xpath/domapi XPathNamespaceImpl.java xml-xalan/java/src/org/apache/xpath/operations -Variable.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java
      -Committer's log entry: -JAXP 1.3 integration. Integrate the Sun donated JAXP 1.3 implementation into the head branch.

    • - -
    • Committed by mkwan@apache.org on 2005/05/17
      -Modified: xml-xalan/java/src/org/apache/xpath/jaxp JAXPExtensionsProvider.java JAXPPrefixResolver.java JAXPVariableStack.java -XPathExpressionImpl.java XPathFactoryImpl.java XPathImpl.java
      -Committer's log entry: -JAXP 1.3 integration. Commit the XPath API implementation under org.apache.xpath.jaxp.

    • - -
    • Committed by mkwan@apache.org on 2005/05/17
      -Modified: xml-xalan/java/bin xml-apis.jar
      -Committer's log entry: -New xml-apis.jar containing JAXP 1.3 APIs.

    • - -
    • Committed by jycli@apache.org on 2005/05/17
      -Modified: xml-xalan/java/src/org/apache/xpath/compiler Compiler.java FuncLoader.java FunctionTable.java Keywords.java -ObjectFactory.java SecuritySupport.java SecuritySupport12.java XPathParser.java xml-xalan/java/src/org/apache/xpath/functions -FuncExtFunctionAvailable.java xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java
      -Committer's log entry: -Modified FunctionTable. Although it is not recommanded, but it is doable for users to add a customized function or overwrite -the default implementation of a build-in function. Fixed bug report XALANJ-2116. Patch is reviewed by Henry Zongaro.

    • - -
    • Committed by mkwan@apache.org on 2005/05/20
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java TransformerImpl.java -xml-xalan/java/src/org/apache/xml/utils DOMBuilder.java
      -Committer's log entry: -Support DOMResult.nextSibling in XalanJ Interpretive. If nextSibling is not null, then result nodes are inserted -before it.

    • - -
    • Committed by mkwan@apache.org on 2005/05/20
      -Modified: xml-xalan/java/samples/XPathAPI ApplyXPathJAXP.java foo.xml XPathResolver.java
      -Committer's log entry: -Add two samples to demonstrate how to use the XPath API in JAXP 1.3.
      -1. ApplyXPathJAXP. Basic sample like ApplyXPath, but use JAXP 1.3 XPath API instead.
      -2. XPathResolver. Demonstrate how to use NamespaceContext, XPathFunctionResolver and XPathVariableResolver.

    • - -
    • Committed by mkwan@apache.org on 2005/05/30
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerJavaClass.java ExtensionHandlerJavaPackage.java -ExtensionNamespaceContext.java XPathFunctionImpl.java XPathFunctionResolverImpl.java
      -Committer's log entry: -Patch for XALANJ-2126. This is a sample implementation of XPathFunctionResolver, with support for -Java and EXSLT extension functions.

    • - -
    • Committed by mkwan@apache.org on 2005/05/30
      -Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java
      -Committer's log entry: -New messages for XALANJ-2126. Messages for the sample XPathFunctionResolver implementation.

    • - -
    • Committed by mkwan@apache.org on 2005/05/30
      -Modified: xml-xalan/java/samples/XPathAPI ExtensionFunctionResolver.java
      -Committer's log entry: -For XALANJ-2126. New sample to demonstrate how to use the sample -XPathFunctionResolver to evaluate XPath expression containing -Java and EXSLT extension functions.

    • - -
    • Committed by minchau@apache.org on 2005/05/31
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      -Committer's log entry: -Committing patch for issue XALANJ-2121, which is that some empty attributes -of some HTML elements are note serialized as empty.

    • - -
    • Committed by minchau@apache.org on 2005/05/31
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      -Committer's log entry: -Putting static iniitialization of HTML element/attribute information in a static method, -which is invoked from a static { ...} block. -No real difference, but slowly inching this code towards adding a -ToXHTMLStream class that extends ToXMLStream, but uses methods in -ToHTMLStream.

    • - -
    • Committed by minchau@apache.org on 2005/05/31
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      -Committer's log entry: -Added "nowrap" as an empty attribute for elements <div> <src> and <tr> -as these are either Netscape or Internet-Explorer extensions. -This is patch3 from XALANJ-2121.

    • - -
    • Committed by minchau@apache.org on 2005/06/01
      -Modified: xml-xalan/java/src/org/apache/xml/serializer OutputPropertiesFactory.java ToStream.java
      -Committer's log entry: -Applying patcth for JIRA XALANJ-2093. Adding a xalan:line-separator extension output attribute.

    • - -
    • Committed by mkwan@apache.org on 2005/06/03
      -Modified: xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java -TransformerImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xml/utils DefaultErrorHandler.java
      -Committer's log entry: -Patch for XALANJ-2134. Change the error handling behavior to be conformant with the requirement -from JAXP 1.3 that the default ErrorListener will report all warnings and errors -to System.err and does not throw any Exceptions.

    • - -
    • Committed by mkwan@apache.org on 2005/06/07
      -Modified: xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -ProcessorInclude.java ProcessorLRE.java ProcessorStylesheetElement.java TransformerFactoryImpl.java -xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java xml-xalan/java/src/org/apache/xalan/templates -ElemExtensionCall.java StylesheetRoot.java xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java -TransformerImpl.java TrAXFilter.java xml-xalan/java/src/org/apache/xalan/xslt Process.java xml-xalan/java/src/org/apache/xml/utils -DOMHelper.java xml-xalan/java/src/org/apache/xpath XPathContext.java xml-xalan/java/src/org/apache/xpath/functions -FuncExtFunction.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java
      -Committer's log entry: -Patch for XALANJ-2136. Support the secure processing feature in Xalan interpretive. When this feature -is set to true, the following XML processing limits are applied:
      -1. extension functions and extension elements are disabled.
      -2. parsers created by the XSLT processor also have the secure processing feature set -to true.
      - -A new option -secure is added to the Process command line to enable the secure -processing feature.

    • - -
    • Committed by mkwan@apache.org on 2005/06/15
      -Modified: xml-xalan/java/xdocs/sources entities.ent xalan-jlocal.xml xalan-jsite.xml xml-xalan/java/xdocs/sources/xalan -features.xml samples.xml xpath_apis.xml
      Committer's log entry: -Patch for XALANJ-2124. Update the online documentation to include descriptions on the new JAXP 1.3 features:
      -1. Add a new "XPath API" page to provide a complete guide on how to use the -XPath API in JAXP 1.3. Details on basic usage patterns, factory plugin mechanism, -how to use NamespaceContext, XPathVariableResolver and XPathFunctionResolver.
      -2. Document the secure processing feature in the features page.
      -3. Describe three new XPath API related samples in the samples page.

    • - -
    • Committed by mkwan@apache.org on 2005/06/21
      -Modified: xml-xalan/java/src/META-INF/services javax.xml.xpath.XPathFactory
      -Committer's log entry: -Service provider file for javax.xml.xpath.XPathFactory.

    • - -
    • Committed by mkwan@apache.org on 2005/06/21
      -Modified: xml-xalan/java/samples/XPathAPI ExtensionTest.java numlist.xml
      -Committer's log entry: -xml and extension java source for the ExtensionFunctionResolver sample.

    • - -
    • Committed by mkwan@apache.org on 2005/06/21
      -Modified: xml-xalan/java/src MANIFEST.MF manifest.xalan-interpretive manifest.xsltc
      -Committer's log entry: -Update manifest files for jaxp version and remove entry for org.w3c.dom.xpath.

    • - -
    • Committed by mkwan@apache.org on 2005/06/22
      -Modified: xml-xalan/java build.xml xml-xalan/java/bin xml-apis.jar xml-xalan/java/src -xml-commons-external-1.2.01-src.tar.gz xml-commons-external-1.3.01-src.tar.gz
      Committer's log entry: -Update the source and binary of xml-apis.jar.

    • - -
    • Committed by mkwan@apache.org on 2005/06/22
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMNodeProxy.java
      -Committer's log entry: -Java docs cleanup. Remove the word "Experimental" for DOM Level 3 spec and update the URI link. -Also remove the obsolete methods that are replaced by new ones.

    • - -
    • Committed by mkwan@apache.org on 2005/06/22
      -Modified: xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -StylesheetHandler.java xml-xalan/java/src/org/apache/xml/utils UnImplNode.java
      -Committer's log entry: -Cleanup javadocs on DOM Level 3 spec. Update the uri and remove -obsolete methods. The getVersion() method in org.w3c.dom.Node is replaced by -getXmlVersion().

    • - -
    • Committed by mkwan@apache.org on 2005/06/24
      -Modified: xml-xalan/java build.xml
      -Committer's log entry: -Add xml-apis.jar to boot classpath to fix a build problem with JDK 1.4.

    • - -
    • Committed by mkwan@apache.org on 2005/06/28
      -Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java
      -Committer's log entry: -Patch for XALANJ-2076. Fix a bug in date:month-in-year.

    • - -
    • Committed by mkwan@apache.org on 2005/06/29
      -Modified: xml-xalan/java/bin xercesImpl.jar
      -Committer's log entry: -New xercesImpl.jar from the official Xerces-J 2.7.0 release.

    • - -
    • Committed by jycli@apache.org on 2005/06/29
      -Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java -xml-xalan/java/src/org/apache/xml/res XMLErrorResources.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java
      -Committer's log entry: -Cleanup resource files. Remove unused constants and commented out message keys. Fix for bug XALANJ-2161 -Patch is reviewed by Sarah McNamara (mcnamara@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2005/07/05
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java
      -Committer's log entry: -Patch for Jira issue XALANJ-1978. Reviewed by Christine Li (jycli@ca.ibm.com).
      - -Behaviour of StreamResult.getSystemId has changed if the Result object was -created using a File. The URI returned begins with "file:/" where it used to -begin with "file:///". TransformerIdentityImpl had a dependency on the old -behaviour.

    • - -
    • Committed by minchau@apache.org on 2005/07/15
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLSAXHandler.java
      -Committer's log entry: -Applying patch2 from XALANJ-2023.
      -Submitted by Ken Weiner, reviewed, approved, applied by Brian Minchau.

    • - -
    • Committed by minchau@apache.org on 2005/07/15
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      -Committer's log entry: -Changing "<!DOCTYPE HTML" to "<!DOCTYPE html" to be more xhtml friendly. -Applying the patch in XALANJ-2103 that was created by Brian Minchau -and reviewed/approved by Joanne Tong.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/15
      -Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java
      -Committer's log entry: -Patch for XALANJ-2099 provided by Morris Kwan and reviewed by me. - -According to the EXSLT doc the extension date:day-abbreviation() should -output a three-letter English day abbreviation: one of 'Sun', 'Mon', 'Tue', -'Wed', 'Thu' or 'Fri'. (See http://exslt.org/date/functions/day-abbreviation/index.html)

    • - -
    • Committed by mcnamara@apache.org on 2005/07/15
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      -Committer's log entry: -Patch for XALANJ-2143. Javadoc improvement for TransformerImpl.setOutputProperty(name,value).

    • - -
    • Committed by mcnamara@apache.org on 2005/07/15
      -Modified: xml-xalan/java/xdocs/sources/xalan usagepatterns.xml
      Committer's log entry: -Patch for XALANJ-2142 - correction for the xalan namespace URI. Patch provided by Brian Minchau and -reviewed by Sarah McNamara.
      - -Patch for XALANJ-2144 - incorrect use of the word "concurrently" when referring to the XPath module.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/19
      -Modified: xml-xalan/java/licenses BCEL.LICENSE.txt LICENSE.DOM-documentation.html LICENSE.DOM-software.html -LICENSE-SAX.html regexp.LICENSE.txt runtime.LICENSE.txt serializer.LICENSE.txt serializer.NOTICE.txt xalan.LICENSE.txt -xalan.NOTICE.txt xercesImpl.LICENSE.txt xercesImpl.NOTICE.txt xml-apis.LICENSE.txt xml-apis.NOTICE.txt
      -Committer's log entry: -Creation of the xml-xalan/java/licenses directory which contains -all licenses required for the Xalan Java (interpretive and compiled) runtime -jars and its dependencies. Most of these files have been moved here -from xml-xalan/java/bin. The serializer files are new for the Xalan Java 2.7 -release (fixes XALANJ-1977). The xercesImpl.LICENSE.txt and xml-apis.LICENSE.txt -now reflect ASL v2.0. This change was reviewed and approved in XALANJ-2170 by Christine Li.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/19
      -Modified: xml-xalan/java/lib xercesImpl.jar xercesImpl.README.txt xml-apis.jar xml-apis.README.txt BCEL.jar BCEL.README.txt -regexp.jar regexp.README.txt runtime.jar runtime.README.txt
      -Committer's log entry: -Creation of the xml-xalan/java/lib directory which contains all runtime -library dependencies (jars) required by Xalan Java (interpretive and compiled) runtime -These files have been moved here from xml-xalan/java/bin.
      - -This change was reviewed and approved in XALANJ-2170 by Christine Li.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/19
      -Modified: xml-xalan/java/tools ant.jar ant.LICENSE.txt ant.README.txt antRun antRun.bat java_cup.jar java_cup.LICENSE.txt -java_cup.README.txt JLex.jar JLex.LICENSE.txt JLex.README.txt stylebook-1.0-b3_xalan-2.jar stylebook-1.0-b3_xalan-2.LICENSE.txt -stylebook-1.0-b3_xalan-2.README.txt xalan2jdoc.jar xalan2jtaglet.jar
      -Committer's log entry: -Creation of the xml-xalan/java/tools directory which contains all build time -tools required by Xalan Java (interpretive and compiled) builds, including -documentation builds. These tools are not required at runtime.
      - -These files have been moved here from xml-xalan/java/bin.
      - -This change was reviewed and approved in XALANJ-2170 by Christine Li.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/19
      -Modified: xml-xalan/java serializer.README.txt xalan.README.txt
      -Committer's log entry: -New readme files for the xalan.jar and serializer.jar. -This change was reviewed and approved in XALANJ-2170 by Christine Li.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/19
      -Modified: xml-xalan/java build.bat build.sh build.xml
      -Committer's log entry: -Updates to the build scripts and Ant build.xml file to accomodate the -restructuring of the tools and runtime libraries in xml-xalan/java/tools and -xml-xalan/java/lib. Also changes to build.xml to reflect upcoming -Xalan Java 2.7.0 (version number) changes.
      - -This change was reviewed and approved in XALANJ-2170 by Christine Li.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/19
      -Modified: xml-xalan/java/samples/AppletXMLtoHTML client.html README.html xml-xalan/java/samples/ApplyXPathDOM ApplyXPathDOM.java
      -Committer's log entry: -Doc changes for Xalan Java 2.7.0 release. -This change was reviewed and approved in XALANJ-2170 by Christine Li.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/19
      -Modified: xml-xalan/java/src/org/apache/xalan/processor XSLProcessorVersion.java xml-xalan/java/src/org/apache/xalan/xslt -EnvironmentCheck.java xml-xalan/java/src/org/apache/xpath/domapi XPathEvaluatorImpl.java XPathExpressionImpl.java -XPathNSResolverImpl.java XPathResultImpl.java xml-xalan/java/src/org/apache/xml/serializer Version.src xml-xalan/java/xdocs/sources -entities.src xalan-jlocal.xml xalan-jsite.xml xml-xalan/java/xdocs/sources/xalan commandline_xsltc.xml commandline.xml downloads.xml -extensions.xml extensionslib.xml faq.xml features.xml getstarted.xml index.xml overview.xml public_apis.xml resources.xml samples.xml -trax.xml usagepatterns.xml whatsnew.xml xpath_apis.xml xsltc_usage.xml xml-xalan/java/xdocs/sources/xsltc README.xslt README.xsltc
      -Committer's log entry: -Doc changes for Xalan Java 2.7.0 release. -This change was reviewed and approved in XALANJ-2170 by Christine Li.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/19
      -Modified: xml-xalan/java/src/org/apache/xalan/processor XSLProcessorVersion.src xml-xalan/java build.xml
      -Committer's log entry: -Doc changes for Xalan Java 2.7.0 release. -This change was reviewed and approved in XALANJ-2170 by Christine Li.

    • - -
    • Committed by zongaro@apache.org on 2005/07/21
      -Modified: xml-xalan/java/src/org/apache/xml/utils XMLString.java XMLStringDefault.java xml-xalan/java/src/org/apache/xpath/objects -XString.java
      -Committer's log entry: -Patch for XALANJ-2176 reviewed by Christine Li (jycli@ca.ibm.com).
      - -Replaced characters in Javadoc comments that were encoded in ISO-8859-1 with -HTML character entity references. This avoids any problems with editors, IDEs -or versions of javac that make faulty assumptions about source encodings.

    • - -
    • Committed by johng@apache.org on 2005/07/24
      -Modified: xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java
      -Committer's log entry: -PR: XALANJ-2113
      -Submitted by: John Gentilin
      -Reviewed by: Henry Zongaro

    • - -
    • Committed by johng@apache.org on 2005/07/25
      -Modified: xml-xalan/java/src/org/apache/xpath/objects XString.java -xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
      -Committer's log entry: -PR: XALANJ-2114
      -Submitted by: John Gentilin
      -Reviewed by: Henry Zongaro

    • - -
    • Committed by mcnamara@ca.ibm.com on 2005/07/25
      -Modified: xml-xalan/java/src/org/apache/xpath/functions FuncSystemProperty.java
      -Committer's log entry: -Patch for XALANJ-936. Reviewed by Yash Talwar.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/27
      -Modified: xml-xalan/java/bin xml-apis.jar
      -Committer's log entry: -Update xml-apis.jar to xml-commons-external-1.3.02 version.

    • - -
    • Committed by johng@apache.org on 2005/07/27
      -Modified: java/src/org/apache/xalan/lib/sql JNDIConnectionPool.java
      -java/samples/extensions/sql/basic-connection dbinfo.xml dbtest.xsl DumpSQL.xsl dbtest-cinfo.xsl
      -java/samples/extensions/sql/ext-connection dbtest.xsl ExternalConnection.java
      -java/samples/extensions/sql/pquery dbinfo.xml
      -java/samples/extensions/sql/streamable cachedNodes.xsl streamNodes.xsl pivot.xsl
      -java/samples/extensions/sql GETTING_STARTED.txt runDerby.bat runXalan.sh createdb.sql runDerby.sh runXalan.bat
      -Committer's log entry: -PR: XALANJ-2172
      -Obtained from: Eric Everman
      -Submitted by: Eric Everman / John Gentilin
      -Reviewed by: Yash Talwar

    • - -
    • Committed by mcnamara@apache.org on 2005/07/29
      -Modified: xml-xalan/java/bin xercesImpl.jar
      -Committer's log entry: -New xercesImpl.jar from the official Xerces-J 2.7.1 release.

    • - -
    • Committed by minchau@apache.org on 2005/08/03
      -Modified: java/src/org/apache/xml/serializer ToTextStream.java Encodings.properties ToHTMLStream.java -ToStream.java EncodingInfo.java ToXMLStream.java Encodings.java
      -Committer's log entry: -Committing patch for XALANJ-2087. This is a fix for correctly deciding if a character is in an encoding or not, -so we write it as is, or as an entity.
      -The old code had a concept of a maximum character in the encoding, and assumed that all characters less -than that unicode value were in the encoding. New code uses the underlying Java libarary, but caches results -for performance.
      -Patch was reviewed/approved by Yash Talwar (see XALANJ-2087).

    • - -
    • Committed by mcnamara@apache.org on 2005/08/04
      -Modified: java/samples/extensions/sql/show-error invalidQuery.xsl invalidPQuery.xsl invalidConn.xsl
      -Committer's log entry: -Updates for the SQL samples (part of the fix for XALANJ-2172). Patch provided by John Gentilin and reviewed by Sarah McNamara.

    • - -
    • Committed by minchau@apache.org on 2005/08/04
      -Modified: java/src/org/apache/xml/serializer ToStream.java EncodingInfo.java
      -java/src/org/apache/xml/serializer/utils SerializerMessages.java MsgKey.java
      -Committer's log entry: -Committing XALANJ-2181. When the requested encoding is not supported by the JDK no -warning is given,... this fix adds an error message.

    • - -
    • Committed by johng@apache.org on 2005/08/05
      -Modified: java/samples/extensions/sql/ext-connection ExternalConnection.java
      -java/xdocs/sources/xalan samples.xml
      -java/samples/extensions/sql runDerby.bat runXalan.sh runDerby.sh runXalan.bat runExtConnection.bat runExtConnection.sh
      -java/src/org/apache/xalan/lib/sql DefaultConnectionPool.java
      -Committer's log entry: -PR: XALANJ-2183.

    • - -
    -
    - - -

    Core (Non-XSLTC) source code updates:

    -
      -
    • Committed by zongaro@apache.org on 2003/11/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc DOM.java Translet.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler SyntaxTreeNode.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -ResultTreeType.java xml-xalan/java/src/org/apache/xalan/xsltc/dom AdaptiveResultTreeImpl.java -DOMAdapter.java DOMWSFilter.java MultiDOM.java SAXImpl.java SimpleResultTreeImpl.java -xml-xalan/java/src/org/apache/xml/dtm/ref ExpandedNameTable.java

      -Committer's log entry: -Patch from Morris Kwan (mkwan@ca.ibm.com), reviewed by myself, with a tweak -or two from myself, reviewed by Morris.

      - -Split namesArray in translet into three arrays: namesArray, urisArray and -typesArray.

      - -Previously, entries in the namesArray had to be examined at run-time to -distinguish those that represented elements, from those that represented -attributes (prefixed by an '@'), and those that represented namespace node -names (prefixed by a '?'). In addition, any namespace URI for the element or -attribute was similarly stored in the namesArray entry. So, -"http://example.org:abc" and "http://example.org:@abc" respectively represented -an element and an attribute named abc in the http://example.org namespace; -"?abc" represented a namespace prefix of abc.

      - -With this change, the namesArray will have entries for "abc" in all three -cases; the urisArray will contain entries for "http://example.org" for the -element and attribute, and an empty string for the namespace prefix; and the -typesArray will contain the value 1 for the element, 2 for the attribute and 13 -for the namespace (which correspond to the DTM constant values for those kinds -of nodes).

      - -In addition, these values are stored in static arrays in the translet, and -references to those arrays are copied to instance fields in the translet's -constructor, rather than constructing arrays and initializing all their entries -in the constructor each time.

      - -All this serves to reduce the overhead of initializing a transformation.

    • - -
    • Committed by minchau@apache.org on 2003/11/24
      -Modified: xml-xalan/java/src/org/apache/xml/serializer NamespaceMappings.java

      -Committer's log entry: -Submitted by: Brian Minchau

      -Just indentation and whitespace changes in the code -(trying to get Apache head and the xslt2.0-compiled branches closer).

    • - -
    • Committed by minchau@apache.org on 2003/11/25
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToTextStream.java

      -Committer's log entry: -PR: bugzilla 24278

      -Submitted by: Brian Minchau

    • - -
    • Committed by minchau@apache.org on 2003/11/25
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemLiteralResult.java

      -Committer's log entry: -PR: bugzilla 24423

      -Submitted by: Brian Minchau

    • - -
    • Committed by minchau@apache.org on 2003/11/25
      -Modified: xml-xalan/java/src/org/apache/xml/serializer SerializerBase.java ToXMLSAXHandler.java

      -Committer's log entry: -Submitted by: Brian Minchau

      -Just indentation and whitespace changes in the code -(trying to get Apache head and the xslt2.0-compiled branches closer).

    • - -
    • Committed by minchau@apache.org on 2003/11/25
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java

      -Committer's log entry: -PR: bugzilla 24958

      -Submitted by: Brian Minchau

    • - -
    • Committed by igorh@apache.org on 2003/12/04
      -Modified: xml-xalan/java/samples/TransformThread TransformThread.java foo0.xml foo0.xsl foo1.xml -foo1.xsl xml-xalan/java/xdocs/sources/xalan samples.xml

      -Committer's log entry: -Transform Thread sample. Submitted by Richard Cao.

    • - -
    • Committed by zongaro@apache.org on 2003/12/04
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax TrAXFilter.java xml-xalan/java/src/org/apache/xml/dtm/ref -DTMManagerDefault.java xml-xalan/java/src/org/apache/xml/utils XMLReaderManager.java

      -Committer's log entry: -Moved code for caching XMLReader objects from XSLTC's TransformerFactoryImpl to -a new org.apache.xml.utils.XMLReaderManager class.

      - -It is now the responsibility of the DTMManagerDefault class to request one of -these cached XMLReader objects, so the benefit of reusing an XMLReader is now -conferred upon both XSLTC and Xalan-J Interpretive, as well as upon references -to the document() function.

    • - -
    • Committed by zongaro@apache.org on 2003/12/04
      -Modified: xml-xalan/java/src/org/apache/xml/utils ObjectFactory.java

      -Committer's log entry: -Factored out part of ObjectFactory's createObject method into separately -callable lookUpFactoryClass and lookUpFactoryClassName methods. This allows -the caller to cache the Class object that provides a service at an appropriate -level, and create new instances of that class at will, rather than going -through the expensive service provider look-up procedure for each and every -object created.

    • - -
    • Committed by santiagopg@apache.org on 2003/12/04
      -Modified: xml-xalan/java/src/org/apache/xml/serializer Encodings.java

      -Committer's log entry: -Reflection code to load sun.io.CharToByteConverter is now wrapped in a privileged action. -This is needed when user code is run without the required permssions.

    • - -
    • Committed by zongaro@apache.org on 2003/12/04
      -Modified: xml-xalan/java build.xml xml-xalan/java/bin xml-apis.jar xml-xalan/java/src -xml-commons-src.tar.gz xml-commons-external-1.2.01-src.tar.gz

      -Committer's log entry: -Upgrading to xml-commons-external-1.2.01 release, and moving to new naming -convention for xml-commons source file.

    • - -
    • Committed by santiagopg@apache.org on 2003/12/04
      -Modified: xml-xalan/java/src/org/apache/xml/serializer Encodings.java

      -Committer's log entry: -Avoid RuntimeException(Throwable) as it is only available in JDK 1.4.

    • - -
    • Committed by zongaro@apache.org on 2003/12/08
      -Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java -xml-xalan/java/src/org/apache/xalan/templates ElemVariable.java ElemWithParam.java

      -Committer's log entry: -Applying patch from Richard Cao (richcao@ca.ibm.com) for Bugzilla bug report -797.

      - -Added code that checks whether an xsl:param, xsl:variable or xsl:with-param -has both a select attribute and content. Also, new test case to test for -message in case of xsl:with-param, and updated messages in existing tests for -xsl:param and xsl:variable.

    • - -
    • Committed by zongaro@apache.org on 2003/12/08
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer NodeSorter.java

      -Committer's log entry: -Applying patch from Richard Cao (richcao@ca.ibm.com) for Bugzilla bug report -5761. Removed code that caused keys to be ignored when they select an empty set of -values.

    • - -
    • Committed by zongaro@apache.org on 2003/12/09
      -Modified: xml-xalan/java/bin xercesImpl.jar

      -Committer's log entry: -Upgrading to version 2.6.0 of Xerces-Java.

    • - -
    • Committed by zongaro@apache.org on 2003/12/12
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMManagerDefault.java

      -Committer's log entry: -Added a finally block for SAXSource/StreamSource case in order to ensure that -any XMLReader is released to the XMLReader cache.

      - -Thanks to Joanne Tong (joannet@ca.ibm.com) for catching this bug when she -reviewed my changes to where caching of XMLReaders was handled, and the DTM -plugability changes for XSLTC.

    • - -
    • Committed by zongaro@apache.org on 2003/12/12
      -Modified: xml-xalan/java/src/org/apache/xml/utils ObjectFactory.java

      -Committer's log entry: -Created a named constant for "META-INF/services" string.

    • - -
    • Committed by rameshm@apache.org on 2003/12/22
      -Modified: xml-xalan/java/src/org/apache/xalan/processor StopParseException.java StylesheetPIHandler.java -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java -xml-xalan/java/src/org/apache/xml/utils StopParseException.java StylesheetPIHandler.java

      -Committer's log entry: -Moving classes that are used between Xalan interpretive and XSLTC ( StylesheetPIHandler and StopParseException ) -to xml/utils package . Making the required modifications to accomadate this change.

      - -Submitted by: Bhakti Mehta ( bhakti.mehta@sun.com )

      -Reviewed by: Ramesh Mandava

    • - -
    • Committed by zongaro@apache.org on 2003/12/24
      -Modified: xml-xalan/java/src/org/apache/xml/utils ObjectFactory.java

      -Committer's log entry: -Fixed a bug I injected recently - missing slash between 'META-INF/services' and service name.

    • - -
    • Committed by zongaro@apache.org on 2004/01/04
      -Modified: xml-xalan/java/src/org/apache/xalan/templates RedundentExprEliminator.java XSLTVisitor.java

      -Committer's log entry: -Made methods in this class public, as is the case in the XPathVisitor class that -it extends. Having the class be public, but none of the methods public isn't -helpful.

      - -Contributed by Warwick Burrows (wburrows@us.ibm.com).

    • - -
    • Committed by zongaro@apache.org on 2004/01/06
      -Modified: xml-xalan/java/src/org/apache/xalan/templates RedundentExprEliminator.java XSLTVisitor.java

      -Committer's log entry: -Updating the copyright dates to reflect recent modifications.

    • - -
    • Committed by zongaro@apache.org on 2004/01/08
      -Modified: xml-xalan/java build.xml

      -Committer's log entry: -Updating build copyright year.

    • - -
    • Committed by minchau@apache.org on 2004/01/15
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemLiteralResult.java ElemTextLiteral.java

      -Committer's log entry: -PR: 26169
      -Submitted by: Brian Minchau
      -Flushed serialier before emitting trace event in ElemeTextLiteral and -ElemLiteralResult.

    • - -
    • Committed by igorh@apache.org on 2004/01/21
      -Modified: xml-xalan/java build.xml

      -Committer's log entry: -Add TransformThread sample to xalansamples.jar.

    • - -
    • Committed by zongaro@apache.org on 2004/02/02
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2RTFDTM.java

      -Committer's log entry: -Fix for bugzilla bug report 25442. - -Record the initial empty sizes of the various vectors in the DTM, and use those -sizes as the defaults in popRewindMark. The code originally assumed that these -vectors had default sizes of zero, but that's not true in the case of m_data, -which reserves entry zero.

      - -Reviewed by Christine Li (jycli@ca.ibm.com) -

    • - -
    • Committed by jycli@apache.org on 2004/02/02
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemApplyTemplates.java

      -Committer's log entry: -Fix for bugzilla bug report 19464. -A reworked patch, move the push statements to the beginning of try block -and added a flag to make sure that there is always something to pop -Reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2004/02/05
      -Modified: xml-xalan/java/src/org/apache/xpath/axes UnionPathIterator.java

      -Committer's log entry: -Fix for bugzilla bug report 26019. detach location path iterators happens only when allowDetach flag is true. -Reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2004/02/05
      -Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorExsltFunction.java

      -Committer's log entry: -Fix for bugzilla bug report 18351. -xsl:message instruction is allowed inside func:function. -It doesn't construct nodes as part of the result. -Reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2004/02/05
      -Modified: xml-xalan/java/src/org/apache/xpath/functions FuncExtFunction.java

      -Committer's log entry: -Fix bugzilla bug report 18351. -Set allowDetachToRelease flag to false, which allow caching of the arguments -Reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by igorh@apache.org on 2004/02/05
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemAttribute.java

      -Committer's log entry: -Fix for Bugzilla Bug 26075.

    • - -
    • Committed by igorh@apache.org on 2004/02/06
      -Modified: xml-xalan/java/src/org/apache/xml/utils TreeWalker.java

      -Committer's log entry: -Fix for Bugzilla Bug 25416.

    • - -
    • Committed by jycli@apache.org on 2004/02/09
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemTemplateElement.java

      -Committer's log entry: -Applying Joanne Tone's (joannet@ca.ibm.com) patch for -bugzilla bug report 26030.

      - -Do not suppress Xalan specified extension element namespace, unless they -are declared as extension element namespaces by users.

    • - -
    • Committed by jycli@apache.org on 2004/02/11
      -Modified: xml-xalan/java build.xml

      -Committer's log entry: -Fix for bugzilla bug report 26829. - -Modified build.xml to add xalanj2taglet.jar to Xalan source distribution -Contributed by Sarah McNamara (mcnamara@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2004/02/11
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerExsltFunction.java -xml-xalan/java/src/org/apache/xalan/templates ElemExsltFunction.java ElemExsltFuncResult.java -xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java

      -Committer's log entry: -Fix for bugzilla bug report 24302. - -Fields in the object representing an EXSLT function element (ElemExsltFunction) -were being used to store execution state information for references to that -function. That caused problems with multi-threaded code that used Transformer -objects created from the same Templates object - each Transformer shares the -same instances of ElemExsltFunction.

      - -The fix was to replace the fields ElemExsltFunction.m_result and -ElemExsltFunction.m_isResultSet with a new ObjectStack field in TransformerImpl -named m_currentFuncResult.

      - -Also, changed how VariableStack was being updated in the execute method for a -function reference - this change was modelled on equivalent code in -ElemCallTemplate.

      - -Reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2004/02/11
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemParam.java

      -Committer's log entry: -Fix for bugzilla bug report 24302. - -Changed condition under which the parent element's m_inArgsSize field is -incremented - that field keeps track of the number of xsl:param children an -element has. This was only happening for ElemTemplate, but it needs to happen -for ElemExsltFunction, which is a subclass of ElemTemplate, as well.

      - -Reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by igorh@apache.org on 2004/02/12
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Sort.java -xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java NodeSortRecordFactory.java -xml-xalan/java/src/org/apache/xml/utils LocaleUtility.java

      -Committer's log entry: -Fix for Bugzilla Bug 26842.

    • - -
    • Committed by igorh@apache.org on 2004/02/13
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java -xml-xalan/java/src/org/apache/xml/utils StringComparable.java

      -Committer's log entry: -Fix for Bugzilla Bug 1396.

    • - -
    • Committed by minchau@apache.org on 2004/02/17
      -Modified: Most files in the Xalan Java cvs repository (too many to list)

      -Committer's log entry: -New Apache 2.0 license update.

    • - -
    • Committed by minchau@apache.org on 2004/02/17
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemForEach.java -xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java

      -Committer's log entry: -PR: bugzilla 26217
      -Submitted by: Brian Minchau
      -Reviewed by: Henry Zongaro
      -This is a javadoc update only. -Programming instructions don't have a namespace, so make -the PI with no namespace be "xalan-doc-cache-off" rather than -"xalan:doc-cache-off"

    • - - -
    • Committed by minchau@apache.org on 2004/02/17
      -Modified: xml-xalan/java/xdocs/sources/xalan faq.xml

      -Committer's log entry: -PR: bugzilla 26217
      -Submitted by: Brian Minchau
      -Reviewed by: Henry Zongaro
      -Changed a ":" to a "-" in "xalan:doc-cache-off" in the FAQ. -Programming instructions don't have a namespace, so make -the PI with no namespace be "xalan-doc-cache-off" rather than -"xalan:doc-cache-off".

    • - -
    • Committed by minchau@apache.org on 2004/02/18
      -Modified: xml-xalan/java/src/org/apache/xml/utils DOMBuilder.java

      -Committer's log entry: -PR: bugzilla 15140
      -Submitted by: patch submitted by Bruno Dumon (bruno@outerthought.org)
      -Reviewed by: Brian Minchau (minchau@ca.ibm.com)

    • - - -
    • Committed by minchau@apache.org on 2004/02/18
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToXMLStream.java

      -Committer's log entry: -PR: bugzilla 24304
      -Submitted by: Brian Minchau
      -Reviewed by: Henry Zongaro
      -Serialized XML no longer put a new line after the xml header unless indent="yes".

    • - -
    • Committed by minchau@apache.org on 2004/02/18
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemForEach.java

      -Committer's log entry: -PR: bugzilla 16889
      -Submitted by: Elson Jiang
      -Reviewed by: Brian Minchau
      -Fixes ElemForEach TraceListener bug.

    • - -
    • Committed by minchau@apache.org on 2004/02/18
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java TransformerImpl.java

      -Committer's log entry: -PR: bugzilla 23591
      -Submitted by: Brian Minchau
      -Reviewed by: Henry Zongaro
      - -JAXP transformer.setOutputProperties(null); now not only doesn't -get an exception, it also resets the internal state to flush out any -previously accumulated properties as if the transformer had -just been created.

    • - -
    • Committed by minchau@apache.org on 2004/02/18
      -Modified: xml-xalan/java/src/org/apache/xml/serializer OutputPropertiesFactory.java -ToHTMLStream.java ToStream.java ToXMLStream.java

      -Committer's log entry: -PR: bugzilla 25816
      -Submitted by: Brian Minchau
      -Reviewed by: Henry Zongaro
      -Make default properties returned by serializer factory immutable.

    • - -
    • Committed by minchau@apache.org on 2004/02/18
      -Modified: xml-xalan/java/src/org/apache/xalan/lib Redirect.java

      -Committer's log entry: -Javadoc update only.
      -PR: bugzilla 26742
      -Submitted by: Brian Minchau

      - -Changed old invalid URI for xmlns:xsl to the correct one -for XSLT 1.0. The old value was before the XSLT 1.0 recommendation -and appeared only in a javadoc example. But it did confuse me when -I tried to run the example in the javadoc.

    • - -
    • Committed by jycli@apache.org on 2004/02/20
      -Modified: xml-xalan/java/src/org/apache/xml/utils PrefixResolverDefault.java

      -Committer's log entry: -Fix for bugzilla bug report 24979. - -Fix for DOM XPath API, any element has an implicit declaration of its own -prefix, which is enforced during namespace serialization.

      - -Reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by igorh@apache.org on 2004/02/21
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java -xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java

      -Committer's log entry: -Code cleaning and optimization for copy and copy-of. Discussed with Henry Zongaro.

    • - -
    • Committed by zongaro@apache.org on 2004/02/22
      -Modified: xml-xalan/java build.xml xml-xalan/java/src MANIFEST.MF manifest.xsltc

      -Committer's log entry: -Applying patch for Bugzilla bug report 24728 from Sarah McNamara (mcnamara@ca.ibm.com).

      - -Use Ant's filtering capabilities to place appropriate "created-by" information -into the MANIFEST.MF file of the jar that's being built.

    • - -
    • Committed by jycli@apache.org on 2004/02/23
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TrAXFilter.java

      -Committer's log entry: -Fix for bugzilla bug report 22376. - -When a TrAXFilter has a parent, should set itself as the EntityResolver, -DTDHandler and ErrorHandler for it's parent to keep the filter chain, -instead of always use the default EntityResolver, DTDHandler and ErrorHandler

      - -The patch is submitted by Werner Donne (werner.donne@re.be)

    • - -
    • Committed by aruny@apache.org on 2004/02/23
      -Modified: xml-xalan/java/src/org/apache/xml/utils DOMBuilder.java

      -Committer's log entry: -Description : Copying the patch from jaxp-1_3_0-branch to main trunk. -When there is no mark up inside element content, text should be contained in single TEXT node. -

    • - -
    • Committed by zongaro@apache.org on 2004/02/24
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemAttribute.java ElemElement.java -ElemPI.java ElemTemplateElement.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java -AttributeSet.java Copy.java DecimalFormatting.java Key.java LiteralElement.java Output.java ProcessingInstruction.java -Template.java XslAttribute.java XslElement.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -ErrorMessages.java ErrorMsg.java Util.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java -ErrorMessages.java xml-xalan/java/src/org/apache/xml/utils XMLChar.java

      -Committer's log entry: -Patch for Bugzilla bug report 24988 from Joanne Tong (joannet@ca.ibm.com) -reviewed by myself.

      - -Changes required to test whether an attribute value that is required to be -a QName, NCName or whitespace-separated list of QNames actually meets that -requirement.

    • - -
    • Committed by zongaro@apache.org on 2004/02/24
      -Modified: xml-xalan/java/bin xercesImpl.jar

      -Committer's log entry: -Upgrading to version 2.6.2 of Xerces-Java.

    • - -
    • Committed by zongaro@apache.org on 2004/02/24
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java

      -Committer's log entry: -Part of patch for bug report 24985. Ensure that m_size is set to zero in -setStartNode methods of AncestorIterator and TypedAncestorIterator. The way -getLast() is implemented resulted in setStartNode being called twice in -some circumstances, with the nodes from the second call being included as -additional (though duplicate) ancestors. Clearing m_size avoids that.

      - -Reviewed by Morris Kwan (mkwan@ca.ibm.com).

    • -
    -
    - -

    Core (Non-XSLTC) source code updates:

    -
      -
    • Committed by ilene@apache.org on 2003/06/06
      -Modified: xml-xalan/java build.xml xml-xalan/java/src/org/apache/xalan Version.java Version.src
      -Committer's log entry: -Generate values for Version information from constants in the build script. -(Adapted from xml-commons build script for the resolver.) -New file Version.src (in org.apache.xalan) is copied into Version.java -with version constants from build script plugged in. -Deprecated XSLProcessorVersion class can be removed. -

    • -
    • Committed by ilene@apache.org on 2003/06/06
      -Modified: xml-xalan/java build.xml
      Committer's log entry: -Generate values for Version information from constants in the build script. -(Adapted from xml-commons build script for the resolver.) -New file Version.src (in org.apache.xalan) is copied into Version.java -with version constants from build script plugged in. -Deprecated XSLProcessorVersion class can be removed. -Also, updated build clean target to delete Version.java, so it will -be regenerated in the next build. -

    • -
    • Committed by ilene@apache.org on 2003/06/07
      -Modified: xml-xalan/java/xdocs/sources/xalan faq.xml overview.xml whatsnew.xml xsltc_usage.xml
      -Committer's log entry: -Documentation patch to correct typos, contributed by Glen Mazza -(glenmazza@yahoo.com). -

    • -
    • Committed by ilene@apache.org on 2003/06/07
      -Modified: xml-xalan/java/xdocs/sources/xalan faq.xml getstarted.xml history.xml index.xml samples.xml trax.xml usagepatterns.xml
      -Committer's log entry: -Documentation update: Replaced all occurrences of TRaX with the properly -capitalized TrAX. -

    • -
    • Committed by minchau@apache.org on 2003/06/09
      -Modified: xml-xalan/java/src/org/apache/xml/serializer CharInfo.java
      -Committer's log entry: -Speed up CharInfo.isSpecial() by replacing its internal use of -java.util.BitSet with a more tuned bitset. -Also sped up the common case of this method for ASCII values (0-126) by -saving booleans in a cached array rather than looking them up via their -bits in the bitset. -Submitted by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/06/09
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      -Committer's log entry: -Speed up ToStream.characters(char[] , int, int) method by -caching commonly calculated boolean expression for characters in the range (0-126) -in an array in CharInfo. -Also move a whitespace check out of the loop that processes characters and into -a separate loop. Most of the time this whitspace checking loop will end early and -speed up the other loop which no longer checks for whitespace with every character. -Submitted by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/06/09
      -Modified: xml-xalan/java/src/org/apache/xml/serializer WriterToUTF8Buffered.java
      -Committer's log entry: -Performance improvement of WriterToUTF8Buffered.characters(char[],int,int); -1. Reduced the number of checks for buffer overflow from 2 to 1 - most of the time by nesting the checks. -2. Used local variables for the array reference and count of characters stored in - the buffer to make the loop faster. -3. Added an additional tight loop for better optimization. -Submitted by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/06/09
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java ToStream.java ToTextStream.java
      -Committer's log entry: -Changing firePseudoAttributes() to firePseudoElement() which -is for debugger tooling. Now both the whole start of the element-tag -e.g. <abc attr1="val1" attr2="val2" -will appear as output that might be written out, rather than -just the attributes. -Submitted by: Gordon Chiu -Reviewed by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/06/09
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToTextStream.java
      -Committer's log entry: -Change to use a local variable to hold the reference to m_writer (minor change for performance). -Submitted by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/06/09
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java ToStream.java ToXMLStream.java
      -Committer's log entry: -Changed references to m_writer to a local writer variable in -a number of places (a minor performance improvement). -Submitted by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/06/12
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      -Committer's log entry: -Made ToStream.characters(char[], int, int) not bail out early if -the length was 0 characters, but do all processing. This forces -the close of any open start tag. -Submitted by: Brian Minchau -

    • -
    • Committed by zongaro@apache.org on 2003/06/16
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      -Committer's log entry: -Patch from Igor Hersht for Bug 19770. getFirstAttributeIdentity should check -that argument is not equal to DTM.NULL prior to calling _type2 method - that -method assumes that the argument is not NULL. Added comments to that effect to -_type2, _parent2, _firstch2, _nextsib2 and _exptype2. -

    • -
    • Committed by grchiu@apache.org on 2003/06/16
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMAxisIteratorBase.java
      -Committer's log entry: -Fix for the general case of bugzilla 20685: -DTMAxisIteratorBase#cloneIterator() was not setting clones to be -non-restartable. -

    • -
    • Committed by grchiu@apache.org on 2003/06/17
      -Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java
      -Committer's log entry: -Patch contributed by Glen Mazza (glenmazza@yahoo.com): -Fixing a typo in the command line help. -

    • -
    • Committed by grchiu@apache.org on 2003/06/17
      -Modified: xml-xalan/java/xdocs/sources/xalan commandline.xml samples.xml trax.xml usagepatterns.xml
      -Committer's log entry: -Patch contributed by Glen Mazza (glenmazza@yahoo.com) for bugzilla 20625: -Fixing some documentation typos. -

    • -
    • Committed by grchiu@apache.org on 2003/06/18
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java ToStream.java ToTextStream.java ToUnknownStream.java
      -Committer's log entry: -Patch from myself and Brian Minchau (minchau@ca.ibm.com): -Added serializer trace mechanisms to flush trace pseudo characters for -start tag before attributes are added. Fixed serializer trace to generate -correct pseudo characters for html attributes. -

    • -
    • Committed by johng@apache.org on 2003/06/19
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql XConnection.java
      -Committer's log entry: -A little code clean up, introduce the SQLQueryParser to handle variables -better. - -Added code by Art Welsh to hande the Set/get Feature routine -

    • -
    • Committed by johng@apache.org on 2003/06/19
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql SQLQueryParser.java
      -Committer's log entry: -Added code by Art Welsh to hande the inline variable parser. -SQL Statements can describe an XSL variable name along with -its type inside the statement instead of using the addParameter methods. -

    • -
    • Committed by johng@apache.org on 2003/06/19
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql SQLErrorDocument.java
      -Committer's log entry: -Added code by Art Welsh to hande full errors, where multiple warning -stattments wll be output into the error document -

    • -
    • Committed by johng@apache.org on 2003/06/19
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql SQLDocument.java
      -Committer's log entry: -Added code by Art Welsh to hande multiple result sets and Callable statements. -

    • -
    • Committed by johng@apache.org on 2003/06/19
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql QueryParameter.java
      -Committer's log entry: -Added code by Art Welsh to handle more of the SQL Types, and other attributes -about the parameter. such as IsOutput and the Name for XSL Variable reference -

    • -
    • Committed by minchau@apache.org on 2003/06/23
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java ToSAXHandler.java ToTextStream.java -ElemContext.java SerializerBase.java ToHTMLSAXHandler.java ToStream.java ToXMLSAXHandler.java ToXMLStream.java
      -Committer's log entry: -Moved a number of serializer instance variables into ElemContext, -which is a stack to push/pop such values in unison. This makes -the code clearer and less error prone and probably marginally -(0.001%) faster. -Submitted by: Brian Minchau -

    • -
    • Committed by grchiu@apache.org on 2003/06/23
      -Modified: xml-xalan/java build.xml
      -Committer's log entry: -Fixing a build issue for JDKs that include XSLTC (specifically, the -JavaCupRedirect class) but not java_cup.jar. Need to put java_cup.jar -and runtime.jar on the bootclasspath. -

    • -
    • Committed by mkwan@apache.org on 2003/06/23
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java SimpleResultTreeImpl.java XSLTCDTMManager.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax XSLTCSource.java xml-xalan/java/src/org/apache/xml/dtm DTM.java -xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java DTMDefaultBaseIterators.java DTMDefaultBaseTraversers.java -DTMDocumentImpl.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java SAX2DTM2.java
      -Committer's log entry: -Implement a "DTM migration" feature, which allows a DTM that is built with -an old DTMManager to be migrated to a new DTMManager. This is to support -DTM sharing between multiple transformations. -

    • -
    • Committed by minchau@apache.org on 2003/06/23
      -Modified: xml-xalan/java/src/org/apache/xml/serializer CharInfo.java EmptySerializer.java ExtendedContentHandler.java -ToHTMLStream.java ToSAXHandler.java ToTextStream.java ToUnknownStream.java ToXMLStream.java
      -Committer's log entry: -Added addUniqueAttribute() method for optimization purposes. -The serializer may write out this attribute straight away with little processing becuase the caller guarantees -that the value has these qualities: -1) Value is unique, i.e. will not be changed by other addAttribute() calls. -2) Value is ASCII -3) Value does not contain quot (34) amp (38) lt (60) gt (62) - -Submitted by: Brian Minchau -Reviewed by: Morris Kwan -

    • -
    • Committed by mkwan@apache.org on 2003/06/25
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler LiteralAttribute.java LiteralElement.java Output.java -Stylesheet.java Text.java XslAttribute.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util MethodGenerator.java -xml-xalan/java/src/org/apache/xml/serializer ElemDesc.java
      -Committer's log entry: -Performance improvement for XSLTC - -Implement a compiler-assisted serialization feature. -Generate code to make use of the new -addUniqAttribute(String name, String value, int flags) -interface in SerializationHandler. The compiler does -more static analysis on attributes of literal elements -and passes the additional information to the serializer -via a bit-encoded flag. - -The additional information includes whether this attribute -is unique, whether its value has bad characters (something -needs to be escaped), whether it is a HTML URI or empty -attribute. If the attribute is unique, the serializer can -write out the attribute right away, without having to -accumulate it in an internal table. If it also does not -contain bad characters, then escaping is not needed. -All these information speeds up the serializer on writing -the attributes out. -

    • -
    • Committed by minchau@apache.org on 2003/06/25
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLSAXHandler.java ToHTMLStream.java ToSAXHandler.java -ToTextStream.java ToUnknownStream.java ToXMLSAXHandler.java ToXMLStream.java SerializerBase.java ToStream.java -ToTextSAXHandler.java
      -Committer's log entry: -Changed code like this: - -String s; ... -char[] array = s.toCharArray(); - -To this: -final int length = s.length(); -if (length > m_charsBuff.length) -{ - m_charsBuff = new char[length * 2 + 1]; -} -char[] array = m_charsBuff; -// re-use "array" but use "length" for the -// number of characters in the array. - -This shows a 2% performance improvement for some -XSLTC/HTML testcases. Of course some transformations -may do betterthan this, and some worse, but all should be -faster. - -The performance should also get marginally better for transformations that spend their -time writing out attributes. It runs marginally faster because -the helper character buffer, m_charsBuffer is re-used rather -than a new one being created each time. - -Submitted by: Brian Minchau -

    • -
    • Committed by mkwan@apache.org on 2003/06/25
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref ExpandedNameTable.java
      -Committer's log entry: -Fix for problem in ExpandedNameTable (bugzilla 21087). -

    • -
    • Committed by mkwan@apache.org on 2003/06/25
      -Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltStrings.java
      -Committer's log entry: -Fix problem in EXSLT align function (bugzilla 19890). -

    • -
    • Committed by minchau@apache.org on 2003/06/25
      -Modified: xml-xalan/java/src/org/apache/xml/utils Trie.java
      -Committer's log entry: -Sped up the Trie.get(String) method by about a factor of 2. -This was done by: -1) Not using string.charAt(i) when looping through the characters, - but rather using string.getChars(0, len, array, 0) and looping over the array. -2) Special casing the lookup in get(String key) for 0,1,2 or more characters -3) Putting the objects into the Trie considering the key as case insensitive at the - time of putting the objects in, rather than at the time of taking them out. -4) Not using a try/catch in the search loop to test if an - index is out of bounds, but testing if the character value is less than 128. -Thanks to Gordon Chiu for optimization 1) and Henry Zongaro for 3) and 4). -Submitted by: Brian Minchau -

    • -
    • Committed by grchiu@apache.org on 2003/06/25
      -Modified: xml-xalan/java/src/org/apache/xpath NodeSet.java
      -Committer's log entry: -Patch from John Lambe (john.lambe@openjawtech.com) for bugzilla 20819 -with some modifications. removeElement() and removeElementAt() were -not removing nodes correctly. -

    • -
    • Committed by grchiu@apache.org on 2003/06/26
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemIf.java
      -Committer's log entry: -Minor change to firing of trace events from xsl:if. - -xsl:for-each now fires one trace event plus one for every iteration. -xsl:if should fire one regardless of whether or not the expression -evaluates true or false. Related to discussion on bug 11414. -

    • -
    • Committed by zongaro@apache.org on 2003/06/28
      -Modified: xml-xalan/java/src/org/apache/xpath XPathContext.java xml-xalan/java/src/org/apache/xpath/functions FuncCurrent.java
      -Committer's log entry: -Applied Igor Hersht's (igorh@ca.ibm.com) patch for Bugzilla bug 10900. Fixed -up algorithm for determining the result of the current() function to avoid -NullPointerException. -

    • -
    • Committed by ilene@apache.org on 2003/07/02
      -Modified: xml-xalan/java/src MANIFEST.MF manifest.xsltc xml-xalan/java/xdocs/sources/xalan downloads.xml xml-xalan/java/bin -java_cup.jar runtime.jar
      -Committer's log entry: -Patch from Sarah McNamara (mcnamara@ca.ibm.com) -Moving java_cup.jar and runtime.jar from v0.10j to the latest version: v0.10k. -

    • -
    • Committed by grchiu@apache.org on 2003/07/02
      -Modified: xml-xalan/java/src/org/apache/xpath/axes UnionChildIterator.java
      -Committer's log entry: -Patch for bugzilla 20909. -Need to fix-up variables for PredicatedNodeTest sub-iterators in -UnionChildIterator. Variables in the m_nodeTests expressions were not -'fixed up'. -

    • -
    • Committed by grchiu@apache.org on 2003/07/02
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemApplyTemplates.java
      -Committer's log entry: -Adding missing trace events for xsl:with-param. Trace events for -xsl:with-param are fired as the parameter expressions are executed. -

    • -
    • Committed by grchiu@apache.org on 2003/07/03
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemCallTemplate.java
      -Committer's log entry: -Adding missing trace events for ElemWithParam as used in xsl:call-template. -Trace events for xsl:with-param are fired as the expression is executed. -

    • -
    • Committed by minchau@apache.org on 2003/07/07
      -Modified: xml-xalan/java/src/org/apache/xml/serializer NamespaceMappings.java ToHTMLStream.java ToStream.java -ToTextStream.java ToXMLSAXHandler.java
      -Committer's log entry: -Patches for bugzilla 20841 and 21039. -PR: 20841, 21039 -Submitted by: Brian Minchau -

    • -
    • Committed by zongaro@apache.org on 2003/07/07
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemElement.java
      -Committer's log entry: -Applying patch from David Bertoni (bertoni@us.ibm.com) for bug 20920. The code -for xsl:element was copying all accessible namespace declarations to the -result, but that's something that should only happen for literal result -elements. -

    • -
    • Committed by minchau@apache.org on 2003/07/08
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      -Committer's log entry: -Fix for bugzilla 21423 -PR: 21423 -Bug caused by an optimization where the element name was not -remembered if the HTML tag was empty and the endElement() call -was coming right away. But XSLTC injected startNamespaceAfterElement() -in the middle, and it needed the element name, So startElement() records the -element name in the ElemContext even though the context is soon going away. -Submitted by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/07/09
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java ToStream.java
      -Committer's log entry: -Reduce the indentation level of end-element tags by 1 level. -PR: bugzilla 21449 -Submitted by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/07/09
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java WriterToUTF8.java WriterToUTF8Buffered.java
      -Committer's log entry: -WriterToUTF8Buffered is now faster because it uses a character -array rather than a series of string.charAt(i) calls. Other changes -were also made to this class. - -Performance gains are when writing to an output stream that has UTF-8 encoding. -WriterToUTF8 (not buffered) is deleted. On analysis, its slow feature was that it -didn't buffer and so it suffered many calls to the underlying OutputStream. The more work that was done to -this class to speed it up, the more it looked like WriterToUTF8Buffered. -PR: bugzilla 21452 - -Submitted by: Brian Minchau -

    • -
    • Committed by mkwan@apache.org on 2003/07/10
      -Modified: xml-xalan/java/src/org/apache/xpath/compiler Compiler.java
      -Committer's log entry: -Fix for bugzilla 17630 (method keys for extension functions are not unique). -

    • -
    • Committed by minchau@apache.org on 2003/07/11
      -Modified: xml-xalan/java/src/org/apache/xml/serializer WriterToUTF8Buffered.java
      -Committer's log entry: -Fix to WriterToUTF8Buffered to ALWAYS buffer regardless of the -size of the input char array or String. This is achieved by logically cutting -the input into chunks, each of which will not blow the internal byte buffer, -and calling itself recursively. -PR: bugzilla 21491 -Submitted by: Brian Minchau -

    • -
    • Committed by johng@apache.org on 2003/07/15
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql SQLQueryParser.java
      -Committer's log entry: -Fixed NPE bug with inline variables -

    • -
    • Committed by grchiu@apache.org on 2003/07/17
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      -Committer's log entry: -Fix for bugzilla 21697: -processAttributes always called writeAttrString with m_writer, regardless -of which writer was passed to it. Now always using the passed writer. -

    • -
    • Committed by zongaro@apache.org on 2003/07/21
      -Modified: xml-xalan/java KEYS
      -Committer's log entry: -Adding my public key. -

    • -
    • Committed by zongaro@apache.org on 2003/07/22
      -Modified: xml-xalan/java/src/org/apache/xalan/templates FuncFormatNumb.java
      -Committer's log entry: -Applying patch from Igor Hersht (igorh@ca.ibm.com) for Bugzilla bug 6155. -Prior to looking up an unnamed decimal format, the FuncFormatNumb.execute -method was calling the stylesheet's getDecimalFormatCount method to save the -cost of the look-up, in the event the result was zero. The problem is that -that method only returns the number of decimal-formats prior to composition of -multiple stylesheets into a single stylesheet, so it was incorrectly returning -zero always. Now, the FuncFormatNumb.execute always performs the look-up. -

    • -
    • Committed by grchiu@apache.org on 2003/07/23
      -Modified: xml-xalan/java/src/org/apache/xpath/axes DescendantIterator.java
      -Committer's log entry: -Fix for bugzilla 21713: need to check m_allowDetach before detach()ing an -iterator of type DescendantIterator. (Thanks to Morris Kwan for reviewing -this patch.) -

    • -
    • Committed by ilene@apache.org on 2003/07/29
      -Modified: xml-xalan/java/src xml-commons-src.tar.gz xml-xalan/java/bin xml-apis.jar
      -Committer's log entry: -Updating with latest code from the tck-jaxp_1_2_0 branch of xml-commons - -which contains the SAX 2.0.1 code. -

    • -
    • Committed by zongaro@apache.org on 2003/08/01
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      -Committer's log entry: -Made a couple of improvements to startElement and endElement to cache -m_elemContext in a local variable. Also, replaced calls to ElemDesc.is with a -single call to ElemDesc.getFlags, and used inline code to check flag settings. - -Reviewed by Brian Minchau (minchau@ca.ibm.com). -

    • -
    • Committed by zongaro@apache.org on 2003/08/01
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ElemDesc.java
      -Committer's log entry: -Added a getFlags() method to allow all flags on an ElemDesc object to be -retrieved at once, rather than forcing multiple calls to ElemDesc.is(int). -Also, marked class final. - -Reviewed by Brian Minchau (minchau@ca.ibm.com). -

    • -
    • Committed by ilene@apache.org on 2003/08/05
      -Modified: xml-xalan/java/bin xml-apis.jar xml-xalan/java/src xml-commons-src.tar.gz
      -Committer's log entry: -Backing out SAX 2.0.1 xml-apis to the level used in XalanJ 2.5.1. -

    • -
    • Committed by igorh@apache.org on 2003/08/08
      -Modified: xml-xalan/java/src/org/apache/xml/utils SystemIDResolver.java
      -Committer's log entry: -Patch for Bugzilla Bug 21893 -

    • -
    • Committed by minchau@apache.org on 2003/08/12
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      -Committer's log entry: -PR: bugzilla 19591 -Submitted by: Gordon Chiu -Reviewed by: Brian Minchau - -Fixes a few methods in the ToStream serializer so that it outputs the DOCTYPE -sooner and in the correct location. Thanks to Bruno Dumon for the nice test case -and thanks to Gordon Chiu for the fix. -- Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/08/12
      -Modified: xml-xalan/java/src/org/apache/xml/serializer Utils.java
      -Committer's log entry: -PR: bugzilla 21309 -Submitted by: Brian Minchau - -Utils.classForName(String classname) still throws a ClassNotFoundException rather than -return null, but it doesn't cache the classname/null combination anymore if the classname -is not loaded. -

    • -
    • Committed by minchau@apache.org on 2003/08/13
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java ToStream.java ToTextStream.java
      -Committer's log entry: - -PR: bugzilla 18907 -Submitted by: Brian Minchau -Patch has just been applied to main branch of CVS. - -Now ToStream.writeUTF16Surrogate(char c, char ch[], int i, int end) -return nothing rather than the "i+1" that it had always returned, -which was a bit confusing. -This routine always processed 2 input characters and always returned "i+1" so why bother? - -There was no error in returning "i+1" because the situation in which this routine was called were always in a loop: -for (int i=start; i < end; i++) { ... } -so "i" was always incremented before going on to the next iteration. Any i++; after calling writeUTF16Surrogate() now -means that 2 input characters have been processed, so there is no bug here (never was). The code is just clearer now. -A bug has been fixed in ToStream.accumDefaultEscape() which used to mis-count how many input characters that it processed. -

    • -
    • Committed by minchau@apache.org on 2003/08/13
      -Modified: xml-xalan/java/src/org/apache/xml/serializer Encodings.properties
      -Committer's log entry: - - -PR: bugzilla 21300 - -Submitted by: Brian Minchau - -Reviewed by: Henry Zongaro - -The review was done via a discussion. Not too many requests are made to - -add encoding information to this property file. Doing one now and then is OK. - -A comment was added to the property file showing where to go to get information - -on ISO encodings. - - - -At this point a decision was made to NOT update the information en-mass, but wait for - -individual requests. -

    • -
    • Committed by ilene@apache.org on 2003/08/14
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java xml-xalan/java/src/org/apache/xml/serializer -CharInfo.java Encodings.java OutputPropertiesFactory.java SerializerFactory.java xml-xalan/java/src/org/apache/xpath/functions -FuncSystemProperty.java xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandler.java ExtensionHandlerGeneral.java -xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler -FunctionAvailableCall.java FunctionCall.java Parser.java xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java -NodeSortRecordFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax SmartTransformerFactoryImpl.java TemplatesImpl.java -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/lib Extensions.java xml-xalan/java/src/org/apache/xalan/lib/sql -DefaultConnectionPool.java xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java xml-xalan/java/src/org/apache/xalan/xslt -EnvironmentCheck.java Process.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ObjectType.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime TransletLoader.java xml-xalan/java/src/org/apache/xml/dtm DTMManager.java -FactoryFinder.java SecuritySupport.java SecuritySupport12.java xml-xalan/java/src/org/apache/xml/dtm/ref CoroutineParser.java -IncrementalSAXSource_Xerces.java xml-xalan/java/src/org/apache/xml/utils ObjectPool.java ObjectFactory.java SecuritySupport.java -SecuritySupport12.java xml-xalan/java/src/org/apache/xpath/compiler FuncLoader.java xml-xalan/java/src/org/apache/xml/utils - ObjectPool.java ObjectFactory.java SecuritySupport.java SecuritySupport12.java
      - Committer's log entry: -Applying Igor Malinin's (igor@widespace.ee) patch for more convenient (centralized) - -classloading. See bugzilla #16675. -

    • -
    • Committed by ilene@apache.org on 2003/08/14
      -Modified: xml-xalan/java/xdocs/sources/xalan overview.xml trax.xml
      -Committer's log entry: -A few minor doc updates. -

    • -
    • Committed by mkwan@apache.org on 2003/08/18
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerGeneral.java
      -Committer's log entry: -Fix a typepo in ExtensionHandlerGeneral.java. It should check for null -instead of nonnull. -

    • -
    • Committed by grchiu@apache.org on 2003/08/25
      -Modified: xml-xalan/java/src/org/apache/xalan/processor XSLTElementProcessor.java xml-xalan/java/src/org/apache/xalan/templates -Stylesheet.java
      -Committer's log entry: -Patch for bugzilla 12441. In forward-compatible mode, an unknown attribute -should be ignored. Currently Xalan throws an exception. - -Reviewed by Morris Kwan (mkwan@ca.ibm.com). -

    • -
    • Committed by zongaro@apache.org on 2003/08/26
      -Modified: xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java
      -Committer's log entry: -Removed static method which was reading XSLTInfo.properties file and setting -a system property for each property in the file. That code was not appropriate -in a secure environment, and wasn't actually needed. Three of the properties -were being set in support of the XSLT system-property function, but the -implementation of that function didn't actually access the values from the -system properties; the fourth was org.xml.sax.driver, which should be provided -by the user's application or by the parser in a -META-INF/services/org.xml.sax.driver file. - -Reviewed with Christine Li (jycli@ca.ibm.com). -

    • -
    • Committed by zongaro@apache.org on 2003/08/26
      -Modified: xml-xalan/java/src/org/apache/xalan/res XSLTInfo.properties
      -Committer's log entry: -Removed property for org.xml.sax.driver. This is something that should be -set by either the user's application code or by a -META-INF/service/org.xml.sax.driver supplied with an XML parser. Xalan -shouldn't be responsible for setting it. - -Reviewed with Christine Li (jycli@ca.ibm.com). -

    • -
    • Committed by zongaro@apache.org on 2003/08/26
      -Modified: xml-xalan/java/src/org/apache/xpath/functions FuncSystemProperty.java SecuritySupport.java SecuritySupport12.java
      -Committer's log entry: -Changed the way XSLTInfo.properties file was being read to use SecuritySupport -class instead. Added copies of SecuritySupport classes to this package as well. - -Reviewed with Christine Li (jycli@ca.ibm.com). -

    • -
    • Committed by zongaro@apache.org on 2003/08/26
      -Modified: xml-xalan/java/src/org/apache/xml/utils SecuritySupport.java SecuritySupport12.java
      -Committer's log entry: -Changed comments that referred to JAXP. Updated imports to avoid using -wildcards, which is a practice Xalan-J has largely eschewed. -

    • -
    • Committed by zongaro@apache.org on 2003/08/27
      -Modified: xml-xalan/java/src/org/apache/xalan/templates FuncDocument.java
      -Committer's log entry: -Applying patch for bug 19297 from Christine Li (jycli@ca.ibm.com). The -document() function must treat the second argument as a node-set; it should -not permit an argument of any other type. -

    • -
    • Committed by grchiu@apache.org on 2003/08/27
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerJavaClass.java ExtensionHandlerJavaPackage.java -xml-xalan/java/src/org/apache/xalan/templates ElemExtensionCall.java xml-xalan/java/src/org/apache/xalan/trace ExtensionEvent.java -TraceListenerEx3.java TraceManager.java
      Committer's log entry: -Implemented extensions trace mechanism for Java extension calls. -(http://marc.theaimsgroup.com/?l=xalan-dev&m=105715909512185&w=2) - -Added new interfaces to allow a trace listener to receive information about -extension functions and elements that are called or executed. - -Placed hooks in subclasses of ExtensionHandler prior to and after invoking -the resolved extension method. - -Adding missing trace event for ElemExtensionCall. -

    • -
    • Committed by grchiu@apache.org on 2003/08/28
      -Modified: xml-xalan/java build.xml
      Committer's log entry: -Patch from Sarah McNamara (mcnamara@ca.ibm.com). - -Removing JavaCupRedirect from the jar files. This class is only -needed at build time, and causes build problems when placed on the -bootclasspath (when bootclasspathing xalan.jar under JDK 1.4). - -See also (http://marc.theaimsgroup.com/?l=xalan-cvs&m=105637851030164&w=2) -

    • -
    • Committed by zongaro@apache.org on 2003/09/03
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerExsltFunction.java xml-xalan/java/src/org/apache/xalan/res -XSLTErrorResources.java
      -Committer's log entry: -Applied patch for bug 15090 from Joanne Tong (joannet@ca.ibm.com). Added code -to handle the case in which a referenced function is not found by reporting an -error. Previously, a NullPointerException was the result. -

    • -
    • Committed by igorh@apache.org on 2003/09/03
      -Modified: xml-xalan/java/src/org/apache/xml/utils SystemIDResolver.java
      -Committer's log entry: -Patch for Bugzilla Bug 22777 -

    • -
    • Committed by minchau@apache.org on 2003/09/03
      -Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java
      -Committer's log entry: -PR: bugzilla 21478 -Submitted by: Christine Li -Reviewed by: Brian Minchau - -Added message key ER_FUNCTION_NOT_SUPPORTED that -maps to message (in English) "Function not supported!" -so that an error message comes out rather than a crash. -

    • -
    • Committed by igorh@apache.org on 2003/09/06
      -Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      -Committer's log entry: -Patch for Bugzilla Bug 22808 -

    • -
    • Committed by zongaro@apache.org on 2003/09/09
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java ErrorMsg.java xml-xalan/java/xdocs/sources/xalan -commandline_xsltc.xml faq.xml xsltc_usage.xml
      -Committer's log entry: -Updated documentation to describe behaviour of XSLTC when the translet name -specified by the user contains characters that are not permitted as part of a -Java class name. - -Reviewed by Sarah McNamara (mcnamara@ca.ibm.com). -

    • -
    • Committed by mkwan@apache.org on 2003/09/11
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer SerializerSwitcher.java -xml-xalan/java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      -Committer's log entry: -Apply the patch from Richard Cao (richcao@ca.ibm.com) for bug 13082. -

    • -
    • Committed by grchiu@apache.org on 2003/09/11
      -Modified: xml-xalan/java/src/org/apache/xalan/trace PrintTraceListener.java
      -Committer's log entry: -Updating PrintTraceListener to print information about the recently -added ExtensionEvents. -

    • -
    • Committed by grchiu@apache.org on 2003/09/11
      -Modified: xml-xalan/java/samples/Trace Trace.java
      -Committer's log entry: -Update Trace sample to allow tracing of extension calls, as well as -optionally read the name of the stylesheet from the command line arguments. -

    • -
    • Committed by grchiu@apache.org on 2003/09/11
      -Modified: xml-xalan/java/xdocs/sources/xalan samples.xml usagepatterns.xml
      -Committer's log entry: -Documenting the addition of the ExtensionEvent trace event, as well as -the Trace sample changes. -

    • -
    • Committed by minchau@apache.org on 2003/09/18
      -Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorUnknown.java -xml-xalan/java/src/org/apache/xalan/templates ElemExtensionCall.java ElemFallback.java ElemUnknown.java
      -Committer's log entry: -PR: Bugzilla 23089 -Submitted by: Joanne Tong -Reviewed by: Brian Minchau - -A slight rework of Joanne's patch made by Brian and now commited to CVS. -Also just previosly commited was a testcase, extend06 created by Joanne (thank!). -

    • -
    • Committed by zongaro@apache.org on 2003/09/19
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      -Committer's log entry: -Applying patch from Joanne Tong (joannet@ca.ibm.com) for Bugzilla bug report -16311. After completing the relevant operations in applyTemplateToNode, the -method was popping various pieces of the context off of stacks. However, in -the case of the default template rule for text nodes, it was trying to pop -variables off the stack, even though no variables had been pushed onto the -stack. -

    • -
    • Committed by zongaro@apache.org on 2003/09/19
      -Modified: xml-xalan/java/src/org/apache/xpath/compiler XPathParser.java
      -Committer's log entry: -Applying patch from Joanne Tong (joannet@ca.ibm.com) for Bugzilla bug report -23200. The XPath syntax for a number is "Digits ('.' Digits?)? | '.' Digits". -The XPath parser accepted anything accepted by the Java double literal syntax, -including values using "E" exponential notation. The fix was to guard against -any value using exponential notation. -

    • -
    • Committed by minchau@apache.org on 2003/09/25
      -Modified: xml-xalan/java/xdocs/sources entities.ent xml-xalan/java/xdocs/sources/xalan downloads.xml faq.xml -history.xml index.xml resources.xml
      -Committer's log entry: -PR: bugzilla 23418 -Submitted by: Sarah McNamara -Reviewed by: Brian Minchau -Updates to java/xdocs so that new webpages point to Apache Mirrors for distribution. -

    • -
    • Committed by minchau@apache.org on 2003/10/05
      -Modified: xml-xalan/java/src/org/apache/xml/serializer CharInfo.java ToHTMLStream.java ToStream.java
      -Committer's log entry: -PR: bugzilla 22623 -Submitted by: Brian Minchau -Reviewed by: Henry Zongaro -Tabs in HTML attribute values are now output as charater references. -

    • -
    • Committed by minchau@apache.org on 2003/10/06
      -Modified: xml-xalan/java/src/org/apache/xalan/templates ElemExtensionCall.java ElemLiteralResult.java -xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java xml-xalan/java/src/org/apache/xml/serializer -EmptySerializer.java SerializationHandler.java ToHTMLSAXHandler.java ToSAXHandler.java ToStream.java ToTextStream.java -ToUnknownStream.java
      -Committer's log entry: -PR: bugzilla 21471 -Submitted by: Joanne Tong -Reviewed by: Brian Minchau -Stop some SAXExceptions from being quietly caught by the serializer. -

    • -
    • Committed by zongaro@apache.org on 2003/10/09
      -Modified: xml-xalan/java/src/org/apache/xml/serializer Encodings.java SecuritySupport.java SecuritySupport12.java
      -Committer's log entry: -Propagated SecuritySupport and SecuritySupport12 classes to serializer package. -Code in Encoding that uses Class.getResource should instead use -SecuritySupport.getResourceAsStream. - -Reviewed by Christine Li (jycli@ca.ibm.com) -

    • -
    • Committed by minchau@apache.org on 2003/10/15
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      -Committer's log entry: -PR: bugzilla 22422 -Submitted by: Brian Minchau -Reviewed by: Naeim Semsarilar (person reporting the problem) - -Get a system and public ID from the properties used to create a serializer -and used them to call appropriate methods on the ToXMLSAXHandler. -

    • -
    • Committed by mkwan@apache.org on 2003/10/15
      -Modified: xml-xalan/java/src/org/apache/xalan/processor XSLTAttributeDef.java xml-xalan/java/src/org/apache/xalan/templates -OutputProperties.java Stylesheet.java xml-xalan/java/src/org/apache/xalan/xslt EnvironmentCheck.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler AttributeValueTemplate.java xml-xalan/java/src/org/apache/xml/serializer -CharInfo.java xml-xalan/java/src/org/apache/xml/utils Hashtree2Node.java
      -Committer's log entry: -Fix for bugzilla 22342. -Rename variables with name "enum". In JDK 1.5, enum is a keyword. -

    • -
    • Committed by mkwan@apache.org on 2003/10/16
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ExpressionVisitor.java
      -Committer's log entry: -Apply the patch for bugzilla 14149 from Joanne Tong (joannet@ca.ibm.com). -

    • -
    • Committed by minchau@apache.org on 2003/10/16
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      -Committer's log entry: -PR: bugzilla 23113 -Submitted by: Brian Minchau -Reviewed by: Brian Minchau -The reset() in ToStream did not reset a few fields to the original values -that were obtained via " new ToStream() ". The applied patch fixes that. -

    • -
    • Committed by minchau@apache.org on 2003/10/16
      -Modified: xml-xalan/java/src/org/apache/xalan/templates OutputProperties.java
      -Committer's log entry: -PR: bugzilla 890 -Submitted by: Richard Cao -Reviewed by: Brian Minchau -Make sure a non standard property has a key with only one '{' and only one '}' -and that the '{' is first thing in the key. -

    • -
    • Committed by zongaro@apache.org on 2003/10/16
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java
      -Committer's log entry: -Patch from Christine Li (jycli@ca.ibm.com) for Bugzilla bug report 22880. - -When input comes from DOMSource, a TreeWalker object walks the DOM input and -fires events to the ContentHandler for the result object, unless the DOM -consists of only an Attribute node. In the case of an Attribute, the TreeWalker -is not utilized, and just the character data is copied to the result. - -As part of the traversal of the DOM, the TreeWalker always fires startDocument -and endDocument events. The code in the transform(Source,Result) method was -redundantly firing those same events if the Node specified by the DOMSource -was not a Document node. Instead, that should be left to the TreeWalker. The -startDocument and endDocument events should only be fired in the transform -method itself to complete the entirely local processing of Attribute nodes. -

    • -
    • Committed by igorh@apache.org on 2003/10/16
      -Modified: xml-xalan/java/src/org/apache/xpath XPathContext.java
      -Committer's log entry: -Patch for Bugzilla Bug 7408. Submitrd by Richard Cao. -

    • -
    • Committed by igorh@apache.org on 2003/10/16
      -Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorDecimalFormat.java xml-xalan/java/src/org/apache/xalan/templates DecimalFormatProperties.java KeyDeclaration.java
      -Committer's log entry: -Patch for Bugzilla Bug 5972. Submitrd by Richard Cao. -

    • -
    • Committed by igorh@apache.org on 2003/10/16
      -Modified: xml-xalan/java/src/org/apache/xalan/processor XSLTAttributeDef.java XSLTSchema.java
      -Committer's log entry: -Patch for Bugzilla Bug 788. Submitted by Richard Cao. -

    • -
    • Committed by minchau@apache.org on 2003/10/16
      -Modified: xml-xalan/java KEYS
      Committer's log entry: -Added the public key of "Brian James Minchau" to the xml-xalan/java/KEYS file. -

    • -
    • Committed by minchau@apache.org on 2003/10/16
      -Modified: xml-xalan/java/src/org/apache/xalan/xslt Process.java
      -Committer's log entry: -PR: bugzilla 16512 -Submitted by: Richard Cao -Reviewed by: Brian Minchau -This bug has existed since the earth cooled (Mid 2000). -Clearly 3 of 4 lines were commented out -// if (x) -// diagnositcsWriter.print(...)/ -// else - diagnosticsWriter.print(...); -And it was printing a message that we were done, not in the spirit of quiet -success. Richard Cao's patch is applied, the fourth line is now commented out as well. -

    • -
    • Committed by igorh@apache.org on 2003/10/16
      -Modified: xml-xalan/java/src/org/apache/xalan/templates TemplateList.java
      -Committer's log entry: -Patch for Bugzilla Bug 789. Submitted by Richard Cao. -

    • -
    • Committed by zongaro@apache.org on 2003/10/17
      -Modified: xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java
      -Committer's log entry: -Patch from Richard Cao (richcao@ca.ibm.com) for Bugzilla bug 15700. -Added additional check to prevent unrecognised elements from the XSLT namespace -(or even recognized elements, other than xsl:stylesheet and xsl:transform) -from appearing as the outermost element in a stylesheet. -

    • -
    • Committed by minchau@apache.org on 2003/10/17
      -Modified: xml-xalan/java/bin xalan2jdoc.jar xalan2jtaglet.jar -xml-xalan/java build.xml xml-xalan/java/src/org/apache/xalan/templates AVT.java -AVTPart.java Constants.java ElemApplyImport.java ElemApplyTemplates.java ElemAttribute.java -ElemAttributeSet.java ElemCallTemplate.java ElemComment.java ElemCopy.java ElemCopyOf.java -ElemElement.java ElemExtensionCall.java ElemExtensionScript.java ElemFallback.java -ElemForEach.java ElemIf.java ElemLiteralResult.java ElemParam.java ElemSort.java -ElemTemplateElement.java ElemText.java ElemWhen.java ElemWithParam.java FuncDocument.java -KeyDeclaration.java StylesheetRoot.java AVTPartSimple.java AVTPartXPath.java -DecimalFormatProperties.java ElemChoose.java ElemEmpty.java ElemExsltFunction.java -ElemExtensionDecl.java ElemMessage.java ElemNumber.java ElemOtherwise.java ElemPI.java -ElemTemplate.java ElemTextLiteral.java ElemUnknown.java ElemUse.java ElemValueOf.java -ElemVariable.java FuncFormatNumb.java FuncKey.java TemplateList.java -xml-xalan/java/src/org/apache/xml/dtm/ref CoroutineManager.java DTMDefaultBase.java -DTMDocumentImpl.java DTMNamedNodeMap.java DTMNodeProxy.java DTMTreeWalker.java -xml-xalan/java/src/org/apache/xpath/axes AttributeIterator.java ChildIterator.java -ChildTestIterator.java LocPathIterator.java OneStepIteratorForward.java WalkingIterator.java -ContextNodeList.java DescendantIterator.java IteratorPool.java OneStepIterator.java -RTFIterator.java SelfIteratorNoPredicate.java SubContextList.java UnionPathIterator.java -WalkerFactory.java WalkingIteratorSorted.java xml-xalan/java/src/org/apache/xalan/res -XSLMessages.java XSLTErrorResources_en.java xml-xalan/java/src/org/apache/xalan/transformer -ClonerToResultTree.java Counter.java CountersTable.java DecimalToRoman.java KeyIterator.java -KeyRefIterator.java KeyTable.java MsgMgr.java NodeSorter.java NodeSortKey.java -NumeratorFormatter.java ResultNameSpace.java TransformerImpl.java TreeWalker2Result.java -XSLInfiniteLoopException.java xml-xalan/java/src/org/apache/xpath/axes AttributeIterator.java -ChildIterator.java ChildTestIterator.java LocPathIterator.java OneStepIteratorForward.java -WalkingIterator.java ContextNodeList.java DescendantIterator.java IteratorPool.java -OneStepIterator.java RTFIterator.java SelfIteratorNoPredicate.java SubContextList.java -UnionPathIterator.java WalkerFactory.java WalkingIteratorSorted.java -xml-xalan/java/src/org/apache/xalan/lib ExsltCommon.java ExsltDatetime.java ExsltDynamic.java -ExsltMath.java ExsltSets.java ExsltStrings.java Extensions.java -xml-xalan/java/src/org/apache/xpath Arg.java Expression.java FoundIndex.java NodeSet.java -NodeSetDTM.java SourceTree.java VariableStack.java XPath.java XPathContext.java -XPathException.java XPathFactory.java XPathProcessorException.java -xml-xalan/java/src/org/apache/xalan/trace EndSelectionEvent.java GenerateEvent.java -PrintTraceListener.java SelectionEvent.java TraceListener.java TraceListenerEx.java -TraceListenerEx2.java TraceListenerEx3.java TracerEvent.java -xml-xalan/java/src/org/apache/xpath/functions FuncBoolean.java FuncCeiling.java -FuncConcat.java FuncContains.java FuncCount.java FuncCurrent.java FuncDoclocation.java -FuncExtElementAvailable.java FuncExtFunction.java FuncExtFunctionAvailable.java -FuncFalse.java FuncFloor.java FuncGenerateId.java FuncId.java FuncLang.java FuncLast.java -FuncLocalPart.java FuncNamespace.java FuncNormalizeSpace.java FuncNot.java FuncNumber.java -FuncPosition.java FuncQname.java FuncRound.java FuncStartsWith.java FuncString.java -FuncStringLength.java FuncSubstring.java FuncSubstringAfter.java FuncSubstringBefore.java -FuncSum.java FuncSystemProperty.java Function.java Function2Args.java Function3Args.java -FunctionDef1Arg.java FunctionMultiArgs.java FunctionOneArg.java FuncTranslate.java -FuncTrue.java FuncUnparsedEntityURI.java WrongNumberArgsException.java -xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources_ca.java -XPATHErrorResources_cs.java XPATHErrorResources_de.java XPATHErrorResources_en.java -XPATHErrorResources_fr.java XPATHErrorResources_hu.java XPATHErrorResources_it.java -XPATHErrorResources_ja.java XPATHErrorResources_ko.java XPATHErrorResources_pl.java -XPATHErrorResources_pt_BR.java XPATHErrorResources_sk.java XPATHErrorResources_sv.java -XPATHErrorResources_zh_TW.java XPATHMessages.java XPATHErrorResources_es.java -XPATHErrorResources_ru.java XPATHErrorResources_tr.java XPATHErrorResources_zh_CN.java -XPATHErrorResources.java xml-xalan/java/src/org/apache/xml/utils AttList.java -BoolStack.java CharKey.java Constants.java DefaultErrorHandler.java DOM2Helper.java -DOMBuilder.java DOMHelper.java ElemDesc.java Hashtree2Node.java IntStack.java IntVector.java -ListingErrorHandler.java MutableAttrListImpl.java NameSpace.java NodeVector.java NSInfo.java -ObjectPool.java ObjectStack.java ObjectVector.java PrefixResolver.java -PrefixResolverDefault.java QName.java RawCharacterHandler.java StringBufferPool.java -StringToIntTable.java StringToStringTable.java StringToStringTableVector.java -StringVector.java SuballocatedByteVector.java SuballocatedIntVector.java SystemIDResolver.java -TreeWalker.java Trie.java UnImplNode.java WrongParserException.java -XMLCharacterRecognizer.java xml-xalan/java/src/org/apache/xpath/res -XPATHErrorResources_ca.java XPATHErrorResources_cs.java XPATHErrorResources_de.java -XPATHErrorResources_en.java XPATHErrorResources_fr.java XPATHErrorResources_hu.java -XPATHErrorResources_it.java XPATHErrorResources_ja.java XPATHErrorResources_ko.java -XPATHErrorResources_pl.java XPATHErrorResources_pt_BR.java XPATHErrorResources_sk.java -XPATHErrorResources_sv.java XPATHErrorResources_zh_TW.java XPATHMessages.java -XPATHErrorResources_es.java XPATHErrorResources_ru.java XPATHErrorResources_tr.java -XPATHErrorResources_zh_CN.java XPATHErrorResources.java -xml-xalan/java/src/org/apache/xpath/patterns FunctionPattern.java NodeTest.java -StepPattern.java UnionPattern.java xml-xalan/java/src/org/apache/xml/res -XMLErrorResources_en.java XMLMessages.java xml-xalan/java/src/org/apache/xml/utils/res -XResourceBundle.java XResourceBundleBase.java XResources_cy.java XResources_de.java -XResources_el.java XResources_en.java XResources_es.java XResources_fr.java XResources_he.java -XResources_hy.java XResources_it.java XResources_ja_JP_A.java XResources_ja_JP_HA.java -XResources_ja_JP_HI.java XResources_ja_JP_I.java XResources_ka.java XResources_ko.java -XResources_sv.java XResources_zh_CN.java XResources_zh_TW.java -xml-xalan/java/src/org/apache/xpath/domapi XPathEvaluatorImpl.java XPathExpressionImpl.java -XPathNamespaceImpl.java XPathNSResolverImpl.java XPathResultImpl.java -xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandler.java -ExtensionHandlerGeneral.java ExtensionHandlerJava.java ExtensionHandlerJavaClass.java -ExtensionHandlerJavaPackage.java ExtensionsTable.java XSLProcessorContext.java -xml-xalan/java/src/org/apache/xalan/serialize SerializerUtils.java -xml-xalan/java/src/org/apache/xml/utils/synthetic/reflection Constructor.java -EntryPoint.java Field.java Member.java Method.java xml-xalan/java/src/org/apache/xpath/objects -XBoolean.java XBooleanStatic.java XMLStringFactoryImpl.java XNodeSet.java XNull.java -XNumber.java XObject.java XRTreeFrag.java XString.java -xml-xalan/java/src/org/apache/xalan/processor ProcessorDecimalFormat.java -ProcessorExsltFuncResult.java ProcessorExsltFunction.java ProcessorLRE.java -ProcessorStylesheetDoc.java ProcessorUnknown.java StopParseException.java -StylesheetHandler.java XSLProcessorVersion.java xml-xalan/java/src/org/apache/xpath/compiler -Compiler.java FuncLoader.java Keywords.java OpCodes.java OpMapVector.java XPathParser.java -xml-xalan/java/src/org/apache/xpath/operations Variable.java -xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/client -XSLTProcessorApplet.java xml-xalan/java/src/org/apache/xalan/xslt Process.java -xml-xalan/java/src/org/apache/xml/dtm DTM.java DTMDOMException.java -xml-xalan/java/src/org/apache/xml/utils/synthetic Class.java JavaUtils.java -SynthesisException.java TestDriver.java
      -Committer's log entry: -PR: bugzilla 20572 (javadoc generation failing under JDK 1.4) -Submitted by: Richard Cao -Reviewed by: Brian Minchau -Did a further review and tested javadoc generation under JDK 1.4.1 and under 1.2.2 -

    • -
    • Committed by zongaro@apache.org on 2003/10/20
      -Modified: xml-xalan/java/src/org/apache/xalan/client XSLTProcessorApplet.java
      -Committer's log entry: -Patch from Christine Li (jycli@ca.ibm.com) for Bugzilla bug report 19823. -Added code to use a Hashtable to keep track of parameters set for an applet. -The old implementation allowed just one parameter to be specified for the -transformation. -

    • -
    • Committed by minchau@apache.org on 2003/10/21
      -Modified: xml-xalan/java build.xml
      -Committer's log entry: -PR: bugzilla 20572 -Submitted by: Richard Cao -Reviewed by: Brian Minchau -Richard added extra -breakiterator option when building javadoc for SDK 1.4 or higher -to get rid of warning messaes when doing the build. -This is a compatibility option. -

    • -
    • Committed by minchau@apache.org on 2003/10/21
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToSAXHandler.java -ToXMLSAXHandler.java
      -Committer's log entry: -PR: bugzilla 23812 -Submitted by: Brian Minchau -Reviewed by: Henry Zongaro -Fixes incorrect handling of CDATA by a ToXMLSAXHandler. -The CDATA was defined by calls to the LexicalHandler methods: -startCDATA() -endCDATA() -Henry would rather have a new flushPending() method which does not -flush a generated endCDATA() call, but I copied the contents of flushPending() -to the top of ToXMLSAXHandler.character(char[] chars, int off, int len) -anyways. I didn't want to put a new flushPending() method on a SerializationHandler -interface. I'm not completely happy with either choice so I left it as-was - bjm -

    • -
    • Committed by minchau@apache.org on 2003/10/21
      -Modified: xml-xalan/java/src/org/apache/xml/serializer ToSAXHandler.java -ToXMLSAXHandler.java -xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      -Committer's log entry: -PR: bugzilla 7205 -Submitted by: Richard Cao -Reviewed by: Brian Minchau/Henry Zongaro -Do NOT have ToXMLSAXHandler always mirror namespaces given via -startPrefixMapping("prefix1", "uri1") - as attribute values of the form xmlns:prefix1="uri1" -

    • -
    • Committed by minchau@apache.org on 2003/10/22
      -Modified: xml-xalan/java/src/org/apache/xalan/extensions ExpressionVisitor.java -xml-xalan/java/src/org/apache/xalan/lib PipeDocument.java ExsltCommon.java -ExsltDatetime.java xml-xalan/java/src/org/apache/xalan/lib/sql ConnectionPool.java -ConnectionPoolManager.java DefaultConnectionPool.java DTMDocument.java ObjectArray.java -PooledConnection.java QueryParameter.java XConnection.java -xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java -xml-xalan/java/src/org/apache/xalan/templates ElemExsltFuncResult.java -ElemTemplateElement.java FuncDocument.java OutputProperties.java -xml-xalan/java/src/org/apache/xml/serializer AttributesImplSerializer.java -EmptySerializer.java NamespaceMappings.java ToHTMLSAXHandler.java ToHTMLStream.java -ToStream.java ToTextSAXHandler.java ToUnknownStream.java ToXMLSAXHandler.java -ToXMLStream.java
      Committer's log entry: -PR: bugzilla 23983 -Submitted by: Brian Minchau -javadoc cleanup -

    • -
    • Committed by minchau@apache.org on 2003/10/22
      -Modified: xml-xalan/java/src/org/apache/xpath/axes AttributeIterator.java -ChildIterator.java -ChildTestIterator.java DescendantIterator.java LocPathIterator.java NodeSequence.java -OneStepIterator.java OneStepIteratorForward.java SelfIteratorNoPredicate.java -UnionPathIterator.java WalkingIterator.java -xml-xalan/java/src/org/apache/xalan/transformer package.html TransformerIdentityImpl.java -TransformerImpl.java XalanProperties.java XalanTransformState.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java -xml-xalan/java/src/org/apache/xml/dtm/ref DTMManagerDefault.java DTMNodeIterator.java -DTMNodeProxy.java
      Committer's log entry: -PR: bugzilla 23983 -Submitted by: Brian Minchau -javadoc cleanup -

    • -
    • Committed by minchau@apache.org on 2003/10/22
      -Modified: xml-xalan/java/src/org/apache/xml/serializer SerializerFactory.java
      -Committer's log entry: -Fix to make SerializerFactory return a serializer even if the only -property specified is method="xml" -PR: bugzilla 22025 -Submitted by: Brian Minchau -Reviewed by: John Meyer (bug originator) -

    • -
    • Committed by minchau@apache.org on 2003/10/23
      -Modified: java/src/org/apache/xml/serializer Encodings.properties ToTextStream.java -java/src/org/apache/xml/res XMLErrorResources.java
      -Committer's log entry: -patch to emit emit error message for method="text" when output character not valid in the -output encoding. -PR: bug 795 -Submitted by: Richard Cao -Reviewed by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/10/23
      -Modified: java/src/org/apache/xalan/templates ElemLiteralResult.java -ElemUse.java
      -Committer's log entry: -Error message for testcase attribseterr07 -PR: bug 782 -Submitted by: Richard Cao -Reviewed by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/10/23
      -Modified: java/src/org/apache/xml/serializer CharInfo.java -ToHTMLStream.java ToXMLStream.java ToStream.java
      -Committer's log entry: -PR: bug 24025 -Submitted by: Brian Minchau -Reviewed by: Henry Zongaro -

    • -
    • Committed by minchau@apache.org on 2003/10/23
      -Modified: java/src/org/apache/xml/utils QName.java -java/src/org/apache/xml/res XMLErrorResources.java
      -Committer's log entry: -Shouldn't be able to call a template with no prefix: -PR: bug 3415 -Submitted by: Richard Cao -Reviewed by: Brian Minchau -

    • -
    • Committed by minchau@apache.org on 2003/10/23
      -Modified: ava/src/org/apache/xalan/lib PipeDocument.java
      -Committer's log entry: -PipeDocument was not calling out.close() when done with the -FileOutputStream "out". -PR: bug 24013 -Submitted by: Pierre Chardin (bug reporter) -Reviewed by: Brian Minchau -

    • -
    -
    - -

    Core (Non-XSLTC) source code updates:

    -
    • Committed by ilene@apache.org on 2003/04/10
      Modified: xml-xalan/java/src/org/apache/xalan/xslt EnvironmentCheck.java xml-xalan/java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: -Applying Sarah McNamara's (mcnamara@ca.ibm.com) patches to update -version numbers in XalanJ. -

    • Committed by ilene@apache.org on 2003/04/10
      Modified: xml-xalan/java/xdocs/sources/xalan commandline_xsltc.xml commandline.xml history.xml index.xml readme.xml resources.xml samples.xml whatsnew.xml xsltc_history.xml xsltc_usage.xml xml-xalan/java/xdocs/sources entities.ent xalan-jlocal.xml xalan-jsite.xml xml-xalan/java commits.xml build.xml xml-xalan/java/xdocs/style/stylesheets done.xsl xml-xalan/java/xdocs xml-site-style.tar.gz
      Committer's log entry: -Sarah McNamara's (mcnamara@ca.ibm.co) documentation patch. -

    • Committed by zongaro@apache.org on 2003/04/10
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java
      Committer's log entry: -Added comments before a couple of messages to assist translators, and fixed a typo in the class name mentioned in a message. -

    • -
    • Committed by zongaro@apache.org on 2003/04/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java xml-xalan/java/src/org/apache/xml/dtm/ref DTMAxisIteratorBase.java EmptyIterator.java
      Committer's log entry: -Applying patches from Igor Hersht (igorh@ca.ibm.com) for bug 15200 and -bug 18585. - -Pulled EmptyIterator class out of SAXImpl to allow for more widespread use. -

    • Committed by ilene@apache.org on 2003/04/23
      Modified: xml-xalan/java/xdocs/sources/xalan faq.xml
      Committer's log entry: -New FAQ from Christine Li (jycli@ca.ibm.com) for using Xalan in Tomcat -with JDK 1.4. -

    • Committed by sboag@apache.org on 2003/04/23
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
      Committer's log entry: -Fix for array out of bounds exception in findNamespaceContext, where the index was allowed to go to -1. This is a blind fix, and someone who knows the code better should take a look to see what they think. -

    • Committed by sboag@apache.org on 2003/04/23
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemCallTemplate.java
      Committer's log entry: -Made it a static error in compose(...) if a reference is made to a non-existent template. Note this might cause some existing stylesheets to not work, since the error would never have been flagged if the code was not run. Note the old code was marked for %REVIEW%, so I don't think this was ever resolved. I think it's clear that this should be a static error. -

    • Committed by minchau@apache.org on 2003/04/24
      Modified: xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java
      Committer's log entry: -Change in comments only. Deleted old commented out (and incorrect) -double-checked locking code. -

    • Committed by ilene@apache.org on 2003/04/24
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemElement.java
      Committer's log entry: -Duplicate trace was event being issued. One from ElemElement and then -from its parent class: ElemUse. -

    • Committed by zongaro@apache.org on 2003/04/24
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.properties
      Committer's log entry: -Dropping properties files that contain English messages. -xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.properties has been -replaced by xml-xalan/java/src/org/apache/xalan/res/XSLTErrorResources.java. -

    • Committed by zongaro@apache.org on 2003/04/24
      Modified: xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.properties
      Committer's log entry: -Dropping properties files that contain English messages. -xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.properties has been -replaced by xml-xalan/java/src/org/apache/xpath/res/XPATHErrorResources.java. -

    • Committed by minchau@apache.org on 2003/04/30
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltStrings.java Extensions.java xml-xalan/java/src/org/apache/xml/serializer CharInfo.java
      Committer's log entry: -Changed incorrect double-check locking code with an inner class -with a static field. Synchronization is covered by the class loader. -Loading happens when first referenced. A cool, efficient, safe -way to lazy load a static field. - -PR: bugzilla 19029 -Obtained from: Henry Zongaro -Submitted by: Brian Minchau -Reviewed by: Henry Zongaro -

    • Committed by minchau@apache.org on 2003/05/01
      Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java ToStream.java ToXMLSAXHandler.java
      Committer's log entry: -Cleared two helper fields, m_elementURI and m_elementLocalName in endElement() -Both of these fields are out of scope after the element is ended -so it is correct to null them out at endElement() - -PR: bugzilla 19388 -Obtained from: bruno@outerthought.org (Bruno Dumon) and Brian Minchau -Submitted by: bruno@outerthought.org (Bruno Dumon) -Reviewed by: Brian Minchau -

    • Committed by minchau@apache.org on 2003/05/03
      Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      Committer's log entry: -endDTD() for ToHTMLStream now does nothing. It used to incorrectly -write out some closing characters, but that was already hanled in startDocumentIntermal() - -PR: 19587 -Submitted by: bruno@outerthought.org (Bruno Dumon) -Reviewed by: Brian Minchau -

    • Committed by minchau@apache.org on 2003/05/06
      Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      Committer's log entry: -Performance fix for double buffering. Don't use WriterToUTF8Buffered if the -writer class is "BufferedServletOutputStream". - -PR: bugzilla 19474 -Submitted by: Brian Minchau -Reviewed by: Ilene Seelemann -

    • Committed by minchau@apache.org on 2003/05/06
      Modified: xml-xalan/java/src/org/apache/xml/serializer SerializerBase.java
      Committer's log entry: -Fix for flushing occuring in trace code even when tracing is not being done. - -PR: bugzilla 19471 -Submitted by: Brian Minchau -Reviewed by: Ilene Seelemann -

    • Committed by zongaro@apache.org on 2003/05/07
      Modified: xml-xalan/java/xdocs/sources/xalan usagepatterns.xml
      Committer's log entry: -Serializer properties files have moved to the new org.apache.xml.serializer -package. Corrected part of documentation that didn't yet reflect that. -

    • -
    • Committed by minchau@apache.org on 2003/05/09
      Modified: xml-xalan/java/src/org/apache/xml/serializer SerializerBase.java ToHTMLSAXHandler.java ToHTMLStream.java ToSAXHandler.java ToStream.java ToTextSAXHandler.java ToTextStream.java ToXMLSAXHandler.java ToXMLStream.java
      Committer's log entry: -Guarded the fireXXX(); calls to trace events with if (m_tracer != null), -strictly for performance reasons. This should run faster than making the call and then checking. -

    • Committed by zongaro@apache.org on 2003/05/09
      Modified: xml-xalan/java/xdocs/sources/xalan faq.xml
      Committer's log entry: -Title of FAQ for Xerces version read, "Which version of Xerces-J 2.4.0 should I -use?" answering it's own question. Fixed that to make for a more suspenseful -read. -

    • Committed by grchiu@apache.org on 2003/05/13
      Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorTemplateElem.java xml-xalan/java/src/org/apache/xalan/templates ElemAttributeSet.java ElemElement.java ElemLiteralResult.java ElemTemplateElement.java ElemUse.java
      Committer's log entry: -Some Trace-related fixes: Two trace events were being fired for ElemCopy, -and for templates elements derived from ElemUse the trace end event was -being fired before child templates were executed. Also saved locator -information for the end tag of stylesheet elements. -

    • Committed by minchau@apache.org on 2003/05/13
      Modified: xml-xalan/java/src/org/apache/xml/serializer SerializerBase.java ToHTMLStream.java ToStream.java ToXMLSAXHandler.java
      Committer's log entry: -See bugzilla # 19900 for a laundry list of small performance -enhancements. - -PR: bugzilla 19900 -Submitted by: Brian Minchau -Reviewed by: Henry Zongaro -

    • Committed by minchau@apache.org on 2003/05/15
      Modified: xml-xalan/java/src/org/apache/xml/serializer Encodings.java OutputPropertiesFactory.java SerializerFactory.java Utils.java
      Committer's log entry: -Performance enhancement. Cache the loading of classes via Class.forName(classname) - in the serializer. The same class is otherwise loaded over and over with each request -to a server, e.g. in a servlet. -PR: bugzilla # 19960 -Submitted by: Brian Minchau -Reviewed by: Morris Kwan -

    • Committed by grchiu@apache.org on 2003/05/20
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemExsltFuncResult.java
      Committer's log entry: -Adding missing trace events for the func:result element. -

    • Committed by minchau@apache.org on 2003/05/21
      Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLStream.java
      Committer's log entry: -The HTML serializer should do nothing with the methods on the -DeclHandler interface, so they are now defined with empty -bodies. Also the comment() method does nothing when in a -DTD. -PR: bugzilla 19640 -Submitted by: Bruno Dumon (bruno@outerthought.org) -Reviewed by: Brian Minchau -

    • Committed by zongaro@apache.org on 2003/05/22
      Modified: xml-xalan/java/xdocs/sources/xalan faq.xml
      Committer's log entry: -Added a new FAQ to describe a situation some users have encountered of late -using XSLTC with JDK 1.4. -Contributed by Christine Li (jycli@ca.ibm.com) with some editorial input from -myself. -

    • Committed by mkwan@apache.org on 2003/05/26
      Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionNamespacesManager.java
      Committer's log entry: -Fix a compatibility problem when using the old "http://xml.apache.org/xslt" -namespace with extension functions in org.apache.xalan.xslt.Extensions. -

    • Committed by ilene@apache.org on 2003/05/26
      Modified: xml-xalan/java build.xml xml-xalan/java/xdocs/sources/xalan builds.xml downloads.xml resources.xml xml-xalan/java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: -Patch from Sarah McNamara (mcnamara@ca.ibm.com) which improves documentation -about packaging and adds support for building and testing an alternate -binary distribution which provides xalan-interpretive and xsltc in separate jars. -

    • Committed by minchau@apache.org on 2003/05/26
      Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: -One line fix to get a lexical handler, was casting the wrong reference. -PR: bugzilla 20237 -Submitted by: Bernard D'Have (bdhaveos@wanadoo.be) -Reviewed by: Brian Minchau -

    • Committed by ilene@apache.org on 2003/05/27
      Modified: xml-xalan/java/samples/extensions/sql/basic-connection dbinfo.xml dbtest.xsl
      Committer's log entry: -Update to the SQL extension sample from Christine Li (jycli@ca.ibm.com). -

    • Committed by zongaro@apache.org on 2003/05/27
      Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: -Applying Christine Li's (jycli@ca.ibm.com) fix for bug 19522. When a -SerializationHandler object is created for Xalan-J Interpretive, it needs to -be informed which Transformer object is associated with the serialization. -

    • Committed by minchau@apache.org on 2003/05/27
      Modified: xml-xalan/java/src/org/apache/xml/serializer AttributesImplSerializer.java
      Committer's log entry: -AttributesImplSerializer now uses the older (faster) org.xml.sax.helpers.AttributesImpl -up until about 12 attributes and switches over to using a Hashtable for faster lookup -of attributes, avoiding an order N*N performance problem for large -number of attributes, but faster for lower number of attributes. -PR: bugzilla 20273 -Submitted by: Brian Minchau -Reviewed by: Henry Zongaro -

    • Committed by ilene@apache.org on 2003/05/27
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemExsltFunction.java xml-xalan/java/src/org/apache/xpath VariableStack.java
      Committer's log entry: -Patch from Christine Li (jycli@ca.ibm.com) for bugzilla #18926. - -Variables weren't being cleared from stack between calls to func:function. -

    • -
    • Committed by mkwan@apache.org on 2003/05/28
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources_ca.java XSLTErrorResources_cs.java XSLTErrorResources_de.java XSLTErrorResources_es.java XSLTErrorResources_fr.java XSLTErrorResources_hu.java XSLTErrorResources_it.java XSLTErrorResources_ja.java XSLTErrorResources_ko.java XSLTErrorResources_pl.java XSLTErrorResources_pt_BR.java XSLTErrorResources_ru.java XSLTErrorResources_sk.java XSLTErrorResources_tr.java XSLTErrorResources_zh_CN.java XSLTErrorResources_zh_TW.java xml-xalan/java/src/org/apache/xalan/xslt Process.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages_ca.java ErrorMessages_cs.java ErrorMessages_de.java ErrorMessages_es.java ErrorMessages_fr.java ErrorMessages_hu.java ErrorMessages_it.java ErrorMessages_ja.java ErrorMessages_ko.java ErrorMessages_pl.java ErrorMessages_pt_BR.java ErrorMessages_ru.java ErrorMessages_sk.java ErrorMessages_tr.java ErrorMessages_zh_CN.java ErrorMessages_zh_TW.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime ErrorMessages_ca.java ErrorMessages_cs.java ErrorMessages_de.java ErrorMessages_es.java ErrorMessages_fr.java ErrorMessages_hu.java ErrorMessages_it.java ErrorMessages_ja.java ErrorMessages_ko.java ErrorMessages_pl.java ErrorMessages_pt_BR.java ErrorMessages_ru.java ErrorMessages_sk.java ErrorMessages_tr.java ErrorMessages_zh_CN.java ErrorMessages_zh_TW.java xml-xalan/java/src/org/apache/xml/res XMLErrorResources_ca.java XMLErrorResources_cs.java XMLErrorResources_de.java XMLErrorResources_es.java XMLErrorResources_fr.java XMLErrorResources_hu.java XMLErrorResources_it.java XMLErrorResources_ja.java XMLErrorResources_ko.java XMLErrorResources_pl.java XMLErrorResources_pt_BR.java XMLErrorResources_ru.java XMLErrorResources_sk.java XMLErrorResources_tr.java XMLErrorResources_zh_CN.java XMLErrorResources_zh_TW.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources_ca.java XPATHErrorResources_cs.java XPATHErrorResources_de.java XPATHErrorResources_es.java XPATHErrorResources_fr.java XPATHErrorResources_hu.java XPATHErrorResources_it.java XPATHErrorResources_ja.java XPATHErrorResources_ko.java XPATHErrorResources_pl.java XPATHErrorResources_pt_BR.java XPATHErrorResources_ru.java XPATHErrorResources_sk.java XPATHErrorResources_tr.java XPATHErrorResources_zh_CN.java XPATHErrorResources_zh_TW.java
      Committer's log entry: -Checked in localized messages for Xalan and XSLTC contributed by IBM. -New Locale support includes ca, cs, hu, pl, pt_BR, ru, sk and tr. -The old messages are also updated with translations for newly added -English messages. -

    • Committed by minchau@apache.org on 2003/05/28
      Modified: xml-xalan/java/src/org/apache/xml/utils BoolStack.java
      Committer's log entry: -Added a clear() method to clear a BoolStack, so that such a -stack can be re-used without the need to create a new one -(for performance). -Submitted by: Brian Minchau -

    • Committed by minchau@apache.org on 2003/05/28
      Modified: xml-xalan/java/src/org/apache/xml/serializer NamespaceMappings.java SerializerBase.java ToHTMLStream.java ToSAXHandler.java ToStream.java ToXMLSAXHandler.java ToXMLStream.java
      Committer's log entry: -Support for reset() for the stream serializers and for ToXMLSAXHandler. -These serializers can now be reset and re-used rather than creating a new one. -A reset() takes about 1/2 the time of creating a new one. - -Submitted by: Brian Minchau -

    • Committed by minchau@apache.org on 2003/05/28
      Modified: xml-xalan/java/src/org/apache/xml/serializer ToHTMLSAXHandler.java
      Committer's log entry: -Support for a ToHTMLSAXHandler serializer to be reset() and re-used. -Submitted by: Brian Minchau -

    • -
    • Committed by grchiu@apache.org on 2003/05/28
      Modified: xml-xalan/java/xdocs/sources/xalan faq.xml
      Committer's log entry: -Contributed by Christine Li (jycli@ca.ibm.com). -Modified FAQ entry regarding bootclasspath; the class path separator is not -colon for all systems. -

    -
    - -

    Core (Non-XSLTC) source code updates:

    -
    • Committed by mkwan@apache.org on 2003/02/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Small improvement to SAXImpl.copyElement(). -Move the getStringValue() method from SAXImpl to SAX2DTM2. -Remove the SAXImpl.stringValueAux() method. -

    • Committed by ilene@apache.org on 2003/02/25
      Modified: xml-xalan/java/src xml-commons-src.tar.gz xml-xalan/java/bin xml-apis.jar
      Committer's log entry: -Update to latest version of xml-apis. -

    • Committed by mkwan@apache.org on 2003/02/26
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Improvement to DescendantIterator. If _startNode is the root node, do -not need to do the isDescendant() check. -

    • Committed by mkwan@apache.org on 2003/02/26
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Set the nextsib element of an attribute or namespace node to -1. -This makes the logic in the iterators simpler and easier to -maintain. -

    • Committed by mkwan@apache.org on 2003/02/27
      Modified: xml-xalan/java/src/org/apache/xalan/lib/sql DTMDocument.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime AttributeList.java xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java DTMStringPool.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java SAX2DTM2.java xml-xalan/java/src/org/apache/xml/utils SuballocatedIntVector.java
      Committer's log entry: -XSLTC_DTM performance work -Improvement for RTF. These changes improve the performance -for stylesheets which create and throw away many small RTFs. - -Make the sizes of all internal storage units used by SAXImpl configurable. -These include SuballocatedIntVector, DTMStringPool, IntStack and FastStringBuffer. -The chain size of DTMStringPool and the number of blocks in SuballocatedIntVector -can now be passed in the constructor. These sizes are set to smaller values in -the RTF case. - -The default RTF size is changed to 32. There is also a change in the XSLTC -AttributeList class to use on-demand memory allocation for the internal vectors. -The vectors are only allocated when there is an attribute. -

    • Committed by mkwan@apache.org on 2003/02/27
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Small improvement to DescendantIterator and TypedDescendantIterator. -

    • Committed by ilene@apache.org on 2003/02/28
      Modified: xml-xalan/java/samples/extensions/sql/streamable cachedNodes.xsl pivot.xsl xml-xalan/java/xdocs/sources/xalan samples.xml xml-xalan/java/samples/CompiledApplet menu.html README.applet xml-xalan/java/samples/extensions/sql/basic-connection dbinfo.xml dbtest.xsl
      Committer's log entry: -More sample and documentation updates from Christine Li (jycli@ca.ibm.com). -

    • Committed by mkwan@apache.org on 2003/02/28
      Modified: xml-xalan/java/src/org/apache/xalan/transformer TrAXFilter.java
      Committer's log entry: -Add a getTransformer() interface to TrAXFilter. This is a user requested -feature. This interface can be used by the UseXMLFilters samples to -set the output properties correctly. -

    • Committed by mkwan@apache.org on 2003/02/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java DTMDefaultBaseIterators.java DTMDefaultBaseTraversers.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Do not create the previous sibling array for XSLTC. This array is not used -in XSLTC's SAXImpl. Creating it is a waste of time. - -We add a boolean flag to the constructors of DTMDefaultBase and its -subclasses to indicate whether the previous sibling array should be created. -

    • Committed by mkwan@apache.org on 2003/02/28
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
      Committer's log entry: -Correct an error. The DTMDefaultBase.getPreviousSibling() interface -returns a node handle instead of a node identity. -

    • Committed by ilene@apache.org on 2003/02/28
      Modified: xml-xalan/java/samples/CompiledEJB bottom_frame.html index.html README.ejb top_frame.html xml-xalan/java/samples/CompiledServlet CompileServlet.java README.servlet
      Committer's log entry: -Patches for samples from Christine Li (jycli@ca.ibm.com) -

    • Committed by mkwan@apache.org on 2003/03/03
      Modified: xml-xalan/java/src/org/apache/xalan/transformer TrAXFilter.java
      Committer's log entry: -Propagate the change from head branch to XSLTC_DTM. -Add a new getTransformer() interface to TrAXFilter. -

    • Committed by mkwan@apache.org on 2003/03/03
      Modified: xml-xalan/java/src/org/apache/xalan/transformer TrAXFilter.java
      Committer's log entry: -Add a new getTransformer() interface to TrAXFilter. -

    • Committed by mkwan@apache.org on 2003/03/03
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java NameBase.java Stylesheet.java xpath.cup XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java DocumentCache.java LoadDocument.java SAXImpl.java XSLTCDTMManager.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerHandlerImpl.java TransformerImpl.java XSLTCSource.java xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work - -Implement a feature for on-demand building of the ID index table. - -Before this change, the SAX2DTM2 class always builds an ID index -hashtable by comparing the name of every attribute with "id". Now -we maintain a flag _hasIdCall in AbstractTranslet to indicate -whether the translet has id function calls. The value of this flag -is compiled into the translet from the Stylesheet class. The Stylesheet -class also has an _hasIdCall flag, which is set by the XPath parser. - -When a SAXImpl object is created, the _hasIdCall flag is passed in from the -Translet. Now the id index table is only built when the stylesheet makes -use of the id function. - -Also fix a bug in the NameBase class for using an incorrect class name -(org.apache.xml.dtm.ref.DTMAxisIterator should be org.apache.xml.dtm.DTMAxisIterator). -

    • Committed by mkwan@apache.org on 2003/03/06
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom AnyNodeCounter.java DOMAdapter.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Improvement for xsl:number. Introduce an optimized version of -getExpandedTypeID() in SAX2DTM2. -

    • Committed by mkwan@apache.org on 2003/03/07
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMWSFilter.java NodeSortRecord.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Improvement for xsl:strip-space by caching the DTM that is used last time. -Better Collator handling in NodeSortRecord. -

    • Committed by mkwan@apache.org on 2003/03/10
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Save the values of attribute, namespace, comment and PI nodes -in a plain Vector instead of in DTMStringPool. Saving a String -in DTMStringPool involves a hash calculation. These values -are unlikely to be equal. Saving them in a plain Vector has a -lower cost than saving them in DTMStringPool. Only prefixed QNames -are saved in DTMStringPool after this change. - -Need to make changes in a few interfaces to accommodate this change. -

    • Committed by mkwan@apache.org on 2003/03/13
      Modified: xml-xalan/java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: -XSLTC_DTM performance work -Small improvement in FastStringBuffer.sendSAXCharacters() when the whole -piece of text is in one chunk. -

    • Committed by mkwan@apache.org on 2003/03/14
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Small improvement in SAX2DTM2.getStringValueX() and dispatchCharacterEvents() -by saving one local variable. -

    • Committed by mkwan@apache.org on 2003/03/14
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom CollatorFactoryBase.java SAXImpl.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Save the offset and length of a Text node in a bitwise encoded value (10 -bits for length and 21 bits for offset) if they are within certain limits. -Before this change, we need 3 SuballocatedIntVector calls to get the offset -and length information. Now we only need one SuballocatedIntVector call, -one bit AND & one SHIFT. Bit AND and SHIFT are faster than accessing a -SuballocatedIntVector. -

    • Committed by mkwan@apache.org on 2003/03/20
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
      Committer's log entry: -Fix a bug for testcase axes129. -DTMDefaultBase.getFirstNamespaceNode() should return NULL when -the given node is not an element. axes129 passed in both -Xalan and XSLTC_DTM after this change. -

    • Committed by jkesselm@apache.org on 2003/03/20
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBaseTraversers.java
      Committer's log entry: -Oops! Old bug, just noticed -- we forgot to override RootTraverser's typed first(). -

    • Committed by mkwan@apache.org on 2003/03/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom NthIterator.java xml-xalan/java/src/org/apache/xml/dtm DTMAxisIterator.java xml-xalan/java/src/org/apache/xml/dtm/ref DTMAxisIteratorBase.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Improvement for step[n]. Introduce a new interface getNodeByPosition(int position) -in DTMAxisIterator, which is used by the NthIterator. The default implementation -is in DTMAxisIteratorBase. The subclasses can override this interface to provide -a faster customized implementation. -

    • Committed by mkwan@apache.org on 2003/03/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Introduce a copyAttribute() method in SAXImpl to speed up -attribute copying. -

    • Committed by mkwan@apache.org on 2003/03/24
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java SAX2DTM2.java
      Committer's log entry: -XSLTC_DTM performance work -Improvement in DTM building. Make the code more efficient -in a few expensive interfaces. -

    • Committed by mkwan@apache.org on 2003/03/24
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM2.java
      Committer's log entry: -Fix a bug in XSLTC_DTM. -Change the name of the optimized getExpandedTypeID method to getgetExpandedTypeID2. -The old one can be used during DTM building, while the new one is only -used in document traversal. -

    • Committed by ilene@apache.org on 2003/03/25
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java XSLTErrorResources.properties XSLTErrorResources.java XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/templates FuncDocument.java FuncDocument.java xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java XSLTErrorResources.properties XSLTErrorResources.java XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/templates FuncDocument.java FuncDocument.java
      Committer's log entry: -Committing Christine Li's (jycli@ca.ibm.com) patch for bugzilla #18210. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java SAX2DTM2.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xml.dtm.ref.sax2dtm. -Add new file SAX2DTM2. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xml.dtm.ref.dom2dtm. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xml/dtm DTM.java DTMAxisIterator.java DTMManager.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xml.dtm. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMAxisIteratorBase.java DTMAxisIterNodeList.java DTMChildIterNodeList.java DTMDefaultBase.java DTMDefaultBaseIterators.java DTMDefaultBaseTraversers.java DTMDocumentImpl.java DTMManagerDefault.java DTMNamedNodeMap.java DTMNodeList.java DTMNodeListBase.java DTMNodeProxy.java DTMStringPool.java ExpandedNameTable.java ExtendedType.java IncrementalSAXSource_Xerces.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xml.dtm.ref. -Add new files: -DTMAxisIterNodeList.java -DTMChildIterNodeList.java -DTMNodeListBase.java -ExtendedType.java -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xml/res XMLErrorResources.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xml.res. -Add new messages for common serializer. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xml/serializer AttributesImplSerializer.java CharInfo.java DOMSerializer.java ElemDesc.java EmptySerializer.java EncodingInfo.java Encodings.java Encodings.properties ExtendedContentHandler.java ExtendedLexicalHandler.java HTMLEntities.res Method.java NamespaceMappings.java output_html.properties output_text.properties output_unknown.properties output_xml.properties OutputPropertiesFactory.java OutputPropertyUtils.java package.html SerializationHandler.java Serializer.java SerializerBase.java SerializerConstants.java SerializerFactory.java SerializerTrace.java SerializerTraceWriter.java ToHTMLSAXHandler.java ToHTMLStream.java ToSAXHandler.java ToStream.java ToTextSAXHandler.java ToTextStream.java ToUnknownStream.java ToXMLSAXHandler.java ToXMLStream.java TransformStateSetter.java WriterToASCI.java WriterToUTF8.java WriterToUTF8Buffered.java XMLEntities.res XSLOutputAttributes.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Add new serializer classes under package org.apache.xml.serializer. -Log from Brian Minchau (minchau@ca.ibm.com): - -In the past Xalan-J interpretive (Xalan) and XSLTC both implemented their own -serialization stages. Much of the code provides the same functionality. -In order to improve the maintainability of the code, and to eliminate any -functional differences, these two serializers are now merged in the -org.apache.xml.serializer package. - -The best performing features of both have been used. The class hierarchy -of serializers used by XSLTC is re-used for this reason. At the highest -level the serializer classes split based on whether the output of the -serializer is a "Stream" or whether it is a "SAX" handler. After that -both major branches split based on the output type (e.g. XML, HTML or TEXT). - -The external user interface of the old Xalan serializer has been kept. -Other classes and interfaces have been absorbed into the serializer -package to keep it independent of both Xalan and XSLTC. The primary -interface, SerializationHandler, accepts SAX and SAX-like calls, but -it also absorbs other interfaces from the old Xalan serializer. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xml/utils DOMHelper.java FastStringBuffer.java IntStack.java SuballocatedIntVector.java XMLStringDefault.java XMLStringFactoryDefault.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xml.utils. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/extensions XSLProcessorContext.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.extensions. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java PipeDocument.java Redirect.java xml-xalan/java/src/org/apache/xalan/lib/sql DTMDocument.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.lib. - -1. Change the return types of some date-time extension functions -for support in XSLTC. - -2. Changes for the new serializer. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorOutputElem.java TransformerFactoryImpl.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.processor. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/serialize CharInfo.java DOMSerializer.java ElemDesc.java EncodingInfo.java Encodings.java Encodings.properties HTMLEntities.res Method.java package.html Serializer.java serializer.properties SerializerFactory.java SerializerToHTML.java SerializerToText.java SerializerToXML.java SerializerUtils.java WriterToASCI.java WriterToUTF8.java WriterToUTF8Buffered.java XMLEntities.res
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Remove old serializer classes under org.apache.xalan.serialize. -The new serializer files are now in org.apache.xml.serializer. -Add new file SerializerUtils.java. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemApplyTemplates.java ElemAttribute.java ElemCopy.java ElemCopyOf.java ElemElement.java ElemExtensionCall.java ElemForEach.java ElemLiteralResult.java ElemTemplateElement.java ElemTextLiteral.java ElemValueOf.java output_html.properties output_text.properties output_xml.properties OutputProperties.java StylesheetRoot.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.templates. -Replace ResultTreeHandler with SerializationHandler. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/trace GenerateEvent.java PrintTraceListener.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.trace. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/transformer ClonerToResultTree.java QueuedEvents.java ResultTreeHandler.java SerializerSwitcher.java TransformerHandlerImpl.java TransformerIdentityImpl.java TransformerImpl.java TransformSnapshot.java TransformSnapshotImpl.java TransformState.java TreeWalker2Result.java XalanTransformState.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.transformer for the new serializer. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java build.xml xsltc_todo.xml
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Update build.xml and xsltc_todo.xml. - -Now the default build target is a big xalan.jar which -includes both Xalan-J Interpretive and XSLTC. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src MANIFEST.MF
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Update MANIFEST.MF to include information about -xsltc and its support jars. -

    • Committed by ilene@apache.org on 2003/04/02
      Modified: xml-xalan/java/bin xercesImpl.jar
      Committer's log entry: -Updating to Xerces-J 2.4.0. -

    • Committed by mkwan@apache.org on 2003/04/02
      Modified: xml-xalan/java/src MANIFEST.MF
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Update spec version for XSLTC in MANIFEST.MF -

    • Committed by mkwan@apache.org on 2003/04/02
      Modified: xml-xalan/java/samples/CompiledApplet menu.html README.applet TransformApplet.java xml-xalan/java/samples/CompiledBrazil README.brazil TransformHandler.java xml-xalan/java/samples/CompiledEJB README.ejb TransformBean.java xml-xalan/java/samples/CompiledJAXP Compile.java README.cjaxp Transform.java xml-xalan/java/samples/CompiledServlet README.servlet TransformServlet.java xml-xalan/java/samples/DOM2DOM DOM2DOM.java xml-xalan/java/samples/Pipe Pipe.java xml-xalan/java/samples/SAX2SAX SAX2SAX.java xml-xalan/java/samples/translets JAXPTransletMultipleTransformations.java JAXPTransletOneTransformation.java todo.xsl xml-xalan/java/samples/UseXMLFilters UseXMLFilters.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head - -Update in the samples -1. Changes from Henry Zongaro (zongaro@ca.ibm.com) in the -XSLTC samples. Use TrAX API instead of native API. -2. Changes from Brian Minchau (minchau@ca.ibm.com) to use -the new serializer classes. -

    • Committed by mkwan@apache.org on 2003/04/02
      Modified: xml-xalan/java/samples/CompiledApplet singleTransform.html xml-xalan/java/samples/CompiledEJB bottom_frame.html index.html top_frame.html xml-xalan/java/samples/translets todo.xml todotoo.xml
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Add new sample files. -

    • Committed by mkwan@apache.org on 2003/04/02
      Modified: xml-xalan/java/xdocs/sources entities.ent xalan-jlocal.xml xalan-jsite.xml xml-xalan/java/xdocs/sources/xalan commandline_xsltc.xml commandline.xml dtm.xml history.xml readme.xml samples.xml usagepatterns.xml xsltc_history.xml xsltc_usage.xml
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head - -Update in java/xdocs. -

    • Committed by mkwan@apache.org on 2003/04/03
      Modified: xml-xalan/java/src/org/apache/xpath/axes FilterExprWalker.java
      Committer's log entry: -Commit patch for bug 12797 from Arun Yadav (arun.yadav@sun.com). -

    • Committed by zongaro@apache.org on 2003/04/03
      Modified: xml-xalan/java build.xml
      Committer's log entry: -Added a new "fulldist" target. It builds a distribution that includes Xalan-J -components that depend upon non-standard components that aren't part of the -Xalan-J repository. In particular, xsltcbrazil.jar is built under the -"fulldist" target, but not under the ordinary "dist" target. -

    • Committed by mkwan@apache.org on 2003/04/04
      Modified: xml-xalan/java/src/org/apache/xml/serializer ToStream.java
      Committer's log entry: -Replace Vector.add() by Vector.addElement() because the first method -is not in JDK 1.1.8. -

    • Committed by ilene@apache.org on 2003/04/05
      Modified: xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xml/utils TreeWalker.java
      Committer's log entry: -Instead of setting a default baseURI in newTemplates, append a dummy string -to the default used in the TreeWalker constructors. This solves the problem -of violating the SourceLocator.getSystemId API which should return null -if if no systemId was set, while allowing relative URI's to be resolved when -the source is a DOM and no systemID has been set. Relative URI's are already -resolved correctly for other source types. -

    • Committed by zongaro@apache.org on 2003/04/06
      Modified: xml-xalan/java/samples/CompiledApplet TransformApplet.java README.applet
      Committer's log entry: -Patch from Christine Li (jycli@ca.ibm.com). Reworked applet code so that the -init method creates a thread to which it delegates all the work of creating -Transformers and performing transformations. - -Xalan needs all of its classes to be loaded with respect to the same class -loader. The thread that's created will have the context class loader, if any, -that is in effect when the applet's init method is called, but calls to other -methods on the applet might not have the same context class loader. Using a -thread avoids any problems that might arise from such a situation. -

    • Committed by zongaro@apache.org on 2003/04/06
      Modified: xml-xalan/java/src/org/apache/xml/serializer CharInfo.java HTMLEntities.properties output_html.properties output_xml.properties XMLEntities.properties xml-xalan/java/xdocs/sources/xalan usagepatterns.xml
      Committer's log entry: -Patch from Christine Li (jycli@ca.ibm.com). Changed CharInfo so that it allows -descriptions of entities to be specified as a properties file in addition to a -Xalan-specific resource file format. - -The code previously always assumed a Xalan-specific resource file format, for -both user-supplied descriptions of entities, and for those supplied with -Xalan-J. The security restrictions of applets are such that an applet that -relies on a copy of Xalan-J in the Java run-time would find that Xalan-J would -be unable to read the default entities file that is packaged with the JRE on -the applet's behalf - it can only do so with a properties, via ResourceBundle. -

    • Committed by mkwan@apache.org on 2003/04/07
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java
      Committer's log entry: -Commit an implementation of the date-time:format-date() extension function -(bugzilla 18713) contributed by Helg Bredow (helg.bredow@kalido.com). -

    • Committed by mkwan@apache.org on 2003/04/07
      Modified: xml-xalan/java/xdocs/sources/xalan commandline_xsltc.xml
      Committer's log entry: -Docs update -Document the new "use-classpath" attribute -which is supported in the XSLTC TrAX API. -

    • Committed by ilene@apache.org on 2003/04/07
      Modified: xml-xalan/java/samples/CompiledServlet README.servlet TransformServlet.java xml-xalan/java/samples/CompiledBrazil README.brazil
      Committer's log entry: -Sample updates from Christine Li (jycli@ca.ibm.com). -

    • Committed by ilene@apache.org on 2003/04/08
      Modified: xml-xalan/java/src/org/apache/xalan/serialize DOMSerializer.java Serializer.java SerializerFactory.java xml-xalan/java/src/org/apache/xml/serializer DOMSerializer.java SerializationHandler.java SerializerBase.java ToHTMLStream.java ToUnknownStream.java xml-xalan/java/src/org/apache/xalan/templates OutputProperties.java
      Committer's log entry: -Patch from Brian Minchau (minchau@ca.ibm.com) for backward compatibility -of new serializers. Also a fix related to a failure in the DOM2DOM sample. -

    • Committed by zongaro@apache.org on 2003/04/09
      Modified: xml-xalan/java/src/org/apache/xml/serializer HTMLEntities.res XMLEntities.res
      Committer's log entry: -Dropped descriptions of entities in the form of resource files in favour of -those in the form of properties file. The resource files are still supported, -but Xalan-J's serializer only requires one. -

    • Committed by zongaro@apache.org on 2003/04/09
      Modified: xml-xalan/java build.xml
      Committer's log entry: -Dropped descriptions of entities in the form of resource files in favour of -those in the form of properties file. The resource files are still supported, -but Xalan-J's serializer only requires one. -

    -
    - -

    Core (Non-XSLTC) source code updates:

      -
    • Committed by johng@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib/sql DefaultConnectionPool.java
      Committer's log entry: -Fixed Class loader Problem. Default Connection now uses context Classloader -

    • Committed by johng@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: -Fixed problem where a query that returned zero rows would incorrectly return a JDBC -Exception. Note: This only occurs in streaming mode. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMNodeProxy.java
      Committer's log entry: -Add a convenient interface getStringValue() which returns the -string value of a node. It is used by the extension code -to get a node value without hacking into the DTM. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/templates Constants.java
      Committer's log entry: -Add strings for new extension namespaces. This includes new EXSLT -namespaces (dynamic and strings), namespaces for redirect, PipeDocument -and SQL extensions and new namespace for the Java extension. For -backward compatibility, the old Java namespace is still kept. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionNamespacesManager.java
      Committer's log entry: -Register new extension namespaces, including two new EXSLT namespaces -(dynamic and strings), namespaces for redirect, PipeDocument and SQL -extensions and the new/old namespaces for Java extension. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib Extensions.java
      Committer's log entry: -Reorganize the extension functions for new EXSLT extensions and -XSLTC integration. The implementation of some extension functions -(intersection, difference, distinct, evaluate and tokenize) are -moved to the corresponding EXSLT extension classes. We also put -a note to say that using these extension functions in the -Xalan namespace is deprecated. The signature of some extension -functions are changed to facilitate the XSLTC integration. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltMath.java
      Committer's log entry: -The EXSLT math extension was rewritten for XSLTC integration. The -signatures of the existing functions (max, min, highest and lowest) -are changed. We use NodeList instead of NodeSet and NodeIterator -in arguments and return types, because it is the only node list type -recognized by XSLTC. We also got rid of the ExpressionContext -arguments in these functions. We implemented the toNumber() and toString() -interfaces as a replacement. - -I also implemented all of the remaining math functions in the EXSLT spec, -e.g. constant, sin, random. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltSets.java
      Committer's log entry: -The signatures of the sets extension functions are changed for -XSLTC integration. NodeList is used instead of NodeSet and NodeIterator -in arguments and return types. The implementation of intersection, -difference and distinct was moved from Extensions.java to this file. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib Redirect.java
      Committer's log entry: -Add comments for the new namespace (http://xml.apache.org/xalan/redirect). -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib PipeDocument.java
      Committer's log entry: -Add comments for the new namespace (http://xml.apache.org/xalan/PipeDocument). -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib/sql XConnection.java
      Committer's log entry: -Add comments for the new namespace (http://xml.apache.org/xalan/sql). -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDynamic.java
      Committer's log entry: -Add the ExsltDynamic class which implements the EXSLT dynamic -extension functions (max, min, sum, map, evaluate and closure). - -The implementation of evaluate is taken from Extensions.java. -The Javadoc is copied from the relevant EXSLT page. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltStrings.java
      Committer's log entry: -Implement the EXSLT strings extension functions (align, -concat, padding, split and tokenize). The implementation -of tokenize is taken from Extensions.java. - -The Javadoc is copied from the relevant EXSLT page. Three -functions (decode-uri, encode-uri and replace) are missing -due to ambiguous spec. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xpath/axes SelfIteratorNoPredicate.java
      Committer's log entry: -For Bugzilla 11809 and 10643. Fix the nextNode() interface so that -it returns DTM.NULL if the m_foundLast flag is true. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemExtensionCall.java
      Committer's log entry: -For Bugzilla 11073. Fix an extension namespace problem. -

    • Committed by mkwan@apache.org on 2002/09/06
      Modified: xml-xalan/java/src/org/apache/xpath/functions FuncExtFunction.java
      Committer's log entry: -For Bugzilla 11743 and 12298. Fix argument handling in -extension functions. Arguments now have non-null parents -and they will be visited by the XPathVisitor. -

    • Committed by ilene@apache.org on 2002/09/09
      Modified: xml-xalan/java KEYS
      Committer's log entry: -I had to get a new key after a hard drive crash. This time, I backed it up! -

    • Committed by mkwan@apache.org on 2002/09/11
      Modified: xml-xalan/java build.xml
      Committer's log entry: -Copy the LICENSE and README files to the bin directory for the source distribution. -These files are needed by the xsltc.jar target. -

    • Committed by mkwan@apache.org on 2002/09/11
      Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerIdentityImpl.java
      Committer's log entry: -Throw an IllegalArgumentException in the setErrorListener() interface -if the error listener is null. -

    • Committed by mkwan@apache.org on 2002/09/11
      Modified: xml-xalan/java/src/org/apache/xalan/extensions MethodResolver.java
      Committer's log entry: -For Bugzilla 9731. Convert an empty NodeList to a null Node. -

    • Committed by mkwan@apache.org on 2002/09/13
      Modified: xml-xalan/java/src/org/apache/xalan/templates OutputProperties.java xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: -For Bugzilla 12379. Transformer.setOutputProperties() should throw -IllegalArgumentException if the property is invalid. -

    • Committed by mkwan@apache.org on 2002/09/13
      Modified: xml-xalan/java/src/org/apache/xalan/processor XSLTAttributeDef.java
      Committer's log entry: -For Bugzilla 12127. Throw a TransformerException if a prefix cannot -be resolved to a URI insteading of throwing a NullPointerException. -

    • Committed by mkwan@apache.org on 2002/09/13
      Modified: xml-xalan/java/src/org/apache/xalan/processor XSLTAttributeDef.java
      Committer's log entry: -Correct a problem in the previous patch. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java
      Committer's log entry: -Javadoc correction. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/lib Extensions.java
      Committer's log entry: -Make the tokenize extension function different from the one in the -EXSLT strings extension. Reuse the Document object to reduce -memory consumption. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltStrings.java
      Committer's log entry: -Make the tokenize function conformed with the EXSLT spec. Reuse -the Document object to reduce memory usage. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xpath/axes RTFIterator.java xml-xalan/java/src/org/apache/xpath/objects XRTreeFrag.java
      Committer's log entry: -For Bugzilla 11341. Let RTFIterator extend NodeSetDTM so that it is the kind -of DTMIterator expected by DTMNodeList. This also fixes the problem in -testcase JavaBugzilla3722. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorExsltFunction.java XSLTSchema.java
      Committer's log entry: -For Bugzilla 12077. Fixed problem with func:function in included stylesheet. -Add exsltFunction to the templateElements list so that we can detect the error where -func:function is embedded in another (e.g. xsl:variable) element. -

    • Committed by ilene@apache.org on 2002/09/17
      Modified: xml-xalan/java/bin xml-apis.jar xml-xalan/java/src xml-commons-src.tar.gz
      Committer's log entry: -New version of xml-apis.jar taken from xml-commons with tag: -factoryfinder-build. It contains the JAXP FactoryFinder patch and some -SAX file updates. -

    • Committed by mkwan@apache.org on 2002/09/18
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: -XSLTC support - phase 1 - -Add the -XSLTC option to enable transforming using XSLTC - -The following existing options do not work in XSLTC mode: --TT --TG --TS --TTC --QC --L --INCREMENTAL --NOOPTIMIZE --RL - -If any of these options is used with -XSLTC, a message is printed -and the option is ignored. All other existing options (e.g. -flavor, --text, etc.) can be used with -XSLTC. - -In phase 2, we are going to migrate the XSLTC specific options in the -XSLTC command lines (Compile and Transform) to the Process command line. -One of the new features would be generating translet class files from -the xsl. -

    • Committed by mkwan@apache.org on 2002/09/19
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDynamic.java ExsltMath.java ExsltStrings.java
      Committer's log entry: -Extension work. A few Javadoc correction. Fix problems in math:max and math:min. -

    • Committed by mkwan@apache.org on 2002/09/19
      Modified: xml-xalan/java/src/org/apache/xpath/objects XRTreeFragSelectWrapper.java
      Committer's log entry: -For Bugzilla 6181. Change the execute() interface to return the result -of executing the select expression. -

    • Committed by ilene@apache.org on 2002/09/20
      Modified: xml-xalan/java/bin xercesImpl.jar
      Committer's log entry: -Updating to latest xercesImpl.jar, which contains org.w3c.dom.xpath interfaces. -

    • Committed by ilene@apache.org on 2002/09/20
      Modified: xml-xalan/java/src/org/apache/xpath/domapi XPathEvaluatorImpl.java XPathExpressionImpl.java XPathNSResolverImpl.java XPathResultImpl.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java XPATHErrorResources.properties
      Committer's log entry: -Prototype implementation of DOM L3 XPath Specification. -

    • Committed by ilene@apache.org on 2002/09/20
      Modified: xml-xalan/java/src/org/apache/xalan/serialize SerializerToXML.java
      Committer's log entry: -Committing Gordon Chiu's (grchiu@ca.ibm.com) patch for bugzilla #6927. -

    • Committed by amiro@apache.org on 2002/09/23
      Modified: xml-xalan/java/xdocs/sources/xalan xsltc_constraints.xml xsltc_usage.xml
      Committer's log entry: -compile -n option changed so inlining is now the default -

    • Committed by mkwan@apache.org on 2002/09/23
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltBase.java ExsltDynamic.java ExsltMath.java ExsltSets.java ExsltStrings.java
      Committer's log entry: -Extension cleanup. -Add an ExsltBase class as the super class for other EXSLT implementation -classes, so that the toString() and toNumber() interfaces can be easily -reused by all the subclasses without duplicating code. -

    • Committed by mkwan@apache.org on 2002/09/23
      Modified: xml-xalan/java/src/org/apache/xpath DOMHelper.java
      Committer's log entry: -The isNodeTheSame(node1, node2) interface should return true if node1==node2. -

    • Committed by ilene@apache.org on 2002/09/23
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemAttribute.java xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java XSLTErrorResources.properties
      Committer's log entry: -Patch for bugzilla #10384. There's still a problem with attribseterr08 which -is covered in bugzilla #3969. -

    • Committed by ilene@apache.org on 2002/09/23
      Modified: xml-xalan/java/src/org/apache/xalan/dom3/xpath XPathEvaluator.java XPathException.java XPathExpression.java XPathNamespace.java XPathNSResolver.java XPathResult.java
      Committer's log entry: -Since Xerces has decided not to build the org.w3c.dom.xpath interfaces into -XercesImpl I have created a temporary home for these interfaces, until -the specification becomes a recommendation. -

    • Committed by ilene@apache.org on 2002/09/23
      Modified: xml-xalan/java/src/org/apache/xpath/domapi XPathEvaluatorImpl.java XPathExpressionImpl.java XPathNSResolverImpl.java XPathResultImpl.java
      Committer's log entry: -Updating import statements to use the interfaces in the temporary org.apache.xalan.dom3.xpath package. -

    • Committed by ilene@apache.org on 2002/09/24
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java XSLTErrorResources.properties
      Committer's log entry: -Added some new error message strings. -

    • Committed by ilene@apache.org on 2002/09/25
      Modified: xml-xalan/java/src/org/apache/xalan/transformer ResultTreeHandler.java
      Committer's log entry: -Patch for bugzilla #4344. The testcases, copyerr04-07 were already -working correctly in that when an attempt was made to add an attribute -after child elements, or before an element was produced, the attribute was -ignored. However, Dave M. said that a warning was also needed. So, -I have added a warning message for these cases. Also, similar behaviour -was being seen for testcases attribset19,35,36 and attribseterr08. This -was being handled in ElemAttribute.execute, but I've commented out the -code there since it will get caught in ResultTreeHandler.execute in the -same place the copyerr tests get handled. - -The negative testcases, copyerr04-07, attribset08 should be moved -to the positive bucket (possibly with a few tweaks) since they all run to -completion. -

    • Committed by ilene@apache.org on 2002/09/25
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemAttribute.java xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.properties
      Committer's log entry: -Patch for bugzilla #4344. -

    • Committed by ilene@apache.org on 2002/09/25
      Modified: xml-xalan/java/src/org/apache/xalan/transformer ResultTreeHandler.java
      Committer's log entry: -Gordon Chiu's (grchui@ca.ibm.com) patch for bugzilla #8473. Thanks also -to Brian Minchau (minchau@ca.ibm.com) for the analysis of this bug. -

    • Committed by mkwan@apache.org on 2002/09/26
      Modified: xml-xalan/java/src/org/apache/xpath/functions FunctionMultiArgs.java
      Committer's log entry: -For Bugzilla 7161. Add a public accessor to return the argument array. -

    • Committed by mkwan@apache.org on 2002/09/27
      Modified: xml-xalan/java/src/org/apache/xpath XPathContext.java xml-xalan/java/src/org/apache/xalan/extensions ExpressionContext.java
      Committer's log entry: -For Bugzilla 10414. Provide a getErrorListener() interface in the ExpressionContext. -

    • Committed by mkwan@apache.org on 2002/09/27
      Modified: xml-xalan/java/samples/AppletXMLtoHTML client.html
      Committer's log entry: -For bugzilla 13059. Fix typo width"0" to width="0". -

    • Committed by mkwan@apache.org on 2002/09/30
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.properties
      Committer's log entry: -Messages for new options in the Process command line. -

    • Committed by mkwan@apache.org on 2002/09/30
      Modified: xml-xalan/java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: -XSLTC support in the Process command line - phase 2 -Migrate the options from the XSLTC command line (Compile and Transform) -to the Process command line. The following new options are added: - --XO [translet_name] (specify translate class name) --XD destination_directory (specify destination directory) --XJ jar_name (put translet into jar file) --XP package_prefix (specify package name prefix) --XN (enable template inlining) --XX (additional debug messages) --XT (use translet to transform if possible) - -The new options can only be used with the -XSLTC option. The options are -passed to XSLTC via the standard TRAX API - TransformerFactory.setAttribute(). -Process does not directly communicate with XSLTC. - -The usage instructions are also re-organized. The options are divided into -three categories (command options, Options for Xalan and Options for XSLTC). A -pager is used when displaying the usage instructions so that you can see them -page by page. -

    • Committed by zongaro@apache.org on 2002/10/01
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime ErrorMessages.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.properties
      Committer's log entry: -Added and fixed up some additional translation guidelines. -

    • Committed by mkwan@apache.org on 2002/10/03
      Modified: xml-xalan/java/src/org/apache/xpath/functions FuncExtFunction.java
      Committer's log entry: -Use Vector.elementAt() instead of Vector.get(). The latter is not available -in JDK 1.1.8. Add two argument accessor methods for Bugzilla 8939. -

    • Committed by mkwan@apache.org on 2002/10/03
      Modified: xml-xalan/java/src/org/apache/xalan/templates Constants.java ElemTemplateElement.java output_html.properties output_text.properties output_xml.properties OutputProperties.java
      Committer's log entry: -Use one namespace for all extensions (Bugzilla 9959) -Use the new namespace uri "http://xml.apache.org/xalan" instead of -"http://xml.apache.org/xslt" for xsl:output extension attributes. -

    • Committed by mkwan@apache.org on 2002/10/03
      Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorLRE.java XSLTElementDef.java XSLTSchema.java
      Committer's log entry: -Use one namespace for all extensions (Bugzilla 9959) -Use the new namespace uri "http://xml.apache.org/xalan" for -the component and script extension elements. We maintain -backward compatibility so that using the old uri -"http://xml.apache.org/xslt" still works. -

    • Committed by mkwan@apache.org on 2002/10/03
      Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerJavaPackage.java
      Committer's log entry: -Minor Javadoc update to use the new namespace uri. -

    • Committed by mkwan@apache.org on 2002/10/03
      Modified: xml-xalan/java/samples/extensions 1-redir.xsl 2-basicJscript.xsl 3-java-namespace.xsl 4-numlistJava.xsl 5-numlistJscript.xsl 6-sqllib-instantdb.xsl
      Committer's log entry: -Update the extension samples to use the new namespace. -

    • Committed by mkwan@apache.org on 2002/10/04
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltMath.java
      Committer's log entry: -Minor fix for math:max(). -

    • Committed by mkwan@apache.org on 2002/10/04
      Modified: xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java
      Committer's log entry: -For Bugzilla 13106. Visit the XPath expressions created for match patterns. -

    • Committed by ilene@apache.org on 2002/10/07
      Modified: xml-xalan/java/src/org/apache/xpath/axes DescendantIterator.java UnionPathIterator.java WalkerFactory.java xml-xalan/java/src/org/apache/xpath/compiler Compiler.java Lexer.java OpMap.java XPathParser.java
      Committer's log entry: -Patch for bugzilla #5046. - -The token queue and operations map can now grow to accomodate really -large XPath expressions. Starting sizes of the data structures remain set -at the size in the current code. - -I created new classes org.apache.xml.utils.ObjectVector (based on org.apache.xml.utils.IntVector) -and org.apache.xpath.compiler.OpMapVector to store the token queue -and operations map. - -This patch is essentially a stop gap until the new parser (xslt20 branch) is integrated. -

    • Committed by ilene@apache.org on 2002/10/07
      Modified: xml-xalan/java/src/org/apache/xml/utils ObjectVector.java xml-xalan/java/src/org/apache/xpath/compiler OpMapVector.java
      Committer's log entry: -Patch for bugzilla #5046. -

    • Committed by ilene@apache.org on 2002/10/07
      Modified: xml-xalan/java/src/org/apache/xpath/compiler OpMap.java
      Committer's log entry: -Cleaning up import statements. -

    • Committed by ilene@apache.org on 2002/10/07
      Modified: xml-xalan/java/src/org/apache/xml/utils IntStack.java IntVector.java ObjectStack.java ObjectVector.java xml-xalan/java/src/org/apache/xalan/templates ElemApplyTemplates.java ElemForEach.java xml-xalan/java/src/org/apache/xalan/transformer StackGuard.java TransformerImpl.java TransformSnapshotImpl.java xml-xalan/java/src/org/apache/xpath XPathContext.java
      Committer's log entry: -Commiting Gordon Chiu's (grchiu@ca.ibm.com) patch for bugzilla#8175. - -IntStack's and ObjectStack's are now used in place of fixed length arrays, so that users -should not run into limitations based on array sizes. The initial size of the arrays has -been set to current array sizes, so the user's experience should not change much, except -in the cases where they were running into the size limitation. - -No performance analysis has been done to determine an optimal initial -size for the stacks. -

    • Committed by ilene@apache.org on 2002/10/07
      Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: -Committing Igor Hersht's (igorh@ca.ibm.com) patch for bugzilla #10176. - -Also, removing testcase position102 from the excludes list for the smoketest -since it now runs. -

    • Committed by ilene@apache.org on 2002/10/15
      Modified: xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java
      Committer's log entry: -Patch for bugzilla #13305. Moved initalization code into a static initializer. - -TransformerFactory.newInstance() can now be called safely from multiple -threads. -

    • Committed by ilene@apache.org on 2002/10/19
      Modified: xml-xalan/java/bin xercesImpl.jar
      Committer's log entry: -Updating to XercesJ 2.2.0. -

    • Committed by ilene@apache.org on 2002/10/20
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref ExpandedNameTable.java
      Committer's log entry: -Committing Pavel Ausianik's (Pavel_Ausianik@epam.com) patch for bugzilla #12687. - -Reduce memory allocation on initialization of ExpandedNameTable. - -m_locNamesPool and m_namespaceNames and code that uses them has -been commented out. Some initialization now done in static initializer. -

    • Committed by ilene@apache.org on 2002/10/20
      Modified: xml-xalan/java/src/org/apache/xpath XPathContext.java
      Committer's log entry: -Committing Gordon Chiu's (grchiu@ca.ibm.com) modified patch of Pavel Ausianik's (Pavel_Ausianik@epam.com) -patch for bugzilla #12486. - -Method XPathContext.reset() was creating many new instances of java objects, -causing unnecessary memory allocations, instead of reusing previously created -objects. - - -m_locNamesPool and m_namespaceNames and code that uses them has -been commented out. Some initialization now done in static initializer. -

    • Committed by ilene@apache.org on 2002/10/20
      Modified: xml-xalan/java/src/org/apache/xalan/serialize Encodings.java Encodings.properties
      Committer's log entry: -Committing Gordon Chiu's (grchiu@ca.ibm.com) patch for bugzilla #13754. -

    • Committed by ilene@apache.org on 2002/10/21
      Modified: xml-xalan/java/src/org/apache/xalan/dom3/xpath COPYRIGHT.html
      Committer's log entry: -Copying the copyright statement for the DOM L3 XPath API interfaces into -the temporary package (org.apache.xalan.dom3.xpath) which contains -the interfaces until they become a recommendation. -

    • Committed by mkwan@apache.org on 2002/10/22
      Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorExsltFunction.java
      Committer's log entry: -For bugzilla 13711 -Fix the conditions for validating the child elements of func:function. -

    • Committed by ilene@apache.org on 2002/10/22
      Modified: xml-xalan/java/src/org/apache/xalan/transformer KeyTable.java xml-xalan/java/src/org/apache/xpath/axes NodeSequence.java
      Committer's log entry: -Committing urban.spielmann@swisslife.ch (Urban Spielmann)'s patch for bugzilla #11661. - -After the Redundant Expression Elimination merge, the key cache had -not yet been replaced. This patch puts back the key cache, which -gives xsl:key much better performance. -

    • Committed by mkwan@apache.org on 2002/10/22
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemExtensionCall.java
      Committer's log entry: -For bugzilla 7357 -Fix problems in exception handling for extension elements. -

    • Committed by ilene@apache.org on 2002/10/23
      Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: -Patch for bugzilla #13863. - -Moved setting the namespaceContext from the TransformerImpl constructor to -the transform method. -

    • Committed by ilene@apache.org on 2002/10/25
      Modified: xml-xalan/java/src/org/apache/xpath XPath.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java XPATHErrorResources.properties
      Committer's log entry: -Move a hardcoded string into the properties file. -

    • Committed by mkwan@apache.org on 2002/10/25
      Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerJavaClass.java ExtensionHandlerJavaPackage.java
      Committer's log entry: -For bugzilla 13944. Check for InvocationTargetException in Method.invoke(). -

    • Committed by mkwan@apache.org on 2002/10/28
      Modified: xml-xalan/java/src/org/apache/xpath XPathContext.java
      Committer's log entry: -For Bugzilla 13303. -Fix Memory leak in XPathContext.popRTFContext(). -

    • Committed by ilene@apache.org on 2002/10/28
      Modified: xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: -Backing out patch for bugzilla #13863. It causes a bunch of failures in -the trax.sax flavour. -

    • Committed by mkwan@apache.org on 2002/10/28
      Modified: xml-xalan/java/xdocs/sources/xalan extensions.xml extensionslib.xml samples.xml
      Committer's log entry: -Update the extensions documentation. -Use the new namespaces in documents and examples. Update EXSLT development -status. Modify setup instructions for SQL samples. -

    • Committed by mkwan@apache.org on 2002/10/28
      Modified: xml-xalan/java/xdocs xml-site-style.tar.gz xml-xalan/java/xdocs/sources/xalan faq.xml resources.xml
      Committer's log entry: -For Bugzilla 14022 -Commit Gordon Chiu's update to the FAQ. -

    • Committed by ilene@apache.org on 2002/10/28
      Modified: xml-xalan/java/src/org/apache/xalan/dom3/xpath COPYRIGHT.html XPathEvaluator.java XPathException.java XPathExpression.java XPathNamespace.java XPathNSResolver.java XPathResult.java xml-xalan/java/src/org/apache/xpath/domapi XPathEvaluatorImpl.java XPathExpressionImpl.java XPathNSResolverImpl.java XPathResultImpl.java
      Committer's log entry: -Removed the temporary org.apache.xalan.dom3.xpath package. - -Updated the org.w3c.dom.xpath interfaces. - -Changed dependencies to org.w3c.dom.xpath interfaces in the implementation -classes in org.apache.xalan.xpath.domapi. -

    • Committed by ilene@apache.org on 2002/10/28
      Modified: xml-xalan/java build.xml
      Committer's log entry: -Build org.w3c.xpath.dom interfaces into xalan.jar. -

    • Committed by ilene@apache.org on 2002/10/28
      Modified: xml-xalan/java/src/org/apache/xpath XPathContext.java
      Committer's log entry: -Patch from Gordon Chiu. Replace stack.clear() calls with stack.removeAllElements() -to be compatible with JDK1.1.8. -

    • Committed by garyp@apache.org on 2002/10/28
      Modified: xml-xalan/java build.xml
      Committer's log entry: -Support compiling under JDK 1.2 - 1.4. Also check for compatability with target JDK 1.1.x. -

    • Committed by ilene@apache.org on 2002/10/29
      Modified: xml-xalan/java/src/org/apache/xpath/domapi XPathNamespaceImpl.java XPathResultImpl.java
      Committer's log entry: -Somewhat rough implementation of XPathNamespace. -

    • Committed by garyp@apache.org on 2002/10/29
      Modified: xml-xalan/java/bin ant.jar
      Committer's log entry: -Upgrade to Ant 1.5.1. -

    • Committed by mkwan@apache.org on 2002/10/29
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltBase.java ExsltStrings.java xml-xalan/java/src/org/apache/xalan/lib/sql DefaultConnectionPool.java
      Committer's log entry: -Fix JDK 1.1.8 compatibility problems. -Replace methods calls that are only in Java2 by JDK 1.1 equivalents. -For DefaultConnectionPool.java, use reflection mechanism to invoke -Thread.getContextClassLoader() instead of hard-coded invocation. -

    -
    - -

    Core (Non-XSLTC) source code updates:

    • Committed by jkesselm@apache.org on 2002/05/09
      Modified: xml-xalan/java/src/org/apache/xalan/serialize SerializerToText.java
      Committer's log entry: -Bugzilla 8358 -- bad method signature. I've created a new method -with the correct signature. The old one may or may not be entirely -superfluous, but I don't want to muck with it right now. -

    • Committed by dleslie@apache.org on 2002/05/09
      Modified: xml-xalan/java/xdocs/sources entities.ent xalan-jsite.xml
      Committer's log entry: -Updated Xalan version to 2.3.2 and Xerces to 2.0.1. -

    • Committed by dleslie@apache.org on 2002/05/09
      Modified: xml-xalan/java/xdocs/sources/xalan xsltc_usage.xml
      Committer's log entry: -Added classpath information pertaining to xercesImpl.jar and xml-apis.jar. -

    • Committed by dleslie@apache.org on 2002/05/09
      Modified: xml-xalan/java/xdocs/sources entities.ent
      Committer's log entry: -Added pointer to xml-apis.jar MANIFEST for version information. -

    • Committed by dleslie@apache.org on 2002/05/09
      Modified: xml-xalan/java/xdocs/sources/xalan history.xml readme.xml xsltc_history.xml
      Committer's log entry: -Updates for next version (release notes to history) -

    • Committed by dleslie@apache.org on 2002/05/09
      Modified: xml-xalan/java/xdocs/sources/xalan extensionslib.xml
      Committer's log entry: -Added info on Xalan implementation of EXSLT common, math, -and set extensions, and ongoing work on the function and result -elements and datetime extensions. -

    • Committed by dleslie@apache.org on 2002/05/09
      Modified: xml-xalan/java/xdocs/sources/xalan index.xml
      Committer's log entry: -Added support for EXSLT extensions. -

    • Committed by jkesselm@apache.org on 2002/05/09
      Modified: xml-xalan/java/src/org/apache/xpath XPathContext.java
      Committer's log entry: -Fix for Bugzilla entries - 6833 - 7023 - 7123 - 7410 - -Basic summary of logic error: It is possible for multiple RTF DTMs -to be pushed onto the stack between the start of a template and -return from it. I hadn't anticipated that, so my pop logic was -inadequate. - -I'm still not 110% sure I understand the case where this situation -arises... I have a general intuition that it makes sense, but also a -suspicion that there might be a way to avoid creating one of these -DTMs. We should review that someday. - -Meanwhile, this fixes a whole batch of related bugs. -

    • Committed by mmidy@apache.org on 2002/05/09
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref ExpandedNameTable.java
      Committer's log entry: -Performance improvement. Instead of looping through the ExtendedType objects, use a hashtable and go directly to the correct object. -

    • Committed by mmidy@apache.org on 2002/05/09
      Modified: xml-xalan/java/src/org/apache/xalan/serialize Encodings.java Encodings.properties
      Committer's log entry: -Bugzilla 6356: Add support for "windows-1251" and use a properties file to store all the supported encodings. Patch from Sergey Ushakov. -

    • Committed by mmidy@apache.org on 2002/05/10
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref ExpandedNameTable.java
      Committer's log entry: -Add basic DOM nodetypes to our hashtable of extended type IDs -

    • Committed by sboag@apache.org on 2002/05/12
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLMessages.java XSLTErrorResources.java XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/xslt Process.java xml-xalan/java/src/org/apache/xml/utils/res XResourceBundle.java XResourceBundleBase.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResourceBundle.java XPATHErrorResources_en.java XPATHErrorResources.java XPATHErrorResources.properties
      Committer's log entry: -Use PropertyResourceBundle instead of ListResourceBundle, and put error -messages into property files, for easier localization. -

    • Committed by sboag@apache.org on 2002/05/13
      Modified: xml-xalan/java/src/org/apache/xpath/axes WalkerFactory.java
      Committer's log entry: -In mightBeProximate, there was a bug that assumed a variable would not be -be a numeric result. It is now fixed to assume a number may be a number, which -may cause a small performance penalty. In the future, it should be possible to -chase this down a bit more to rule out more variables as non-numbers. -

    • Committed by dleslie@apache.org on 2002/05/13
      Modified: xml-xalan/java/src/org/apache/xpath XPath.java
      Committer's log entry: -Bugzilla 7157. Updated Javadoc comment to note that the XPath.installFunction() method currently does not -use the name parameter. -

    • Committed by mmidy@apache.org on 2002/05/13
      Modified: xml-xalan/java/src/org/apache/xpath/compiler Compiler.java xml-xalan/java/src/org/apache/xpath/functions FuncLast.java FuncPosition.java Function.java
      Committer's log entry: -Bugzilla6284: New function added to position() and last() that will help us determine whether we are executing a top-level expression and therefore, not inside a predicate -

    • Committed by mmidy@apache.org on 2002/05/13
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLMessages.java XSLTErrorResources.java xml-xalan/java/src/org/apache/xalan/templates ElemTemplateElement.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java
      Committer's log entry: -Add a null constructor for resource files and fix XSLMessages to use the correct error resource file -

    • Committed by mmidy@apache.org on 2002/05/13
      Modified: xml-xalan/java/src/META-INF/services org.apache.xml.dtm.DTMManager xml-xalan/java/src/org/apache/xml/dtm DTMManager.java
      Committer's log entry: -Add meta file for DTMManager factory and make sure it is read as UTF-8 -

    • Committed by jkesselm@apache.org on 2002/05/14
      Modified: xml-xalan/java/src/org/apache/xpath/objects XNodeSetForDOM.java
      Committer's log entry: -m_last was not being set correctly. See comments. -

    • Committed by jkesselm@apache.org on 2002/05/14
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemVariable.java
      Committer's log entry: -Bugzilla 7118: Variable set via RTF may have -local variables within it; need to push a new -context. -

    • Committed by jkesselm@apache.org on 2002/05/15
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemTemplateElement.java
      Committer's log entry: -Missing safety net, mostly needed during stylesheet construction. - -We really should change TransformerImpl to set parent _before_ -starting to setPropertiesFromAttributes, so the error conditions -which might cause this test to be needed don't arise. Among other -things, that would produce more useful diagnostic messages. -

    • Committed by mmidy@apache.org on 2002/05/15
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBaseTraversers.java
      Committer's log entry: -Bugzilla 8894: DescendantForRoot traversers needed to implement their own version of first(int, int) so that their context would be from the root. -

    • Committed by mmidy@apache.org on 2002/05/16
      Modified: xml-xalan/java/src/org/apache/xpath/axes NodeSequence.java
      Committer's log entry: -Fix for NullPointerException in SQL extension stuff. Just check for a NULL iterator... -

    • Committed by jkesselm@apache.org on 2002/05/16
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBaseIterators.java
      Committer's log entry: -Bugzilla 8324. This should have been checked into the main branch. -

    • Committed by jkesselm@apache.org on 2002/05/16
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemTemplateElement.java
      Committer's log entry: -Dumb of me -- fixed one edge case and created another, because -I forgot about subclassing Sigh. This version protects against both. -

    • Committed by jkesselm@apache.org on 2002/05/16
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBase.java DTMDefaultBaseIterators.java
      Committer's log entry: -Fix for new tests Variable71 and Variable72. - -When we went to the shared RTF DTMs, we forgot to update -PreceedingIterator to reflect the fact that the root of a DTM tree -may no longer have 0 as its internal Node Identifier. This change -corrects that situation, and does so without imposing a lot of -computational overhead since we need to scan the ancestors -anyway. - -There appear to be similar hazards in some of the Traversers, -still to be dealt with. Coming up with testcases which will provoke -those bugs (and confirm that we've fixed them) is likely to be -harder than writing the fix itself... -

    • Committed by amiro@apache.org on 2002/05/17
      Modified: xml-xalan/java/xdocs/sources/xalan xsltc_constraints.xml
      Committer's log entry: -section on problems was way out of date. Also incorporated material from JAXP 1.2 release notes -

    • Committed by amiro@apache.org on 2002/05/17
      Modified: xml-xalan/java/xdocs/sources/xalan xsltc_usage.xml
      Committer's log entry: -updated command option usuage. Some options have been added. -

    • Committed by santiagopg@apache.org on 2002/05/17
      Modified: xml-xalan/java/xdocs/sources/xalan xsltc_usage.xml
      Committer's log entry: -Updated first three sections. -

    • Committed by jkesselm@apache.org on 2002/05/17
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemVariable.java
      Committer's log entry: -Bugzilla 7118 REVERT -- This fix was provoking bug 9195, which -is more severe. -

    • Committed by jkesselm@apache.org on 2002/05/21
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: -Obvious mistake, apparently in a corner our regression tests missed. -

    • Committed by jkesselm@apache.org on 2002/05/21
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref/sax2dtm SAX2RTFDTM.java
      Committer's log entry: -Root node is not always 0 in an RTFDTM -

    • Committed by sboag@apache.org on 2002/05/22
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLMessages.java XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/xslt Process.java xml-xalan/java/src/org/apache/xpath/functions FuncPosition.java
      Committer's log entry: -Fixed hard coded string for timing diagnostics. -

    • Committed by santiagopg@apache.org on 2002/05/31
      Modified: xml-xalan/java/src/org/apache/xalan/serialize SerializerToXML.java
      Committer's log entry: -Prevent an external DTD from being inlined when using the built-in -identity transform. -

    • Committed by dleslie@apache.org on 2002/06/04
      Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorFuncResult.java ProcessorFunction.java ProcessorOutputElem.java ProcessorResultDocument.java XSLTSchema.java
      Committer's log entry: -XSLT 2.0: stylesheet function, result-document, and -principal-result-document. -

    • Committed by jkesselm@apache.org on 2002/06/04
      Modified: xml-xalan/java/bin xercesImpl.jar
      Committer's log entry: -Xalan3 branch: Check in temporary version of Xerces. This predates -the most recent changes to Xerces, and supports the older "light -weight" PSVI APIs. Current Xerces has replaced those with a heavier -version, but in the process lost the derivedFrom() method which -we need; when they restore that functionality, we'll cut over. -

    • Committed by dleslie@apache.org on 2002/06/05
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java
      Committer's log entry: -Core EXSLT dates-and-times functions. -

    • Committed by sboag@apache.org on 2002/06/06
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemVariable.java XUnresolvedVariable.java
      Committer's log entry: -Fix bug 7118. In XUnresolvedVariable, treat the RTF variable much more like -a template that has to count it's variables at compose-time, and link and unlink -when the lazy variable is resolved. -

    • Committed by sboag@apache.org on 2002/06/07
      Modified: xml-xalan/java/src/org/apache/xalan/lib/sql DefaultConnectionPool.java xml-xalan/java/src/org/apache/xalan/processor TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/res XSLMessages.java XSLTErrorResources.java XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/templates RedundentExprEliminator.java xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBaseTraversers.java xml-xalan/java/src/org/apache/xml/utils ListingErrorHandler.java xml-xalan/java/src/org/apache/xml/utils/synthetic JavaUtils.java xml-xalan/java/src/org/apache/xpath VariableStack.java xml-xalan/java/src/org/apache/xpath/functions FuncConcat.java Function.java Function2Args.java Function3Args.java FunctionOneArg.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java XPATHErrorResources.properties
      Committer's log entry: -Integrated some removal of hard-coded error messages. -

    • Committed by sboag@apache.org on 2002/06/08
      Modified: xml-xalan/java/src/org/apache/xpath XPathContext.java
      Committer's log entry: -Add resets for m_contextNodeLists, etc. It might be possible that these are -redundent with the same thing being done somewhere else, but given -http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6021 I suspect -that this really does need to be done here. It would explain any problems -that might have been reported after an exception has been thrown, and -the Transformer is being reused. -

    • Committed by sboag@apache.org on 2002/06/08
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemApplyTemplates.java ElemTemplate.java xml-xalan/java/src/org/apache/xalan/transformer StackGuard.java TransformerImpl.java xml-xalan/java/src/org/apache/xml/utils URI.java
      Committer's log entry: -Add back a certain amount of StackGuard functionality. Instead of checking -counts where both the node and the xsl:template are the same... (we would -really need also to check that parameters are the same), just check for recursion -of templates. We can make it fancier over time to also check for same params, -but checking of the current node may be harder. I was only able to set the -recursion limit to about 475 before I would get stack overflow errors anyway. -I also did some stuff where the error messages should be more consistent by -making sure some of the arrays are reset in XPathContex, which may address -some of the inconsistency problems that Christina reported. -may address part of the problem that Christina was having. -

    • Committed by sboag@apache.org on 2002/06/08
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/transformer StackGuard.java
      Committer's log entry: -Moved hard coded strings for StackGuard error message to properties file. -

    • Committed by sboag@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.properties
      Committer's log entry: -Fix bug for optionV. -

    • Committed by dleslie@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/extensions ExpressionContext.java ExpressionVisitor.java ExtensionHandlerExsltFunction.java ExtensionNamespacesManager.java ExtensionNamespaceSupport.java ExtensionsTable.java xml-xalan/java/src/org/apache/xalan/processor ProcessorExsltFuncResult.java ProcessorExsltFunction.java StylesheetHandler.java XSLTSchema.java xml-xalan/java/src/org/apache/xalan/templates Constants.java ElemExsltFuncResult.java ElemExsltFunction.java ElemExtensionCall.java ElemExtensionDecl.java StylesheetRoot.java xml-xalan/java/src/org/apache/xalan/transformer TransformerImpl.java xml-xalan/java/src/org/apache/xpath ExtensionsProvider.java XPathContext.java xml-xalan/java/src/org/apache/xpath/functions FuncExtElementAvailable.java FuncExtFunction.java FuncExtFunctionAvailable.java
      Committer's log entry: -Updates to Xalan extensions: (1) EXLST function and (2) architectural modifications. -This is a merge of the ExtensionEnhancements branch into Main. - -1. EXSLT function -We are well underway in our progress towards providing support for EXSLT extension functionss and elements. The EXSLT function and result elements (see http://www.exslt.org/func/func.html) require some fairly substantial additions. -XSLTSchema includes new XSLTElementDefs for a top-level exslt:function element, which, along with other items, may contain an exslt:result element. These definitions specify a new element class and processor for both of these elements, and a new extension handler. I have tested the implementation with the 6 test cases that EXSLT provides (including recursive calls), and it passes these tests. -Note: These additions/updates also provide the infrastructure for the XSLT 2.0 stylesheet function. -2. Architectural changes -During styesheet composition, Stylesheet Root assembles a vector of ExtensionNamespaceSupport objects. This object contains the information required during a transform to instantiate the required ExtensionHandler. If the stylesheet includes no extensions, this vector is null. I.e., it does not include handlers for the default extension namespaces (of which there are currently 7, and which the Xalan currently loads for each transformation). -The presence of an extension is detected as follows: -Compilation of an expression that contains a FuncExtFunction. StylesheetHandler.createXPath() uses an XPathVisitor to locate any FuncExtFunctions embedded in the expression. -Final composition of a component element -- ElemExtensionDecl.compose(). -Final composition of an extension component for which no component exsits -- ElemExtensionCall.compose(). -Final composition of an exslt:function element -- ElemFunction.compose(). -During StylesheetRoot.recompose(), any extension namespaces that are not predefined and for which no component or function element exists, are defined as java class (if a java class is found) or java package. In the current implementation, this last stab is made during the transformation, repeatedly if the element or function cannot be processed and is called more than once. -At the beginning of each transformation -- transformNode() -- if any extensions exist, TransformerImpl instantiates an ExtensionsTable with a hashtable containing an ExtensionHandler for each of the ExtensionNamespaceSupport objects defined during stylesheet assembly. XPathContext no longer creates or has any direct knowledge of the ExtensionsTable. The ExtensionsTable does not contain handlers for predefined namespaces that are not being used. -TransformerImpl implements the org.apache.xpath.ExtensionsProvider interface. The relevant XPath functions (FuncExtFunction, FuncExtElememntAvailable, and FuncExtFunctionAvailable) call this interface, via XPathContext.getOwnerObject(). The implementation contains 3 methods that call through to the ExtensionsTable, which passes the call on to the appropriate ExtensionHandler.. -

    • Committed by mmidy@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/serialize Encodings.java
      Committer's log entry: -Use ContextClassLoader - Use full Encoding file package name - Merge new patch from Sergey Ushakov -

    • Committed by sboag@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/templates FuncDocument.java FuncFormatNumb.java xml-xalan/java/src/org/apache/xpath/functions FuncConcat.java FuncExtFunction.java FuncSubstring.java Function.java Function2Args.java Function3Args.java FunctionDef1Arg.java FunctionMultiArgs.java FunctionOneArg.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.properties
      Committer's log entry: -Patch submitted by Henry_Zongaro@us.ibm.com: - -To summarize what I did, the Function class and its subclasses have two -methods that check the number of arguments: setArg and -checkNumberArgs. The former checks whether too many arguments are -specified, and the latter checks for too few (or too many, redundantly). - -In the case where there are optional arguments (as in substring), the class -for the function (FuncSubstring, in this case) derives from a class that has a -fixed number of arguments (Func3Arguments, in this case). If too few -arguments are specified, the FuncSubstring.checkNumberArgs method -reports that the function only allows 2 or 3 arguments; if too many arguments -are specified, the Function3Arguments.setArg method reports that the -function only allows 3 arguments. - -To fix the problem, I added reportWrongNumberArgs() methods to the -Function class and to its subclasses, as appropriate, and I added code to -call that from checkNumberArgs and setArg - that way, the correct number -of arguments is always reported in the error messages. - -Alternatively, I could have changed the setArg method in all the classes that -have optional arguments to report correctly the number of arguments, but I -didn't like the idea of having it redundantly perform the same check that the -setArg method of its base class was going to perform just to get a better -message out. A third possibility would be to have setArg call the -checkNumberArgs method when it detects too many arguments are -specified; that would guarantee that setArg would report the same message, -and avoid introducing a new method, as long as checkNumberArgs always -checks for both too few and for too many arguments. A fourth possibility -would be to report two different errors: the minimum number of arguments -required in checkNumberArgs and the maximum permitted in setArg. - -I also noticed that the message produced for FuncSubstring when too few -arguments are specified actually indicates that 0 or 1 arguments are required, - so I fixed the XPATHErrorResources.properties file. - -I don't see the NPE that Dave Marston mentions in Bugzilla, so I assume -that's been fixed. -

    • Committed by sboag@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java xml-xalan/java/src/org/apache/xalan/templates ElemNumber.java ElemTemplateElement.java xml-xalan/java/src/org/apache/xml/utils PrefixResolver.java PrefixResolverDefault.java xml-xalan/java/src/org/apache/xpath/compiler Lexer.java
      Committer's log entry: -Patch submitted by Ilene_Seelemann@us.ibm.com for Bug 6798: - -Added a method (handlesNullPrefixes) to the PrefixResolver interface so -that the resolver can indicate whether it supports null prefixes. Then, in the -tokenizer, if the prefix is null, and the resolver supports that, it continues -processing as if the prefix had a value. In Lexer.java, methods that have -changed are: tokenize, mapNSTokens. - -In ElemNumber#getCountMatchPattern, pass MyPrefixResolver instance to default -psuedo match patterns. -

    • Committed by dleslie@apache.org on 2002/06/11
      Modified: xml-xalan/java/xdocs/sources/xalan history.xml readme.xml xsltc_constraints.xml xsltc_history.xml
      Committer's log entry: -Moved 2.3.2 core and xsltc updates into the history files. -

    • Committed by curcuru@apache.org on 2002/06/11
      Modified: xml-xalan/java/bin xercesImpl.jar
      Committer's log entry: -xercesImpl.jar from Xerces-J-bin.2.0.1.zip (for upcoming Xalan-J 2.4.D1) -

    • Committed by curcuru@apache.org on 2002/06/11
      Modified: xml-xalan/java/src MANIFEST.MF
      Committer's log entry: -Update xerces.jar to be xercesImpl.jar; this should have been -done quite a while ago. Note the Class-Path: entry needs review -in general at some point. -

    • Committed by curcuru@apache.org on 2002/06/11
      Modified: xml-xalan/java/xdocs/sources/xalan builds.xml
      Committer's log entry: -Brief documentation about developer standards and official build processes -

    • Committed by curcuru@apache.org on 2002/06/11
      Modified: xml-xalan/java/xdocs/sources xalan-jlocal.xml
      Committer's log entry: -Add builds.xml; perhaps should also be added to xalan-jsite.xml as well -

    • Committed by sboag@apache.org on 2002/06/11
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemNumber.java xml-xalan/java/src/org/apache/xpath/compiler Lexer.java
      Committer's log entry: -From Ilene Seelemann: -Added the following in blue to line 395 of Lexer.java - - if ((-1 != posOfNSSep) || - ((m_namespaceContext != null) && (m_namespaceContext.handlesNullPrefixes()))) - -I'm also including ElemNumber.java which really doesn't need to -explicitly state that it implements PrefixResolver. -Without these updates everything does run fine. -

    • Committed by dleslie@apache.org on 2002/06/13
      Modified: xml-xalan/java/xdocs/sources/xalan readme.xml xsltc_constraints.xml
      Committer's log entry: -updates for developer's release. -

    • Committed by dleslie@apache.org on 2002/06/13
      Modified: xml-xalan/java/xdocs/sources entities.ent xalan-jsite.xml xml-xalan/java/xdocs/sources/xalan history.xml index.xml readme.xml resources.xml xml-xalan/java KEYS
      Committer's log entry: -Patches for developer's release from Sarah McNamara. -

    • Committed by dleslie@apache.org on 2002/06/13
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: -Updated version # for developer's release. -

    • Committed by curcuru@apache.org on 2002/06/13
      Modified: xml-xalan/java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: -Update .jar file sizes for 2.4.D1 release -

    • Committed by curcuru@apache.org on 2002/06/13
      Modified: xml-xalan/java/xdocs/sources/xalan resources.xml
      Committer's log entry: -Remove extraneous slash char on path -Submitted by: mcnamara@ca.ibm.com -

    • Committed by curcuru@apache.org on 2002/06/13
      Modified: xml-xalan/java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: -Fix Bugzilla #9137; don't toLowerCase() the filename (not really needed anymore); -remove line for xalan.jar for 2_4_D1 because .jar build size is not determinate -

    • Committed by dleslie@apache.org on 2002/06/13
      Modified: xml-xalan/java/xdocs/sources/xalan extensionslib.xml
      Committer's log entry: -Add pointers to info on new EXSLT extensions. -

    • Committed by dleslie@apache.org on 2002/06/17
      Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionNamespacesManager.java
      Committer's log entry: -Changed Vector.get(int) to Vector.elementAt(int) to maintain -compability with Java 1.1.8. -

    • Committed by dleslie@apache.org on 2002/06/17
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltDatetime.java
      Committer's log entry: -Modified leap-year functions to use arithmetic logic rather than relying -on a Calendar method that doesn't exist in Java 1.1.8. -

    • Committed by dleslie@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xpath/axes RTFIterator.java xml-xalan/java/src/org/apache/xpath/objects XRTreeFrag.java
      Committer's log entry: -Added RTFIterator (extends OneStepIteratorForward); -created fromRTFFragment so EXSLT object-type function -can identify an RTF with certainty. -

    • Committed by dleslie@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltCommon.java
      Committer's log entry: -Removed duplicate implementation of several EXSLT "Set" -functions. -

    • Committed by amiro@apache.org on 2002/06/21
      Modified: xml-xalan/java/bin jtidy.LICENSE.txt jtidy.README.txt Tidy.jar
      Committer's log entry: -adding Jtidy for use with test harness to parse html -

    • Committed by curcuru@apache.org on 2002/06/21
      Modified: xml-xalan/java/src/org/apache/xml/utils Hashtree2Node.java
      Committer's log entry: -Simplistic static utility to convert a Hashtable of items (either -Hashtables or anything else cast to (String)) into an Element tree -

    • Committed by curcuru@apache.org on 2002/06/21
      Modified: xml-xalan/java/src/org/apache/xalan/lib Extensions.java
      Committer's log entry: -Update checkEnvironment to attempt to call org.apache.env.Which first -by using reflection; Which provides better output data than -EnvironmentCheck. If reflection doesn't work, then we -fallback to EnvironmentCheck as before. -

    • Committed by curcuru@apache.org on 2002/06/21
      Modified: xml-xalan/java/xdocs/sources/xalan faq.xml
      Committer's log entry: -Add doc about calling checkEnvironment as a stylesheet extension -

    • Committed by tmiller@apache.org on 2002/06/21
      Modified: xml-xalan/java/src/org/apache/xalan/serialize SerializerToXML.java
      Committer's log entry: -bug fix for bugzilla 9572, fix by Pavani.Mukthipudi@sun.com -

    • Committed by curcuru@apache.org on 2002/06/26
      Modified: xml-xalan/java build.xml
      Committer's log entry: -Update docs.class.path to include XSLTC-dependent jars -Submitted by: Henri Gomez hgomez@slib.fr -

    • Committed by mmidy@apache.org on 2002/06/26
      Modified: xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java XPATHErrorResources.properties
      Committer's log entry: -Add error resources pulled out from code -

    • Committed by mmidy@apache.org on 2002/06/26
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java XSLTErrorResources.properties
      Committer's log entry: -Add error resources pulled out from code -

    • Committed by mmidy@apache.org on 2002/06/27
      Modified: xml-xalan/java/src/org/apache/xpath/compiler Compiler.java OpMap.java
      Committer's log entry: -Pull out hard coded messages -

    • Committed by mmidy@apache.org on 2002/06/27
      Modified: xml-xalan/java/src/org/apache/xpath/compiler XPathParser.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java XPATHErrorResources.properties
      Committer's log entry: -Bugzilla 5016: Patch from Henry Zongaro... Fix XPATHParser.java to prevent matching empty RelativeLocationPath and Step expressions, prevent a LocationPath from preceding a Predicate in a FilterExpr, check for valid NameTest in NodeTest() -

    • Committed by mmidy@apache.org on 2002/06/28
      Modified: xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.properties
      Committer's log entry: -Fix typo. -

    • Committed by amiro@apache.org on 2002/06/29
      Modified: xml-xalan/java/xdocs/sources/xalan xsltc_constraints.xml
      Committer's log entry: -fix typo in SmartTransormerFactoryImpl pointed out by Tobias McNulty -

    • Committed by mmidy@apache.org on 2002/07/01
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemNumber.java
      Committer's log entry: -Bug6268. Patch from Ilene Seelemann. Fix Grouping separator. If no grouping separator is specified but a gouping size is, number is not formatted. If grouping separator is "", warning is issued and number is not formatted. If grouping separator is more than one character, warning is issued and number is not formatted. -

    • Committed by mmidy@apache.org on 2002/07/08
      Modified: xml-xalan/java/src/org/apache/xalan/processor StylesheetHandler.java XSLTAttributeDef.java xml-xalan/java/src/org/apache/xml/utils DefaultErrorHandler.java
      Committer's log entry: -resource error messages -

    • Committed by mmidy@apache.org on 2002/07/10
      Modified: xml-xalan/java/src/org/apache/xalan/processor XSLTAttributeDef.java XSLTElementProcessor.java XSLTSchema.java xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/templates AVT.java Constants.java ElemAttribute.java ElemElement.java ElemNumber.java ElemPI.java xml-xalan/java/src/org/apache/xml/utils QName.java StringToIntTable.java xml-xalan/java/src/org/apache/xpath/res XPATHErrorResources.java XPATHErrorResources.properties
      Committer's log entry: -Bugzilla 5013: Validation of QName attribute values. The patch will also fix the missing validation described in bugs 792 and 793 -

    • Committed by mmidy@apache.org on 2002/07/10
      Modified: xml-xalan/java/src/org/apache/xml/utils XMLChar.java
      Committer's log entry: -Bugzilla 5013: Validation of QName attribute values. The patch will also fix the missing validation described in bugs 792 and 793 -

    • Committed by mmidy@apache.org on 2002/07/10
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBaseIterators.java
      Committer's log entry: -bugzilla 9575: Fix AncestorIterator counting root node twice. Patch from Henry Zongaro. -

    • Committed by jkesselm@apache.org on 2002/07/10
      Modified: xml-xalan/java/src/org/apache/xml/utils DOMBuilder.java
      Committer's log entry: -<Blush> - -This was still trying to switch between setAttribute() and -setAttributeNS(). Correct usage of DOM Level 2 would be to -always use setAttributeNS(), and simply set a null URI when the -node is not namespaced. (Basically, the L1 versions of -createElement, createAttribute, setAttribute and setAttributeNode -should be considered deprecated with the sole exception of -manipulating a DOM intended to be viewed *only* as Level 1.) - -I could swear we fixed this a VERY long time ago... -Good catch, thanks for calling it to our attention. - -</Blush> -

    • Committed by ilene@apache.org on 2002/07/19
      Modified: xml-xalan/java/src/org/apache/xalan/transformer ResultTreeHandler.java
      Committer's log entry: -Morris Kwan's patch for bugzilla#10306 - -The problem is that the namespace declaration is not added to the attributes if there are other leading attributes. There is a check for whether the namespace - has already been added. That check is commented out because multiple namespace declarations can exist in one element. -

    • Committed by ilene@apache.org on 2002/07/22
      Modified: xml-xalan/java/src/org/apache/xalan/templates RedundentExprEliminator.java
      Committer's log entry: -Applied patch from Morris Kwan for bugzilla #9753. - -The bug addresses the problem that there is a build error with Xalan under JDK 1.4, because one of the classes uses assert() as method name. - And assert is a keyword in JDK 1.4. The patch just changes the word "assert" to "assertion". -

    • Committed by ilene@apache.org on 2002/07/24
      Modified: xml-xalan/java/src/org/apache/xalan/processor XSLTSchema.java xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java XSLTErrorResources.properties xml-xalan/java/src/org/apache/xalan/templates ElemPI.java xml-xalan/java/src/org/apache/xml/utils QName.java
      Committer's log entry: -Remaining updates for Bugzilla#5013. - -Some attributes that should have been handled as errors were getting -handled as warnings. -

    • Committed by ilene@apache.org on 2002/07/24
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemApplyTemplates.java ElemForEach.java
      Committer's log entry: -Check that recursionLimit is not negative before calling checkForInfinateLoop. -

    • Committed by amiro@apache.org on 2002/07/25
      Modified: xml-xalan/java/xdocs/sources/xalan xsltc_constraints.xml
      Committer's log entry: -fix typo, java for Java in doc on xsltc and external java functions -

    • Committed by ilene@apache.org on 2002/07/25
      Modified: xml-xalan/java/src/org/apache/xalan/serialize Encodings.java
      Committer's log entry: -Applying patch for bug#10839. - -Try/catch block needed around System.getProperty call. -

    • Committed by ilene@apache.org on 2002/07/26
      Modified: xml-xalan/java/src/org/apache/xalan/processor XSLTAttributeDef.java XSLTSchema.java
      Committer's log entry: -Applying Paul Brown's patch for bug#6972. - -xsl:output cdata-section-elements attribute was not handled correctly. -

    • Committed by zongaro@apache.org on 2002/07/29
      Modified: xml-xalan/java/src/org/apache/xpath/axes SingletonIterator.java
      Committer's log entry: -file SingletonIterator.java was initially added on branch XSLTC_DTM. -

    • Committed by ilene@apache.org on 2002/07/29
      Modified: xml-xalan/java/src/org/apache/xalan/lib ExsltCommon.java ExsltMath.java ExsltSets.java Extensions.java
      Committer's log entry: -Committed patch for bugzilla#10323 (incorrect Javadoc -in the extension code.) -Submitted by Morris Kwan (mkwan@ca.ibm.com) -

    • Committed by ilene@apache.org on 2002/07/29
      Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerJavaClass.java xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.properties
      Committer's log entry: -Committed patch for bugzilla#10914 -( Need better error message for redirect select errors) -Submitted by Morris Kwan (mkwan@ca.ibm.com) -

    • Committed by ilene@apache.org on 2002/07/29
      Modified: xml-xalan/java/src/org/apache/xml/utils TreeWalker.java
      Committer's log entry: -Patch for bugzilla #9146 - -NullPointerException when attempting to build a stylesheet from -a DOM Element instead of a Document node. -

    • Committed by zongaro@apache.org on 2002/07/30
      Modified: xml-xalan/java/src/org/apache/xml/utils SystemIDResolver.java
      Committer's log entry: -Applying patches for Morris Kwan for bug 10519. Changed condition in absoluteURI method to handle the case where the URI is the root of a file system - e.g., / or c:\ -

    • Committed by zongaro@apache.org on 2002/07/30
      Modified: xml-xalan/java/src/org/apache/xalan/processor ProcessorInclude.java
      Committer's log entry: -Applying patches for Morris Kwan for bug 10519. In parse method, if SystemId of the returned DOMSource object is null, systemID is resolved using href. -

    • Committed by amiro@apache.org on 2002/08/02
      Modified: xml-xalan/java/xdocs/sources/xalan xsltc_constraints.xml
      Committer's log entry: -changed verbage to agree with new support of constructors and nonstatic external java functions -

    • Committed by zongaro@apache.org on 2002/08/07
      Modified: xml-xalan/java/src/org/apache/xpath/objects XRTreeFrag.java
      Committer's log entry: -Applying patch for Bug 9683 for Morris Kwan. If XRTreeFrag is constructed -without respect to an XPathContext, the object() method should defer to the -parent class's object() method to convert the fragment to the appropriate -representation. -

    • Committed by ilene@apache.org on 2002/08/09
      Modified: xml-xalan/java/src/org/apache/xalan/templates ElemValueOf.java
      Committer's log entry: -Patch for bugzilla #6071. Specifically, this patch allows line numbers to -be reported when errors are discovered at runtime in a value-of attribute. -(See idkeyerr10.) -

    • Committed by mkwan@apache.org on 2002/08/14
      Modified: xml-xalan/java/src MANIFEST.MF
      Committer's log entry: -For Bug#6547. Remove reference to old jar files. -

    • Committed by ilene@apache.org on 2002/08/15
      Modified: xml-xalan/java/src/org/apache/xalan/templates FuncKey.java xml-xalan/java/src/org/apache/xalan/transformer KeyTable.java
      Committer's log entry: -Patch for bug: "The key() function throws an exception when called in the context of a -local variable." reported on xalan-dev. - -Modified FuncKey.execute to use getDocumentRoot instead of getDocument. -

    • Committed by mkwan@apache.org on 2002/08/16
      Modified: xml-xalan/java/src/org/apache/xpath/axes BasicTestIterator.java
      Committer's log entry: -For Bug#11123. Fix infinite loop in union expression. -

    • Committed by mkwan@apache.org on 2002/08/16
      Modified: xml-xalan/java/src/org/apache/xalan/extensions ExtensionHandlerJavaClass.java
      Committer's log entry: -For bug#7776. Fix argument passing problem for Java extension. -

    • Committed by mkwan@apache.org on 2002/08/16
      Modified: xml-xalan/java/src/org/apache/xalan/trace PrintTraceListener.java
      Committer's log entry: -See bug#10945. Test if a node is a DTMNodeProxy before casting. -

    • Committed by ilene@apache.org on 2002/08/19
      Modified: xml-xalan/java/src/org/apache/xml/dtm/ref DTMDefaultBaseTraversers.java
      Committer's log entry: -Patch for bugzilla#11834. Replaced calls to DTM.getDocument with get -DTM.getDocumentRoot. -

    • Committed by jkesselm@apache.org on 2002/08/21
      Modified: xml-xalan/java/src/org/apache/xalan/transformer ClonerToResultTree.java
      Committer's log entry: -James Riordan's bug -- Attributes on elements returned from -extensions were not being processed successfully. Turns out -our copying logic had a minor sequencing error. - -I don't see anything similar listed in Bugzilla. -

    • Committed by ilene@apache.org on 2002/08/27
      Modified: xml-xalan/java/bin xml-apis.jar
      Committer's log entry: -Replacing xml-apis.jar with the version from the RIVERCOURT1 branch -of xml-commons. The xml-commons-1.0.b2 version does not pass -the TCK 1.1 or the TCK 1.2. -

    • Committed by ilene@apache.org on 2002/08/27
      Modified: xml-xalan/java/xdocs/sources/xalan builds.xml
      Committer's log entry: -Small updates to the build documentation. -

    • Committed by ilene@apache.org on 2002/08/27
      Modified: xml-xalan/java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: -Updating version numbers to 2.4.0 for new release. -

    • Committed by ilene@apache.org on 2002/08/27
      Modified: xml-xalan/java build.xml xml-xalan/java/src/org/apache/xalan/processor XSLProcessorVersion.java xml-xalan/java/xdocs/sources entities.ent xalan-jsite.xml
      Committer's log entry: -Updating version numbers to 2.4.0 for new release. -

    • Committed by ilene@apache.org on 2002/08/27
      Modified: xml-xalan/java commits.xml
      Committer's log entry: -New commits.xml for upcoming Xalan 2.4.0 release. -

    • Committed by ilene@apache.org on 2002/08/27
      Modified: xml-xalan/java/xdocs/sources/xalan history.xml xsltc_history.xml
      Committer's log entry: -New history.xml, xsltc_history.xml for upcoming Xalan 2.4.0 release. -

    -
    - -

    Core (Non-XSLTC) source code updates:

    • Committed by jkesselm@apache.org on 02/22/2002
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      Committer's log entry: Make synchronized to address potential reentrancy issue in - XRTreeFrag.finalize(), as discussed in the Javadoc. This may - solve several outstanding bug reports regarding reuse of - Transformers and cache suppression in for-each.

    • Committed by jkesselm@apache.org on 02/22/2002
      Modified: java/src/org/apache/xpath XPathContext.java
      Committer's log entry: Well, _that_ was dumb... Forgot one "don't dereference if null" test.

    • Committed by jkesselm@apache.org on 02/27/2002
      Modified: java/src/org/apache/xpath/objects XRTreeFrag.java
      Committer's log entry: Just comment

    • Committed by jkesselm@apache.org on 02/27/2002
      Modified: java/src/org/apache/xalan/serialize SerializerToXML.java
      Committer's log entry: We weren't handling the case where no default-value handling was specified. - This didn't generally bother us because XSLT never produces an element - declaration as output... but it did affect TransformerIdentityImpl when the - source document had an internal subset. - - See xalan-j-users archives, under subject - "Differences between explicit and implicit parsing for docs with DTDs?"

    • Committed by jkesselm@apache.org on 03/04/2002
      Modified: java/src/org/apache/xalan/processor StylesheetHandler.java - java/src/org/apache/xalan/templates ElemVariable.java - java/src/org/apache/xalan/transformer TransformerImpl.java - java/src/org/apache/xml/dtm/ref DTMManagerDefault.java - java/src/org/apache/xpath VariableStack.java - XPathContext.java
      Committer's log entry: Variable64-66 and a number of variable-related Bugzilla reports: Global - variables may have their resolution deferred. This was causing their - content to be placed on the normal variable stack, where it could be - popped off (arggh) and later overwritten (double arggh). This change - gives them an independent storage space which is not subject to - those risks. - - While I was at it, I've also made the VariableStack class a trifle more - self-documenting by giving some of the fields more meaningful names.

    • Committed by jkesselm@apache.org on 03/04/2002
      Modified: java/src/org/apache/xml/utils IntStack.java
      Committer's log entry: Bugzilla 6854: Return the stack exception, as documented.

    • Committed by jkesselm@apache.org on 03/12/2002
      Modified: java/src/org/apache/xpath XPathContext.java
      Committer's log entry: Bugzilla 6156 reopened: Same symptom, different disease -- rather than - a late finalizer, we simply forgot to reset one field between invocations.

    • Committed by jkesselm@apache.org on 03/19/2002
      Modified: java/src/org/apache/xml/dtm/ref TestDTM.java
      Committer's log entry: Replace old version, which was specific to particular implentations of - DTM, with one which is specific only to DTMManagerDefault and which - can be generalized more easily to conduct other tests.

    • Committed by jkesselm@apache.org on 03/19/2002
      Removed: java/src/org/apache/xml/dtm/ref TestDTMNodes.java
      Committer's log entry: No longer in service. - - This supported the old version of TestDTM. New version has - a node-dumper as an internal subroutine. (If we're going to do - a display method for other debugging purposes, it should be - both applicable to all DTMs and -- probably -- built into the - DTM system.)

    • Committed by jkesselm@apache.org on 03/20/2002
      Modified: java/src/org/apache/xml/dtm/ref TestDTM.java
      Committer's log entry: Add Apache header, remove import of discarded TestDTMNode. - At some point, we should consider moving this class to the tests - directory.

    • Committed by sboag@apache.org on 03/21/2002
      Modified: java/src/org/apache/xalan/serialize SerializerToXML.java
      Committer's log entry: Properly catch exception from CharInfo constructor, and try again.

    • Committed by sboag@apache.org on 03/21/2002
      Modified: java/src/org/apache/xml/utils SystemIDResolver.java
      Committer's log entry: Put extra check for getAbsoluteURI(String urlString, String base) for absolute - file paths with no protocol... I think one of the last check-in's wiped this -out. - So now, if the path is the form of "x:/x" or "/x" then "file:///" is added to -it. - I don't see how this can screw anything up... but I'm sure it will.

    • Committed by sboag@apache.org on 03/21/2002
      Modified: java/src/org/apache/xpath XPathContext.java
      Committer's log entry: Merge from redundent expression elemination branch.

    • Committed by sboag@apache.org on 03/21/2002
      Modified: java/src/org/apache/xalan Version.java - java/src/org/apache/xalan/lib/sql DTMDocument.java - java/src/org/apache/xalan/processor ProcessorKey.java - ProcessorPreserveSpace.java - ProcessorStripSpace.java StylesheetHandler.java - XSLTAttributeDef.java XSLTElementProcessor.java - java/src/org/apache/xalan/templates AVT.java AVTPart.java - AVTPartSimple.java AVTPartXPath.java - ElemApplyTemplates.java ElemAttribute.java - ElemCallTemplate.java ElemChoose.java - ElemCopyOf.java ElemElement.java - ElemExtensionCall.java ElemForEach.java ElemIf.java - ElemLiteralResult.java ElemNumber.java - ElemTemplateElement.java ElemValueOf.java - ElemVariable.java ElemWhen.java ElemWithParam.java - FuncDocument.java FuncKey.java Stylesheet.java - WhiteSpaceInfo.java - java/src/org/apache/xalan/trace TraceManager.java - java/src/org/apache/xalan/transformer KeyIterator.java - KeyManager.java KeyRefIterator.java KeyTable.java - NodeSorter.java ResultTreeHandler.java - TransformerHandlerImpl.java - java/src/org/apache/xml/utils NodeVector.java - java/src/org/apache/xpath Expression.java VariableStack.java - XPath.java - java/src/org/apache/xpath/axes AttributeIterator.java - AxesWalker.java ChildIterator.java - ChildTestIterator.java DescendantIterator.java - FilterExprWalker.java IteratorPool.java - LocPathIterator.java MatchPatternIterator.java - OneStepIterator.java OneStepIteratorForward.java - PredicatedNodeTest.java ReverseAxesWalker.java - SelfIteratorNoPredicate.java UnionPathIterator.java - WalkerFactory.java WalkingIterator.java - WalkingIteratorSorted.java - java/src/org/apache/xpath/compiler Compiler.java - java/src/org/apache/xpath/functions FuncBoolean.java - FuncCount.java FuncExtFunction.java Function.java - Function2Args.java Function3Args.java - FunctionMultiArgs.java FunctionOneArg.java - java/src/org/apache/xpath/objects XBoolean.java - XNodeSet.java XNodeSetForDOM.java XNumber.java - XObject.java XRTreeFrag.java - XRTreeFragSelectWrapper.java XString.java - XStringForFSB.java - java/src/org/apache/xpath/operations Bool.java Equals.java - Operation.java UnaryOperation.java Variable.java - java/src/org/apache/xpath/patterns FunctionPattern.java - NodeTest.java StepPattern.java UnionPattern.java
      Added: java/src/org/apache/xalan/processor WhitespaceInfoPaths.java - java/src/org/apache/xalan/templates AbsPathChecker.java - ElemVariablePsuedo.java - RedundentExprEliminator.java VarNameCollector.java - XSLTVisitable.java XSLTVisitor.java - XUnresolvedVariableSimple.java - java/src/org/apache/xpath ExpressionNode.java - ExpressionOwner.java XPathVisitable.java - XPathVisitor.java - java/src/org/apache/xpath/axes BasicTestIterator.java - FilterExprIterator.java - FilterExprIteratorSimple.java - HasPositionalPredChecker.java NodeSequence.java - PathComponent.java UnionChildIterator.java - java/src/org/apache/xpath/operations VariableSafeAbsRef.java
      Removed: java/src/org/apache/xalan/transformer KeyWalker.java
      Committer's log entry: Redundent Expression Elimination branch merge. - - Major architectural changes - 1) Rip out cacheing in all iterators, and move the caching into XNodeSet -(actually NodeSequence where the caching is done derives from XObject and -XNodeSet derives from NodeSequence).Lots of other changes went into this, -including rewriting of some of the xsl:key stuff. - - 2) Implementation of a Visitor mechanism for the stylesheet and xpath -components.Each component for an XPath event is passed an ExpressionOwner, -which just has a getExpression and setExpression method, which allows us to -create a list of these, and then be able to do rewrites.This should be a -generally useful mechanism for all sorts of stuff, and should be considered a -public API. - - 3) Implementation of deepEquality methods for all XPath components, which -allows us to see if two components are equal. - - 4) Implementation of RedundentExprEliminator, which is a derivative from the -new XSLTVisitor class, which runs over the stylesheet collecting xpaths within -the same scope, and absolute xpaths that are not context dependent.These are -then each reduced by walking the list and checking for deep equality (though -global paths are always reduced).Reduction takes place by creating variables -that have a special namespace and a non-legal local name.Both full and partial -path reduction done. - - Not done yet: Add back in the xsl:key caching that I ripped out (not a big -deal).Could be skipped, with some risk. - - Not done yet: Implement isLast function.With the new stuff, the last() -function will be slower, so, since most cases are just checking to see if an -item is the last, I want to rewrite foo[last()] patterns to -foo[xalan:isLast()].Could be skipped, with some risk. - - Davanum performance test result: 4x increase in performance. - - Datapower performance suite results: very slight decrease in overall -performance.:-( - - Smoke test results: All clear when run with Xerces 1.

    • Committed by dleslie@apache.org on 03/22/2002
      Modified: java/src/org/apache/xpath DOMHelper.java
      Committer's log entry: The Node identity test in isNodeAfter() - (ie., node1 == node2) does not work in some cases, - so I added a routine to use DTMNodeProxy equals() - if that test fails. - This was required to support the new EXSLT - leading() and trailing() extension functions.

    • Committed by dleslie@apache.org on 03/22/2002
      Modified: java/src/org/apache/xalan/extensions ExtensionsTable.java - MethodResolver.java
      Committer's log entry: 1. Registered the EXSLT 'common', 'sets', and 'math' - namespaces ExtensionsTable. - - 2. To handle extension functions (e.g., some EXSLT - functions) that include a dash in their name, added - a routine in MethodResolver that maps abc_xyz to - abcXyz.

    • Committed by dleslie@apache.org on 03/22/2002
      Modified: java/src/org/apache/xalan/lib package.html
      Added: java/src/org/apache/xalan/lib ExsltCommon.java - ExsltMath.java ExsltSets.java
      Committer's log entry: Preliminary set of EXSLT extension implementations.

    • Committed by dleslie@apache.org on 03/22/2002
      Modified: java/src/org/apache/xalan/lib ExsltCommon.java - ExsltMath.java ExsltSets.java Extensions.java
      Committer's log entry: Added Apache license.

    • Committed by sboag@apache.org on 03/23/2002
      Modified: java/src/org/apache/xalan/templates ElemApplyImport.java - ElemApplyTemplates.java ElemAttribute.java - ElemCallTemplate.java ElemChoose.java - ElemComment.java ElemCopy.java ElemCopyOf.java - ElemFallback.java ElemForEach.java ElemIf.java - ElemMessage.java ElemNumber.java ElemPI.java - ElemParam.java ElemTemplate.java - ElemTextLiteral.java ElemUse.java ElemValueOf.java - ElemVariable.java - java/src/org/apache/xalan/trace TraceListenerEx.java - TraceManager.java - java/src/org/apache/xalan/transformer TransformerImpl.java
      Added: java/src/org/apache/xalan/trace TraceListenerEx2.java
      Committer's log entry: Implemented TraceListenerEx2, which extends TraceListenerEx to add - the traceEnd event. - - Modified all existing templates that call fireTraceEvent to also call - fireTraceEndEvent at the appropriate time. - - Note that there was a bad incompatibility between xsl:for-each and - xsl:if, which was called whether the test was successful or not. - With the current logic of xsl:for-each, - if the node-set is empty trace will not be called at all. - So I've changed xsl:if to match the xsl:for-each behavior.

    • Committed by sboag@apache.org on 03/24/2002
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: Set the DEVELOPMENT number to 1, in prep for a developer's release.

    • Committed by sboag@apache.org on 03/24/2002
      Modified: java/src/org/apache/xalan/templates ElemForEach.java
      Committer's log entry: Make sure the current element is nulled out if debug mode so that - TransformerImpl#getElementCallstack works correctly.

    • Committed by sboag@apache.org on 03/24/2002
      Modified: java/src/org/apache/xalan/templates ElemElement.java
      Committer's log entry: Added fire trace events, which seemed to be missing.

    • Committed by sboag@apache.org on 03/24/2002
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Added getElementCallstack() and getTemplateCallstack() methods, for support - of xsl debuggers.

    • Committed by sboag@apache.org on 03/24/2002
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: Changed the release number to 4, since new functionality has been added.

    • Committed by sboag@apache.org on 03/27/2002
      Modified: java/src/org/apache/xalan/templates ElemApplyTemplates.java
      Committer's log entry: Fix Frank Weiss bug, which has to do with the currentFrameBottom not being - restored properly when inside a with-param. - - Fix Cristina bug where the traceEnd event was being passed the wrong template. - - Fix problem with RTF pruning where push/popRTFContext wasn't being called - for xsl:apply-templates.

    • Committed by sboag@apache.org on 03/27/2002
      Modified: java/src/org/apache/xalan/trace TraceListenerEx2.java
      Committer's log entry: Fix JavaDoc comment.

    • Committed by sboag@apache.org on 03/27/2002
      Modified: java/src/org/apache/xalan/trace PrintTraceListener.java
      Committer's log entry: Handle TraceListenerEx2, even though we don't do anything with the extra -methods.

    • Committed by sboag@apache.org on 03/27/2002
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Fix problem with the SAXSourceLocator not getting the line number info.

    • Committed by sboag@apache.org on 03/27/2002
      Modified: java/src/org/apache/xml/utils SAXSourceLocator.java
      Committer's log entry: Add a constructor that takes a SourceLocator.

    • Committed by sboag@apache.org on 03/28/2002
      Modified: java/src/org/apache/xalan/templates ElemTemplateElement.java
      Committer's log entry: Added getOwnerXSLTemplate method, a convenience function. - Implemented getLocalName().

    • Committed by sboag@apache.org on 03/28/2002
      Modified: java/src/org/apache/xalan/processor StylesheetHandler.java - ProcessorTemplateElem.java
      Committer's log entry: Addressing http://nagoya.apache.org/bugzilla/show_bug.cgi?id=6752. - Make the processor more robust against multiple failures during compilation.

    • Committed by sboag@apache.org on 03/28/2002
      Modified: java/src/org/apache/xpath/objects XNull.java
      Committer's log entry: Change derivation to XNodeSet.

    • Committed by sboag@apache.org on 03/29/2002
      Modified: java/src/org/apache/xpath XPathProcessorException.java - XPathException.java
      Committer's log entry: Pass in the parent ExpressionNode, so that more context information can be - set. For the moment, I've added methods that are dependent on the - XSLT module, to set the source stylesheet node. I'll deal with this more when - I deal with the proper breakup and packaging of the XPath package, in a - few days.

    • Committed by sboag@apache.org on 03/29/2002
      Modified: java/src/org/apache/xpath/objects XObject.java
      Committer's log entry: Pass this as ExpressionNode to the XPathException object on error, which - helps us to establish context information for the exception object.

    • Committed by sboag@apache.org on 03/29/2002
      Modified: java/src/org/apache/xpath/objects XRTreeFrag.java
      Committer's log entry: Add constructor that lets us set the owning ExpressionNode.

    • Committed by sboag@apache.org on 03/29/2002
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: For getCurrentElement, add some protection for access when there is no - current element.

    • Committed by sboag@apache.org on 03/29/2002
      Modified: java/src/org/apache/xalan/templates ElemVariable.java - ElemWithParam.java
      Committer's log entry: Pass the template to the XRTreeFrag constructor, so we can establish - better context.

    • Committed by sboag@apache.org on 03/29/2002
      Modified: java/src/org/apache/xpath XPathException.java
      Committer's log entry: Set the "StylesheetNode" to the ElemTemplateElement instead of the - DOM backpointer.

    • Committed by sboag@apache.org on 04/02/2002
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Wrap runtime exception in TransformerException, so we'll get line number info - when NPE and the like.

    • Committed by sboag@apache.org on 04/02/2002
      Modified: java/src/org/apache/xpath/objects XRTreeFrag.java
      Committer's log entry: Fix for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=7622. - 1) Transform#1 creates an XRTreeFrag. This has a reference to a DTM, that in -turn is registered with a DTMManager. The DTM will need to be deleted from the -DTMManager when the XRTreeFrag is deleted. The XRTreeFrag also contains a -reference to the XPathContext. - 2) Transform#1 completes. The XPathContext is reset... namely the a bunch of -structures are reset or rebuilt, including DTMManagerDefault#m_dtms. BUT, the -XRTreeFrags are still hanging around, waiting to unregister themselves. - 3) Transform#2 starts humming along. It builds a XRTreeFrag and installs -that RTF DTM into DTMManagerDefault#m_dtms[2]. - 4) The finalizer thread wakes and decides to delete some of those old -XRTreeFrags from Transform#1. - 5) The XRTreeFrag#finalize() method references through the XPathContext, and -deletes what it thinks is it's DTM from DTMManagerDefault#m_dtms[2] (via -getDTMIdentity(dtm)). - 6) Transform#2 tries to reference DTMManagerDefault#m_dtms[2], finds it is -null, and chaos results. - - ...so, before calling xctxt.release, etc., check to make sure the DTM is -actually - entered in the current DTMManager.

    • Committed by sboag@apache.org on 04/04/2002
      Added: java/src/org/w3c/dom/xpath COPYRIGHT.html - XPathEvaluator.java XPathException.java - XPathExpression.java XPathNSResolver.java - XPathNamespace.java XPathResult.java
      Committer's log entry: Add Document Object Model (DOM) Level 3 XPath Specification. - (Temp until it's added to xml-commons.)

    • Committed by sboag@apache.org on 04/05/2002
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: On entry, set the document base URI in the DTM. Fixes bug reported - by Christine.

    • Committed by jkesselm@apache.org on 04/09/2002
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      Committer's log entry: Fix inconsistancy in handling returned DTM IDs. (There's room for - debate about whether the current value -- expressed as the - NodeHandle for Node 0 in that DTM -- is the best possible - representation, but this is what we're currently using...)

    • Committed by jkesselm@apache.org on 04/09/2002
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
      Committer's log entry: Clean-up of dumpDTM method, some code clarity changes.

    • Committed by jkesselm@apache.org on 04/09/2002
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      Committer's log entry: Yeowch. Didn't mean to check in the XNI experiment. - Disabled, probably belongs on a branch. (And probably - needs to be rewritten fairly intensively, since the current - hook is something of a kluge!)

    • Committed by jkesselm@apache.org on 04/09/2002
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      Committer's log entry: (nitpicking)

    • Committed by pauldick@apache.org on 04/10/2002
      Removed: java/src/org/apache/xml/dtm/ref TestDTM.java
      Committer's log entry: Moved into Test directory

    • Committed by jkesselm@apache.org on 04/10/2002
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      Committer's log entry: Cleaner disabling of experimental code. Sorry 'bout that.

    • Committed by mmidy@apache.org on 04/10/2002
      Modified: java/src/org/apache/xml/dtm DTM.java - java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMDefaultBaseIterators.java - DTMDefaultBaseTraversers.java - ExpandedNameTable.java - java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Change extended types to be an integer and use a structure with a localname, -a namespace and a nodetype to represent the node extended type. We no longer -need to do the shifting left and right that we did for the previous extended -types.

    • Committed by mmidy@apache.org on 04/10/2002
      Modified: java/src/org/apache/xpath/operations Variable.java - java/src/org/apache/xpath/patterns NodeTest.java
      Committer's log entry: Change extended types to be an integer and use a structure with a localname, -a namespace and a nodetype to represent the node extended type. We no longer -need to do the shifting left and right that we did for the previous extended -types.

    • Committed by mmidy@apache.org on 04/10/2002
      Modified: java/src/org/apache/xalan/templates ElemApplyTemplates.java - ElemForEach.java TemplateList.java - VarNameCollector.java
      Committer's log entry: Change extended types to be an integer and use a structure with a localname, -a namespace and a nodetype to represent the node extended type. We no longer -need to do the shifting left and right that we did for the previous extended -types.

    • Committed by jkesselm@apache.org on 04/12/2002
      Added: java/src/org/apache/xml/dtm XSequence.java
      Committer's log entry: Creating a new branch, Xalan3, for experimentation with XPath2 support. - - Currently the changes are limited to org.apache.xml.dtm -- enabling - datatype support by tying into Xerces' low-level XNI layer, which - includes experimental support for post-schema-validation Infoset - (PSVI) information. Eventually we'll be patching other portions of - Xalan to actually retrieve and use this data. - - The code I'm now checking in is NOT in final form. Known issues: - - 1) The logic in DTMManager which enables this behavior is - something of a kluge -- it only kicks in if you parse incrementally - from a StreamSource. The getDTM() method really wants to be - rationalized somewhat, which will make adding XNI easier. - - 2) The storage for datatype information currently adds another - column to the DTM table. We really want to switch to associating - the datatype with the Expanded Type table, and using some form - of sparse array to record local overrides. - - 3) The XNI code won't compile without Xerces2. We need to think - about whether we want to accept that as a dependency, or use - reflection to bind at run time rather than compile time. - - Note that typed values are currently computed on demand, with the - DTM storing only the sting values. An argument could be made for - precomputing some or all of this information and instead generating - strings on demand (see the XPath2 Data Model spec for discussion - of that alternative). But that's a considerably larger change, and - would affect non-type-based users of XSLT as well since it would - present values in their normalized form rather than as entered; I'd - rather not go that route until we have a string-based alternative - fully functional.

    • Committed by jkesselm@apache.org on 04/12/2002
      Added: java/src/org/apache/xml/dtm/ref/xni2dtm DTM_XSequence.java - XNI2DTM.java
      Committer's log entry: Creating a new branch, Xalan3, for experimentation with XPath2 support. - - Currently the changes are limited to org.apache.xml.dtm -- enabling - datatype support by tying into Xerces' low-level XNI layer, which - includes experimental support for post-schema-validation Infoset - (PSVI) information. Eventually we'll be patching other portions of - Xalan to actually retrieve and use this data. - - The code I'm now checking in is NOT in final form. Known issues: - - 1) The logic in DTMManager which enables this behavior is - something of a kluge -- it only kicks in if you parse incrementally - from a StreamSource. The getDTM() method really wants to be - rationalized somewhat, which will make adding XNI easier. - - 2) The storage for datatype information currently adds another - column to the DTM table. We really want to switch to associating - the datatype with the Expanded Type table, and using some form - of sparse array to record local overrides. - - 3) The XNI code won't compile without Xerces2. We need to think - about whether we want to accept that as a dependency, or use - reflection to bind at run time rather than compile time. - - Note that typed values are currently computed on demand, with the - DTM storing only the sting values. An argument could be made for - precomputing some or all of this information and instead generating - strings on demand (see the XPath2 Data Model spec for discussion - of that alternative). But that's a considerably larger change, and - would affect non-type-based users of XSLT as well since it would - present values in their normalized form rather than as entered; I'd - rather not go that route until we have a string-based alternative - fully functional.

    • Committed by jkesselm@apache.org on 04/12/2002
      Modified: java/src/org/apache/xml/dtm Tag: Xalan3 DTM.java - java/src/org/apache/xml/dtm/ref Tag: Xalan3 - DTMDefaultBase.java DTMDocumentImpl.java - DTMManagerDefault.java - IncrementalSAXSource_Xerces.java - java/src/org/apache/xml/dtm/ref/sax2dtm Tag: Xalan3 - SAX2DTM.java
      Committer's log entry: Creating a new branch, Xalan3, for experimentation with XPath2 support. - - Currently the changes are limited to org.apache.xml.dtm -- enabling - datatype support by tying into Xerces' low-level XNI layer, which - includes experimental support for post-schema-validation Infoset - (PSVI) information. Eventually we'll be patching other portions of - Xalan to actually retrieve and use this data. - - The code I'm now checking in is NOT in final form. Known issues: - - 1) The logic in DTMManager which enables this behavior is - something of a kluge -- it only kicks in if you parse incrementally - from a StreamSource. The getDTM() method really wants to be - rationalized somewhat, which will make adding XNI easier. - - 2) The storage for datatype information currently adds another - column to the DTM table. We really want to switch to associating - the datatype with the Expanded Type table, and using some form - of sparse array to record local overrides. - - 3) The XNI code won't compile without Xerces2. We need to think - about whether we want to accept that as a dependency, or use - reflection to bind at run time rather than compile time. - - Note that typed values are currently computed on demand, with the - DTM storing only the sting values. An argument could be made for - precomputing some or all of this information and instead generating - strings on demand (see the XPath2 Data Model spec for discussion - of that alternative). But that's a considerably larger change, and - would affect non-type-based users of XSLT as well since it would - present values in their normalized form rather than as entered; I'd - rather not go that route until we have a string-based alternative - fully functional.

    • Committed by jkesselm@apache.org on 04/12/2002
      Removed: java/src/org/apache/xml/dtm XSequence.java - java/src/org/apache/xml/dtm/ref/xni2dtm DTM_XSequence.java - XNI2DTM.java
      Committer's log entry: These should only be on the Xalan3 branch, not the main branch. - I _hope_ I can split this successfully...

    • Committed by jkesselm@apache.org on 04/12/2002
      Added: java/src/org/apache/xml/dtm Tag: Xalan3 XSequence.java
      Committer's log entry: These should only be on the Xalan3 branch, not the main branch. - I _hope_ I can split this successfully...

    • Committed by jkesselm@apache.org on 04/12/2002
      Added: java/src/org/apache/xml/dtm/ref/xni2dtm Tag: Xalan3 - DTM_XSequence.java XNI2DTM.java
      Committer's log entry: These should only be on the Xalan3 branch, not the main branch. - I _hope_ I can split this successfully...

    • Committed by santiagopg@apache.org on 04/15/2002
      Modified: java/src/org/apache/xalan/xsltc Tag: - jaxp-ri-1_2_0-fcs-branch DOM.java
      Committer's log entry: New implementation of xsl:element

    • Committed by jkesselm@apache.org on 04/17/2002
      Modified: java/src/org/apache/xpath/compiler XPathParser.java
      Committer's log entry: Improve recovery if user's error handler insists on trying to - continue past a fatal error in the XPath syntax. Ideally, this - mechanism should be cleaned up and applied across the - entire XPath grammar. But for now, I'm addressing the one - specific complaint in a way that can be expanded later, and - doing so in a way that minimizes costs. - - (In fact, one can argue that since this is a rare event, we - shouldn't be minimizing the cost quite so much, and should - be throwing new exception objects rather than reusing a - preconstructed one.)

    • Committed by jkesselm@apache.org on 04/17/2002
      Modified: java/src/org/apache/xpath/compiler XPathParser.java
      Committer's log entry: Decided I _was_ overoptimizing. - - Saving memory in tne non-error case trumps saving it in the error case.

    • Committed by mmidy@apache.org on 04/17/2002
      Modified: java/src/org/apache/xalan/templates Tag: XSLTC_DTM - ElemApplyTemplates.java - java/src/org/apache/xalan/xsltc Tag: XSLTC_DTM DOM.java - DOMCache.java NodeIterator.java Translet.java - java/src/org/apache/xalan/xsltc/cmdline Tag: XSLTC_DTM - Transform.java - java/src/org/apache/xalan/xsltc/compiler Tag: XSLTC_DTM - AbsolutePathPattern.java AncestorPattern.java - Constants.java CopyOf.java DocumentCall.java - ForEach.java IdKeyPattern.java Import.java Key.java - KeyCall.java LastCall.java Mode.java NameBase.java - NodeTest.java ParentLocationPath.java Parser.java - ProcessingInstructionPattern.java Step.java - StepPattern.java Stylesheet.java - SyntaxTreeNode.java UnionPathExpr.java XSLTC.java - java/src/org/apache/xalan/xsltc/compiler/util Tag: XSLTC_DTM - MethodGenerator.java NodeSetType.java - ResultTreeType.java - java/src/org/apache/xalan/xsltc/dom Tag: XSLTC_DTM - AbsoluteIterator.java AnyNodeCounter.java Axis.java - BitArray.java CurrentNodeListFilter.java - CurrentNodeListIterator.java DOMAdapter.java - DOMImpl.java DTDMonitor.java DocumentCache.java - DupFilterIterator.java FilterIterator.java - FilteredStepIterator.java KeyIndex.java - LoadDocument.java MatchingIterator.java - MultiDOM.java MultipleNodeCounter.java - NodeCounter.java NthIterator.java - ReverseIterator.java SingleNodeCounter.java - SingletonIterator.java SortingIterator.java - StepIterator.java UnionIterator.java - java/src/org/apache/xalan/xsltc/runtime Tag: XSLTC_DTM - AbstractTranslet.java BasisLibrary.java - Constants.java DefaultRun.java SAXAdapter.java - java/src/org/apache/xalan/xsltc/trax Tag: XSLTC_DTM - TransformerHandlerImpl.java TransformerImpl.java - XSLTCSource.java - java/src/org/apache/xml/dtm Tag: XSLTC_DTM DTM.java - DTMAxisIterator.java DTMManager.java - java/src/org/apache/xml/dtm/ref Tag: XSLTC_DTM - DTMAxisIteratorBase.java DTMDefaultBase.java - DTMDefaultBaseIterators.java DTMNamedNodeMap.java - DTMNodeList.java DTMNodeProxy.java - ExpandedNameTable.java - java/src/org/apache/xml/dtm/ref/dom2dtm Tag: XSLTC_DTM - DOM2DTM.java - java/src/org/apache/xml/dtm/ref/sax2dtm Tag: XSLTC_DTM - SAX2DTM.java
      Added: java/src/org/apache/xalan/xsltc/dom Tag: XSLTC_DTM - SAXImpl.java XSLTCDTMManager.java
      Committer's log entry: Checking in a branch of xalan where XSLTC is using the DTM interface. This -branch is very unstable, please do not use yet!!!

    • Committed by mmidy@apache.org on 04/17/2002
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm Tag: XSLTC_DTM - DOM2DTM.java
      Committer's log entry: Make getNumberOfNodes() public

    • Committed by jkesselm@apache.org on 04/18/2002
      Modified: java/src/org/apache/xml/dtm/ref Tag: Xalan3 - DTMManagerDefault.java - IncrementalSAXSource_Xerces.java
      Committer's log entry: XNI support now always used if available, with SAX as fallback. - - Issues: DTMDefaultManager is still a bit more aware of Xerces2 - than I want it to be. And the kluge of creating an Incremental Xerces - source and then running it non-incrementally, while producing - straightforward code, is a slightly ugly mixed metaphor.

    • Committed by jkesselm@apache.org on 04/18/2002
      Modified: java/src/org/apache/xml/dtm/ref Tag: Xalan3 - DTMManagerDefault.java - java/src/org/apache/xml/dtm/ref/xni2dtm Tag: Xalan3 - XNI2DTM.java
      Committer's log entry: Minor polishing, disabling debugging dump. - - We currently pass most of Smoketest with the new XNI code enabled. - Some suspicious stuff in the API tests; my attempts to disentangle - the XNI and SAX support may not have been 100% succesful.

    • Committed by mmidy@apache.org on 04/18/2002
      Modified: java/src/org/apache/xalan/xsltc/dom Tag: XSLTC_DTM - SAXImpl.java - java/src/org/apache/xml/dtm/ref Tag: XSLTC_DTM - DTMDefaultBaseIterators.java - java/src/org/apache/xpath/compiler Tag: XSLTC_DTM - XPathParser.java
      Committer's log entry: Misc fixes

    • Committed by jkesselm@apache.org on 04/22/2002
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: Bug 4546 -- thanks to Wolfram Eisert for tracking this down and - proposing the patch.

    • Committed by jkesselm@apache.org on 04/29/2002
      Modified: java/src/org/apache/xml/dtm/ref Tag: Xalan3 - DTMManagerDefault.java - IncrementalSAXSource_Xerces.java
      Committer's log entry: Easy enable/disable of XNI support for testing purposes, - and some error-reporting cleanup. We still fail a few API tests - in XNI mode, mostly related to error handling.

    • Committed by jkesselm@apache.org on 04/29/2002
      Modified: java/src/org/apache/xml/dtm Tag: Xalan3 DTM.java - java/src/org/apache/xml/dtm/ref Tag: Xalan3 - DTMDefaultBase.java DTMDefaultBaseIterators.java - DTMDefaultBaseTraversers.java - ExpandedNameTable.java - java/src/org/apache/xml/dtm/ref/dom2dtm Tag: Xalan3 - DOM2DTM.java - java/src/org/apache/xml/dtm/ref/sax2dtm Tag: Xalan3 - SAX2DTM.java
      Committer's log entry: Merge ExtendedType changes from main branch

    • Committed by jkesselm@apache.org on 05/02/2002
      Modified: java/src/org/apache/xml/dtm/ref Tag: Xalan3 - ExpandedNameTable.java
      Committer's log entry: Oops. Typo.

    • Committed by jkesselm@apache.org on 05/02/2002
      Modified: java/src/org/apache/xml/dtm/ref Tag: Xalan3 - ExpandedNameTable.java - IncrementalSAXSource_Xerces.java - java/src/org/apache/xml/dtm/ref/xni2dtm Tag: Xalan3 - XNI2DTM.java
      Committer's log entry: Make sure current version checked in before I start experimenting with -alternatives.

    • Committed by jkesselm@apache.org on 05/02/2002
      Modified: java/src/org/apache/xml/dtm/ref/xni2dtm Tag: Xalan3 - XNI2DTM.java
      Committer's log entry: It helps if we actually remember to store the schema info...

    • Committed by jkesselm@apache.org on 05/03/2002
      Modified: java/src/org/apache/xml/dtm/ref Tag: Xalan3 - ExpandedNameTable.java - java/src/org/apache/xml/dtm/ref/xni2dtm Tag: Xalan3 - XNI2DTM.java
      Committer's log entry: Xalan3 PSVI changes: Lighter-weight storage for PSVI datatype. Schema - type first seen is now stored as part of the ExpandedName. In many cases - all instances of the same node have the same type and this should suffice. - In some cases tthe actual type may be locally overridden (schema - derived types), and XNI2DTM will record an exception into a simple - "sparse vector". - - Storage improved. DTM construction speed improved. Schema type - retrieval speed adversely impacted but -- one hopes -- not significantly. - - Of course right now Xerces' schema-validator burns so many cycles - that our own efficiency or lack thereof is completely moot... but we - assume they'll be improving that over time.

    • Committed by costin@apache.org on 05/06/2002
      Modified: java/src/org/apache/xpath/compiler XPathParser.java
      Committer's log entry: Remove the duplicated ;; - - ( which broke the JDK1.4 compilation which in turn broke all the gump - deps ).

    • Committed by jkesselm@apache.org on 05/06/2002
      Modified: java/src/org/apache/xpath/axes PredicatedNodeTest.java
      Committer's log entry: Bugzilla 7159 -- Just an access-permission change, for improved - toolability.

    • Committed by jkesselm@apache.org on 05/09/2002
      Modified: java/src/org/apache/xalan/serialize SerializerToText.java
      Committer's log entry: Bugzilla 8358 -- bad method signature. I've created a new method - with the correct signature. The old one may or may not be entirely - superfluous, but I don't want to muck with it right now.

    -
    - - -

    Core (Non-XSLTC) source code updates:

    • Committed by johng@apache.org on 01/17/2002
      Modified: java/src/org/apache/xalan/lib/sql XConnection.java
      Committer's log entry: Fixed second connection problem

    • Committed by johng@apache.org on 01/17/2002
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: Update for new DTM Model

    • Committed by johng@apache.org on 01/17/2002
      Modified: java/src/org/apache/xalan/lib/sql DTMDocument.java
      Committer's log entry: Update for new DTM Model

    • Committed by johng@apache.org on 01/17/2002
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java - DTMDocument.java
      Committer's log entry: Removed Debug

    • Committed by jkesselm@apache.org on 01/18/2002
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: Whups. There's a possible reentrancy problem when data - is being serialized from an FSB, thru Sax, back into a new - chunk of the same FSB; if the append causes a rechunking, - the serialize loop may break. - - TEMPORARY PATCH; permanant fix to follow. See comments.

    • Committed by jkesselm@apache.org on 01/18/2002
      Modified: java/src/org/apache/xml/utils SuballocatedIntVector.java
      Committer's log entry: <blush>Wrong side of the fencepost...</blush>

    • Committed by jkesselm@apache.org on 01/23/2002
      Modified: java/src/org/apache/xalan/templates ElemTemplate.java - java/src/org/apache/xalan/transformer TransformerImpl.java - java/src/org/apache/xml/dtm DTMManager.java - java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMManagerDefault.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java - java/src/org/apache/xpath XPathContext.java
      Added: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2RTFDTM.java
      Committer's log entry: These changes allow us to store multiple Result Tree Fragment (RTF) - document trees (used when an XSLT variable contains a constructed - set of nodes) into a single DTM object rather than using a new DTM - for each RTF. They also permit "tail-pruning" this shared DTM to - reuse that space as the variables go out of scope. - - The result is a slight performance improvement, and a much more - significant improvement in storage efficiency. Stylesheets which - use RTFs heavily should now run in much less memory; in - one testcase, our "working set" heap size (storage actually in - use, not counting objects released but not yet GC'd) dropped - from 12-15MB down to 3-6MB, and heap churn (how quickly - storage was being allocated and discarded) also reduced - substantially. - - The code changes needed to support this new scheme are - surprisingly small. And I believe it may be possible to reduce them - further, if we're willing to merge the SAX2RTFDTM subclass back - into its SAX2DTM superclass. I believe that could be done with - very little adverse impact on other uses of SAX2DTM... but I felt it - was safer to defer that decision for now.

    • Committed by mmidy@apache.org on 01/25/2002
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Bug 5982 and 6022. The variable stack was not being cleared accross -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()).

    • Committed by mmidy@apache.org on 01/28/2002
      Modified: java/src/org/apache/xpath/res XPATHErrorResources.java
      Committer's log entry: bug 4762: Fixed the duplicate error message in XPATH.

    • Committed by jkesselm@apache.org on 01/28/2002
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Bugzilla 4054: Retain previously set output properties when adding new ones.

    • Committed by mmidy@apache.org on 01/28/2002
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Bug 5872. We were using a constructor of TransformerException without the -locator information. Changed to code to use a locator if info is available.

    • Committed by dleslie@apache.org on 01/30/2002
      Modified: java/src/org/apache/xalan/lib NodeInfo.java
      Committer's log entry: Changed "system id" to "public identifier" in javadoc - comments for publicId() methods.

    • Committed by jkesselm@apache.org on 01/30/2002
      Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Bugzilla 2617, part 1: Construct the data structures and access them -correctly. - Ignore too-late-to-be-safe requests to enable this feature. - - This doesn't resolve how to rewrite higher-level code so it makes the - request early enough to be useful.

    • Committed by mmidy@apache.org on 01/30/2002
      Modified: java/src/org/apache/xalan/templates StylesheetComposed.java - StylesheetRoot.java TemplateList.java - java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Bug 4987: Changed Apply-imports logic to only apply imports to stylesheets -that are direct imports. The logic for includes has not changed, we will -apply-imports to any stylesheet that is imported as a result of an inclusion. -Note: had to change the order when includes and imports are recomposed!

    • Committed by jkesselm@apache.org on 01/31/2002
      Modified: java/src/org/apache/xalan/lib NodeInfo.java - java/src/org/apache/xalan/processor - TransformerFactoryImpl.java - java/src/org/apache/xalan/transformer TransformerImpl.java - java/src/org/apache/xalan/xslt Process.java - java/src/org/apache/xml/dtm/ref DTMManagerDefault.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java - SAX2RTFDTM.java - java/src/org/apache/xml/utils DefaultErrorHandler.java
      Committer's log entry: Bugzilla 2617: Recreated missing code, changed controls to ensure - that this mode gets set early enough to be useful and can't be broken - by being turned on and off during execution. - - NOTE: Current implementation relies on a global static flag in - TransformerFactoryImpl. We need to rearchitect our APIs slightly - so configuration hints of this kind can be passed down from top-level - objects to the back-end code more elegantly. Revisit in future - releases.

    • Committed by mmidy@apache.org on 01/31/2002
      Modified: java/src/org/apache/xalan/templates ElemApplyTemplates.java
      Committer's log entry: Bug 5505: Need to resolve params before we do anything else, so move code -that does that above the code that sets up the different node stacks.

    • Committed by jkesselm@apache.org on 02/01/2002
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: Bugzilla 6182. Darned fence posts; always either too many or not enough... -<grin/>

    • Committed by mmidy@apache.org on 02/01/2002
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java - java/src/org/apache/xpath VariableStack.java - XPathContext.java
      Committer's log entry: Bug 6156: Change variable stack reset to just get a new object. Also make -sure that the stack of result tree fragments is also cleaned ot during a reset.

    • Committed by mmidy@apache.org on 02/04/2002
      Modified: java/src/org/apache/xpath/objects XBoolean.java - XNodeSet.java XNumber.java XObject.java - XRTreeFrag.java XString.java - java/src/org/apache/xpath/operations Equals.java
      Committer's log entry: Bug 5851: Make sure that the equal operation is evaluated by order of -precedence of the operands, as defined by XSLT.

    • Committed by jkesselm@apache.org on 02/04/2002
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Bugzilla 5346: Prevent mantissa overflow when converting string to double. - There is still a possible edge-case, since I detect overflow on decimal digit - bounds rather than on bit bounds; I'm not sure what the IEEE spec calls for.

    • Committed by jkesselm@apache.org on 02/04/2002
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Bugzilla 5346: My first-cut messed up fractional values. This one is - somewhat better. - - There's an open issue w/r/t numbers with many digits after the - decimal point, regarding limits on how large a power of 10 can - be contained in a long. In that one case I'm falling back on successive - divisions (though as few as possible), and some loss of precision - may result. - - Need to find a better algorithm...

    • Committed by jkesselm@apache.org on 02/04/2002
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Bugzilla 5346: Oops. Forgot to take out a debugging printout.

    • Committed by jkesselm@apache.org on 02/05/2002
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Bugzilla 5346: Responding to the re-open; more direct and reliable - edge-case test. This does lose a few low bits on many-digit values, - so it is not the best long-term solution.

    • Committed by jkesselm@apache.org on 02/05/2002
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Bug 5346: One more (last, I hope) edge case.

    • Committed by jkesselm@apache.org on 02/05/2002
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Bug 5346: Gaaah. This regressions was just plain foolish flailing. "Less -haste, more speed."

    • Committed by jkesselm@apache.org on 02/05/2002
      Modified: java/src/org/apache/xalan/serialize CharInfo.java
      Committer's log entry: Bug 5857: Reusing objects that reuse objects has threading concerns. - Three possible solutions: Don't reuse, synchronize reuse, or rewrite - to avoid using the objects in the first place. See comments in code.

    • Committed by jkesselm@apache.org on 02/06/2002
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java - IncrementalSAXSource.java - IncrementalSAXSource_Filter.java - IncrementalSAXSource_Xerces.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Bug 4244: Incremental wasn't setting up correctly for the - DTDHandler stream. It never occurred to me that XSLT would - ever have a use for unparsed entities...

    • Committed by curcuru@apache.org on 02/06/2002
      Modified: java/src/org/apache/xalan Version.java - java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: Whoops! Never updated release number to 2.3 in these version files!

    • Committed by curcuru@apache.org on 02/06/2002
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: updated version number to 2.3

    • Committed by mmidy@apache.org on 02/07/2002
      Modified: java/src/org/apache/xpath SourceTreeManager.java
      Committer's log entry: Bug 6304: Remove print stacktrace

    • Committed by jkesselm@apache.org on 02/08/2002
      Modified: java/src/org/apache/xalan/extensions - XSLProcessorContext.java - java/src/org/apache/xalan/lib/sql DTMDocument.java - java/src/org/apache/xalan/templates ElemForEach.java - FuncDocument.java FuncKey.java - java/src/org/apache/xalan/transformer KeyIterator.java - TransformerHandlerImpl.java TransformerImpl.java - java/src/org/apache/xml/dtm DTM.java - java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMDefaultBaseIterators.java DTMDocumentImpl.java - DTMNodeProxy.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2RTFDTM.java - java/src/org/apache/xpath/axes IteratorPool.java
      Committer's log entry: Bugzilla 6314: Additional support changes for multiple RTFs per DTM. - Many files affected, but the basic change is that dtm.getDocument() - with no arguments is meaningless when there are multiple docs in - a single DTM object; instead, folks should use the new getRootNode() - method or getOwnerDocument(), both of which take a node as input - and thus more clearly identify which document we're referring to.

    • Committed by jkesselm@apache.org on 02/12/2002
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: Bugzilla 6328, whitespace normalization. Late fix, but it was a genuine -regresion. - This code could still do with a rationalization pass; I think it can be made -slightly - a touch faster.

    • Committed by curcuru@apache.org on 02/14/2002
      Modified: java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: Update various .jar sizes for recent builds and 2.3.0

    -
    - -

    Following a series of Developer releases, &xslt4j; 2.2 represents a stable, production-quality release with -the DTM (Document Table Model). &xslt4j; uses the DTM to represent the XML source document -to be transformed. Please send your feedback to the .

    -

    Core (Non-XSLTC) source code updates:

    • Committed by dleslie@apache.org on 11/30/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: updated version number to 2.2.D14

    • Committed by dleslie@apache.org on 11/30/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: updated version number to 2.2.D14

    • Committed by jkesselm@apache.org on 12/03/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBaseIterators.java
      Committer's log entry: Bugzilla 5242: Special-case initializing iteration from Document node -- -one-liner wasn't safe.

    • Committed by tmiller@apache.org on 12/04/2001
      Added: java/src/org/apache/xalan/xsltc ProcessorVersion.java
      Committer's log entry: new class to version xsltc software

    • Committed by jkesselm@apache.org on 12/05/2001
      Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Additional debugging printouts, added while analysing Bugzilla 5272 but -generally useful. - No functional change, and should be optimized away when DEBUG is set false.

    • Committed by jkesselm@apache.org on 12/10/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Removed the "magic" default which causes us to switch into incremental - processing mode whenever we were writing to Standard Output (ie, - -OUT had not been specified). If you want incremental processing, - please use the (relatively new) -INCREMENTAL switch to explicitly - request it. - - (The automatic switchover was causing some confusion - when testing against Xerces2. )

    • Committed by jkesselm@apache.org on 12/10/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMManagerDefault.java
      Committer's log entry: Efficiency improvement to the new DTM "overflow addressing" scheme. - In some tests, this one alteration shaved about 30% off the runtime.

    • Committed by jkesselm@apache.org on 12/11/2001
      Modified: java/src/org/apache/xpath CachedXPathAPI.java - XPathContext.java
      Committer's log entry: Changes requested by the xml-security group: - - 1) Provide something a constructor that allows sharing the - XPathContext object between CachedXPathAPI objects - - 2) Add getXPathContext(). I'm just a bit nervious about this - method, but they assure us they need it and the field isn't - private. We may need to discus this one further. - - 3) Make the XPathContext's m_dtmManager member - protected rather than private, so their subclass can get to it. - We may want to work with them to understand why they're - accessing this directly and whether there's a better solution.

    • Committed by jkesselm@apache.org on 12/13/2001
      Modified: java/src/org/apache/xml/dtm/ref - IncrementalSAXSource_Xerces.java
      Committer's log entry: Bugzilla5272 patch suggested by Sandy Gao. - - This startup sequence for incremental SAX parsing under Xerces2 - really is excessively complicated and excessively fragile as a result. - Not to mention being underdocumented. We really need to push the - Xerces folks to provide a simple incremental SAX API, similar to that - in the Xerces1incremental prototype.

    • Committed by jkesselm@apache.org on 12/13/2001
      Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Part 1 of 2: Reducing initial space requirements of a DTM. This may - involve a slight performance hit, but should help stylesheets which - generate a lot of Result Tree Fragment. Part 2 of this change will be - checked in after I resolve a bug in whitespace normalization. - - Note that a better long-term answer will be to reduce the number of - DTMs tied up as RTFs, by doing a better job of discarding or reusing - them when we're done with them. There are some issues regarding - exactly what their lifetimes will be when assigned to variables, - especially when one variable is used to build another, which we - need to address before we can make that change.

    • Committed by jkesselm@apache.org on 12/13/2001
      Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Part 2a of 2: Reducing initial space requirements of a DTM. This may - involve a slight performance hit in some circumstances due to - smaller and more complex subdivision of FastStringBuffers,, but - should help stylesheets which generate a lot of Result Tree - Fragments. - - Note that a better long-term answer will be to reduce the number of - DTMs tied up as RTFs

    • Committed by jkesselm@apache.org on 12/13/2001
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: Part 2b of 2: Reducing initial space requirements of a DTM. This may - involve a slight performance hit in some circumstances due to - smaller and more complex subdivision of FastStringBuffers,, but - should help stylesheets which generate a lot of Result Tree - Fragments. - - (Leveraging FSB's features more strongly exposed a bug in - whitespace normalization, which I've fixed.) - - Note that a better long-term answer will be to reduce the number of - DTMs tied up as RTFs

    • Committed by jkesselm@apache.org on 12/14/2001
      Modified: java/src/org/apache/xml/utils AttList.java
      Committer's log entry: Two goofs: Forgetting to use the namespace-aware DOM call, and - forgetting to check for a returned null before dereferencing. - - How long has _that_ been lurking in the undergrowth?!

    • Committed by jkesselm@apache.org on 12/14/2001
      Modified: java/src/org/apache/xml/utils SuballocatedIntVector.java
      Committer's log entry: Finally following up on an old hunch, I switched from /% addressing - to shift-and-mask. Big improvement!

    • Committed by jkesselm@apache.org on 12/14/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: Performance improvements; Some changes to better leverage the - DOM's existing code, others to avoid some call-and-return overhead. - - Combined with other recent changes, we've now got a significant - speedup over D14 on some tests. We may want to drop the scheduled - December 17th 2.2 release and instead bring 2.2 out on 1/14 (which is - when we'd planned 2.3) with performance gains and Xerces2 support.

    • Committed by jkesselm@apache.org on 12/18/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - DOM2DTMdefaultNamespaceDeclarationNode.java
      Committer's log entry: A few more subtle performance tweaks, and an actual bug.

    • Committed by curcuru@apache.org on 12/20/2001
      Added: java/src/org/apache/xml/utils ListingErrorHandler.java
      Committer's log entry: Alternate ErrorHandler/ErrorListener implementation that allows - configuration and prints errors out similarly to javac

    • Committed by jkesselm@apache.org on 12/21/2001
      Modified: java/src/org/apache/xml/utils AttList.java
      Committer's log entry: Bugzilla 5496; previously unimplemented functions.

    • Committed by jkesselm@apache.org on 01/03/2002
      Modified: java/src/org/apache/xml/utils DOMBuilder.java
      Committer's log entry: [Bug 5528] DOMBuilder mixed DOM Level 1 and 2

    • Committed by dleslie@apache.org on 01/11/2002
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: updated release number to 2.2.

    • Committed by dleslie@apache.org on 01/11/2002
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: updated release number to 2.2.

    • Committed by curcuru@apache.org on 01/13/2002
      Modified: java/src/org/apache/xml/utils SystemIDResolver.java
      Committer's log entry: Fix Bugzilla#5701: incorrect resolution of certain kinds of absolute file: -URIs - Note: This definitely seems to be more correct in terms of resolving URIs - vis-a-vis RFC 2396 than it used to be. The only user case which might now - fail where it used to work is a user that supplies an incorrect - 'file:subdir/blah' that they intended to be a relative URI (technically - it is an absolute URI no matter which way you look at it); this might - lead to a change in behavior in this particular case, although the behavior - before was incorrect. - The major risk factor could be if there are other parts of Xalan code that -rely - on the previously incorrect behavior, but I can't find any, and the whole test - suite runs and passes normally.

    • Committed by curcuru@apache.org on 01/14/2002
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Fix Bugzilla#4678 and Bugzilla#5533: call setSystemId on StreamResult - in Process command line class; ignored if using System.out - This should enable the redirect extension to properly put it's redirected - output in a location relative to the output if possible; previously it - always put redirected output relative to the input since it - never had the systemId of where the output should be

    This release includes no updates of the compatibility source code (now deprecated). -
    - -

    &xslt4j; 2.2.D14 is intended to be the final release in the current series of Developer releases incorporating - the DTM. We believe Xalan with the DTM has reached a level of stability that warrants a - standard "User" release. Accordingly, we plan to release &xslt4j; 2.2 soon.

    -

    &xslt4j; 2.2.D14 also includes a new CachedXPathAPI class that - provides an enhanced alternative to the XPath convenience methods in XPathAPI.

    -

    Beginning with 2.2.D12, xalan.jar contains just the &xslt4j; implementation. The source files for the SAX level 2, DOM 2, - and JAXP 1.1 interfaces are pulled from the xml-commons repository (), and are built as - xml-apis.jar. These interfaces are shared by a number of tools, so placing them in their own jar simplifies coordination and reduces - the risk of duplication. To run &xslt4j;, you must add xml-apis.jar to your classpath. See Setting up the system class path.

    -

    Core (Non-XSLTC) source code updates:

    • Committed by jkesselm@apache.org on 11/12/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: Reorder slightly and add test to not synthesize xmlns:xsl declaration - if one was already present on the DOM's root element.

    • Committed by jkesselm@apache.org on 11/12/2001
      Modified: java/src/org/apache/xalan Version.java
      Committer's log entry: D13 internal version number update

    • Committed by jkesselm@apache.org on 11/12/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: D13 internal version number update

    • Committed by jkesselm@apache.org on 11/13/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMNodeList.java
      Committer's log entry: Bugzilla4842, secondary complaint (glitch in getChildren)... <blush/>

    • Committed by jkesselm@apache.org on 11/15/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMNodeProxy.java
      Committer's log entry: Bugzilla4842: Expand the proxy layer to support more of the DOM API.

    • Committed by jkesselm@apache.org on 11/15/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: Namespace decls are themselves not namespace-aware, in the - Namespaces 1.0 REC. Use the qname.Grumble.

    • Committed by jkesselm@apache.org on 11/20/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: "Tupograflica eror". Sorry 'bout that!

    • Committed by jkesselm@apache.org on 11/26/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: Sigh. The XML Namespaces spec it itself imperfectly - namespace-aware. While there's a plan to fix that, it's - safer for now if we test the QName when looking for - explicit instances of xmlns:xml in the source document.

    • Committed by jkesselm@apache.org on 11/26/2001
      Modified: java/src/org/apache/xalan/lib/sql DTMDocument.java - java/src/org/apache/xalan/templates ElemApplyTemplates.java - java/src/org/apache/xalan/xslt Process.java - java/src/org/apache/xml/dtm DTMManager.java - java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMDefaultBaseIterators.java - DTMDefaultBaseTraversers.java - DTMManagerDefault.java - java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Another fairly large change in the DTM architexture (sic).... - - We've changed DTM's internal behavior so it can now assign - more than one "DTM ID" to a single document, cascading from - one ID to the next. This means that the size of a single DTM is - no longer limited by the bits available in the low part of the DTM - Node Handle. This means we can support larger documents. - - That has allowed us to reduce the number of bits reserved - for that portion of the node addresing scheme... which in turn has - increased the number of bits available for use in the DTM ID. This - means we can now have many more documents active at once. - - The trade-off is that huge documents will require more than one - DTM ID and thus cut into the number of documents, But since we - now have 16 bits of DTM ID space, I don't think we're really likely - to run into both limits at once. And the changes are essentially - limited to the DTM layer; the rest of Xalan should be unaffected. - - In the process of making this change, I've also encapsulated the - conversions between DTM API node handles and DTMDefaultBase's - internal node indices. That should be safer all 'round. - - NOTE: One side effect of this change is that the strings - generated by the key() function have changed again. - I've updated the IDKEY testcases to reflect this. - - Smoketest is currently passing everything except - axes109 and the API's TraceListenerTest . But I believe - those failures are due to a glitch in my test directory - since they also happen when I run the D13 code there, - whereas D13 runs fine in the directory where I built it. - I'm going to assume that "same result is no new bug" - for now.

    • Committed by jkesselm@apache.org on 11/26/2001
      Modified: java/src/org/apache/xml/dtm/ref - DTMDefaultBaseTraversers.java
      Committer's log entry: Found the glitch causing the axes108 bug -- exptype/type.

    • Committed by jkesselm@apache.org on 11/27/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Added option to set the recursion limit (which we're having trouble with - right now; the code that supported it seems to be disabled...) and - selfdoc for this and a few other newer options.

    • Committed by sboag@apache.org on 11/28/2001
      Modified: java/src/org/apache/xalan/transformer ResultTreeHandler.java
      Committer's log entry: Catch exceptions from the output content handler in flush(), and throw a - SAXParseException with line numbers filled in. - If we don't do this, and the exception is a RuntimeException, - good line numbers of where the exception occured in the stylesheet - won't get reported. I tried just catching RuntimeException, but - for whatever reason it didn't seem to catch. - Fix for Christina's DOMException error problem.

    • Committed by jkesselm@apache.org on 11/29/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Added: java/src/org/apache/xml/dtm/ref/dom2dtm - DOM2DTMdefaultNamespaceDeclarationNode.java
      Committer's log entry: Moved default namespace declaration node object out of its "inner - class" status, since I think I want to perform an instanceof test on it.

    • Committed by jkesselm@apache.org on 11/29/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMManagerDefault.java - java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - java/src/org/apache/xpath XPathAPI.java
      Added: java/src/org/apache/xpath CachedXPathAPI.java
      Committer's log entry: Bugzilla 4336 -- fix for presenting symptom (since the implicit - xml: declaration pseudo-DOM node is resynthesized in each - DTM, find the _corresponding_ node), and a first draft of - CachedXPathAPI which should be a fix for the larger symptom - (XPathAPI creates a new DTM every time, which is potentially - very ugly for applications that want to run XPaths repeatedly - on a single document). - - Also caught and fixed another node-handle/node-identity confusion. - The fact that DTM.get...() allowed us to be sloppy about that - distinction in the past means there may still be a few others lurking - in the code. Ye gods, I _wish_ Java had typedef!

    • Committed by jkesselm@apache.org on 11/29/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMNodeProxy.java
      Committer's log entry: Minor tweaks

    • Committed by curcuru@apache.org on 11/29/2001
      Modified: java/src/org/apache/xalan/lib Redirect.java
      Committer's log entry: Patch to enable optional 'append' attribute on redirect:open and - redirect:write elements to append to file; note that behavior may - not be what you expect when using xml output, since the xml decl - will currently be output *each* time you newly write to the file - Submitted by: jpvdm@iafrica.com

    • Committed by jkesselm@apache.org on 11/29/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMNodeProxy.java
      Committer's log entry: Implement getDocumentElement. If the DTM doesn't represent a - wellformed Document, this call is undefined and throws an exception... - which isn't DOMlike but that's a non-DOMlike situation.

    This release includes no updates of the compatibility source code (now deprecated). -
    - -

    &xslt4j; 2.2.D13 is intended to be the final release in the current series of Developer releases incorporating - the DTM. We believe Xalan with the DTM has reached a level of stability that warrants a - standard "User" release. Accordingly, we plan to release &xslt4j; 2.2 soon.

    -

    Beginning with this release, xalan.jar contains just the &xslt4j; implementation. The source files for the SAX level 2, DOM 2, - and JAXP 1.1 interfaces are pulled from the xml-commons repository (), and are built as - xml-apis.jar. These interfaces are shared by a number of tools, so placing them in their own jar simplifies coordination and reduces - the risk of duplication. To run &xslt4j;, you must add xml-apis.jar to your classpath. See Setting up the system class path.

    -

    Beginning with this release, we are shipping two distribution files; a binary - distribution file, which includes everything needed to run &xslt4j; and build applications, and a source distribution. For - more information, see Downloading what you need.

    -

    This release also includes ValidateXMLInput, a sample that illustrates - how you can verify that the XML input you are transforming adheres to its document type. It is in the samples/validate subdirectory - along with a Validate utility that you can use to validate XML files without performing a transformation.

    -

    Core (Non-XSLTC) source code updates:

    • Committed by jkesselm@apache.org on 10/12/2001
      Modified: java/src/org/apache/xpath VariableStack.java
      Committer's log entry: Bugzilla3995: Removed "final" keywords. That doesn't by itself - provide the requested enhancement, but it makes prototyping one - a bit easier.

    • Committed by jkesselm@apache.org on 10/15/2001
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Bugzilla 3384. See comments in the toDouble method; I suspect this may be -wasted micro-optimization.

    • Committed by jkesselm@apache.org on 10/15/2001
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Is " 12 34 . 56 78 " really considered acceptable? - Or should whitespace within the value be treated as NAN?

    • Committed by dleslie@apache.org on 10/15/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: Updated build number to 2.2.D12.

    • Committed by dleslie@apache.org on 10/15/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: Updated build number to 2.2.D12.

    • Committed by jkesselm@apache.org on 10/15/2001
      Modified: java/src/org/apache/xalan/templates ElemLiteralResult.java
      Committer's log entry: Fix for Bugzilla1133, LRE21: xsl:extension-element-prefixes should be -considered an exclusion

    • Committed by jkesselm@apache.org on 10/15/2001
      Modified: java/src/org/apache/xalan/templates ElemLiteralResult.java
      Committer's log entry: Fix for Bugzilla 3464. Exposes errors in conformance tests namespace93 and 94.

    • Committed by curcuru@apache.org on 10/16/2001
      Modified: java/src/org/apache/xalan/serialize CharInfo.java - HTMLEntities.res XMLEntities.res
      Committer's log entry: Fix Bugzilla#4000, force reading of *Entites.res to be in UTF-8; added -comments - PR: Bugzilla#4000

    • Committed by jkesselm@apache.org on 10/17/2001
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Avoid overgenerality of isDigits - Combine most character tests into a single switch for performance - Reject values with embedded (as opposed to leading/trailing) whitespace. - - Note that this is "more correct:" than the old solution of calling Java's - toDouble, since (I think) XSLT doesn't officially accept leading + or - scientific notation. If folks want to accept those notations, an - extension function specifically for that purpose seems the - simplest/safest/most-portable solution.

    • Committed by jkesselm@apache.org on 10/17/2001
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Gaaah. Typo.

    • Committed by curcuru@apache.org on 10/17/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java - java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Added: java/src/org/apache/xalan Version.java
      Committer's log entry: Added new org.apache.xalan.Version class for better versioning info; - Deprecated org.apache.xalan.processor.XSLProcessorVersion; - Updated EnvironmentCheck with this info

    • Committed by jkesselm@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan Version.java
      Committer's log entry: Be careful with parentheses when using ?: operator.

    • Committed by jkesselm@apache.org on 10/18/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java - IncrementalSAXSource_Xerces.java
      Removed: java/src/org/apache/xml/dtm/ref CoroutineSAXParser.java - CoroutineSAXParser_Xerces.java
      Committer's log entry: CoroutineParser API was replaced by IncrementalSAXSource; dropping obsolete -code.

    • Committed by jkesselm@apache.org on 10/18/2001
      Removed: java/src/org/apache/xml/dtm/ref CoroutineSAXFilterTest.java
      Committer's log entry: CoroutineParser API was replaced by IncrementalSAXSource; dropping obsolete -code.

    • Committed by jkesselm@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan Version.java
      Committer's log entry: Whups; sloppy: Actually, problem was that the latter two arguments to ?: - must agree in datatype. Dropped in a quick-and-dirty int-to-string hint.

    • Committed by jkesselm@apache.org on 10/18/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      Committer's log entry: Preliminary Xerces-2 support. Doesn't leverage Xerces-2 incremental features - yet, but should at least compile and run under the new parser without - breaking support for the old one. Still working on improving this.

    • Committed by mmidy@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/templates ElemApplyTemplates.java - ElemCallTemplate.java
      Committer's log entry: Bugzilla 4218: Make sure that the stack frame gets restored to the frame that -was previously set. Just calling unlink() may restore to the wrong frame, and -get us out of synch.

    • Committed by jkesselm@apache.org on 10/18/2001
      Modified: java/src/org/xml/sax/helpers ParserAdapter.java
      Committer's log entry: Java 1.1.8 back-compatability requires not using Java 1.2 collection calls. - (Still waiting for community consensus before abandoning 1.1)

    • Committed by mmidy@apache.org on 10/18/2001
      Modified: java/src/org/apache/xpath VariableStack.java
      Committer's log entry: Bugzilla 4218: Make sure that the stack frame gets restored to the frame that -was previously set. Just calling unlink() may restore to the wrong frame, and -get us out of synch.

    • Committed by jkesselm@apache.org on 10/22/2001
      Modified: java/src/org/apache/xml/dtm/ref - IncrementalSAXSource_Xerces.java
      Committer's log entry: In Xerces2, SAXParser no longer seems to inherit from - XMLReader; explicit casts needed to work around that.

    • Committed by curcuru@apache.org on 10/23/2001
      Removed: java/src/javax/xml/parsers SAXParserFactory.java - SAXParser.java ParserConfigurationException.java - package.html FactoryFinder.java - FactoryConfigurationError.java - DocumentBuilderFactory.java DocumentBuilder.java
      Committer's log entry: Remove javax.xml.parsers package from xalan sources since we no longer ship -with these files

    • Committed by jkesselm@apache.org on 10/25/2001
      Modified: java/src/org/apache/xalan/serialize CharInfo.java
      Committer's log entry: Microsoft VJ++ workaround. Should never arise in any reasonably - standards-compliant Java environment, but VJ++ isn't...

    • Committed by jkesselm@apache.org on 10/25/2001
      Modified: java/src/org/apache/xalan/serialize CharInfo.java
      Committer's log entry: Additional "big scary" docs for Microsoft VJ++ workaround.

    • Committed by sboag@apache.org on 10/25/2001
      Modified: java/src/org/apache/xpath/compiler XPathParser.java
      Committer's log entry: Added fix for bug reported by Myriam for match="//x/a" patterns. On the - second "/" on "//", the parser wasn't swallowing the token, which caused - the "x" pattern to be ancestor instead of parent. If you don't have this fix, - it will cause 'a' to be matched when it has any ancestor that is 'x'. - This fix should be localized to only match patterns. The reason this probably - wasn't reported before, is because "//" at the head of a match pattern is - pretty useless, "x/a" being equivelent.

    • Committed by sboag@apache.org on 10/26/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToHTML.java
      Committer's log entry: By longstanding request, don't URL-escape spaces. This is consistent with the - specification, and the opinion of the right thing to do by several people on -the - XSL working group, including Mike Kay, and by the LotusXSLTeam.

    • Committed by jkesselm@apache.org on 10/30/2001
      Modified: java/src/org/apache/xalan/processor XSLTElementDef.java
      Committer's log entry: Improved safety net: When running with Xerces2, the "uri" field may be null. - (Also reordered tests to encourage optimization of code.)

    • Committed by jkesselm@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Add command-line switches for the options introduced at same time as DTM, to -make testing those features easier.

    • Committed by mmidy@apache.org on 11/02/2001
      Modified: java/src/org/apache/xalan/processor StylesheetPIHandler.java
      Committer's log entry: Bugzilla 4575: Add the EOL character to the list of token delimiters.

    • Committed by jkesselm@apache.org on 11/02/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java - IncrementalSAXSource_Xerces.java
      Committer's log entry: Leverage Xerces-2 incremental parsing feature, when possible, - - Making this compile _and_ run under both the old and new versions of - the parser involves a lot of reflection... especially since Xerces-2 - no longer provides a way to directly request incremental delivery - of SAX events; we now have to assemble that concept ourselves, - using XNI components. - - Note that if you pass an existing Xerces-2 SAXParser into the - IncrementalSAXSource_Xerces wrapper, there is currently no way - for us to access its incremental controls. In that case, we are - forced to fall back on the _Filter solution and coroutines.

    • Committed by mmidy@apache.org on 11/02/2001
      Modified: java/src/org/apache/xpath/objects XStringForFSB.java
      Committer's log entry: Bugzilla 4396: Defaulting to the super hashCode(). This causes us to create -a string, but at this point this only seems to get called in key processing. -Maybe we can live with it?

    • Committed by curcuru@apache.org on 11/02/2001
      Modified: java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: Use appropriate context class loader as done in JAXP's FactoryFinder; - Added various new jars; added checkAntVersion()

    • Committed by sboag@apache.org on 11/04/2001
      Modified: java/src/org/apache/xalan/serialize HTMLEntities.res
      Committer's log entry: Commented out mainly greek entities that Netscape seems not to handle.

    • Committed by sboag@apache.org on 11/04/2001
      Modified: java/src/org/apache/xalan/serialize Encodings.java - SerializerToHTML.java SerializerToText.java - SerializerToXML.java
      Committer's log entry: Progress on Bugzilla Bug 1639 : Xalan escaping characters for ISO encodings -other than ISO-8859-1. - - The problem is that you can't tell from the Java Writers if they can encode - a character, and you can't tell which character they are going to encode to. - So... - - Do a one-time-only reflection to see if a sun.io.CharToByteConverter for the - specific encoding is available. I'm hoping this will work for most or all - platforms... but only some extensive testing will tell for sure. If the - CharToByteConverter is not available, it falls back to the old behavior. - If it is available, use the canConvert method to see if the UTF-16 character - can be encoded. If it can be, just send it to the writer, otherwise escape -it. - This doesn't need to be done for < 128, so I'm suspecting the performance - hit won't be too bad. - - The alternative is to create lookups for all the encodings that tell which - blocks of characters can't be encoded. Too much work for me this - weekend, though it remains a possibility. I want to try the use of - CharToByteConverter.canConvert first. - - One problem I've encountered is that CharToByteConverter.canConvert - returns true for (utf-16 code points) 127-159. And so they go unescaped. - How bad of a problem is this? This seems like a bug in the Java - CharToByteConverter for ISO-8859-7. - - It remains to be seen if this problem exists with other encodings, or if this -is - the best approach.

    • Committed by sboag@apache.org on 11/05/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToXML.java
      Committer's log entry: Check for control characters for canConvert, and return false if it is a -control - character, so that it will be escaped.

    • Committed by sboag@apache.org on 11/05/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      Committer's log entry: Don't set the ErrorHandler if it is already set.

    • Committed by sboag@apache.org on 11/06/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Minor fix to JavaDoc for setRecursionLimit.

    • Committed by jkesselm@apache.org on 11/06/2001
      Modified: java/src/org/apache/xpath/operations Operation.java - UnaryOperation.java
      Committer's log entry: Bugzilla 4679: Accessors for left and right operands

    • Committed by mmidy@apache.org on 11/06/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToHTML.java
      Committer's log entry: Do not escape the percent '%' character anymore.

    • Committed by mmidy@apache.org on 11/06/2001
      Modified: java/src/org/apache/xpath/axes LocPathIterator.java - OneStepIterator.java PredicatedNodeTest.java
      Committer's log entry: Bugzilla 4638: When we are in a subcontext we need to clip off the predicate -when evaluating. If not, we end up with the wrong nodeset. This also relates to -test position68.

    • Committed by jkesselm@apache.org on 11/07/2001
      Modified: java/src/org/apache/xalan/transformer - ClonerToResultTree.java ResultTreeHandler.java
      Committer's log entry: Bugzilla 4607; allow explicitly cloning namespace nodes rather than - throwing exception.

    • Committed by curcuru@apache.org on 11/07/2001
      Removed: java/src/META-INF/services - javax.xml.parsers.SAXParserFactory - javax.xml.parsers.DocumentBuilderFactory
      Committer's log entry: Remove services/javax.xml.parsers.* references; we assume parsers have their -own

    • Committed by curcuru@apache.org on 11/07/2001
      Removed: java/src/javax/xml/transform ErrorListener.java - FactoryFinder.java OutputKeys.java Result.java - Source.java SourceLocator.java Templates.java - Transformer.java - TransformerConfigurationException.java - TransformerException.java TransformerFactory.java - TransformerFactoryConfigurationError.java - URIResolver.java overview.html package.html - java/src/javax/xml/transform/dom DOMLocator.java - DOMResult.java DOMSource.java package.html - java/src/javax/xml/transform/sax SAXResult.java - SAXSource.java SAXTransformerFactory.java - TemplatesHandler.java TransformerHandler.java - package.html - java/src/javax/xml/transform/stream StreamResult.java - StreamSource.java package.html - java/src/org/w3c/dom Attr.java CDATASection.java - CharacterData.java Comment.java DOMException.java - DOMImplementation.java Document.java - DocumentFragment.java DocumentType.java - Element.java Entity.java EntityReference.java - NamedNodeMap.java Node.java NodeList.java - Notation.java ProcessingInstruction.java Text.java - package.html - java/src/org/w3c/dom/ranges DocumentRange.java Range.java - RangeException.java package.html - java/src/org/w3c/dom/traversal DocumentTraversal.java - NodeFilter.java NodeIterator.java TreeWalker.java - package.html - java/src/org/xml/sax AttributeList.java Attributes.java - ContentHandler.java DTDHandler.java - DocumentHandler.java EntityResolver.java - ErrorHandler.java HandlerBase.java InputSource.java - Locator.java Parser.java SAXException.java - SAXNotRecognizedException.java - SAXNotSupportedException.java - SAXParseException.java XMLFilter.java - XMLReader.java package.html - java/src/org/xml/sax/ext DeclHandler.java - LexicalHandler.java package.html - java/src/org/xml/sax/helpers AttributeListImpl.java - AttributesImpl.java DefaultHandler.java - LocatorImpl.java NamespaceSupport.java - ParserAdapter.java ParserFactory.java - XMLFilterImpl.java XMLReaderAdapter.java - XMLReaderFactory.java package.html
      Committer's log entry: Use a condensed copy of xml-commons sources instead of individual sources; - remove xalan-specific copies of commons files

    • Committed by mmidy@apache.org on 11/08/2001
      Modified: java/src/org/apache/xalan/res XSLTErrorResources.java - java/src/org/apache/xalan/templates ElemNumber.java - java/src/org/apache/xml/utils/res XResources_cy.java - XResources_el.java XResources_ja_JP_A.java - XResources_ja_JP_HA.java XResources_ja_JP_HI.java - XResources_ja_JP_I.java XResources_zh_CN.java - XResources_zh_TW.java
      Committer's log entry: Bugzilla 4601: Change ElemNumber to use a long integer for the value of the -number. This will allow us to format bigger numbers. As far as japanese -multipliers, we decided to document as a xalan limitation the fact that the -last 2 japanese multipliers will not be supported. If anyone has a strong and -valid user case for this, we will reconsider. For now, we could not justify the -expense of moving to BigInteger to support these multipliers.

    • Committed by jkesselm@apache.org on 11/08/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Bugzilla 4735: We should at least report an error when we overflow DTM -addressing...

    • Committed by mmidy@apache.org on 11/08/2001
      Modified: java/src/org/apache/xalan/processor ProcessorInclude.java
      Committer's log entry: Bugzilla 4355: Make sure that when finding out if a stylesheet imports -itself, we use the resolved href.

    • Committed by mmidy@apache.org on 11/08/2001
      Modified: java/src/org/apache/xpath NodeSetDTM.java
      Committer's log entry: Bugzilla 4158: Make sure we get the current, not the node pointed to by -m_next, which has been already incremented.

    • Committed by jkesselm@apache.org on 11/09/2001
      Modified: java/src/org/apache/xalan/transformer ResultTreeHandler.java
      Committer's log entry: Bugzilla 4344: discard attrs which don't have an element to belong to

    • Committed by jkesselm@apache.org on 11/09/2001
      Modified: java/src/org/apache/xalan/transformer ResultTreeHandler.java
      Committer's log entry: Bugzilla 4344: more efficient.

    • Committed by jkesselm@apache.org on 11/12/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: Reorder slightly and add test to not synthesize xmlns:xsl declaration - if one was already present on the DOM's root element.

    • Committed by jkesselm@apache.org on 11/12/2001
      Modified: java/src/org/apache/xalan Version.java
      Committer's log entry: D13 internal version number update

    • Committed by jkesselm@apache.org on 11/12/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: D13 internal version number update

    This release includes no updates of the compatibility source code (now deprecated). -
    - -

    Core (Non-XSLTC) source code updates:

    • Committed by jkesselm@apache.org on 09/05/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Removed the code which precalculated node levels - (depth in tree). This has been IFed out for some time, but - was retained in case we wanted to go back to it. Since it - seems we're happy with this choice, zapping it entirely - saves a few more cycles. - - It's simple enough to recreate if we change our minds later.

    • Committed by curcuru@apache.org on 09/07/2001
      Modified: java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: Minor cleanup and updates in preparation for extension function; - note SAX portion isn't complete yet

    • Committed by curcuru@apache.org on 09/10/2001
      Modified: java/src/org/apache/xalan/lib Extensions.java - java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: Update EnvironmentCheck service with SAX checking; better method organization; - Add checkEnvironment to xalan: built-in Extensions class

    • Committed by mmidy@apache.org on 09/12/2001
      Modified: java/src/org/apache/xpath/compiler Lexer.java
      Committer's log entry: Bug 2140: Catch index out of bounds exception

    • Committed by mmidy@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/transformer ResultTreeHandler.java
      Committer's log entry: Bug 2130: Check for null data to avoid NPE

    • Committed by mmidy@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/res XSLTErrorResources.java - java/src/org/apache/xalan/templates ElemElement.java
      Committer's log entry: Bug 3421: Issue an error if namespace attribute is used with an empty string -in xsl:element

    • Committed by mmidy@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/templates ElemElement.java
      Committer's log entry: Backing out this change. Some conformance tests need to be updated first

    • Committed by mmidy@apache.org on 09/13/2001
      Modified: java/src/org/apache/xalan/templates ElemElement.java
      Committer's log entry: Bug 3421: Issue an error if namespace - attribute is used with an empty string in xsl:element

    • Committed by mmidy@apache.org on 09/13/2001
      Modified: java/src/org/apache/xalan/templates ElemTemplateElement.java
      Committer's log entry: Bug 3442: when building the prefix table for an element, just override -prefixes defined in parent element with uris that have been redefined by the -element instead of keeping both uris in the table.

    • Committed by curcuru@apache.org on 09/13/2001
      Modified: java/src/org/apache/xalan/serialize SerializerFactory.java
      Committer's log entry: Fix Bugzilla 3491: updated error message text; also updated Javadoc to - reflect @throws; note that the Javadoc is still somewhat contradictory - about returning a null on error (it appears to throw exceptions instead) - PR:3491 - Submitted by:Julian.Birch@ranplc.co.uk

    • Committed by curcuru@apache.org on 09/13/2001
      Modified: java/src/javax/xml/transform TransformerFactory.java - java/src/org/apache/xml/dtm DTMManager.java
      Committer's log entry: Fix Bugzilla 3423: documentation updates for proper class, property names - (one of two checkins) - PR:3423 - Submitted by:gthb@dimon.is

    • Committed by curcuru@apache.org on 09/14/2001
      Modified: java/src/org/apache/xpath XPath.java
      Committer's log entry: Fix Bugzilla 2637: documentation updates for constructor functionality - PR:2637 - Submitted by:gthb@dimon.is

    • Committed by mmidy@apache.org on 09/17/2001
      Modified: java/src/org/apache/xalan/templates ElemUse.java
      Committer's log entry: Bug 2548: Combine attribute sets with the same name but process them in order -of precedence.

    • Committed by mmidy@apache.org on 09/17/2001
      Modified: java/src/org/apache/xpath/axes UnionPathIterator.java
      Committer's log entry: Bug 3533: Check for null m_iterators before trying to use it.

    • Committed by mmidy@apache.org on 09/18/2001
      Modified: java/src/org/apache/xalan/transformer KeyRefIterator.java
      Committer's log entry: Bugzilla 3618: Check cache before anything else when getting the next node in -the iterator.

    • Committed by morten@apache.org on 09/19/2001
      Modified: java/src/org/apache/xalan/xsltc TransletException.java
      Committer's log entry: Changed the TransletException class so that it inherits from SAXException - and not from Exception. This should make it possible for us to avoid - testing for both SAXExceptions and TransletExceptions. Exception handling - is one of the things that JVM takes its time with, and we should try to - avoid using them when we can, and use as few of them as possible otherwise. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by mmidy@apache.org on 09/19/2001
      Modified: java/src/org/apache/xalan/processor - TransformerFactoryImpl.java
      Committer's log entry: Bugzilla 2332: Implement getAttribute() method to return the values for -incremental and optimize

    • Committed by jkesselm@apache.org on 09/20/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMNodeProxy.java
      Committer's log entry: Enable Attr.getOwnerElement()

    • Committed by mmidy@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/processor StylesheetHandler.java - java/src/org/apache/xalan/templates ElemLiteralResult.java
      Committer's log entry: Bugzilla 1803: Handle version attribute on a litteral element.

    • Committed by dleslie@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: release 2.2.D11

    • Committed by dleslie@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: release 2.2.D11

    • Committed by mmidy@apache.org on 09/26/2001
      Modified: java/src/org/apache/xalan/processor XSLTSchema.java
      Committer's log entry: Mark xsl:template as containing ordered elements. Fix for no error when -xsl:param not first child of xsl:template

    • Committed by mmidy@apache.org on 09/28/2001
      Modified: java/src/org/apache/xalan/templates ElemLiteralResult.java - ElemTemplateElement.java Stylesheet.java
      Committer's log entry: Bugzilla 3800: Make sure that when looking for excluded prefixes, we check -the URI associated with the prefix, not the prefix in the excluded list.

    • Committed by mmidy@apache.org on 09/28/2001
      Modified: java/src/org/apache/xpath NodeSetDTM.java
      Committer's log entry: Do not reorder or strip duplicate nodes when converting a DOM nodelist into a -DTM nodelist

    • Committed by jkesselm@apache.org on 10/01/2001
      Modified: java/src/org/apache/xml/dtm/ref - IncrementalSAXSource_Filter.java
      Committer's log entry: Catch for unwrappered StopException (apparently not all parsers generate - a SAXException wrapper).

    • Committed by jkesselm@apache.org on 10/01/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMDefaultBaseIterators.java - DTMDefaultBaseTraversers.java - java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Creating the implied Namespace Node for xml:

    This release includes no updates of the compatibility source code (now deprecated). -
    - -The SQL Extension library has been updated to work with DTM. -

    Core (Non-XSLTC) source code updates:

      -
    • Committed by garyp@apache.org on 08/13/2001
      Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Fix bugzilla bug 3056 -(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3056). SAX2DTM now keeps -track if it is receiving events inside a DTD and ignores comment events when -inside the DTD.

    • Committed by mmidy@apache.org on 08/13/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: Update version for 2.2.D9 build

    • Committed by johng@apache.org on 08/14/2001
      Modified: java/src/org/apache/xalan/lib/sql ConnectionPool.java - DefaultConnectionPool.java SQLDocument.java - XConnection.java
      Committer's log entry: Fixed bug in connect method where User and Password were not - correctly being passed to the JDBC Driver. Requires chnage in - ConnectionPool Interface - Submitted by: John Gentilin

    • Committed by mmidy@apache.org on 08/15o2001
      Modified: java/src/org/apache/xalan/lib/sql XConnection.java
      Committer's log entry: Use defined constant DTMManager.IDENT_DTM_NODE_BITS for shifting DTM nodes, -not hard coded value.

    • Committed by mmidy@apache.org on 08/15/2001
      Modified: java/src/org/apache/xml/utils SystemIDResolver.java
      Committer's log entry: Fix problem with resolving a relative URI from a processing instruction

    • Committed by mmidy@apache.org on 08/17/2001
      Modified: java/src/org/apache/xml/utils SystemIDResolver.java
      Committer's log entry: Make sure base is not null before checking for its contents.

    • Committed by mmidy@apache.org on 08/17/2001
      Modified: java/src/org/apache/xalan/templates FuncDocument.java
      Committer's log entry: Fix document function so that if only one argument is passed and it is a -nodetest, the base to be used to resolve relative URIs is the base of the each -node in the nodeset.

    • Committed by mmidy@apache.org on 08/17/2001
      Modified: java/src/org/apache/xalan/processor XSLTSchema.java
      Committer's log entry: Allow multiple iterations of xsl:with-param within an xsl:call-template or -xsl:apply-template

    • Committed by sboag@apache.org on 08/20/2001
      Modified: java/src/org/apache/xpath XPathContext.java
      Committer's log entry: Added getCurrentNodeList() for getting the current node list as defined - by http://www.w3.org/TR/xslt#dt-current-node-list. - This looks up the stack of the SubContextLists to find the top-level - LocPathIterator. I'm fairly unhappy with this fix, and hope to restructure - the context list stuff a bit to avoid the casts in the getCurrentNodeList(), - and to fix getCurrentNode() so that it properly defines the current - node as defined by the XSLT spec. As a matter of fact, I would - like to break up XPathContext into an XSLTContext. - Part of the http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3031 - fix.

    • Committed by sboag@apache.org on 08/20/2001
      Modified: java/src/org/apache/xpath/functions FuncCurrent.java
      Committer's log entry: Call new XPathContext#getCurrentNodeList. Fixes - http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3031.

    • Committed by sboag@apache.org on 08/20/2001
      Modified: java/src/org/apache/xalan/transformer KeyRefIterator.java - java/src/org/apache/xpath/axes ChildIterator.java - ChildTestIterator.java DescendantIterator.java - MatchPatternIterator.java - SelfIteratorNoPredicate.java UnionPathIterator.java
      Committer's log entry: Fix for problem reported by Mike Starr <mike.starr@air2web.com>, - where the transformation hangs for "foo[2] | bang" - patters, i.e. unions with positional predicates. The fix - is to have the iterators#nextNode() set m_lastFetched to DTM.NULL - when m_foundLast is found to be true on function entry - (after the cache check). This allows getCurrentNode() to - fullfill it's contract of returning null if the last fetch was - null. The bug occured after an optimization for positional - predicates to have them not continue searching once - the positional node was found, by setting m_foundLast - to true.

    • Committed by johng@apache.org on 08/24/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: Removed debug flag - Submitted by:John Gentilin

    • Committed by johng@apache.org on 08/24/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java - XConnection.java
      Committer's log entry: Fixed Streaming Mode - Submitted by: John Gentilin

    • Committed by johng@apache.org on 08/24/2001
      Modified: java/src/org/apache/xml/dtm DTM.java - java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMDocumentImpl.java DTMManagerDefault.java
      Committer's log entry: added document registration and release events to the DTM interface - Submitted by: John Gentilin

    • Committed by garyp@apache.org on 08/25/2001
      Modified: java/src/org/apache/xalan/lib Extensions.java
      Committer's log entry: Fix bug 3112 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3112). Fix -tokenize to work with DTM by obtaining a new DocumentBuilder and not using the -document from the context node.

    • Committed by garyp@apache.org on 08/26/2001
      Modified: java/src/org/apache/xpath VariableStack.java - java/src/org/apache/xpath/operations Variable.java
      Committer's log entry: Fix bug 3265 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3265). Using -an expression in the evaluate extension function that contains a top-level -variable was cause an NPE.

    • Committed by sboag@apache.org on 08/26/2001
      Modified: java/src/org/apache/xpath/objects XStringForChars.java
      Committer's log entry: Fixed two bugs, one in getChars and one in charAt where the m_start - offset wasn't being used correctly. This manifested itself in some - stuff I was doing with the startsWith function, but likely caused - many other bugs with other functionality.

    • Committed by morten@apache.org on 08/27/2001
      Added: java/src/org/apache/xalan/xsltc StripFilter.java
      Committer's log entry: Forgot to add this file in my last putback. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by jkesselm@apache.org on 08/28/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
      Committer's log entry: added dumpNode method, convenience for debugging. - - We might want to move this function up to DTMDefaultBase, or - perhaps to the DTM API itself.

    • Committed by sboag@apache.org on 08/28/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToText.java
      Committer's log entry: Fix http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3131 by - overriding writeNormalizedChars and writeUTF16Surrogate to - not do any XML escaping.

    • Committed by mmidy@apache.org on 08/28/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
      Committer's log entry: The index was being stored as opposed to the node handle when we were -replacing namespace nodes. Store the actual node handle.

    • -
    • Committed by mmidy@apache.org on 08/29/2001
      Modified: -java/src/org/apache/xpath/compiler Lexer.java
      Committer's log entry: Fix for Bugzilla 2684 StringIndexOutOfBounds Exception. Check if we are at the end of the pattern string.

    • -
    This release includes no updates of the compatibility source code (now deprecated). -
    - -

    Core (Non-XSLTC) source code updates:

    -
    • Committed by dleslie@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: 2.2.D8

    • Committed by dleslie@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: 2.2.D8

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/transformer NodeSortKey.java
      Committer's log entry: Submitted fix for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2851.

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Just added some stuff to diagnose bugs for flavor th.

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xpath/axes WalkerFactory.java - java/src/org/apache/xpath/compiler Compiler.java - java/src/org/apache/xpath/patterns - ContextMatchStepPattern.java StepPattern.java
      Committer's log entry: These are changes submitted (offline) by Mukund Raghavachari/Watson/IBM@IBMUS. - - This fixes a bug with match="chapter//footnote[1]" patterns. - - The main change here is minor to remove the automatic attachment of parent::* -to simple step patterns. - - He has re-implemented executePredicates to be - more efficient. Given a pattern such as row[6], it - does not iterate over the entire axis until it reaches - the node to see if it is the sixth node. Rather, - starting from the current node, it works backwards - (preceding siblings) until it either runs out of nodes - or finds more than six nodes that match the - predicate [I can explain it better if desired]. - This optimization improves performance slightly - overall. It helps decoy and patterns most (by - about 10%). - - The other optimization that I implemented was the - following. For a pattern foo[][3][][4] ..., where more - than one predicate is a number (position check), - in checking the predicate [4], the fact that the - current node has passed foo[][3] implies that it is - the only node that is the third node among its - siblings that passes foo[]. Therefore, any - subsequent position checks can be true if and - only if the position is [1]. This optimization is not - used by the xsltmark benchmarks and so does - not offer any performance benefits.

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xpath/axes DescendantIterator.java
      Committer's log entry: Fix for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1336

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xpath/compiler Lexer.java
      Committer's log entry: Resize the m_patternMap if m_patternMapSize exceeds the bounds.

    • Committed by mmidy@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/extensions - ExtensionHandlerGeneral.java - ExtensionHandlerJavaPackage.java - ExtensionsTable.java MethodResolver.java - java/src/org/apache/xalan/lib Extensions.java - java/src/org/apache/xalan/lib/sql ConnectionPoolManager.java - java/src/org/apache/xalan/processor ProcessorLRE.java - ProcessorTemplateElem.java StylesheetHandler.java - TransformerFactoryImpl.java XSLTAttributeDef.java - XSLTElementProcessor.java - java/src/org/apache/xalan/res XSLTErrorResources.java - java/src/org/apache/xalan/serialize CharInfo.java - WriterToUTF8Buffered.java - java/src/org/apache/xalan/templates ElemExtensionCall.java - ElemExtensionDecl.java ElemMessage.java - FuncDocument.java FuncFormatNumb.java - OutputProperties.java StylesheetRoot.java - java/src/org/apache/xalan/transformer TrAXFilter.java - TransformerHandlerImpl.java - TransformerIdentityImpl.java TransformerImpl.java - java/src/org/apache/xalan/xslt Process.java - java/src/org/apache/xml/dtm DTMException.java - DTMManager.java - java/src/org/apache/xml/dtm/ref ChunkedIntArray.java - CoroutineManager.java CoroutineSAXParser.java - CoroutineSAXParser_Xerces.java DTMBuilder.java - DTMDefaultBase.java DTMDefaultBaseIterators.java - DTMDefaultBaseTraversers.java - DTMManagerDefault.java - IncrementalSAXSource_Filter.java - IncrementalSAXSource_Xerces.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java - java/src/org/apache/xml/utils ObjectPool.java QName.java - URI.java - java/src/org/apache/xpath NodeSet.java NodeSetDTM.java - VariableStack.java XPath.java XPathContext.java - java/src/org/apache/xpath/axes WalkerFactory.java - java/src/org/apache/xpath/functions FuncSubstring.java - FunctionDef1Arg.java - java/src/org/apache/xpath/objects - XRTreeFragSelectWrapper.java XStringForChars.java - java/src/org/apache/xpath/operations Variable.java - java/src/org/apache/xpath/res XPATHErrorResources.java
      Committer's log entry: Getting all (almost all) error message strings into the resource bundle

    • Committed by mmidy@apache.org on 07/27/2001
      Removed: java/src/org/apache/xml/dtm/ref DTMBuilder.java
      Committer's log entry: Accidentally added. Now deleting.

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xpath Expression.java - java/src/org/apache/xpath/axes AxesWalker.java - LocPathIterator.java PredicatedNodeTest.java - ReverseAxesWalker.java - java/src/org/apache/xpath/objects XNumber.java - java/src/org/apache/xpath/operations Variable.java
      Committer's log entry: If a proximity predicate is a stable number (variable or number literal) then, - once the node is found, don't keep searching! (since only one - node is possible).

    • Committed by sboag@apache.org on 07/30/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java
      Committer's log entry: In getNextNamespaceNode and getFirstNamespaceNode, was - sometimes returning a node without the DTM identity bits. - Fix for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2878.

    • Committed by sboag@apache.org on 07/30/2001
      Modified: java/src/org/apache/xpath/compiler OpMap.java
      Committer's log entry: Throw real error instead of runtime error in getFirstPredicateOpPos - for better error reporting.

    • Committed by sboag@apache.org on 07/30/2001
      Modified: java/src/org/apache/xpath/axes PredicatedNodeTest.java - java/src/org/apache/xpath/compiler OpMap.java
      Committer's log entry: Bit of a hack to make /descendant-or-self::north with getFirstPredicateOpPos - where getFirstPredicateOpPos was always throwing an error if - there was not a predicate (!! Should have been discovered before - now?!?!). If -2 return -2 (instead of throwing an error), and - handle this case in PredicatedNodeTest#initPredicateInfo.

    • Committed by johng@apache.org on 07/30/2001
      Modified: java/src/org/apache/xalan/lib/sql ObjectArray.java - SQLDocument.java SQLErrorDocument.java - XConnection.java
      Committer's log entry: Added the original pquery and streaming mode functionality - Submitted by: John Gentilin

    • Committed by johng@apache.org on 07/30/2001
      Added: java/src/org/apache/xalan/lib/sql DTMDocument.java
      Committer's log entry: Added DTM Document, a common impl between SQLDocument and SQLErrorDocument - Submitted by: John Gentilin

    • Committed by sboag@apache.org on 07/30/2001
      Modified: java/src/org/apache/xpath/axes DescendantIterator.java - WalkerFactory.java
      Committer's log entry: Fix addresses http://nagoya.apache.org/bugzilla/enter_bug.cgi?product=XalanJ2, - and a whole class of related problems.

    • Committed by sboag@apache.org on 07/31/2001
      Modified: java/src/org/apache/xpath/objects XNodeSet.java XObject.java - java/src/org/apache/xpath/patterns StepPattern.java
      Committer's log entry: Detach expressions in match patterns. Also, defined - numWithSideEffects and boolWithSideEffects (for lack of - better names) that will increment the iterator, and call these - for predicates. The combination of these results in about an - 18% performance improvement for decoy.xsl. - Credits to Mukund Raghavachari/Watson/IBM@IBMUS.

    • Committed by mmidy@apache.org on 07/31/2001
      Modified: java/src/org/apache/xalan/extensions - ExtensionHandlerGeneral.java - java/src/org/apache/xalan/res XSLTErrorResources.java - java/src/org/apache/xalan/templates ElemExtensionDecl.java
      Committer's log entry: Add support for external scripts (ie, the src attribute on a script element)

    • Committed by sboag@apache.org on 07/31/2001
      Modified: java/src/org/apache/xpath XPathContext.java - java/src/org/apache/xpath/axes ChildTestIterator.java - OneStepIteratorForward.java
      Committer's log entry: In XPathContext#createDTMIterator(int node), call -OneStepIteratorForward(Axis.SELF) - instead of DescendantIterator. This addresses one of the bugs - in http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2925 - (i.e. <xsl:copy-of select="xalan:nodeset($stylesheets)"/>... - The DescendantIterator was enumerating all of the nodes in the RTF - rather than just the one.)

    • Committed by johng@apache.org on 07/31/2001
      Modified: java/src/org/apache/xalan/lib/sql ConnectionPool.java - ConnectionPoolManager.java DTMDocument.java - DefaultConnectionPool.java ObjectArray.java - PooledConnection.java SQLDocument.java - SQLErrorDocument.java XConnection.java
      Committer's log entry: Added Error Managment and javadocs - Submitted by: John Gentilin

    • Committed by sboag@apache.org on 08/01/2001
      Modified: java/src/org/apache/xpath/patterns StepPattern.java
      Committer's log entry: Fixed some major problems with position() and last() in secondary - predicates for match patterns. Credit goes to - Mukund Raghavachari/Watson/IBM@IBMUS for flagging these.

    • Committed by johng@apache.org on 08/01/2001
      Modified: java/src/org/apache/xalan/lib/sql XConnection.java
      Committer's log entry: Update after building Unit Test's - Submitted by: John Gentilin

    • Committed by mmidy@apache.org on 08/01/2001
      Modified: java/src/org/apache/xalan/processor XSLTAttributeDef.java
      Committer's log entry: Fix for Bugzilla 2930. Fix from Alexander Rudnev. Handle namespaced elements.

    • Committed by sboag@apache.org on 08/01/2001
      Modified: java/src/org/apache/xml/dtm DTMAxisIterator.java - java/src/org/apache/xml/dtm/ref DTMAxisIteratorBase.java - DTMDefaultBaseIterators.java - java/src/org/apache/xpath/axes OneStepIterator.java
      Committer's log entry: Addresses http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2945 - - Bug was caused by (redundent) cloneWithReset being called from - the UnionPathIterator, and the iterator in OneStepIterator not being - reset. (Need to review: check other iterators for this.) - - Call reset on the iterator in OneStepIterator#reset. Reset the position - value in the ancestor iterator reset. Define DTMAxisIterator#cloneIterator - to not reset the iterator position, and fix the implementations of - this to not call clone.reset().

    • Committed by sboag@apache.org on 08/02/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java - java/src/org/apache/xpath NodeSetDTM.java - java/src/org/apache/xpath/functions FuncExtFunction.java - java/src/org/apache/xpath/objects XBoolean.java - XNodeSet.java XNumber.java XObject.java
      Added: java/src/org/apache/xpath/objects XNodeSetForDOM.java
      Committer's log entry: Address http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2925 - - Create new XObject, XNodeSetForDOM, which is constructed - from a Node, NodeList, or NodeIterator, and acts the same as - XNodeSet, except it returns the original object for object(), - nodeset(), and nodelist(). - - Add XObject#create(Object val, XPathContext xctxt), which is - called from TransformerImpl#setParameter(s), and - FuncExtFunction#execute (for the return values of the - extension). - - XBoolean and XNumber now also have Boolean and Number - constructors, in which case the original object will also be - returned from the object() method. - - This should make the conversion from java object to XObject - consistent between function returns and setParameter. These - changes should also fix a bug where NodeLists weren't being converted.

    • Committed by jkesselm@apache.org on 08/03/2001
      Added: java/src/org/apache/xml/utils NamespaceSupport2.java
      Committer's log entry: Replacement for org.xml.sax.helpers.NamespaceSupport; extends - that API so it can be easily swapped in. - - Current changes; - - Minor code reorg. I'm sorry, but I find classes easier to read - if fields are defined before methods reference them rather than - at end, especially when inner classes are present. - - Punt stack vector in favor of doubly-linked list. (It was already - singly-linked in parallel with the vector!) - - The whole dirty-tables concept was broken, because Context's - ctor always called copyTables and thus always marked tables - dirty. It also wasted some time setting itself only to be reset by - setParent. I've fixed both by parameterizing the ctor and making - copyTables specific to prep-for-new-declaration. (Could be - moved back into the declaration method, for that matter.) - - I'm dubious about the caches in processName. As far as I can - tell, Xalan per se never actually uses that method... - - The use of Hashtables is questionable. Hashtable is - known to be inefficient and oversynchronized in older JVMs, and - the fact that this is a bidirectional mapping suggests that an - approach similar to our own String Pool -- lighter-weight, more - targeted, hashing without reduplicating the two column tables -- - would be a win. Since these are typically short sets, even - simple linear search is worth considering!

    • Committed by jkesselm@apache.org on 08/03/2001
      Modified: java/src/org/apache/xalan/processor StylesheetHandler.java - java/src/org/apache/xalan/templates ElemTemplateElement.java - java/src/org/apache/xalan/transformer ResultTreeHandler.java - TransformSnapshotImpl.java
      Committer's log entry: Cutover to NamespaceSupport2, q.v.

    • Committed by jkesselm@apache.org on 08/03/2001
      Modified: java/src/org/apache/xml/utils NamespaceSupport2.java
      Committer's log entry: Continuing code review.

    • Committed by jkesselm@apache.org on 08/03/2001
      Modified: java/src/org/apache/xml/utils NamespaceSupport2.java
      Committer's log entry: More efficient prefixes-for-specific-URI. This may wind up being - redone yet again if/when the underlying storage representation - changes.

    • Committed by dleslie@apache.org on 08/03/2001
      Added: java/src/org/apache/xalan/lib PipeDocument.java
      Committer's log entry: PipeDocument extension element (the pipeDocument method).

    • Committed by sboag@apache.org on 08/04/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java - java/src/org/apache/xpath NodeSet.java NodeSetDTM.java
      Committer's log entry: Bug fixed regarding the current() function in the root template - (related to bug#1269). Bug was reported by David Marston - offline. The test for this is conf/copy/copy29. - - In TransformerImpl#applyTemplateToNode, create a NodeSetDTM and pass it to -m_xcontext.pushContextNodeList(cnl);. - In NodeSetDTM fix getCurrentNode so that it doesn't use m_next-1 - (which simply appears to be completely wrong). Do the same for - NodeSet... though I don't think this will be called anywhere in - Xalan.

    • Committed by sboag@apache.org on 08/04/2001
      Modified: java/src/org/apache/xml/dtm DTMAxisIterator.java - java/src/org/apache/xml/dtm/ref DTMAxisIteratorBase.java - DTMDefaultBaseIterators.java
      Committer's log entry: Provide method for DTMAxisIterator to get the current root node - of the iteration.

    • Committed by sboag@apache.org on 08/04/2001
      Modified: java/src/org/apache/xpath/objects XObject.java
      Committer's log entry: In response to regression posted on xalan-dev by John Gentilin -<johnglinux@eyecatching.com> - on 08/03/2001 06:49 PM. When the XNodeSet taks a DTMIterator, it - will call val.getDTMManager();, which will call LocPathIterator#getDTMManager, - which will call m_execContext..getDTMManager(), which means - that setRoot has to be called on the iterator before it is added to - XNodeSet. Thus, call setRoot on the OneStepIterator in - create(Object, XPathContext) before it is added to the XNodeSet. - The regression was related to fix for -http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2925.

    • Committed by sboag@apache.org on 08/05/2001
      Modified: java/src/org/apache/xpath/axes OneStepIterator.java
      Committer's log entry: For the OneStepIterator(DTMAxisIterator iterator) constructor, - initialize the node tests to DTMFilter.SHOW_ALL (duh).

    • Committed by sboag@apache.org on 08/06/2001
      Modified: java/src/org/apache/xpath/objects XObject.java
      Added: java/src/org/apache/xpath/objects XObjectFactory.java
      Committer's log entry: Move create methods from XObject to XObjectFactory, in response - to cyclic build problems encountered with javac 1.1.8.

    • Committed by sboag@apache.org on 08/06/2001
      Modified: java/src/org/apache/xml/utils NamespaceSupport2.java
      Committer's log entry: Moved anonomous class to PrefixEnumerator, in response - to problems encountered with 1.1.8 build. - Joe may want to fix this in another way, as - I'm sure the anon class is probably a bit - cheaper?

    • Committed by sboag@apache.org on 08/06/2001
      Modified: java/src/org/apache/xpath VariableStack.java
      Committer's log entry: Address http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2972, - where it was throwing a NPE instead of reporting that the variable - was being accessed before it was bound (i.e. the variable was being - accessed inside an RTF for that same variable).

    • Committed by sboag@apache.org on 08/06/2001
      Modified: java/src/org/apache/xalan/transformer - TransformerHandlerImpl.java
      Committer's log entry: Remove m_hasStarted variable and associated assertion.

    • Committed by sboag@apache.org on 08/06/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBaseIterators.java
      Committer's log entry: Addresses bug http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3001. - In the cloneIterator function of PrecedingIterator, the cloned array - was being sized for _maxAncestors, which defaults to 8. But if the - _stack was resized, it will copy more into the new stack than is - allocated. The solution is to allocate the new clone._stack array to - _stack.length.

    • Committed by jkesselm@apache.org on 08/06/2001
      Modified: java/src/org/apache/xml/utils NamespaceSupport2.java
      Committer's log entry: Don't create caches unless used (which I don't think they are, in Xalan).

    • Committed by sboag@apache.org on 08/06/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBaseIterators.java
      Committer's log entry: Made _maxAncestors not static, as this is - not compatible with 1.1.8 (reported by - Gary Peskin).

    • Committed by jkesselm@apache.org on 08/06/2001
      Modified: java/src/org/apache/xml/utils NamespaceSupport2.java
      Committer's log entry: Playing a hunch, I moved the Context objects out of NamespaceSupport2. - They're now a second class in the same file rather than being an inner class. - That reduces the size of the Context2 object, and its initialization time, by - removing the need for it to carry a reference to the NamespaceSupport2 - object that created it. - - Performance seems significantly improved... even (surprisingly!) on the - getDeclaredPrefixes operation. Memory usage also seems better, as - expected. - - NamespaceSupport2 is still acounting for about 5% - of the time spent in the ResultTreeHandler, according - to my latest trace. Apparently we are calling - getDeclaredPrefixes an obscenely large number of - times, and the Vector.elements call is adding up. We - may want to look at where this is being called from - and whether we can reduce the number of invocations.

    • Committed by jkesselm@apache.org on 08/06/2001
      Modified: java/src/org/apache/xalan/transformer ResultTreeHandler.java
      Committer's log entry: Performance improvement; avoid scanning the same list twice.

    • Committed by sboag@apache.org on 08/06/2001
      Modified: java/src/org/apache/xalan/transformer - TransformerHandlerImpl.java TransformerImpl.java - java/src/org/apache/xalan/xslt Process.java - java/src/org/apache/xml/dtm/ref - IncrementalSAXSource_Filter.java - java/src/org/apache/xml/utils DefaultErrorHandler.java - java/src/org/apache/xpath/operations Variable.java
      Committer's log entry: This checkin hopefully fixes many problems with bad diagnostics lately, but - at the expense of a slight change in behavior. The rule now is, the - DefaultErrorHandler never outputs location info for error and fatalError... -this has to be done - by the catcher of the exception. Convenience methods for this are - in DefaultErrorHandler#printLocation. This method will unwrap the - exception as close to the originating source as possible.

    • Committed by sboag@apache.org on 08/07/2001
      Modified: java/src/org/apache/xalan/extensions - XSLProcessorContext.java - java/src/org/apache/xml/dtm DTMIterator.java - java/src/org/apache/xml/dtm/ref DTMAxisIteratorBase.java - java/src/org/apache/xpath NodeSetDTM.java - java/src/org/apache/xpath/axes AttributeIterator.java - AxesWalker.java ChildIterator.java - ChildTestIterator.java DescendantIterator.java - FilterExprWalker.java LocPathIterator.java - OneStepIterator.java OneStepIteratorForward.java - ReverseAxesWalker.java UnionPathIterator.java - WalkingIteratorSorted.java - java/src/org/apache/xpath/objects XObjectFactory.java
      Committer's log entry: Changes to allow some dynamic determination in WalkerIteratorSorted to - see if the nodes really need to be sorted. Added isDocOrdered() and - getAxis() to both DTMIterator and AxesWalker, and implemented - appropriate overloads in derived or implementing classes. In FilterExprWalker - return the contained DTMIterator's getAxis(). In WalkerIteratorSorted, - implement canBeWalkedInNaturalDocOrder() function that is called - from setRoot(...). If this function returns true, than don't sort the nodes - in setRoot, and in all other respects treat this as if it is a simple - WalkingIterator.

    • Committed by mmidy@apache.org on 08/07/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Fix for bugzilla 1251. Make sure exceptions are thrown when we're on the main -thread.

    • Committed by sboag@apache.org on 08/07/2001
      Modified: java/src/org/apache/xpath/axes AxesWalker.java - WalkerFactory.java WalkingIteratorSorted.java
      Committer's log entry: Eliminate do/while check for duplicates in AxesWalker#nextNode() - by using WalkingIteratorSorted for cases where both the preceding[-sibling] - and following[-sibling] axes are being walked, and for "@*/foo" patterns - ("@attr/foo" patterns still use WalkingIterator).

    • Committed by garyp@apache.org on 08/08/2001
      Modified: java/src/org/apache/xalan/templates FuncFormatNumb.java
      Committer's log entry: Fix bugzilla bug 3036 -(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3036). When no -xsl:decimal-format element is supplied in the composed stylesheet, the defaults -specified in the Recommendation section 12.3 should be used for the attribute -values, not locale-specific defaults.

    • Committed by garyp@apache.org on 08/09/2001
      Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Fix for bugzilla 3060 -(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3060). Prefixes and - namespaceURIs are kept in the same Vector, m_prefixMappings. The entries are -stored as pairs of vector elements. The even elements contain the prefix and -the odd elements contain the URI. In two routines, getPrefix and endElement, -the appropriate prefix or URI was being located in the Vector using an -indexOf. However, in this case where the prefix and the URI were the same, the -routine was looking for the URI but finding the prefix instead of the URI. It -tried tried to back up one to get the prefix and underflowed the Vector size.

    • Committed by mmidy@apache.org on 08/09/2001
      Modified: java/src/org/apache/xalan/transformer ResultTreeHandler.java - TransformerImpl.java
      Committer's log entry: Implement ErrorHandler in ResultTreeHandler so that fatal errors can get -passed in to the SAXHandler. Also change the code in TransformerImpl to call -fatalError in case of an error instead of endDocument. (overlaps with URI -handling fix...)

    • Committed by mmidy@apache.org on 08/09/2001
      Modified: java/src/org/apache/xalan/processor - TransformerFactoryImpl.java - java/src/org/apache/xalan/transformer - TransformerIdentityImpl.java - java/src/org/apache/xml/utils SystemIDResolver.java
      Committer's log entry: Fix code to handle absolute paths from unix systems. This fix is part of an -ongoing process and is just meant to fix a few pending bugs. More changes are -expected in this area.

    • Committed by mmidy@apache.org on 08/10/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: Change version for xalan2.2.D9 build

    • Committed by garyp@apache.org on 08/10/2001
      Modified: java/src/org/apache/xalan/templates ElemElement.java - java/src/org/apache/xalan/transformer ResultTreeHandler.java - java/src/org/apache/xml/utils DefaultErrorHandler.java
      Committer's log entry: ResultTreeHandler was pushing a new namespace context but failing to note -that result in more pushes than pops. Cleaned up the execute() method of -ElemElement to make it more understandable (to me) and added a few comments. -The DefaultErrorHandler was not flushing Writers that it created. Since the -Writers are never closed (and cannot be as there is no close method), error -messages were failing to appear.

    • Committed by jkesselm@apache.org on 08/10/2001
      Modified: java/src/org/apache/xml/dtm DTMManager.java
      Committer's log entry: Increasing the number of bits used to identify DTM nodes, at the expense of -decreasing the number of DTMs that a DTMManager can track simultaneously. Some -other code has been updated to track this change (and to better track posible -future changes), as have the IDKEY testcases.

    • Committed by jkesselm@apache.org on 08/10/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMDocumentImpl.java DTMManagerDefault.java
      Committer's log entry: Increasing the number of bits used to identify DTM nodes, at the expense of -decreasing the number of DTMs that a DTMManager can track simultaneously. Some -other code has been updated to track this change (and to better track posible -future changes), as have the IDKEY testcases.

    • Committed by jkesselm@apache.org on 08/10/2001
      Modified: java/src/org/apache/xpath/functions FuncGenerateId.java
      Committer's log entry: Increasing the number of bits used to identify DTM nodes, at the expense of -decreasing the number of DTMs that a DTMManager can track simultaneously. Some -other code has been updated to track this change (and to better track posible -future changes), as have the IDKEY testcases.

    • Committed by sboag@apache.org on 08/10/2001
      Modified: java/src/org/apache/xpath NodeSetDTM.java
      Committer's log entry: Try to support getRoot. Fixes problem with TransformStateTest.

    • Committed by mmidy@apache.org on 08/10/2001
      Modified: java/src/org/apache/xpath/axes WalkerFactory.java
      Committer's log entry: Fix problem with duplicate nodes produced from a walking iterator

    This release includes no updates of the compatibility source code (now deprecated). -
    - -

    Core (Non-XSLTC) source code updates:

    • Committed by johng@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: Code Update - Submitted by:John Gentilin

    • Committed by johng@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: Fixed DTM.NULL compile error

    • Committed by jkesselm@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/transformer TreeWalker2Result.java
      Committer's log entry: Redundant test removed, possibly redundant code flagged for %REVIEW%

    • Committed by jkesselm@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java - java/src/org/apache/xalan/transformer - TransformerHandlerImpl.java - java/src/org/apache/xml/dtm/ref DTMDefaultBase.java - DTMDocumentImpl.java DTMManagerDefault.java - IncrementalSAXSource.java - IncrementalSAXSource_Filter.java - IncrementalSAXSource_Xerces.java - java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java - java/src/org/apache/xml/utils SuballocatedIntVector.java
      Committer's log entry: IncrementalSAXSource replaces CoroutineSAXParser -- simpler API, - hence less risk of programming errors introducing timing windows. I hope. - A few performance-related tweaks are also included in this check-in. - Only very minor gains are expected.

    • Committed by johng@apache.org on 07/22/2001
      Modified: java/src/org/apache/xalan/lib/sql ObjectArray.java - SQLDocument.java
      Committer's log entry: Project Update

    • Committed by jkesselm@apache.org on 07/23/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Oops.Should have been checked in as part of the IncrementalSAXSource cutover. -Sorry!

    • Committed by costin@apache.org on 07/23/2001
      Modified: java build.xml - java/src/org/apache/xml/dtm/ref - IncrementalSAXSource_Filter.java - java/src/org/apache/xml/utils/synthetic JavaUtils.java
      Committer's log entry: 3 small fixes to the build process ( to make it work with jdk1.4 and crimson) - - - exclude IncrementalSAXSource_Xerces if xerces is not detected - - comment-out the "main" in IncrementalSAXSource_Filter.java ( it is a - test, but has deps on xerces ) - - don't try to load the compiler in syntetic/JavaUtils. This is a mess, - it was debated on tomcat-dev and ant-dev, as you may know some people - decided to remove the internal compiler class ( sun.tools.javac.Main ), - and that brakes jasper, ant and now xalan. - - It seems right now the only portable way to run the compiler is via command - line call in a separate process ( jikes can easily make up for the - overhead of creating a new process and doesn't leave garbage ). - - Question: is synthetic used ? Seems like a very usefull package, but if - xalan is not using it it might be better to move it to xml-commons or - jakarta-commons or some other place.

    • Committed by sboag@apache.org on 07/24/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: Don't set m_level anymore, as it looks like Joe commented out it's - initialization. m_level is no longer called by Xalan, and the implementation - can calculate it when it is called.

    • Committed by garyp@apache.org on 07/24/2001
      Modified: java/src/org/apache/xalan/transformer - TransformerIdentityImpl.java
      Committer's log entry: Fixed bug 2758 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2758). The -flag indicating that a call to startDocument() in the resultContentHandler was -necessary was not being reset for multiple transforms.

    • Committed by garyp@apache.org on 07/25/2001
      Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Fix bug 2727 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2727). -Attributes which contain a namespace prefix are indicated by placing a negative -number in the appropriate entry in the m_dataOrQName array. The absolute value -of this number is an entry in m_data. However, in this example, there were no -text nodes before the first namespaced attribute so the entry in m_data had an -array index of 0. This resulted in an entry of zero, not a negative number, in -m_dataOrQName. This situation got several routines which tested for < 0 -confused. I looked at several ways of fixing this but decided to just always -allocate m_data.elementAt(0) entry to a dummy entry. The other solutions -involved runtime checking which could slow down this piece of code and I felt -that wasting one entry was worth it to not slow down the run time.

    • Committed by garyp@apache.org on 07/26/2001
      Modified: java/src/org/apache/xalan/serialize - WriterToUTF8Buffered.java
      Committer's log entry: Fix bugzilla bug 2639 -(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2639) where buffer was -overflowing because the expansion of the Unicode characters into multiple UTF8 -characters was not being properly taken into account. Many thanks to -Gunnlaugur Thor Briem for his "multiply by three" trick.

    • Committed by sboag@apache.org on 07/26/2001
      Modified: java/src/org/apache/xalan/transformer NodeSorter.java
      Committer's log entry: Commented out NumberFormat m_formatter = NumberFormat.getNumberInstance();. - - Mukund reported: - - a minor improvement for alphabetize.xsl is to comment out the line - - //NumberFormat m_formatter = NumberFormat.getNumberInstance(); - - in NodeSorter.java. The variable m_formatter does not seem to be used -anywhere, and the performance difference is: - - Before: alphabetize 10 90 5108 196 156 34.58 -OK - After : alphabetize 10 70 4316 196 156 -40.93 OK

    • Committed by dleslie@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: 2.2.D8

    • Committed by dleslie@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: 2.2.D8

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/transformer NodeSortKey.java
      Committer's log entry: Submitted fix for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2851.

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Just added some stuff to diagnose bugs for flavor th.

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xpath/axes WalkerFactory.java - java/src/org/apache/xpath/compiler Compiler.java - java/src/org/apache/xpath/patterns - ContextMatchStepPattern.java StepPattern.java
      Committer's log entry: These are changes submitted (offline) by Mukund Raghavachari/Watson/IBM@IBMUS. - - This fixes a bug with match="chapter//footnote[1]" patterns. - - The main change here is minor to remove the automatic attachment of parent::* -to simple step patterns. - - He has re-implemented executePredicates to be - more efficient. Given a pattern such as row[6], it - does not iterate over the entire axis until it reaches - the node to see if it is the sixth node. Rather, - starting from the current node, it works backwards - (preceding siblings) until it either runs out of nodes - or finds more than six nodes that match the - predicate [I can explain it better if desired]. - This optimization improves performance slightly - overall. It helps decoy and patterns most (by - about 10%). - - The other optimization that I implemented was the - following. For a pattern foo[][3][][4] ..., where more - than one predicate is a number (position check), - in checking the predicate [4], the fact that the - current node has passed foo[][3] implies that it is - the only node that is the third node among its - siblings that passes foo[]. Therefore, any - subsequent position checks can be true if and - only if the position is [1]. This optimization is not - used by the xsltmark benchmarks and so does - not offer any performance benefits.

    • Committed by sboag@apache.org on 07/27/2001
      Modified: java/src/org/apache/xpath/axes DescendantIterator.java
      Committer's log entry: Fix for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1336

    This release includes no updates of the compatibility source code (now deprecated). -
    - -

    Core (Non-XSLTC) source code updates:

    • Committed by sboag@apache.org on 07/03/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMManagerDefault.java
      Committer's log entry: Since the real root of our tree may be a DocumentFragment, we need to - use getParent to find the root, instead of getOwnerDocument. Otherwise - DOM2DTM#getHandleOfNode will be very unhappy. - Result of report via private mail by Carsten Ziegeler of breakage - in Cocoon.

    • Committed by sboag@apache.org on 07/05/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToHTML.java - SerializerToXML.java
      Committer's log entry: Made m_maxCharacter, accumDefaultEscape, - accumDefaultEntity, and m_isRawStack - protected by request from Johannes Farrenkopf - and Frank Nestel.

    • Committed by sboag@apache.org on 07/05/2001
      Modified: java/src/org/apache/xpath/functions FuncNormalizeSpace.java
      Committer's log entry: In executeCharsToContentHandler check first for - DTM.NULL before trying to get the DTM.

    • Committed by sboag@apache.org on 07/05/2001
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: Fix bug reported by "Carsten Ziegeler" <cziegeler@sundn.de>. - Test for this is whitespace23.

    • Committed by jkesselm@apache.org on 07/05/2001
      Modified: java/src/org/apache/xml/utils SuballocatedIntVector.java
      Committer's log entry: Drop some bounds tests for cases which shouldn't arise in the first place, -since this is an inner-loop method.

    • Committed by jkesselm@apache.org on 07/05/2001
      Modified: java/src/org/apache/xml/utils SuballocatedByteVector.java - SuballocatedIntVector.java
      Committer's log entry: Synch SuballocatedByteVector with changed SuballocatedIntVector

    • Committed by sboag@apache.org on 07/05/2001
      Modified: java/src/org/apache/xml/dtm/ref CoroutineSAXParser.java
      Committer's log entry: Revert back to throwing a shutdownException if (arg == null) in co_yield. I -see this - occur if the parser is Crimson with output\output01, and it causes - a hang if the shutdownException is not thrown.

    • Committed by sboag@apache.org on 07/06/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToXML.java
      Committer's log entry: Make accumDefaultEntity and accumDefaultEscape non-final.

    • Committed by sboag@apache.org on 07/06/2001
      Modified: java/src/org/apache/xpath/axes ChildTestIterator.java - OneStepIterator.java - java/src/org/apache/xpath/functions FuncExtFunction.java
      Committer's log entry: Fix for John G. for the SQL extension: handle return types of - DTM and DTMAxisIterator.

    • Committed by sboag@apache.org on 07/09/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: In executeChildTemplates, somehow there was a popMode without - a corresponding pushMode. The pushMode was added. - Addresses bug posted by Stephane Bailliez <sbailliez@imediation.com> - on the xalan-dev list on 07/09/2001 07:28 AM.

    • Committed by garyp@apache.org on 07/10/2001
      Modified: java/src/org/apache/xalan/extensions ExpressionContext.java - java/src/org/apache/xalan/templates StylesheetRoot.java - java/src/org/apache/xpath VariableStack.java - XPathContext.java
      Committer's log entry: Resolve bugzilla 2355 -<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2355>. To make the -functionality clearer, I've changed the method name from getVariable to -getVariableOrParam since the routine will pick up either one. Also fixed a -bug where top level variables and parameters were not getting marked as such.

    • Committed by garyp@apache.org on 07/10/2001
      Modified: java/src/org/apache/xalan/lib Extensions.java - java/src/org/apache/xpath XPathContext.java
      Committer's log entry: Resolve bugzilla 2523 -<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2523>. evaluate extension -function was not refactored with DTM. Also need to add function to -XPathContext.XPathExpressionContext to allow an extension to obtain the -associated XPathContext.

    • Committed by mmidy@apache.org on 07/10/2001
      Modified: java/src/org/apache/xpath/axes DescendantIterator.java
      Committer's log entry: Fix problem with descendant-or-self and from root pattern. When from root, -descedant or self was not recognized.

    • Committed by jkesselm@apache.org on 07/10/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: Quick patch to handle case where someone wants to build a DTM from - an Element rather than from a Document. The Attr handling might want to - move down into addNode. - - This opens several cans of worms -- what if the next user wants the - root of their DTM to be an EntityReference node, which has no DTM - node equivalent -- but we'll eat those when we get to them.

    • Committed by garyp@apache.org on 07/10/2001
      Modified: java/src/org/apache/xalan/lib Extensions.java
      Committer's log entry: Modify distinct() extension so that it no longer relies on DOMHelper which is -deprecated but uses ExpressionContext.toString().

    • Committed by sboag@apache.org on 07/11/2001
      Modified: java/src/org/apache/xalan/res XSLTErrorResources.java - java/src/org/apache/xalan/trace PrintTraceListener.java - java/src/org/apache/xalan/transformer TransformerImpl.java - java/src/org/apache/xalan/xslt Process.java - java/src/org/apache/xml/dtm DTM.java - java/src/org/apache/xml/dtm/ref DTMDocumentImpl.java - ExpandedNameTable.java - java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Added: java/src/org/apache/xalan/lib NodeInfo.java - java/src/org/apache/xalan/transformer XalanProperties.java - java/src/org/apache/xml/dtm/ref NodeLocator.java
      Committer's log entry: Application of patch submitted by Ovidiu Predescu <ovidiu@cup.hp.com> - for file, line, column number information for XML source document. - - [A made one change: m_sourceSystemId, m_sourceLine, and - m_sourceColumn are not created with the member variable - initializer, since they are initialized in setProperty.] - - The following patch is a rework of a previous patch I've submitted on - May 24 against the Stree model, current at that time. This time the - patch is against the DTM model, and makes use of DTM features to - optimize the lookup time and storage requirements. I hope this time - the patch gets incorporated in the CVS repository, before any major - rework happens again ;-). - - As with the previous patch, there is no overhead in space or time if - source information is not needed. - - From a user perspective, this feature can be turned on by passing the - -L flag to Xalan when invoking it from the command - line. Programmatically you can also enable it by invoking the - setProperty method on the TransformerImpl: - - TransformerImpl impl = ((TransformerImpl) transformer); - -impl.setProperty(org.apache.xalan.transformer.XalanProperties.SOURCE_LOCATION, - Boolean.TRUE); - - A Transformer "property" is different from a "feature": while a - feature is specific to all the transformer instances and usually - refers to an implementation aspect, a property is a runtime capability - that is set per Transformer instance. Currently the only property - added by this patch is the source location in the XML source document. - - The patch adds two methods to the DTM interface: - - public void setProperty(String property, Object value); - public SourceLocator getSourceLocatorFor(int node); - - The second method is used to obtain the source location given a node - handle. - - There are two ways you can make use of the source location. The first - one is from within a stylesheet, where you can have something like - this: - - <xsl:stylesheet - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:nodeinfo="xalan://org.apache.xalan.lib.NodeInfo" - version="1.0"> - - <xsl:template match="*"> - //node <xsl:value-of select="name()"/> - //file <xsl:value-of select="nodeinfo:systemId()"/> - //line <xsl:value-of select="nodeinfo:lineNumber()"/> - //column <xsl:value-of select="nodeinfo:columnNumber()"/> - <xsl:apply-templates/> - </xsl:template> - - </xsl:stylesheet> - - If no arguments are passed to the systemId(), lineNumber() or - columnNumber() functions, the corresponding information of the current - context node is returned. A node can be passed as argument to the - above functions, in which case the corresponding information about - that node is returned. If a node set containing multiple nodes is - passed as argument, only the information of the first node in the set - is returned. - - The second way of obtaining the source location is - programmatically. Given a Node instance, one can obtain the owner DTM - and the node handle (an integer) that represents the - node. Unfortunately I didn't see any way of hiding this: if you find - one please let me know and I'll fix it. - - The following example is extracted from PrintTraceListener and - illustrates the API: - - Node sourceNode = ev.m_sourceNode; - int nodeHandler = ((DTMNodeProxy)sourceNode).getDTMNodeNumber(); - SourceLocator locator = ((DTMNodeProxy)sourceNode).getDTM() - .getSourceLocatorFor(nodeHandler); - - m_pw.println("Selected source node '" + sourceNode.getNodeName() - + "', at " + locator);

    • Committed by garyp@apache.org on 07/11/2001
      Modified: java/src/org/apache/xpath/compiler Compiler.java
      Committer's log entry: Fix bug 2175 <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2175> by -adding the current time to the method key to ensure method key uniqueness. -Multiple Compilers were getting the same hashCode, particularly in Visual Age -for Java, due to aggressive garbage collection. Added the current time in -mills to distinguish between the different functions being compiled.

    • Committed by garyp@apache.org on 07/11/2001
      Modified: java/src/org/apache/xalan/templates ElemVariable.java - StylesheetRoot.java - java/src/org/apache/xpath VariableStack.java - java/src/org/apache/xpath/operations Variable.java
      Committer's log entry: Resolve bugzilla 2355 -<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2355>. Added code to -populate m_index for global variables and parameters. If the backward search -for templates reaches the top level, use the list of composed top-level -variables and parameters from StylesheetRoot.

    • Committed by sboag@apache.org on 07/11/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMNodeProxy.java
      Committer's log entry: Now implements DocumentFragment.

    • Committed by dleslie@apache.org on 07/11/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: Updated version to 2.2.0.

    • Committed by dleslie@apache.org on 07/11/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: Updated version to 2.2.0.

    • Committed by sboag@apache.org on 07/11/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMNodeProxy.java
      Committer's log entry: Fixed very ugly bug, left-over from DTM1, in getValue, where +1 was being -added per the old attribute structure of DTM1.

    • Committed by johng@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/lib/sql ConnectionPool.java - DefaultConnectionPool.java PooledConnection.java - QueryParameter.java XConnection.java
      Added: java/src/org/apache/xalan/lib/sql ConnectionPoolManager.java - ObjectArray.java SQLDocument.java - SQLErrorDocument.java
      Removed: java/src/org/apache/xalan/lib/sql Column.java - ColumnAttribute.java ColumnData.java - ColumnHeader.java ExtensionError.java Row.java - RowSet.java SQLExtensionError.java - StreamableNode.java XConnectionPoolManager.java - XStatement.java
      Committer's log entry: First round of changes to port DOM mode to DTM Mode - Submitted by: John Gentilin mailto://johng@apache.org

    • Committed by mmidy@apache.org on 07/12/2001
      Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Check if locator property is set before trying to use locator fields

    • Committed by mmidy@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/trace PrintTraceListener.java
      Committer's log entry: Don't print locator message if locator is null

    • Committed by sboag@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/transformer - TransformerHandlerImpl.java
      Committer's log entry: In startDocument, run m_contentHandler.startDocument before you start the -thread.

    • Committed by sboag@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Call wait for initial events before the the transform is started.

    • Committed by sboag@apache.org on 07/12/2001
      Modified: java/src/org/apache/xml/dtm/ref CoroutineSAXParser.java
      Committer's log entry: Allow co_yield to be called after the parse has finished.

    • Committed by sboag@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java - SQLErrorDocument.java
      Committer's log entry: Added setProperty and getSourceLocatorFor empty methods.

    • Committed by garyp@apache.org on 07/13/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: Fix problem reported by Carsten Ziegeler <cziegeler@sundn.de>. Using -ApplyXPath (or doing a transformation) with DOM input was resulting in an NPE -due to declareNamespaceInContext() being called before setting m_exptype which -is needed by declareNamespaceInContext().

    • Committed by sboag@apache.org on 07/13/2001
      Modified: java/src/org/apache/xalan/transformer - TransformerHandlerImpl.java
      Committer's log entry: Add pauseForTransformThreadStartup. Call this in startDocument just - after starting the transform thread. This should get rid of any variability - with racing threads.

    • Committed by sboag@apache.org on 07/13/2001
      Modified: java/src/org/apache/xalan/extensions - XSLProcessorContext.java
      Committer's log entry: Fix problem reported by jason heddings <Jason.Heddings@Sun.COM>. - - "In v2.0.1, I was able to pass a Node to this function and have the node - be copied to the result tree (as expected). In the source code for - XSLProcessorContext, it appears that the only objects that can be sent - to the result tree are XObjects. Everything else is converted to a - String. So for instance, I can no longer create a ProcessingInstruction - and pass it to the result tree via this method since the PI is simply - converted to a String."

    • Committed by sboag@apache.org on 07/13/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToHTML.java
      Committer's log entry: Application of patch submitted by Benjamin Riefenstahl -<Benjamin.Riefenstahl@ision.net> - - Motivation: We are using Xalan to generate HTML pages. We have the - requirement to integrate code for ad banners. The ad server provider - has written the code to use with compatibility to NetScape 4 in mind. - The code uses the NetScape proprietory <LAYER> element and <IFRAME> - elements for other browsers. The SRC attributes of these elements - contain URLs with several URL parameters separated by '&', as is the - common convention. - - Problem: The code is integrated in our XSL stylesheets. In the - stylesheet the '&' has to be written as the entity '&amp;'. That's - ok. The problem is that in the output the '&' is also written as - '&amp;' which is not ok, because NetScape doesn't understand that. - OTOH the same URL is written with '&' when used in an <A> element. - - Solution: This goes down to a different handling of attribute values - in the class SerializeToHTML, depending on whether the attribute in - question is known to contain a URI or not. Xalan knows this for <A> - but not for <LAYER> and <IFRAME>. When I compare the list in - SerializeToHTML.java with the HTML specs, I find a couple of other - missing URI attributes in SerializeToHTML.java. When I add the - missing pieces, the generation works fine. - - Patch: Here is the patch (diff -c) for xalan-j_2_2_D6. I also have - one for xalan-j_2_0_1 which is the version I actually tested this - with. Please let me know if this is insufficient or the patch is - wrong or if there is something else I can do to fix this problem.

    • Committed by sboag@apache.org on 07/13/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: On code review of previous checkin from Gary P., we determined there - was a problem with the point at which type was declared a - DTM.NAMESPACE_NODE. So that part was moved back up (actuall - a bit higher than where it was before), - and the call to declareNamespaceInContext was moved a bit - further down.

    • Committed by johng@apache.org on 07/15/2001
      Modified: java/src/org/apache/xalan/lib/sql XConnection.java
      Committer's log entry: Project Update - Submitted by: John Gentilin mailto://johng@apache.org

    • Committed by johng@apache.org on 07/15/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: Project Update - Submitted by: John gentilin mailto://johng@apache.org

    • Committed by johng@apache.org on 07/15/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: Fixup from previous check-in, defined new - functions. - Submitted by: John Gentilin mailto://johng@apache.org

    • Committed by johng@apache.org on 07/15/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: Project Update

    • Committed by johng@apache.org on 07/15/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: reduced Attribute's for testing

    • Committed by sboag@apache.org on 07/16/2001
      Modified: java/src/org/apache/xml/dtm/ref/sax2dtm SAX2DTM.java
      Committer's log entry: Minor hack to catch an attribute value being null.

    • Committed by mmidy@apache.org on 07/17/2001
      Modified: java/src/org/apache/xalan/templates ElemNumber.java - java/src/org/apache/xalan/transformer Counter.java - CountersTable.java KeyRefIterator.java - java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java - java/src/org/apache/xpath NodeSetDTM.java - java/src/org/apache/xpath/axes LocPathIterator.java - UnionPathIterator.java WalkingIteratorSorted.java - java/src/org/apache/xpath/objects XNodeSet.java - XRTreeFrag.java
      Committer's log entry: Add new parameter to NodeSetDTM constructor. We need to have a DTMManager on -hand. Change code to use the new constructors.

    • Committed by mmidy@apache.org on 07/17/2001
      Modified: java/src/org/apache/xml/dtm/ref/dom2dtm DOM2DTM.java
      Committer's log entry: OOps! Back out this last change. Old code on my machine!!!

    • Committed by johng@apache.org on 07/17/2001
      Modified: java/src/org/apache/xalan/lib/sql SQLDocument.java
      Committer's log entry: Fixed a few bugs, almost there - Submitted by: John Gentilin mailto://johng@apache.org

    • Committed by jkesselm@apache.org on 07/18/2001
      Modified: java/src/org/apache/xml/dtm/ref CoroutineManager.java - CoroutineSAXParser.java - CoroutineSAXParser_Xerces.java
      Added: java/src/org/apache/xml/dtm/ref IncrementalSAXSource.java - IncrementalSAXSource_Filter.java - IncrementalSAXSource_Xerces.java
      Committer's log entry: Starting to phase out Coroutine*Parser* in favor of IncrementalSAXSource*. - The latter simplifies the code, and should help us avoid some of the - confusion that can arise in using the older tools. - - Most importantly, it greatly simplifies the calling sequences, by discarding - the "which file do you want to parse" and "do you want to parse any more - files" transactions. These now operate _only_ as filters, and only as single - -use (though in fact the Xerces-specific version is reusable, and we may - reintroduce that feature in the generic filtering version at a later date). - - Note too that we have swept the CoroutineManager completely - under the covers of the filter's API. There's no particular reason to expose - that implementation detal to the outside world. - - Still to be done: Rework the rest of Xalan to use the new code.

    • Committed by jkesselm@apache.org on 07/18/2001
      Modified: java/src/org/apache/xml/dtm/ref CoroutineParser.java
      Committer's log entry: Starting to phase out Coroutine*Parser* in favor of IncrementalSAXSource*. - See comment in previous check-in; I just missed this one....

    • Committed by jkesselm@apache.org on 07/18/2001
      Modified: java/src/org/apache/xml/dtm/ref DTMStringPool.java
      Committer's log entry: doc.

    • Committed by dleslie@apache.org on 07/18/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: 2.2.D7

    • Committed by dleslie@apache.org on 07/18/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: 2.2.D7

    • Committed by jkesselm@apache.org on 07/18/2001
      Removed: java/src/org/apache/xml/dtm/ref DTMBuilder.java
      Committer's log entry: Obsolete

    This release includes no updates of the compatibility source code (now deprecated). -
    - -

    Important: Xerces has added a number of DOM level-3 methods to its DOM interfaces. The DOM level-3 proposal -is currently a working draft (it is not yet a W3C recommendation), and Xalan does not support these new methods. -To run Xalan in the JDK 1.1.8 platform, you must put xalan.jar (with its DOM level-2 interfaces) in front of -xerces.jar on the system class path. If you want to rebuild Xalan (on JDK 1.1.8 or higher), you must put Xalan -in front of xerces.jar the system class path.

    - -

    This beta release includes the following non-XSLTC code changes:

    -
      -
    • Costin Manolache has slightly modified the CoRoutine stuff so that a you can compile and run everything but the CoRoutineXercesParser without having Xerces on the classpath.

    • -
    • Joseph Kesselman added chunked int array stuff to address our scaling problems that Mukund & co. uncovered. This was a fairly mechanical, but still substantial, change. No bugs have yet been discovered that relate to this. This is probably the most controversial change.

    • -
    • The Process class now outputs incrementally if the output is standard out. This is mostly for testing purposes, but it makes general sense.

    • -
    • Bug was fixed with setting the incremental flag in TransformerFactoryImpl. Clearly the change was made but never tested. Simply a missing 'else'.

    • -
    • Fix for Bugzilla Bug 2275, Xalan did not fire the right templates. This was substantial and somewhat risky. Xalan had several problems related to the last() function. Fixes cover four axes files.

    • -
    • Change PrintTraceListener to output the file, as well as the line numbers. This is really a feature change, but simple, and aids diagnosing problems with multi-part stylesheets.

    • -
    • XPath fix: the XPath API wasn't working correctly due to a problem with with NodeSet/NodeIterator adapters. This fix ended up interacting quite a bit with the #2275 fix.

    • -
    • Fix for the Norm Walsh bug posted 06/20/2001: iterators weren't always being cloned correctly from the variable value stack. This fix is not without some risk, though we haven't seen any problems since Scott Boag made it.

    • -
    • David Bertoni added missing html element properties to SerializerToHTML.java.

    • -
    • Shance Curcuru modified TransformerFactoryImpl.setAttribute() to accept a String ("true" or "false") as well as a Boolean object to set the value of a Boolean attribute.

    • -
    • TransformerHandlerImpl was threading when incrementality is turned off. Scott Boag has fixed this bug.
    • -
    -
    - - -

    This release includes the following changes:

    -
      -
    • Deprecation of the Xalan-Java 1 compatiblity API
    • -
    • The DTM
    • -
    • Other optimization work
    • -
    -

    The primary focus of the 2.2 Developer releases is incorporation of all our work over the past several months on the Document Table - Model (DTM).

    - -

    As a result of the changes in *internal* api, you may encounter problems with extensions. We have done some bug fixing in support -for extensions since 2.2.D1. John Gentilin is working on fixing the SQL library extension,which currently is broken. Please report -any problems you find (see bugs).

    - -

    The DTM and related work provides faster performance and less accumulation of garbage... though it is an -ongoing battle. Brief summary:

    -
      -
    • The DTM identifies nodes with 32-bit integer handles. -The DTM has many features, including direct character dispatch to SAX2, -native DTM iterators and "traversers", multiple document management, etc.

    • -
    • Joe Kesselman's CoRoutine parsers, which are in a threaded SAX flavor -and in a Xerces parseMore() flavor (no threads). These do away with the -"race" conditions that occured in the original code, and should make Xalan -much more robust.

    • -
    • *Much* more robust XPath itteration. The "waiting" iterators of old are -no more, and good riddance. There is stil lots more we want to do with -this mechanism. (There is something here called MatchIterators, but it's -not being used yet for various reasons. We will be taking advantage of -these down the line.)

    • -
    • A fair amount of XObject creation reduction. You can now get boolean, -number, nodeset, and string values directly from an Expression, instead of -going through an XObject.

    • -
    • XMLString, which allows us to work with string objects that don't wrap -Java's String object. These objects get their character data from an array or -Fast String Buffer.

    • -
    • Serializers now only do internal buffering if they know they are writing -to a FileStream.

    • -
    • The variable stack mechanism has been redisigned, so that it is no -longer so interpretive, and we believe it is much more robust.

    • -
    • Some small amount of stylesheet rewriting (but not yet redundent -expression elimination), in particular to reduce full RTF creation and -interpretation.
    • -
    -

    &xslt4j; implements two DTM performance features that you can control with the TransformerFactory -setAttribute() -method. See DTM performance settings

    -
    - -

    This release includes a number of bug fixes to &xslt4j; and TrAX. - We have also enhanced the ApplyXSLT servlet. It can now be set up to use a compiled Templates object to respond to multiple - client transformation requests involving the same stylesheet.

    -

    Core source code updates:

    • Committed by costin@apache.org on 03/16/2001
      Modified: java/src/org/apache/xalan/processor StylesheetHandler.java - java/src/org/apache/xpath Expression.java XPath.java - XPathContext.java - java/src/org/apache/xpath/compiler Compiler.java - XPathParser.java
      Committer's log entry: Renamed "assert()" to "assertion()". - - Assert can be a keyword, and brake the compilation.

    • Committed by mmidy@apache.org on 03/19/2001
      Modified: java/src/org/apache/xalan/transformer KeyWalker.java
      Committer's log entry: Throw an error message if the key name in a key function was not defined

    • Committed by jkesselm@apache.org on 03/20/2001
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: Reworked "chunk growth" algorithm again. Growing mode not - yet adequately tested, but fixed-size mode (which is what Xalan - is currently using) is simpler code and shows improved performance.

    • Committed by curcuru@apache.org on 03/20/2001
      Added: java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: Utility class to check your JVM environment for common problems

    • Committed by curcuru@apache.org on 03/22/2001
      Modified: java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: Added more .jar sizes to jarVersions listing

    • Committed by jkesselm@apache.org on 03/22/2001
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: We've reworked the algorithm again. The fixed-chunk-size mode (initial - and max. chunk sizes equal) runs essentially unchanged, though with a - few cycles less overhead. The variable-chunk-size mode now uses a - recursive-encapsulation scheme, where the first chunk may itself be a - FastStringBuffer whose total length equals one chunk; every so often - we push the existing data down one level and restart with a larger - chunk size. The new scheme has been stress-tested and is apparently - working. At this writing, however, Xalan uses only the fixed-size - mode (initial size equals max size), and no effort has been made to - find the optimial values for the tuning parameters. It does appear - likely that the best values will vary with usage patterns, but we hope - to find a good compromise. - - I'll probably be putting this aside for a while to work on other things. - If someone wants to experiment with varying the block sizes and - how frequently they grow, and suggest good performance/memory - tradeoff points, go for it!

    • Committed by jkesselm@apache.org on 03/22/2001
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: Minor tweak to the javadoc.

    • Committed by jkesselm@apache.org on 03/23/2001
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: reset() versus setLength(0).

    • Committed by sboag@apache.org on 03/26/2001
      Modified: java/src/org/apache/xalan/templates ElemForEach.java
      Committer's log entry: Fix for bug# 1116, getMatchedTemplate throws ClassCastException. - Don't push template unless it is a xsl:template.

    • Committed by sboag@apache.org on 03/26/2001
      Modified: java/src/org/apache/xalan/templates OutputProperties.java
      Committer's log entry: Patches submitted by Patrick Moore <patrickm@rioport.com> - on 03/15/2001 01:25 PM: - - This proposed change does a number of things: - - 1. Problem: HTML output method does not uses XML output properties as - default. - - In both org/apache/xalan/templates/output_html.properties and in the java - doc for - org/apache/xalan/templates/OutputProperties#getDefaultMethodProperties(Strin - g) It specifically states that all OutputProperties use the - output_xml.properties as a base. In the code this is not true for html. This - is now changed to match the comments - - 2. Problem: unclear IOException. - - If there was a problem loading the XML properties file. The wrapped - exception now will say which file was trying to be loaded. If the file did - not exist I was getting a very strange "Stream closed" IOException message. - - 3. Problem: the streams were not closed after reading the property file. - - Fixed. - - 4. Problem: the double-check locking mechanism does not work in Java (see - bug #919) - - <http://www.javaworld.com/javaworld/jw-02-2001/jw-0209-toolbox.html> - - 5. QUESTION: now if there is a default properties (i.e. - output_xml.properties has been loaded) but the expected properties file does - not exist a error message will be printed to System.err and the processing - will continuing using just the default properties (output_xml.properties) I - felt that this is the best behavior. - - (comment by sboag: I think it's better to - throw a runtime exception in this case. - but we can discuss this over time. For now - the patch was modified to do the runtime exception).

    • Committed by sboag@apache.org on 03/27/2001
      Modified: java/src/org/apache/xalan/processor XSLTSchema.java - java/src/org/apache/xalan/stree SourceTreeHandler.java - java/src/org/apache/xalan/templates ElemForEach.java - ElemLiteralResult.java - java/src/org/apache/xalan/transformer QueuedSAXEvent.java - ResultTreeHandler.java TransformerImpl.java - java/src/org/apache/xml/utils BoolStack.java - java/src/org/apache/xpath XPathContext.java
      Committer's log entry: This check-in contains a couple things that overlapped on my - system, so I'm checking them in together. - 1) Unfinished (in progress) implementation of TransformSnapshot mechanism, - which will hopefully allow a result ContentHandler to take a snapshot - at a given point, and the restart execution from that point at some - later time. For tooling support. - 2) Check to make sure SourceTreeHandler isn't being entered twice, - which is related to the cocoon bug from a couple of weeks ago. This - will just help diagnose such a problem in the future. - 3) Removed the error stack trace print from postExceptionFromThread. - 4) Report exception in SourceTreeHandler#endDocument after - the join, if we can determine that the posted exception won't be - caught elsewhere. - 5) removed some catches that simply rethrew the exception - (thanks to Patrick Moore <patrickm@rioport.com>). - See my note on 3/27/2001 to Patrick for more info - on the last two.

    • Committed by sboag@apache.org on 03/27/2001
      Added: java/src/org/apache/xalan/transformer TransformSnapshot.java - TransformSnapshotImpl.java
      Committer's log entry: Unfinished (in progress) implementation of TransformSnapshot mechanism, - which will hopefully allow a result ContentHandler to take a snapshot - at a given point, and the restart execution from that point at some - later time. For tooling support.on the last two.

    • Committed by mmidy@apache.org on 03/29/2001
      Modified: java/src/org/apache/xalan/processor - ProcessorStylesheetElement.java - ProcessorTemplateElem.java StylesheetHandler.java - XSLTElementDef.java XSLTElementProcessor.java - XSLTSchema.java
      Committer's log entry: Try to catch element order and required element errors during stylesheet -object creation. This new code adds an order and a required field to -XSLElementDef objects where it is applicable.

    • Committed by garyp@apache.org on 04/02/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Fix bugzilla bug 1170. If we're trying an xsl:apply-imports at the top level -(ie there are no - imported stylesheets), we need to indicate that there is no matching template -and prevent and infinite recursion by using the built-in template.

    • Committed by garyp@apache.org on 04/02/2001
      Modified: java/src/org/apache/xalan/extensions MethodResolver.java
      Committer's log entry: Code cleanup submitted by Art Welch <art_w@EASTPOINT.COM>.

    • Committed by mmidy@apache.org on 04/06/2001
      Modified: java/src/org/apache/xml/utils TreeWalker.java
      Committer's log entry: Add locator support to TreeWalker

    • Committed by sboag@apache.org on 04/06/2001
      Modified: java/src/org/apache/xalan/transformer - QueuedStartElement.java
      Committer's log entry: Small fix made for getCurrentNode.

    • Committed by sboag@apache.org on 04/06/2001
      Modified: java/src/org/apache/xml/utils TreeWalker.java
      Committer's log entry: Commented out extra call to getData()... this could be a big performance - improvement for some stylesheets.

    • Committed by mmidy@apache.org on 04/09/2001
      Modified: java/src/org/apache/xalan/transformer - TransformSnapshotImpl.java TransformerImpl.java
      Committer's log entry: Additional support for tooling. Allow tools to take a snapshot of context and -restart execution at that point.

    • Committed by mmidy@apache.org on 04/10/2001
      Modified: java/src/org/apache/xalan/processor - XSLTElementProcessor.java - java/src/org/apache/xalan/res XSLTErrorResources.java - java/src/org/apache/xalan/transformer - TransformSnapshotImpl.java TransformerImpl.java
      Committer's log entry: Misc stuff left out from previous check in

    • Committed by mmidy@apache.org on 04/11/2001
      Modified: java/src/org/apache/xpath/functions FuncCurrent.java
      Committer's log entry: Don't assume that the object returned by getSubContextList() is a -PredicatedNodeTest object.

    • Committed by mmidy@apache.org on 04/11/2001
      Modified: java/src/org/apache/xalan/processor ProcessorInclude.java - TransformerFactoryImpl.java - java/src/org/apache/xalan/transformer - TransformerIdentityImpl.java - java/src/org/apache/xml/utils TreeWalker.java
      Committer's log entry: Create new TreeWalker constructor that takes a systemId parameter. Change -TreeWalker to change fields in the locator and not set it for each node.

    • Committed by curcuru@apache.org on 04/17/2001
      Modified: java/src/org/apache/xpath XPath.java
      Committer's log entry: Fix Bugzilla bug: - PR: 1106 - Submitted by: elharo@metalab.unc.edu

    • Committed by curcuru@apache.org on 04/18/2001
      Modified: java/src/org/apache/xalan/lib/sql QueryParameter.java - SQLExtensionError.java XConnection.java
      Committer's log entry: Minor Javadoc updates (add @author name, remove declared but unthrown @throws)

    • Committed by johng@apache.org on 04/18/2001
      Modified: java/src/org/apache/xalan/lib/sql Column.java - ColumnAttribute.java ColumnData.java - ColumnHeader.java Row.java RowSet.java - StreamableNode.java XConnection.java - XStatement.java
      Committer's log entry: Support for Streamable Mode- John Gentilin

    • Committed by garyp@apache.org on 04/24/2001
      Modified: java/src/org/apache/xpath/objects XObject.java
      Committer's log entry: Resolve bugzilla bug 1015 -<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1015>. - Fix prevents null pointer exceptions when null non-XSLT arguments are - passed to an extension function.

    • Committed by garyp@apache.org on 04/24/2001
      Modified: java/src/org/apache/xalan/extensions MethodResolver.java
      Committer's log entry: Resolve bugzilla bug 1015 -<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1015>. - Fix prevents null pointer exceptions when null non-XSLT arguments are - passed to an extension function.

    • Committed by mmidy@apache.org on 04/24/2001
      Modified: java/src/org/apache/xalan/processor - TransformerFactoryImpl.java
      Committer's log entry: Fix copy/paste error. Want to use TransformerFactoryImpl's class loader.

    • Committed by mmidy@apache.org on 04/24/2001
      Modified: java/src/org/apache/xalan/transformer - TransformSnapshotImpl.java
      Committer's log entry: Keep a copy of current contextNodeList is there is one

    • Committed by curcuru@apache.org on 04/25/2001
      Modified: java/src/org/apache/xalan/xslt EnvironmentCheck.java
      Committer's log entry: Added checkDirForJars() which checks java.ext.dirs as well now

    • Committed by dleslie@apache.org on 04/26/2001
      Added: java/src/javax/xml/transform package.html - java/src/javax/xml/transform/dom package.html - java/src/javax/xml/transform/sax package.html - java/src/javax/xml/transform/stream package.html
      Committer's log entry: Add package.html for each package in javax.xml.transform.

    • Committed by garyp@apache.org on 04/27/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Resolve bug 1496 <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1496> -where xsl:param statements were not being reset properly if the TransformerImpl -was reused.

    • Committed by jkesselm@apache.org on 04/27/2001
      Modified: java/src/org/apache/xalan/stree DocImpl.java
      Committer's log entry: Fix for #1561

    • Committed by garyp@apache.org on 04/29/2001
      Modified: java/src/org/apache/xpath/functions FuncExtFunction.java
      Committer's log entry: Resolve bugzilla bug 1373 -<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1373>. - Added code to support return of Integer or Long by an external function. - Code was contributed by Patrick Moore <patmoore@ieee.org>.

    • Committed by costin@apache.org on 05/03/2001
      Modified: java/src/javax/xml/transform/stream StreamResult.java - StreamSource.java
      Committer's log entry: Small fix to avoid file:////path that may fail on some JDK.

    • Committed by dleslie@apache.org on 05/04/2001
      Modified: java/src/org/apache/xalan/lib/sql package.html
      Committer's log entry: Preliminary updates for John G's work.

    • Committed by mmidy@apache.org on 05/07/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Check for a null contextNodeList before returning its clone

    • Committed by mmidy@apache.org on 05/07/2001
      Modified: java/src/org/apache/xalan/stree StreeDOMBuilder.java
      Committer's log entry: Set the element's level correctly, before we process attributes.

    • Committed by garyp@apache.org on 05/08/2001
      Modified: java/src/org/apache/xalan/transformer - TransformerIdentityImpl.java
      Committer's log entry: Resolve bugzilla 1648 -(http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1648). - TransformerIdentityImpl was improperly using an old LexicalHandler when -invoked for a second transform. - This bug only affects identity transforms with StreamResults. - Many thanks to John Keyes <johnkeyes@yahoo.com> for reporting this bug.

    • Committed by dleslie@apache.org on 05/10/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: Updated version number to 2.1.0

    • Committed by dleslie@apache.org on 05/10/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: Updated version number to 2.1.0

    • Committed by garyp@apache.org on 05/10/2001
      Modified: java/src/org/apache/xpath/functions FuncExtFunction.java
      Committer's log entry: Change submitted by Patrick Moore <patmoore@ieee.org> as part of bugzilla -1373 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1373). - Return value from extension function is now generalized so that all -derivatives of Number are now properly handled.

    • Committed by mmidy@apache.org on 05/11/2001
      Modified: java/src/org/apache/xalan/processor XSLTSchema.java
      Committer's log entry: Set the correct order of xsl:include elements

    • Committed by johng@apache.org on 05/13/2001
      Modified: java/src/org/apache/xalan/lib/sql Column.java - ColumnAttribute.java ColumnData.java - ColumnHeader.java ConnectionPool.java - DefaultConnectionPool.java ExtensionError.java - PooledConnection.java QueryParameter.java Row.java - RowSet.java SQLExtensionError.java - StreamableNode.java XConnection.java - XConnectionPoolManager.java XStatement.java - package.html
      Committer's log entry: Updates Javadocs - Submitted by:John Gentilin mailto://johnglinux@eyecatching.com

    • Committed by garyp@apache.org on 05/14/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Correct typo introduced in revision 1.30 causing problems with transforms on -Unix platforms.

    • Committed by garyp@apache.org on 05/14/2001
      Modified: java/src/org/apache/xalan/templates ElemChoose.java
      Committer's log entry: Correct bugzilla bug 1748 -<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1748>. - When evaluating xsl:when, the xsl:choose element was used to resolve -namespace prefixes instead of - the xsl:when element itself. This caused namespace prefixes defined on the -xsl:when to be ignored.

    • Committed by costin@apache.org on 05/15/2001
      Modified: java/src/javax/xml/parsers DocumentBuilderFactory.java - SAXParserFactory.java - java/src/javax/xml/transform TransformerFactory.java
      Committer's log entry: Use the context class loader if available. - - The implementation is based on ExtensionHandler, and it's needed in order - to work in certain environments ( like tomcat ).

    • Committed by costin@apache.org on 05/15/2001
      Modified: java/src/org/apache/xalan/extensions ExtensionHandler.java - ExtensionHandlerGeneral.java
      Committer's log entry: Make getClassForName a public method. There are few other places in xalan - where Class.forName is used, and this can create problems in some cases - where the Thread.getContextClassLoader should be used. - - getClassForName uses introspection to call getContextClassLoader - ( so it works in JDK1.1 ). - - In ExtensionHandlerGeneral, use the thread loader to find BSF ( it may be - possible that xalan is installed in CLASSPATH, but BSF is in a webapp ).

    • Committed by costin@apache.org on 05/15/2001
      Modified: java/src/org/apache/xalan/processor - CompilingStylesheetHandler.java - java/src/org/apache/xalan/serialize SerializerFactory.java
      Committer's log entry: 2 more instances where Class.forName was used. - - Use the method in ExtensionHandler for consistency ( we could move it in - org.apache.xml.utils, but for now it's easier to just use it as it is )

    • Committed by costin@apache.org on 05/15/2001
      Modified: java/src/org/apache/xalan/stree SourceTreeHandler.java - java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: This is the "thread pooling hook". - - It slightly changes the API used to create and wait for the transform thread. - Instead of using threadCreate() and Thread.start() that creates a new thread - and thread.join() that waits for a thread to end, we now use a -ThreadControler - class that has the equivalent methods: - - run( Runnable ) - executes a task in a thread. The default implementation - is identical with what we had, using new Thread() and start() - - waitTread() - waits for a task to end. The default impl. is identical with - the previous code, using thread.join(). - - Someone wanting to use a thread pool for xalan will have to extend - the ThreadControler and override the 2 methods, then call setThreadController. - - Xalan itself doesn't implement a thread pool right now ( for mosts uses it's - not even needed - if you just do few transforms for example ), instead - a server that runs xalan could plug it's own thread pool.

    • Committed by Gary L Peskin <garyp@firstech.com> on 05/15/2001
      Committer's log entry: -> Use the context class loader if available. -> -> The implementation is based on ExtensionHandler, and it's needed in order -> to work in certain environments ( like tomcat ). -> ->

    • Committed by dleslie@apache.org on 05/16/2001
      Modified: java/src/org/apache/xalan/lib/sql ExtensionError.java
      Committer's log entry: Fixed "conflict" in javadoc comments.

    • Committed by dleslie@apache.org on 05/16/2001
      Modified: java/src/org/apache/xalan/lib/sql package.html
      Committer's log entry: Editing pass.

    • Committed by tmiller@apache.org on 05/17/2001
      Modified: java/src/org/apache/xalan/xsltc TransletOutputHandler.java
      Committer's log entry: bug # 1406 fixed, omit xml header implemented

    • Committed by curcuru@apache.org on 05/17/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Update Javadoc and remove commented out reference to properties file - PR:Bugzilla1627

    • Committed by garyp@apache.org on 05/18/2001
      Modified: java/src/org/apache/xalan/transformer ResultTreeHandler.java
      Committer's log entry: Resolve bug 1330 <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1330>. - setContentHandler failed to also reset m_lexicalHandler if the ContentHandler - was also a LexicalHandler. This caused the old LexicalHandler to be used -which - was pointing to a previous result tree.

    • Committed by garyp@apache.org on 05/18/2001
      Modified: java/src/org/apache/xalan/processor - TransformerFactoryImpl.java
      Committer's log entry: Resolve bug 1762 <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1762>. - TransformerFactoryImpl's URIResolver was not propagated to created -Transformers. - Modified code to propagate.

    • Committed by curcuru@apache.org on 05/19/2001
      Modified: java/src/org/apache/xml/utils TreeWalker.java - SystemIDResolver.java
      Committer's log entry: Catch SecurityException whenever accessing System.getProperty("user.dir"); - minor javadoc update

    • Committed by sboag@apache.org on 05/21/2001
      Modified: java/src/org/apache/xalan/templates ElemCopy.java - ElemValueOf.java - java/src/org/apache/xalan/transformer TreeWalker2Result.java - java/src/org/apache/xpath/functions FuncLast.java
      Committer's log entry: Fix for bugs reported by the Eclipse folks for TransformState, where - some operations (xsl:value-of, xsl-copy) were not pushing the - current node on the current node stack. Addresses - http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1524.

    • Committed by curcuru@apache.org on 05/21/2001
      Modified: java/src/org/apache/xalan/templates OutputProperties.java
      Committer's log entry: Catch SecurityException as needed - PR: Bugzilla1258

    • Committed by garyp@apache.org on 05/21/2001
      Modified: java/src/org/apache/xalan/templates OutputProperties.java
      Committer's log entry: Fix to the following bug reported by dims@yahoo.com: - - loadPropertiesFile method in org\apache\xalan\templates\OutputProperties.java -does not fall back - to the Thread Context Class Loader to load properties files like -output_xml.properties etc. This - is causing problems in ServletExec_3_1+C2.

    • Committed by garyp@apache.org on 05/21/2001
      Modified: java/src/org/apache/xalan/templates OutputProperties.java
      Committer's log entry: Correct implementation of ContextClassLoader to support case where properties -file is to be loaded by a different ClassLoader than the OutputProperties -class. Thanks to Davanum Srinivas <dims@yahoo.com> for this code and for -reporting this bug. - loadPropertiesFile should eventually be moved into a thread-specific class.

    • Committed by garyp@apache.org on 05/21/2001
      Modified: java/src/org/apache/xalan/processor - TransformerFactoryImpl.java - java/src/org/apache/xalan/serialize CharInfo.java - java/src/org/apache/xpath/functions FuncSystemProperty.java
      Committer's log entry: Modify getResourceAsStream calls to use the contextClassLoader, if available. - This is a temporary fix until we can centralize this function.

    This release includes no updates of the compatibility source code. -
    - - -

    This release includes a number of bug fixes to the &xslt4j; and TrAX core and Xalan-Java 1 compability API. We have also

    -
      -
    • Entered all known &xslt4j; 2 bugs in the Apache Bugzilla database

    • -
    • Added support for using custom URIResolver, EntityResolver, and ContentHandler implementations with the command-line utility

    • -
    • Upgraded from Ant 1.2 to Ant 1.3 for our builds (the new ant.jar is in the bin directory).
    • -
    -

    Core source code updates:

    -
      -
    • Committed by sboag@apache.org on 02/06/2001
      Modified: java/src/org/apache/xpath/axes ChildWalkerMultiStep.java
      Committer's log entry: Fix for bug reported by "Chris P. McCabe" <chris_mccabe@choicehotels.com> - 02/06/2001 06:55 PM. - Defensive fix for if the last used walker is null, then don't check to - see if it is a fast walker! Without this, a null pointer exception is - very possible.

    • Committed by sboag@apache.org on 02/06/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Fixes for exceptions being thrown that weren't being passed through - the error listener.

    • Committed by sboag@apache.org on 02/07/2001
      Modified: java/src/org/apache/xpath/axes FollowingWalker.java
      Committer's log entry: Fix for bug reported by Dave Haffner <dave.haffner@xmls.com> - 02/06/2001 04:03 AM - In parentNode(), don't screen out nextAncestor, since the parent - is never actually returned. This sets things up correctly for firstChild - and nextSibling.

    • Committed by sboag@apache.org on 02/07/2001
      Modified: java/src/org/apache/xpath/axes PrecedingWalker.java
      Committer's log entry: Fix for bug reported by Dave Haffner <dave.haffner@xmls.com> - 02/06/2001 04:03 AM - In nextSibling(), don't return null if isAncestorOfRootContext, instead - do next.getFirstChild().

    • Committed by sboag@apache.org on 02/07/2001
      Modified: java/src/org/apache/xpath SourceTreeManager.java
      Committer's log entry: Fix for bug reported by anders.domeij@uc.se - 02/07/2001 09:35 AM - removed extra bogus TransformerException decl in resolveURI

    • Committed by sboag@apache.org on 02/08/2001
      Modified: java/src/org/apache/xalan/stree SourceTreeHandler.java
      Committer's log entry: Fix bug reported by Jason Harrop <jharrop@bigpond.net.au> - 02/07/2001 08:12 PM - Don't process comment or whitespace events if inside a startDTD/endDTD - event.

    • Committed by sboag@apache.org on 02/10/2001
      Modified: java/src/org/apache/xpath/axes WalkerFactory.java
      Committer's log entry: In indirect response to bug posted by "Thee Boon Hoo" <theebh@newstakes.com> - 02/07/2001 09:37 PM - - "//table[1]" patterns would give one node - when they should have given 2, when applied to Boon Hoo's - source. - "//table[1]" is equivelent to - "/descendant-or-self::node()/table[1]", - and so must return the first table child - of each table-inst element. - - An optimization was optimizing this to - "/descendant-or-self::table, which is - fine as long as indexing isn't used. Since - we can not tell until runtime if indexing - is being used, we have to turn of this - optimization for all predicated "//foo[xx]" - patterns.

    • Committed by mmidy@apache.org on 02/12/2001
      Modified: java/src/org/apache/xalan/processor StylesheetPIHandler.java - TransformerFactoryImpl.java
      Committer's log entry: Patch for Dmitri IIyin to use the specified URIResolver.

    • Committed by mmidy@apache.org on 02/12/2001
      Modified: java/src/org/apache/xalan/templates ElemNumber.java
      Committer's log entry: Number Expression should be evaluated then rounded up.

    • Committed by sboag@apache.org on 02/13/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Create a document fragment for the output node, for -flavor d2d.

    • Committed by sboag@apache.org on 02/13/2001
      Modified: java/src/org/apache/xpath/compiler Compiler.java
      Committer's log entry: Better error message when quo is used.

    • Committed by mmidy@apache.org on 02/13/2001
      Modified: java/src/org/apache/xalan/templates ElemCallTemplate.java - ElemChoose.java ElemCopy.java ElemFallback.java - ElemIf.java ElemLiteralResult.java - ElemTemplate.java - java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Remove extra method/call to TransformerImpl.executeChildTemplates()

    • Committed by sboag@apache.org on 02/13/2001
      Modified: java/src/org/apache/xpath/patterns NodeTest.java
      Committer's log entry: Return an empty string instead of null from getLocalName() when the - nodetest does not have a name. Encountered with the SQL extension, - in response to bug reported by "Michael Kay" <mhkay@iclway.co.uk>, - 02/08/2001 08:57 AM.

    • Committed by sboag@apache.org on 02/13/2001
      Modified: java/src/org/apache/xalan/lib/sql ColumnData.java
      Committer's log entry: In getData() return an empty string instead of null if there is - no data to be obtained. - In response to bug reported by "Michael Kay" <mhkay@iclway.co.uk>, - 02/08/2001 08:57 AM.

    • Committed by garyp@apache.org on 02/19/2001
      Modified: java/src/org/apache/xalan/extensions MethodResolver.java
      Committer's log entry: Correct ConversionInfo array for Node-Set and RTF. Remove DocumentFragment -from RTF and replace with NodeList. Remove duplicate Boolean from both. Fix -Boolean conversion to make java.lang.Boolean higher than string.

    • Committed by sboag@apache.org on 02/19/2001
      Modified: java/src/org/apache/xalan/lib/sql ColumnHeader.java - RowSet.java XStatement.java
      Committer's log entry: Use null nodetest to mean the same as "node()". This fixes a bug reported - by "Voytenko, Dimitry" <DVoytenko@SECTORBASE.COM> - where <xsl:copy-of select="sql:query(...)"/> - crashes with NullPointerException, i.e. - there are cases where we really don't want - to set the NodeTest.

    • Committed by mmidy@apache.org on 02/20/2001
      Modified: java/src/org/apache/xpath/compiler XPathParser.java
      Committer's log entry: Check for null token before checking if it is a letter

    • Committed by sboag@apache.org on 02/20/2001
      Modified: java/src/org/apache/xalan/transformer - TransformerIdentityImpl.java
      Committer's log entry: Fix made for bug reported by "Glencross, Christian" -<Christian.Glencross@gs.com> - on 02/16/2001 10:18 AM. - Xerces 1.2.3 SAX parser calls - handler.setDocumentLocator() before handler.startDocument(). - TransformerIdentityImpl.m_resultContentHandler isn't initialised until - TransformerIdentityImpl.startDocument() is called. - Added lazy construction of result handler - in setDocumentLocator, in addition to - startDocument.

    • Committed by garyp@apache.org on 02/21/2001
      Modified: java/src/org/apache/xalan/lib Extensions.java
      Committer's log entry: Correct implementation of string value of a node.

    • Committed by dleslie@apache.org on 02/21/2001
      Modified: java/src/org/apache/xalan/lib/sql Column.java - ColumnAttribute.java ColumnData.java - ColumnHeader.java Row.java RowSet.java - StreamableNode.java XConnection.java - XStatement.java package.html
      Committer's log entry: Added experimental usage metatag to all classes in this package, - and an explanatory note to package.html.

    • Committed by sboag@apache.org on 02/22/2001
      Modified: java/src/org/apache/xalan/stree ElementImpl.java
      Committer's log entry: Bug fix attributed to Norman Walsh <ndw@nwalsh.com>, on - 02/20/2001 09:50 AM. if the attribute 'name' doesn't occur in the AttList, -the - result of getIndex(name) is -1, but - getChildAttribute() would incorrectly - return the first attribute. Fix returns - null if index < 0.

    • Committed by mmidy@apache.org on 02/22/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToXML.java - java/src/org/apache/xalan/transformer - TransformerIdentityImpl.java
      Committer's log entry: Implement DeclHandler for identity transforms

    • Committed by sboag@apache.org on 02/22/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Fix for bug originally reported by Daryl Beattie <DarylB@screamingmedia.com> - on 02/14/2001 04:16 PM. A hang was occuring inside the use - of a Result Tree Fragment. When the result tree fragement was - being created, the Redirect extension was being called, which - called createResultContentHandler which set the ContentHandler - in the Transformer, but not in the ResultTreeHandler. Then, Redirect - called Transformer#executeChildTemplates( - ElemTemplateElement elem, Node sourceNode, QName mode, -ContentHandler handler) - which saves the reference to the original content handler in - the transformer, and then sets the new one by calling setContentHandler, - which sets the ContentHandler in the ResultTreeHandler as well - as the Transformer. When it tried to restore the old ContentHandler, - it restored the value in the ResultTreeHandler to a Serializer, instead - of the correct ContentHandler. When transformToRTF then called - endDocument on it's resultTreeFragment, the event was sent - to the Serializer instead of the SourceTreeHandler, and thus the - isComplete flag was not set, and thus the hang. (whew!) - The fix is in executeChildTemplates save the value of the - resultTreeHandler's contentHandler as well as Transformer's - content handler, and restore them both. A more architectual fix - could be made, but not without high risk, so I think this is the best - and safest way to fix it.

    • Committed by dleslie@apache.org on 02/23/2001
      Modified: java/src/org/apache/xalan/res XSLTInfo.properties
      Committer's log entry: Changed version to 2.0.1

    • Committed by dleslie@apache.org on 02/23/2001
      Modified: java/src/org/apache/xalan/processor XSLProcessorVersion.java
      Committer's log entry: Changed version to 2.0.1

    • Committed by curcuru@apache.org on 02/28/2001
      Modified: java/src/org/apache/xalan/res XSLTErrorResources.java
      Committer's log entry: Update text of error messages - Submitted by: Andreas Zehnpfund

    • Committed by curcuru@apache.org on 02/28/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Update printArgOptions() with better text and to better reflect actual - options that are currently supported; catch missing -IN argument

    • Committed by jkesselm@apache.org on 03/05/2001
      Modified: java/src/org/apache/xalan/client XSLTProcessorApplet.java - java/src/org/apache/xalan/processor StylesheetHandler.java - TransformerFactoryImpl.java - java/src/org/apache/xalan/stree DocImpl.java - StreeDOMBuilder.java TextImpl.java - java/src/org/apache/xalan/templates OutputProperties.java - java/src/org/apache/xalan/xslt Process.java - java/src/org/apache/xml/utils FastStringBuffer.java - java/src/trax trax.properties
      Committer's log entry: New approach to FastStringBuffer, and changes needed to support it. - We still need to do some serious work on both the initial values of the - tuning parameters and the heuristics driving the "chunk growth" algorithms. - Currently set for fixed-sized chunks of 8Kch in main tree, .5Kch in RTF.

    • Committed by sboag@apache.org on 03/06/2001
      Modified: java/src/org/apache/xalan/templates ElemElement.java - ElemForEach.java ElemLiteralResult.java - java/src/org/apache/xalan/transformer - ClonerToResultTree.java QueuedSAXEvent.java - QueuedStartDocument.java QueuedStartElement.java - ResultTreeHandler.java TransformerImpl.java - TreeWalker2Result.java
      Committer's log entry: Fix for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=741. - - 1) ResultTreeHandler now implements the TransformState interface. - 2) Queued state such as the current node and the current template is stored -as part of QueuedStartElement. Storage will only occur if the ContentHandler -implements TransformClient. - 3) When state is requested (for instance TransformState#getCurrentElement()), -if the queued element is null or not pending (for instance, in a characters -event), it will get the state from the transformer, otherwise it will get the -state from the queued element. - - Other fixes were attempted for this problem, including trying to - get rid of queueing altogether, and flushing a bit earlier before - the state was pushed on the various stacks, but both of - these had show-stopping issues (see discussions - on xalan-dev). - - Note that for the moment the ContextNodeList is node - cloned as it needs to be in order for - TransformState#getContextNodeList.

    • Committed by garyp@apache.org on 03/06/2001
      Modified: java/src/org/apache/xalan/templates ElemParam.java - java/src/org/apache/xpath Arg.java VariableStack.java
      Committer's log entry: The field Arg.isParamVar was attempting to serve two functions: to indicate -variable Frame entries which are not currently activated and to indicate Frames -containing parameters passed with xsl:with-param. When processing was finished -for a node in a node-set, the isParamVar flag was turned on to indicate the -Frame slot was available. Unfortunately, this also indicated that the item was -passed as a parameter which it wasn't. This fix changes isParamVar into to -fields, isAvailable which indicates that the slot is available and -isFromWithParam indicating the Frame slot came from an xsl:with-param or a -top-level parameter passed in via the transformerImpl.setParameter() API. - I have tested this change against the conformance suite and had no -regression. I've also submitted a test case which fails on the existing -codebase but works okay after this fix. - It is possible that I've missed something with regard to the API setParameter -calls but we can fix those if problems are reported.

    • Committed by garyp@apache.org on 03/07/2001
      Modified: java/src/org/apache/xml/utils FastStringBuffer.java
      Committer's log entry: Correct operation when length of content to be appended is zero.

    • Committed by mmidy@apache.org on 03/07/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToXML.java
      Committer's log entry: Fix closing out doctype declaration

    • Committed by mmidy@apache.org on 03/08/2001
      Modified: java/src/org/apache/xml/utils SystemIDResolver.java
      Committer's log entry: Change SystemIdResolver to default to user.dir if the base URI is null

    • Committed by garyp@apache.org on 03/09/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java - java/src/org/apache/xpath VariableStack.java
      Committer's log entry: Parameters set with setParameter were available to stylesheet as variable -references ($myParam) even though there was no xsl:param element to receive it.

    • Committed by mmidy@apache.org on 03/09/2001
      Modified: java/src/org/apache/xalan/transformer - TransformerIdentityImpl.java
      Committer's log entry: Check if there is a DeclHandler before calling it.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xml/utils WrappedRuntimeException.java
      Committer's log entry: Patch attributed to Patrick Moore <patrickm@rioport.com> on 03/09/2001. - Adds another constructor to pass in the error message.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/templates ElemAttribute.java - ElemElement.java
      Committer's log entry: Checkin addresses http://nagoya.apache.org/bugzilla/show_bug.cgi?id=923. - elemAttribute now derives from elemElement so the basic name resolution - code can be shared. Breaks attribset24 test, but I think the newer - behavior is better. New virtual methods overloaded by elemAttribute are - constructNode, resolvePrefix, and validateNodeName. Also, in the - elemAttribute#execute method, checks are made to make sure an - element is pending.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xml/utils SystemIDResolver.java
      Committer's log entry: Added getAbsoluteURI(String url), and merge - with Myriam's changes. - Part of fix for problem found when - investigating http://nagoya.apache.org/bugzilla/show_bug.cgi?id=906.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/processor - TransformerFactoryImpl.java
      Committer's log entry: Call getAbsoluteURI(String url) for the source URL. - Fix for problem found when - investigating http://nagoya.apache.org/bugzilla/show_bug.cgi?id=906. - This tries to force us always having an absolute URL in the processing - stack as the base URL, which should be OK, I hope.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/transformer TransformerImpl.java
      Committer's log entry: Call getAbsoluteURI(String url) for the source URL. - Fix for problem found when - investigating http://nagoya.apache.org/bugzilla/show_bug.cgi?id=906. - This tries to force us always having an absolute URL in the processing - stack as the base URL, which should be OK, I hope.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/transformer QueuedEvents.java - QueuedStartElement.java ResultTreeHandler.java
      Committer's log entry: The user for http://nagoya.apache.org/bugzilla/show_bug.cgi?id=741 reported - problems on testing, so these changes are a re-fix. He tested and - everything seems OK now. There actually may be a slight performance - improvement involved here.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/serialize SerializerToHTML.java
      Committer's log entry: Applied patches from dmitri.ilyin@memiq.com (Dmitri Ilyin) - from http://nagoya.apache.org/bugzilla/show_bug.cgi?id=705.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xpath XPathAPI.java
      Committer's log entry: Applied patch submitted by nboyd@atg.com (Norris Boyd) - at http://nagoya.apache.org/bugzilla/show_bug.cgi?id=702.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/serialize Encodings.java
      Committer's log entry: Applied patch submitted by havardw@underdusken.no (H嶡rd Wigtil). - Also added "XXX-X" variants for all "XXX_X" java encoding names. - I'm not totally confident that this is the right thing to do, but I can't - see that it will hurt, except to make the table a bit larger. I - would prefer to be safe and make sure we handle the encoding. - See my comments in http://nagoya.apache.org/bugzilla/show_bug.cgi?id=718.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/templates ElemTemplateElement.java - StylesheetRoot.java
      Committer's log entry: Minor changes to better bottleneck throwing of Runtime exceptions - during processing.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/processor - TransformerFactoryImpl.java
      Committer's log entry: Catch all exceptions thrown when processing stylesheet, and send - them to the error listener. There's probably some danger of having - the same error sent to the error listener multiple times, but better too - many reports, than none, I guess. - This addresses http://nagoya.apache.org/bugzilla/show_bug.cgi?id=906.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/lib/sql XConnection.java - XStatement.java
      Added: java/src/org/apache/xalan/lib/sql ConnectionPool.java - DefaultConnectionPool.java ExtensionError.java - PooledConnection.java QueryParameter.java - SQLExtensionError.java XConnectionPoolManager.java
      Committer's log entry: These are John Gentilin <johnglinux@eyecatching.com> - patches for connection pooling and parameterized - queries. These should be considered to be unstable - right now, as we are still working on some things.

    • Committed by sboag@apache.org on 03/11/2001
      Modified: java/src/org/apache/xalan/processor ProcessorInclude.java - TransformerFactoryImpl.java - java/src/org/apache/xalan/serialize SerializerToXML.java - java/src/org/apache/xalan/stree StreeDOMHelper.java - java/src/org/apache/xalan/transformer ResultTreeHandler.java - TransformerIdentityImpl.java TreeWalker2Result.java - java/src/org/apache/xml/utils AttList.java TreeWalker.java - java/src/org/apache/xpath DOM2Helper.java XPathContext.java
      Committer's log entry: The DOM2Helper#isNodeAfter(Node node1, Node node2) method - has been fixed so that it no longer does the try/catch thing if one - of the nodes doesn't implement DOMOrder, but instead does an - instanceof test. In StreeDOMHelper, it overloads this method and - *does* do the try/catch business, since almost always both nodes - will implement DOMOrder in this case, and this will be faster than - an instanceof test. Also, in various classes, I did some stuff to try - and make sure that a DOM2Helper wasn't being created and used - when a StreeDOMHelper is needed. - - This addresses http://nagoya.apache.org/bugzilla/show_bug.cgi?id=800 - and should give a good performance fix for foreign DOM processing.

    • Committed by sboag@apache.org on 03/12/2001
      Modified: java/src/org/apache/xpath/patterns NodeTest.java
      Committer's log entry: Xerces at some point decided to use "" instead - of null for null namespaces. There has been a - discussion between Gary Peskin in - Joe Kessleman on xalan-dev about this, - but I hadn't been fully keeping up the the - thread that well, and missed it's relation to - this problem. I include some of the discussion - at the end of this note. I made Xalan be able to - compare a "" namespace to null for now, until - we get this resolved. - - The gist of the discussion on xalan-dev regarding this is: - - >>1. Declare the Xerces-J support of schemas to have a bug and ask that - >>Xerces be corrected to always use a null namespace URI to indicate that - >>there is no default namespace. Even if the Xerces people change this - >>behavior, is this correct? - > - > Yes. If your description of the problem is accurate (you should probably - > submit a more detailed case so it can be reproduced in the lab), this is a - > parser/DOM-builder bug.

    • Committed by costin@apache.org on 03/12/2001
      Modified: java/src/org/apache/xalan/lib/sql ExtensionError.java
      Committer's log entry: Removed ( commented out ) dump() method and the imports in ExtensionError. - - So far the method doesn't seem to be used ( no warning in the compile ). - - The problem is that this method is breaking the build with crimson ( since - it uses xerces-specific classes ). It is possible to implement it on top - of the serialization classes that are part of xalan - if someone needs the - method I'll try to port it.

    • Committed by sboag@apache.org on 03/13/2001
      Modified: java/src/org/apache/xml/utils TreeWalker.java
      Committer's log entry: Added back in the TreeWalker(ContentHandler contentHandler) - constructor, because I'm worried I'll break more dependent code.

    • Committed by mmidy@apache.org on 03/13/2001
      Modified: java/src/org/apache/xalan/res XSLTErrorResources.java - java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Implement new arguments for the command line interface: URIResolver, -EntityResolver and ContentHandler

    • Committed by mmidy@apache.org on 03/13/2001
      Modified: java/src/org/apache/xalan/templates FuncFormatNumb.java
      Committer's log entry: Fix error message to say that 2 or 3 arguments are required.

    • Committed by mmidy@apache.org on 03/13/2001
      Modified: java/src/org/apache/xalan/processor ProcessorLRE.java - java/src/org/apache/xalan/res XSLTErrorResources.java
      Committer's log entry: Better error message for missing or incorrect XSLT namespace declaration in a -stylesheet

    • Committed by garyp@apache.org on 03/13/2001
      Modified: java/src/org/apache/xalan/lib Redirect.java - java/src/org/apache/xalan/transformer TransformerImpl.java - java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Remember the Result that was used to trigger the transform. Access that -result from the Redirect extension to make file references in Redirect relative -to the original result URI. - If this is not available, references are relative to the source URI.

    • Committed by sboag@apache.org on 03/14/2001
      Modified: java/src/org/apache/xpath VariableStack.java
      Committer's log entry: Added protection for null pointer exception that I discovered when - running some Cocoon tests. Since I've never seen this before, - I assume this is related to the changes that Gary made, but am - unsure as it's 4:00 in the morning and I'm too tired to look into it deeply.

    • Committed by curcuru@apache.org on 03/14/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: Remove check for missing -IN arg; there are a number of use - cases for calling Process.main without an XML document

    • Committed by costin@apache.org on 03/14/2001
      Modified: java/src/org/apache/xalan/xslt Process.java
      Committer's log entry: A (last ? ) place where XMLReaderFactory was used without - trying jaxp first. I used the same code that is used in all other - places in xalan. - - With this change, the parser defined in XSLTInfo.properties will be used - only if jaxp is not available.

    • Committed by dleslie@apache.org on 03/14/2001
      Modified: java/src/org/apache/xml/utils StringVector.java
      Committer's log entry: Added missing @serial Javadoc tags.

    • Committed by sboag@apache.org on 03/15/2001
      Modified: java/src/org/apache/xalan/lib/sql ConnectionPool.java - DefaultConnectionPool.java ExtensionError.java - SQLExtensionError.java XConnection.java - XConnectionPoolManager.java XStatement.java
      Committer's log entry: Update from John Gentilin <johnglinux@eyecatching.com> to - fix connection cleanup.

    Compatibility source code updates:

    • Committed by mmidy@apache.org on 02/02/2001
      Modified: java/compat_src/org/apache/xalan/xslt XSLTInputSource.java - XSLTResultTarget.java
      Committer's log entry: Implement some more methods for compatibility

    • Committed by dleslie@apache.org on 02/02/2001
      Modified: java/compat_src/org/apache/xalan/xslt XSLTInputSource.java
      Committer's log entry: Fixed javadoc for api that was just added back.

    • Committed by dleslie@apache.org on 02/02/2001
      Modified: java/compat_src/org/apache/xalan/xslt XSLTResultTarget.java
      Committer's log entry: Fixed javadoc for api that was just added back.

    • Committed by mmidy@apache.org on 02/02/2001
      Modified: java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java
      Committer's log entry: Fix problem with calling the processor with a liaison

    • Committed by mmidy@apache.org on 02/02/2001
      Modified: java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java
      Committer's log entry: Fix problem where source file was being parsed more than once and if using an -input stream, we would get a read error

    • Committed by mmidy@apache.org on 02/12/2001
      Modified: java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java
      Committer's log entry: Set system id in stylesheet handler

    • Committed by mmidy@apache.org on 02/14/2001
      Modified: java/compat_src/org/apache/xalan/xslt XSLTInputSource.java
      Committer's log entry: Call local setSystemId.

    • Committed by mmidy@apache.org on 02/15/2001
      Modified: java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java
      Committer's log entry: Fix problem with processing an input source created from a reader with no -systemId - Fix problem with reading an input source file twice if it has a PI

    • Committed by mmidy@apache.org on 02/22/2001
      Modified: java/compat_src/org/apache/xalan/xslt StylesheetRoot.java
      Committer's log entry: Add getOutputMethod API.

    • Committed by dleslie@apache.org on 03/07/2001
      Modified: java/compat_src/org/apache/xalan/xpath/xml - XMLParserLiaisonDefault.java
      Committer's log entry: Put in Apache copyright.

    • Committed by sboag@apache.org on 03/13/2001
      Modified: java/compat_src/org/apache/xalan/xpath/xml TreeWalker.java - java/compat_src/org/apache/xalan/xslt XSLTEngineImpl.java
      Committer's log entry: Made changes for change to API for XalanJ2 TreeWalker, which - now requires that the DOM helper be created by the caller.
    • -
    -
    - - -

    Release 2.0 includes several bug fixes to the &xslt4j; and TrAX core and to the Xalan-Java 1 compatibility API. We also updated bsf.jar to the release candidate 2.2, which fixes a bug running JPython extensions.

    -

    Core bug fixes:

    -
      -
    • A threading problem showed up when using multiple processors. We fixed it by using a separate XPathContext object to do whitespace node - matches (xsl:strip-space).

    • -
    • Fixed a bug running Norm Walsh's DocBook stylesheets by not setting the variable stack position if the FilterExprWalker is not owned by a - top-level NodeIterator.

    • -
    • Fixed a problem with null namespace being passed from xsl:element. This bug also surfaced while processing DocBook - stylesheets.

    • -
    • In the interest of stability, we now treat "unknown error in XPath" as a fatal error.

    • -
    • Added support in stylesheet processing instructions for "text/xml" and "application/xml+xslt" mime types.

    • -
    • Fixed tokenizing of stylesheet processing instructions to allow parameters to be passed to server in href attributes.

    • -
    • Fixed a bug passing Transformer creation error messages to ErrorListener when an ErrorListener has been set on - TransformerFactory.

    • -
    • When using an Exception to instantiate a FactoryConfigurationError (extends Error), we now propagate the Exception message to - super().

    • -
    • Added defensive code to ElemTemplateElement for handling a null URI.

    • -
    • When using an Exception to instantiate a TransformerException (extends Exception), we now propagate the Exception message to super() - rather than a generic message.

    • -
    • Fixed a bug (the generation of an unwanted entity reference) performing the identity transformation - (see Serializing output) with an XML document containing a DOCTYPE - declaration.

    • -
    • Message manager modified so that the SourceLocator must always be passed in, - which will make a major difference in getting line number information.

    • -
    • xsl:element's handling of namespace attribute and prefix in - name attribute changed so that it no longer manufactures prefixes... - it always tries its best to match the prefix entered.

    • -
    • Bug fixed with namespace contexts in the stylesheet processor. - The bug could cause <a xmlns:a="x"><b> to produce <a xmlns:a="x"><b xmlns:a="x">.

    • -
    • Modified processing of xsl:message to enhance it as a debugging aid. Line numbers are now output with each - message. If the terminate attribute is true (the default is false) the message is sent to the console, and an exception is thrown with the - message "Stylesheet directed termination".

    • -
    • In TransformerException, check that the cause != null when checking for a contained exception.

    • -
    • Fixed a problem validating non-namespaced attributes and a problem allowing non-namespaced attributes to be children of the - stylesheet element.

    • -
    • Fixed checking of number of arguments in document() function.

    • -
    • Fixed problem with mutation of templates at run time. Templates resolution now takes place during the compose() method.

    • -
    • Fixed some minor threading issues in org.apache.xalan.stree (Child, Parent, ElementImpl, SourceTreeHandler).

    • -
    • Synchronized TrAX API functions subject to mutation to prevent mutation during a transformation.

    • -
    • Fixed bug reported by Jano Elovirta: substring() was returning an error if the start index is larger than the string.

    • -
    • Set StringKey.toString() to return the underlying String (m_str), thus avoiding a potential symmetry problem with the equals() method - reported by Ito Kazumitsu.

    • -
    • In response to note from Ito Kazumitsu, changed Java encoding name "EUCJIS" in FormatterToXML to "EUC_JP".

    • -
    • When Xalan creates a FileOutputStream, it now closes the stream before exiting.

    • -
    • Fixed handling of an exception that can be thrown while building a DOM.

    • -
    • Fixed a problem reported by Dimitry Voytenko serializing compiled stylesheets.

    • -
    • For support of applets, modified TransformerFactory System.getProperty() calls to catch SecurityExceptions.

    • -
    • Fixed a bug reported by Krishna Mohan Meduri setting output properties.

    • -
    • Fixed error recovery when xsl:element encounters a bad name or unresolvable prefix.

    • -
    • Added AbstractMethodError handling to existing NoSuchMethodError handling as a fallback to the XMLReaderFactory for XML parsers that do - not implement the JAXP parsers interface for creating an XMLReader

    • -
    • Fixed bug with cloned iterators reported by Tim Sean.

    • -
    • Fixed null pointer exception that could occur with getValue("xxx").

    • -
    • Fixed bug reported by Tim Sean handling the xml:space attribute.
    • -
    -

    Bug fixes in the Xalan-Java 1 compatibility API:

    -
      -
    • Fixed ProblemListener (for processing error messages) to derive from &xslt4j; 2 ErrorHandler.

    • -
    • Fixed evaluation of stylesheet string parameters to conform to &xslt4j; 1 behavior (expressions for &xslt4j; 1 vs. String objects - for &xslt4j; 2).

    • -
    • Added XPathSupport and XPathSupportDefault, and fixed the derivation of XObject sub-types (XString, etc.).

    • -
    • Fixed bug with XSLTProcessor process(xmlIn, null, out) method so that it uses the StylesheetRoot (if one exists) that has been created - with the processStylesheet() method.
    • -
    -
    - - -

    &xslt4j; 2.0.D07 incorporates a Xalan-Java 1 compatibility jar, some performance enhancements, and a number of bug fixes for bugs found in version 2.0.D06.

    -
      -
    • Fixed handling of disable-output-escaping="no". Previously, once it was turned on, it could not be turned off.

    • -
    • Fixed a bug with whitespace handling where Xalan was incorrectly checking for whitespace - stripping before collation of multiple whitespace events into a single text node.

    • -
    • Whitespace stripping wasn't working with input DOMs before. This is now fixed.

    • -
    • Fixed many exception handling problems and problems with error reporting.

    • -
    • Fixed a bug resetting parameters in Transformer clearParameters().

    • -
    • Fixed a bug where CDATA sections were not matching the text() node test.

    • -
    • Made better memory allocation problem with result tree fragments.

    • -
    • Made result tree fragment parsing of numbers consistent with strings.

    • -
    • Exceptions thrown from extensions should now be properly reported via the error listener.

    • -
    • Fixed hard-coded stack dump set off by m_reportInPostExceptionFromThread variable.

    • -
    • Fixed intermittent threading problem with text nodes being dropped.

    • -
    • Fixed problem with variable evaluation inside of union expressions.
    • -
    -
    - -

    We have fixed the bugs reported in &xslt4j; 2.0.D05. Along with several other enhancements, -we have also fixed a number of bugs found by testing and our users:

    -
      -
    • Fixed some threading problems and improved support for handling Exceptions thrown in a secondary thread.

      -Note: To support incremental output, &xslt4j; performs the transformation in a second thread while building the source tree in the main thread.

    • -
    • Fixed problems encountered in piping (utilizing transformation output as input for another transformation).

    • -
    • Fixed problems handling attributes and adding attributes to result tree.

    • -
    • Added defensive checking for null entities, null namespaces, and empty strings passed in for URIs and local names.

    • -
    • We now conform to the SAX convention of representing null namespaces with empty strings.

    • -
    • Fixed a bug encountered evaluating a variable in a predicate expression applied to child nodes.

    • -
    • Changed names of serializers from FormatterToXxx to SerializerToXxx. See -Package org.apache.xalan.serialize.

    • -
    • Improved debugging support in a number of areas.
    • -
    -
    - -

    All of the bugs reported in &xslt4j; 2.0.D01 have been fixed. The remainder of this section discusses two changes that we believe are of particular importance:

    -

    TrAX

    -

    The Transformation API for XML (TrAX) that &xslt4j2; implements has undergone substantial revisions since the release of &xslt4j; 2.0.D01. TrAX has joined the Java API for XML Parsing (JAXP) as part of the Sun® . Accordingly, the TrAX package names have changed. The conceptual organization has also changed somewhat: The primary transformation interfaces are defined in javax.xml.transform, with concrete classes for managing stream input/output, SAX parsers and ContentHandler, and DOM parsers and DOM trees in javax.xml.transform.stream, javax.xml.transform.sax, and javax.xml.transform.dom. For more information, see TrAX (Transformation API for XML), and review Usage Patterns.

    -

    Output properties

    -

    The handling of xsl:output properties has changed: org.apache.xalan.serialize.OutputFormat and apache.xalan.templates.OutputFormatExtended were removed and replaced with org.apache.xalan.templates.OutputProperties. The SerializerFactory getSerializer() method now takes Properties rather than a String indicating the output method. You can replace getSerializer("xml"), for example, with getSerializer(OutputProperties.getDefaultMethodProperties("xml")).

    -

    HTML, XML, and text xsl:output properties are specified in property files in org.apache.xalan.templates: output_html.properties, output_xml.properties, and output_text.properties.

    -

    You can start using the output properties defined in these files in your stylesheets. For example, you can turn URL escaping off in HTML output with
    {http\u003a//xml.apache.org/xslt}use-url-escaping=no
    -and you can control indenting with
    -{http\u003a//xml.apache.org/xslt}indent-amount=n

    -The colon after the "http" protocol must be escaped. -

    Character-to-entity mapping is specified in org.apache.xalan.serialize: HTMLEntities.res and XMLEntities.res. You can override entity ref -mapping from a stylesheet. For example:

    -<?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:xalan="http://xml.apache.org/xslt" version="1.0"> - - <xsl:output xalan:entities="myentities.ent"/> - - <xsl:template match="/"> - <out>&#125;</out> - </xsl:template> - -</xsl:stylesheet> -

    === myentities.ent ===

    -quot 34 -amp 38 -lt 60 -gt 62 -lala 125 -

    The output is:

    -<?xml version="1.0" encoding="UTF-8"?> -<out>&lala;</out> -

    See also Setting output properties in your stylesheets.

    -
    -
    diff --git a/stylebook/sources/xalan/overview.xml b/stylebook/sources/xalan/overview.xml deleted file mode 100644 index 429227e18..000000000 --- a/stylebook/sources/xalan/overview.xml +++ /dev/null @@ -1,189 +0,0 @@ - - - - - - - -
      -
    • Introduction
    • -
    • &xslt4j; Features
    • -
    • Getting to work with &xslt4j;
    • -
    • Getting up to speed with XSLT
    • -
    • Glossary
    • -
    - - -

    &xslt4j; fully implements - and the . XSLT is the first part of the XSL stylesheet language for - XML. It includes the XSL Transformation vocabulary and XPath, a language for addressing parts of - XML documents. For links to background materials, discussion groups, frequently asked questions, - and tutorials on XSLT, see Getting up to speed with XSLT.

    -XSL also includes a vocabulary for formatting documents, which is not part of &xslt4j;. - For more information, see and the Apache XML FOP (Formatting Objects Project). -

    XSL stylesheets are written in the XSLT language. An XSL stylesheet contains instructions - for transforming XML documents into XML, HTML, XHTML or plain text. In structural terms, an XSL - stylesheet specifies the transformation of one tree of - nodes (the XML input) into another tree of nodes (the output or transformation result).

    -The XSL stylesheet may generate and refer to cascading style sheets (CSS) as part of its output. -

    In the following example, the foo.xsl stylesheet is used to transform foo.xml into foo.out:

    -

    foo.xml:

    -<?xml version="1.0"?> -<doc>Hello</doc> -

    foo.xsl:

    - <?xml version="1.0"?> -<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> -<xsl:template match="doc"> -<out><xsl:value-of select="."/></out> -</xsl:template> -</xsl:stylesheet> -

    foo.out:

    -<out>Hello</out> -

    By default, &xslt4j; uses &xml4j;, but it may be configured with system properties to work with - other XML parsers (see Plugging in a Transformer and - XML parser). The input may be submitted in the form of a stream of XML markup (from a URI, - a character or byte stream, or another transformation), a SAX InputStream, or a DOM Node.

    -

    &xslt4j; performs the transformations specified in the XSL stylesheet and packages a sequence of - SAX events that may be serialized to an output stream or writer, used to build a DOM tree, or - forwarded as input to another transformation.

    -
    - - - -
      -
    • Includes an Interpretive processor for use in a tooling and debugging environment and - a Compiling processor (XSLTC) for use in a high performance runtime environment.

    • -
    • Implements the relevant W3C specifications: and - .

    • -
    • Implements , and builds on - and .

    • -
    • Implements the XPath API in .

    • -
    • May be configured to work with any XML parser, such as - &xml4j;, that implements - (see Plugging in an XML - parser).

    • -
    • Can process Stream, SAX or DOM input, and output to a Stream, SAX or DOM.

    • -
    • Transformations may be chained (the output of one transformation may be the input for - another).

    • -
    • May be run from the command line for convenient file-to-file - transformations.

    • -
    • Includes an applet wrapper.

    • -
    • May be used in a servlet to transform XML documents - into HTML and serve the results to clients.

    • -
    • Supports the creation of Java and scripting language extensions. - and provides a growing library of extension elements and functions.
    • -
    -
    - - - -

    For instructions and some suggestions about how to get started using the XSLT Interpretive - processor, see Getting Started with Interpretive Processing.

    -

    For instructions and some suggestions about how to get started using the XSLT Compiling - processor, see Getting Started with XSLTC.

    -
    - - - -

    If you are still working through the details of the XSLT spec (the W3C 1.0 Recommendation), you - may want to consult one or more of the following:

    -
      -
    • XSLT - XSL Transformations in - - The XML Revolution: Technologies for the future Web by Anders Møller and Michael - I. Schwartzbach (Web pages, but designed for sequential reading)

    • -
    • Crane Softwright's Free preview of - Practical Transformation Using XSLT and XPath

    • -
    • Doug Tidwell's XSLT, O'Reilly, 2001 -

    • -
    • Bob Ducharme's XSLT Quickly, - Manning Publications, 2001

    • -
    • John Robert Gardner and Zarella Rendon's - XSLT - and XPath: A Guide to Transformations, Prentice-Hall, 2001

    • -
    • Michael Kay's XSLT - Programmer's Reference, 2nd ed., Wrox Press, 2001

    • - -
    • Dave Pawson's to search out particular answers and - techniques

    • -
    • Miloslav Nic's XSL - Tutorial, a collection of stylesheet examples

    • -
    • Elliotte Rusty Harold's - Chapter 17 of the XML Bible: XSL Transformations

    • -
    • The Mulberry XSL-List -- Open Forum on - XSL (of interest to XSL users at all levels)

    • -
    • Objects by Design's - Transforming XMI to HTML (oriented towards XMI, "an XML-based, stream representation - of a UML model," but also covers "generic" XML transformations) and their related - XSLT by Example -

    • -
    • OASIS (the Organization for the Advancement of Structured Information Standards): - Extensible Stylesheet Language (XSL) - by Robin Cover

    • -
    -

    When you come across other useful introductory or background materials, please email - , so we can add them to this list.

    - -
    - - - - The XML namespace for XSLT. An XML - namespace is a collection of element and attribute names, identified by a Unique Resource - Identifier (URI), which often takes the form of a URL, but is really just a unique string, - not a pointer to a web page. The XSLT namespace URI is http://www.w3.org/1999/XSL/Transform. - In each XSLT stylesheet, you must declare this namespace in the stylesheet element tag and - bind it to a local prefix. Like the XSLT specification, we always use xsl as the XSLT - namespace prefix in our descriptions and examples, although you are free to bind any prefix - to this namespace.

    - - - Any tag associated with the XSLT namespace.

    - - - An element, usually with child elements, that specifies a "rule" or set of - instructions to perform when a particular kind of node is encountered in the source - tree.

    - - - Any tag that occurs inside an xsl:template element and is associated with the XSLT - namespace.

    - - - The XML tree input to the XSL process.

    - - - The tree that is output by the XSL process.

    - - - The part of a template that defines the kind(s) of nodes to which the template - applies.

    - -
    -

    For more definitions of XSLT terminology, see Dave Pawson's - XSLT Terminology - Clarification and the Glossary in Michael Kay's - XSLT Programmer's Reference.

    -
    -
    diff --git a/stylebook/sources/xalan/public_apis.xml b/stylebook/sources/xalan/public_apis.xml deleted file mode 100644 index dc783dd59..000000000 --- a/stylebook/sources/xalan/public_apis.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - - -
      -
    • Public interfaces
    • -
    • Experimental interfaces
    • -
    • Internal interfaces
    • -
    - -

    A public interface of &xslt4j2; is an API that a typical client developer - should code against. Such interfaces are usually based upon - World-Wide Web Consortium (W3C) recommendations, such as XSLT 1.0 and - XPath 1.0, or Java Specification Requests (JSR's) with a status of - "Final Release", such as JAXP.

    -

    The &xslt4j2; team will support use of public interfaces, and will - attempt to fix severe bugs in such interfaces.

    -

    A particular version of a public interface will be supported for all - the maintenance drops of a particular version and release of &xslt4j2; - (that is, for a release that changes just the third digit of the - version number). At the point a new version of &xslt4j2; is made - available, (that is, a release that changes the first or second digit - of the version number) such interfaces could change to reflect the - latest standard specifications.

    -

    The public interfaces of &xslt4j2; are:

    -
      -
    • JAXP 1.3 - interfaces found in the - - javax.xml.parsers, - - javax.xml.transform, - - org.xml.sax, - - org.w3c.dom and - - javax.xml.xpath packages.
    • -
    • The &xslt4j2; specific XPath API, defined by the classes -
        -
      • - org.apache.xpath.XPathAPI
      • -
      • - org.apache.xpath.CachedXPathAPI
      • -
      -
    • -
    • API's for using, configuring or defining a serializer, from the - org.apache.xml.serializer package: -
        -
      • - OutputPropertiesFactory
      • -
      • - SerializerFactory
      • -
      • - Serializer
      • -
      -
    • -
    • Properties files for configuring a serializer. (See - Setting output - properties in your stylesheets for more information.) -
        -
      • org/apache/xml/serializer/output_xml.properties
      • -
      • org/apache/xml/serializer/output_html.properties
      • -
      • org/apache/xml/serializer/output_text.properties
      • -
      -
    • -
    • Command-line interfaces for performing transformations: -
        -
      • &xslt4j; Command-line utility
      • -
      • Compiling translets - from the command line
      • -
      • Running translets - from the command line
      • -
      -
    • -
    -
    - -

    Interfaces and classes that are designated experimental reflect recent - World-Wide Web Consortium (W3C) draft recommendations or draft - Java Specification Requests (JSR's). Such an API is based upon - a specification that is subject to change, and so is itself subject - to change as the relevant standards body makes changes to the - specification.

    -

    If and when the specification upon which the API is based reaches its - final published form, the API could become a Public interface in - a subsequent release of &xslt4j2;, although the &xslt4j2; team could - decide to simply withdraw the API, if it decided that making the API - a public interface would not be appropriate.

    -

    As the name suggests, experimental interfaces are provided in order to - give users the opportunity to experiment with new features so that they - can provide feed-back on those features. They should not be used in - production-level code. The &xslt4j2; team may fix severe bugs in - experimental interfaces.

    -

    The experimental interfaces of &xslt4j2; are:

    -
      -
    • The - - DOM Level 3 XPath API found in the - - org.apache.xpath.domapi package.
    • -
    -
    - -

    All other classes are considered to be part of the internal interface of - &xslt4j2;. Some such classes or members of such classes may themselves - be designated as public using the Java keyword, but that is - a consequence of the internal organization of &xslt4j2;.

    -

    Users who have complex and specific needs, such as the need to build - their own XSLT or XPath processors, might use these internal interfaces, - but their use is not supported. In addition these interfaces are subject - to change without notice.

    -
    -
    diff --git a/stylebook/sources/xalan/readme.xml b/stylebook/sources/xalan/readme.xml deleted file mode 100644 index b87f9e828..000000000 --- a/stylebook/sources/xalan/readme.xml +++ /dev/null @@ -1,1036 +0,0 @@ - -]> - - - - -
      -
    • Release notes for version 2.7.3
    • -
    • Release notes for version 2.7.2
    • -
    • Release notes for version 2.7.1
    • -
    • Release notes for version 2.7.0
    • -
    • Release notes for version 2.6.0
    • -
    • Release notes for version 2.5.2
    • -
    • Release notes for version 2.5.1
    • -
    • Release notes for version 2.5.0
    • -
    • Release notes for version 2.5.D1
    • -
    • Release notes for version 2.4.1
    • -
    • Release notes for version 2.4.0
    • -
    • Other points of interest
    • -
    - - - -

    - &xslt4j; 2.7.3 was released in April 2023. -

    - - This XalanJ release, requires users to use Java minimum version 8 for working with XalanJ. - - - This issue was fixed within XalanJ's XSLTC processor. This XalanJ issue, when present causes following problems: - Malicious XSLT stylesheets may be written, which could result in XalanJ invalid translet Java byte code to be - produced by XalanJ XSLTC processor. The XalanJ translet is a Java byte code compiled representation, of an XSLT - transformation. - - - This XalanJ release, contains upgraded version of Apache Commons BCEL library [Gary Gregory]. - - - The XalanJ users, can now make XalanJ builds and perform XalanJ tests from the XalanJ source - distribution. The XalanJ build scripts for the implementation and the tests, both for the Windows and - Linux platforms, were enhanced to support building XalanJ with JDK 1.8. [Gary Gregory, Joseph Kessselman, - Mukul Gandhi] - - - This XalanJ release, contains upgraded versions of xercesImpl.jar - and xml-apis.jar (Xerces-J 2.12.2). - - -

    XALANJ Jira bug fixes: - 2638, - 2623, - 2607, - 2601, - 2600, - 2584, - 2346 -

    -
    -
    - - -

    - &xslt4j; 2.7.2 was released in April 2014. -

    - - -

    - When using FEATURE_SECURE_PROCESSING ("http://javax.xml.XMLConstants/feature/secure-processing") on a TransformerFactory, the output properties: -

    -
      -
    • {http://xml.apache.org/xalan}content-handler
    • -
    • {http://xml.apache.org/xalan}entities
    • -
    • {http://xml.apache.org/xslt}content-handler
    • -
    • {http://xml.apache.org/xslt}entities
    • -
    -

    - should be ignored (see http://xml.apache.org/xalan-j/usagepatterns.html#outputprops) -

    -

    - These properties can be used to load an arbitrary class or access an arbitrary URL/resource so are problematic when secure processing is desired. -

    -

    - - <xsl:output xalan:content-handler="org.example.BadClass" ... - -

    -

    - - <xsl:output xalan:entities="http://example.org/reallyLargeFile.bin" ... - -

    -

    - These features could be used to load a class that had undesirable side-effects or to load a large file and exhaust memory, etc. -

    -

    - See XALANJ-2435. -

    -
    - - - The distributions contain upgraded versions of xercesImpl.jar - (Xerces-J 2.11.0) and xml-apis.jar (XML Commons External 1.4.01). - - - -

    XALANJ Jira bug fixes: - 2435, - 2580, - 2546, - 2581, - 2582, - 2583, - 2473, - 2495, - 2493, - 2424, - 2446, - 2447 -

    -

    You can also view the list in - Jira -

    -
    - -
    - - - -

    &xslt4j; 2.7.1 was released in August 2007. -

    -

    - The serializer now has support for DOM Level 3 serialization - (LSSerializer) - for an XML parser. These changes are seen in the new class - - org.apache.xml.serializer.DOM3Serializer - and the new package - org.apache.xml.serializer.dom3 - as well as a new method, - asDOM3Serializer() on the older - - org.apache.xml.serializer.Serializer interface. -

    -

    - More details are in the javadoc of those classes and interfaces. -

    - -

    - The distributions contain upgraded versions of xercesImpl.jar - (Xerces-J 2.9.0) and xml-apis.jar (XML Commons External 1.3.04). - The distributions were tested with these versions of Xerces-J - and XML Commons External and are the recommended versions to use with - the release. -

    -

    - Important: You may experience unpredictable anomalies - if your &xslt4j; and &xml4j; builds are not in synch. -

    - - -

    - &xslt4j; 2.7.1 contains the following functional enhancements, - performance enhancements and bug fixes since 2.7.0: -

    -
      -
    • XALANJ Jira bug fixes: - 611, - 1243, - 1324, - 1434, - 1497, - 1706, - 1753, - 1774, - 2061, - 2091, - 2108, - 2159, - 2184, - 2196, - 2199, - 2204, - 2205, - 2206, - 2208, - 2209, - 2210, - 2217, - 2218, - 2219, - 2220, - 2221, - 2222, - 2224, - 2219, - 2230, - 2236, - 2240, - 2249, - 2268, - 2269, - 2271, - 2275, - 2276, - 2277, - 2278, - 2279, - 2281, - 2283, - 2284, - 2285, - 2286, - 2290, - 2292, - 2293, - 2294, - 2295, - 2297, - 2298, - 2307, - 2312, - 2316, - 2317, - 2318, - 2319, - 2321, - 2323, - 2324, - 2329, - 2336, - 2337, - 2339, - 2341, - 2342, - 2343, - 2375, - 2377, - 2384, - 2395 -
    • -
    -
    - - - -

    &xslt4j; 2.7.0 was released on August 8, 2005. -

    -

    &xslt4j; 2.7.0 contains the following functional enhancements, performance enhancements and - bug fixes since 2.6.0. -

    - - -

    Support for JAXP 1.3 has been introduced in this release of &xslt4j;. JAXP 1.3 - includes a new javax.xml.xpath package, which provides an object-model neutral - API for the evaluation of XPath expressions and access to the evaluation environment. - Please refer to Using the JAXP 1.3 XPath API for details on how to - use the new XPath API. You can also look at the code in the samples - ApplyXPathJAXP , - XPathResolver and - ExtensionFunctionResolver.

    - -

    There are also a few new transformer features - in JAXP 1.3, as described in the following list:

    -

  • A new method - - TransformerFactory.setFeature(String name, boolean value)
  • -
  • A new method - Transformer.reset()
  • -
  • A new nextSibling attribute is introduced for - DOMResult, accessible - by the constructors, getter and setter methods.
  • -
  • Support for the secure processing feature
  • -
    - - The behavior of the default ErrorListener - was changed in this release of &xslt4j;, - in order to conform with a clarification of the required behavior described by JAXP 1.3. - If an application does not register its own ErrorListener, the default ErrorListener is - used which reports all warnings and errors to System.err and does not throw any Exceptions. Applications - are strongly encouraged to register and use ErrorListeners that insure proper behavior for warnings and errors. - The default ErrorListener of the old &xslt4ji; processor throws exceptions on errors and fatal errors. If your - code expects exceptions to be thrown on errors and fatal errors, you have to set a customized ErrorListener on - TransformerFactory and/or Transformer. You can use - org.apache.xml.utils.DefaultErrorHandler - as a sample ErrorListener implementation. - - -

    This release of &xslt4j; adds support for Namespaces in XML 1.1 and XML 1.1 output documents. - The processors:

    -

  • support C0 control characters
  • -
  • handle C1 control characters in a way that is consistent with the requirements of XML 1.1
  • -
  • treat NEL (U+0085) and LSEP (U+2028) as end-of-line markers
  • -
  • support Internationalized Resource Identifiers (IRIs)
  • -
  • support the additional characters in NCNames and QNames permitted by XML 1.1 and Namespaces in XML 1.1
  • - -

    The processors do not undeclare namespaces other than the default namespace in serialized documents Also, Full - normalization is not supported.

    -

    An input document can be either XML 1.0 or XML 1.1. Also, a stylesheet document can be either XML 1.0 or XML 1.1. - A stylesheet document must conform to the XSLT 1.0 specifications.

    -

    Note that it is possible for a stylesheet module that is an XML 1.1 document to use constructs that cannot be - serialized as part of a valid XML 1.0 document, and for a stylesheet module that is an XML 1.0 document to use - constructs that cannot be serialized as part of a valid XML 1.1 document. For example, a stylesheet module that - is an XML 1.1 document might contain a literal result element whose name contains characters that are not permitted - as part of a QName in a document that conforms to Namespaces for XML 1.0. The user needs to ensure that the nodes - created by the stylesheet can be serialized as part of a well-formed document of the required version of XML.

    -
    - -

    Extensions written in Java are directly supported by &xslt4j;. For extensions written in languages other than - Java, &xslt4j; uses the Bean Scripting Framework (BSF), an architecture for incorporating scripting into Java - applications and applets, and an implementation of BSF must be available on the classpath. In previous - releases, IBM's BSF implementation (bsf.jar from 2001) has been included in the &xslt4j; distribution. - Some time ago IBM donated their BSF implementation to the - Apache Jakarta BSF project. As of this release, - the IBM bsf.jar is no longer included in the &xslt4j; distribution. To use extensions written in - languages other than Java, please download a version of Jakarta BSF and put it on your classpath. To use - a different BSF implementation, please refer to setting the BSFManager.

    -
    - -

    In this release of &xslt4j; the code related to serialization of output result trees has been pulled out of - xalan.jar and moved into a new jar file, named serializer.jar.

    -

    The code in serializer.jar has been modified to have no build or runtime dependencies on the rest of the - code in &xslt4j;, therefore, serializer.jar can be used in a stand-alone fashion through its public APIs. - Although the code has been modified to create a stand-alone jar, the serializer public APIs have not changed - and the package names and classnames are the same as they were last release.

    -
    - -

    Also the following:

    - -
      -
    • Updates to the SQL extension and SQL samples to support the Apache Derby database.
    • -
    • Minor restructuring of the source and binary distributions.
    • -
    • Various performance fixes.
    • -
    • Various memory leak fixes.
    • -
    • Upgrade to Xerces-J (2.7.1) and a new version of xml-commons (xml-commons-external-1.3.02).
    • - -
    • Bugzilla fixes: - 15333, - 27417, - 27516, - 27522, - 27539, - 27932, - 28082, - 28435, - 28622, - 28796, - 28879, - 29120, - 29234, - 29372, - 29411, - 29655, - 29706, - 30056, - 30142, - 30262, - 30301, - 30658 -
    • -
    • XALANJ Jira bug fixes: - 936, - 1186, - 1368, - 1417, - 1427, - 1431, - 1478, - 1526, - 1550, - 1556, - 1592, - 1640, - 1662, - 1705, - 1708, - 1761, - 1810, - 1811, - 1812, - 1822, - 1824, - 1852, - 1853, - 1886, - 1887, - 1888, - 1891, - 1908, - 1912, - 1924, - 1925, - 1937, - 1938, - 1942, - 1955, - 1966, - 1967, - 1977, - 1978, - 1979, - 1985, - 1990, - 1994, - 1999, - 2003, - 2008, - 2013, - 2015, - 2021, - 2023, - 2026, - 2037, - 2051, - 2054, - 2058, - 2059, - 2068, - 2070, - 2074, - 2076, - 2077, - 2079, - 2081, - 2085, - 2086, - 2087, - 2089, - 2093, - 2095, - 2097, - 2099, - 2103, - 2105, - 2109, - 2113, - 2114, - 2116, - 2121, - 2123, - 2124, - 2126, - 2134, - 2136, - 2140, - 2142, - 2143, - 2144, - 2146, - 2154, - 2161, - 2167, - 2170, - 2176, - 2183 -
    • -
    • For a list of &xslt4j; commits, see xalan-cvs@xml.apache.org in the - . -
    • -
    -
    - - - -

    &xslt4j; 2.6.0 was released on February 29, 2004 (a leap year!). -

    -

    &xslt4j; 2.6.0 contains the following functional enhancements, performance enhancements and - bug fixes since 2.5.2:

    -
      -
    • Improvement in translet initialization time.
    • -
    • Addition of a translet versioning mechanism. If the translet version - detected by the XSLTC runtime is more recent than any supported by the - XSLTC runtime, an error will be reported.
    • -
    • Changes that allow XSLTC to use other DTM implementations.
    • -
    • Release notes for the XML Serializer. The serializer will no longer put a newline after - the xml header tag unless indent="yes". See bugzilla - 24304.
    • -
    • Rename of Xalan Java's xalan:doc-cache-off processing instruction to - xalan-doc-cache-off. This change was necessary due to a recent - change in Xerces. Xerces has started detecting the Namespace - well-formedness rule that a processing instruction's PITarget must not contain - a colon. The old-style PI (xalan:doc-cache-off) will be accepted provided that - the XML parser does not report it as an error. See bugzilla - 26217.
    • -
    • Enhancement to XSLTC's URIResolvers and the general mechanism to resolve relative URIs. - XSLTC is now compatible with Xalan Intepretive.
    • -
    • Addition of a TransformThread sample that demonstrates how to use different transformers - on different threads and in different modes.
    • -
    • Upgrade to Xerces-J (2.6.2) and a new version of xml-commons (xml-commons-external-1.2.01)
    • -
    • Elimination of "enum" as a name to allow compilation under JDK 1.5
    • - -
    • Bugzilla fixes: - 797, - 1396, - 5761, - 15140, - 16889, - 18351, - 19194, - 19464, - 22376, - 23046, - 23591, - 24278, - 24111, - 24187, - 24188, - 24302, - 24304, - 24365, - 24414, - 24518, - 24695, - 24728, - 24788, - 24793, - 24958, - 24979, - 24985, - 24988, - 25368, - 25416, - 25442, - 25449, - 25816, - 25924, - 26019, - 26030, - 26075, - 26169, - 26217, - 26697, - 26742, - 26829, - 26842 -
    • -
    • For a list of &xslt4j; commits, see xalan-cvs@xml.apache.org in the - . -
    • -
    -
    - - - -

    &xslt4j; 2.5.2 was released on October 30, 2003. -

    -

    &xslt4j; 2.5.2 contains bug fixes and performance enhancements since 2.5.1.

    -

    Fixes in this release include the following:

    -
      -
    • - 782, - 788, - 789, - 795, - 890, - 3415, - 5133, - 5972, - 6155, - 7205, - 7408, - 10900, - 11414, - 12441, - 13082, - 14149, - 14607, - 15090, - 15327, - 15700, - 15828, - 15901, - 16311, - 16512, - 16675, - 17630, - 18821, - 18907, - 19297, - 19591, - 19770, - 19823, - 19890, - 19918, - 19972, - 19973, - 20074, - 20114, - 20256, - 20537, - 20572, - 20625, - 20685, - 20795, - 20819, - 20832, - 20841, - 20909, - 20913, - 20920, - 21039, - 21048, - 21087, - 21300, - 21309, - 21449, - 21452, - 21471, - 21478, - 21491, - 21697, - 21713, - 21805, - 21893, - 22025, - 22115, - 22167, - 22342, - 22422, - 22438, - 22623, - 22769, - 22777, - 22808, - 22880, - 23200, - 23113, - 23115, - 23271, - 23418, - 23706, - 23812, - 23896, - 23983, - 24013, - 24025 -
    • -
    • For a list of &xslt4j; commits, see xalan-cvs@xml.apache.org in the - . -
    • -
    -
    - - - -

    &xslt4j; 2.5.1 was released on June 3, 2003. -

    -

    &xslt4j; 2.5.1 contains bug fixes and performance enhancements since 2.5.0.

    -

    Fixes in this release include the following:

    -
      -
    • - 15200, - 18585, - 18926, - 19029, - 19388, - 19471, - 19474, - 19522, - 19640, - 19900, - 19960, - 20237, - 20273 -
    • -
    • For a list of &xslt4j; commits, see xalan-cvs@xml.apache.org in the - . -
    • -
    -
    - - - -

    &xslt4j; 2.5.0 was released on April 16,2003. -

    -

    &xslt4j; 2.5.0 contains a variety of features, bug fixes and - performance enhancements since 2.5.D1.

    -

    New features in &xslt4j; 2.5.0 include: -

      -
    • integration of the Document Table Model (DTM) with the XSLTC - processor [Henry Zongaro, Morris Kwan] and
    • -
    • integration of the Xalan Interpretive and Xalan Compiled - serializers into a common serializer [Brian Minchau].
    • -
    - These features have been driven by a need to get common behavior, - improve maintainability, reduce duplication of effort for future work, - and in some cases improve performance and conformance.

    -

    Refer to What's New for a description of the new function - and History of software changes for a list of the various - bug fixes and other enhancements in this release.

    -
    - - - -

    &xslt4j; 2.5.D1 was released on March 3, 2003. -

    -

    This developer's release, Xalan-Java 2.5.D1, has changes since 2.4.1 and - is primarily for the purpose of releasing - various bug fixes to the community. These will eventually be released officially in - a future Xalan-Java 2.5 version, along with some new function.

    -

    Fixes in this release include the following:

    -
      -
    • 4858, - 5140, - 6075, - 6157, - 10053, - 10626, - 12481, - 13414, - 13651, - 13774, - 13775, - 13977, - 14112, - 14148, - 14157, - 14178, - 14229, - 14236, - 14237, - 14241, - 14244, - 14300, - 14322, - 14324, - 14365, - 14368, - 14406, - 14578, - 14753, - 14856, - 14862, - 14965, - 15074, - 15094, - 15218, - 15254, - 15373, - 15586, - 16745, - 17030, - 17136
    • -
    • Support for and bundling of Xerces Java 2.3.
    • -
    • Support for and bundling of xml-apis.jar from the tck-jaxp-1_2_0 branch of xml-commons. - This version of the Java APIs for XML Processing successfully passes the JAXP 1.1 and - JAXP 1.2 TCKs.
    • -
    • For a list of &xslt4j; commits, see xalan-cvs@xml.apache.org in the - .
    • -
    -
    - - - -

    &xslt4j; 2.4.1 was released on October 31, 2002 (Halloween!). -

    -
      -
    • Performance fixes and enhancements to address the degradation of performance between Xalan-Java - version 2.3.1 and Xalan-Java 2.4.0.
    • -
    • A prototype implementation of the DOM Level 3 XPath Specification. - The implementation is considered 'experimental' at this time due to the status of the specification. - See the new sample, ApplyXPathDOM for an - example of how to use this API.
    • -
    • Extension changes and enhancements:
    • -
        -
      • Implement canonical namespaces for all Xalan extensions. All extensions - now use namespaces starting with http://xml.apache.org/xalan. The old namespaces are - still supported for backward compatibility. See the updated - extensions documentation for details.
      • -
      • Added new EXSLT extension functions, including the EXSLT dynamic extension functions - max, min, sum, map, evaluate and closure, the EXSLT strings extension functions align, - concat, padding, split and tokenize, and some new extension functions in the math module.
      • -
      • Reorganized the extension functions for new EXSLT extensions. - The implementation of some extension functions (intersection, difference, distinct, - evaluate and tokenize) are moved from the main Extensions class to the corresponding EXSLT modules.
      • -
      • Enable the EXSLT extensions for XSLTC. The EXSLT common, math, sets, dates-and-times and strings - modules can be used in XSLTC.
      • -
      • Integration of the nodeset and redirect extension for XSLTC. You can now use Xalan namespaces for - these extensions in XSLTC.
      • -
      • Enhancement in Java extenion for XSLTC. Three namespace formats (Java, package and class) can all - be used in XSLTC. More type conversion rules are added as well.
      • -
      -
    • Enable support for invoking transformations using the Xalan compiler (XSLTC) via the - Xalan interpretive Process command line. Specifically, the -XSLTC option was added. The - -TT, -TG, -TS, -TTC, -QC, -L, -INCREMENTAL, -NOOPTIMIZE and -RL option do not work in XSLTC mode. All - other existing options can be used with -XSLTC. Additional options were added to enable XSLTC compile - and transform modes: -XO, -XD, -XJ, -XP, -XN, -XX, -XT. See the Process usage statement for more - information on these options.
    • -
    • Fixed SQL Extension problem where a query that returned zero rows would incorrectly - return a JDBC exception.
    • -
    • Fixed a limitation for XPath expressions. The token queue and operations map can now grow - to accomodate really large XPath expressions.
    • -
    • Fixes for the following bugzilla defects: - 4344, - 5046, - 6181, - 6927, - 7161, - 7357, - 8175, - 8473, - 8939, - 9731, - 9959, - 10176, - 10384, - 10414, - 10643, - 11073, - 11341, - 11661, - 11743, - 11809, - 12077, - 12127, - 12298, - 12687, - 13059, - 13303, - 13305, - 13106, - 13501, - 13711, - 13754, - 13863, - 13944, - 14022
    • -
    • Support for and bundling of Xerces Java 2.2.
    • -
    • Support for and bundling of xml-apis.jar from the factoryfinder-build of the RIVERCOURT1 branch of xml-commons. This version of the Java - APIs for XML Processing successfully passes the JAXP 1.1 and JAXP 1.2 TCKs.
    • -
    • For a list of &xslt4j; commits, see xalan-cvs@xml.apache.org in the - .
    • -
    • Support building Xalan with JDK 1.4.
    • -
    -
    - - - -

    &xslt4j; 2.4.0 was released on September 3, 2002. -

    -
      -
    • Fixes for the following bugzilla defects : - 3238, - 4603, - 5013, - 5016, - 5941, - 6071, - 6268, - 6284, - 6356, - 6547, - 6798, - 6833, - 6925, - 6972, - 7023, - 7118, - 7123, - 7157, - 7410, - 7776, - 8324, - 8358, - 8551, - 8894, - 9068, - 9137, - 9146, - 9171, - 9174, - 9179, - 9572, - 9575, - 9683, - 9753, - 10137, - 10306, - 10323, - 10625, - 10715, - 10832, - 10837, - 10839, - 10914, - 10945, - 11123, - 11166, - 11221, - 11345, - 11704, - 11987, - 11828, - 12075
    • . -
    • &xslt4j; now uses a list of supported encodings in a properties file - (org.apache.xml.serializer.Encodings.properties). Fixes Bugzilla 6356. Patch from Sergey Ushakov.
    • -
    • Support for the EXSLT function and result elements, and EXSLT - date-and-time functions.
    • -
    • Improvements to the extensions mechanism to more efficiently handle the detection and analysis of extensions - during the stylesheet "composition" process, and the generation of the required extension handlers during - initialization of the transformation process.
    • -
    • Performance improvement. Instead of looping through the ExtendedType objects, use a hashtable and go - directly to the correct object.
    • -
    • Separation of source and messages. Messages have been moved into property files for easier localization.
    • -
    • XSLTC version upgraded from 1.0 to 1.2.
    • -
    • Support for and bundling of Xerces Java 2.1.
    • -
    • Support for and bundling of xml-apis.jar from the RIVERCOURT1 branch of xml-commons. This version of the Java - APIs for XML Processing successfully passes the JAXP 1.1 and JAXP 1.2 TCKs.
    • -
    • For a list of &xslt4j; commits, see xalan-cvs@xml.apache.org in the - .
    • -
    -
    - - -
      -
    • Xalan Java 2 is integrated with release 2 of &xml4j;. &xslt4j-current; does not include support for the deprecated &xslt4j; 1 compatability API. - The &xslt4j; 1 compatability code does NOT compile with &xml4j2;.

    • -
    • The SQL extension samples continue to use InstantDB, but based on our realization of changes - that have occurred in the licensing of InstantDB, we no longer include InstantDB and the associated sample database with our distibution. - We do, however, provide information on how to set up InstantDB to support our SQL - extension samples.

    • -
    • Documentation updates: We have subdivided the release notes into multiple files to accelerate HTML document loading, and we have added a - document on Transform features.

    • -
    • If an attempt is made to coerce a different namespace onto a prefix already in use in xsl:attribute, the attribute will come out - in the wrong namespace. Workaround: either provide an NCName instead of a QName for the attribute, or provide a QName with a prefix not - used elsewhere.

    • -
    • Handling xsl:namespace-alias declarations: In release 2.0.D01, we reported the need to do some research concerning exactly how &xslt; - should handle xsl:namespace-alias declarations. As a result of discussions among members of the W3C Working Group on XSL, we have reached a - more precise consensus on how namespaces should be represented when an xsl:namespace-alias declaration is in effect.

      - If a literal result element has a namespace prefix, the prefix will be preserved and the namespace URI of the element will be as - specified in the xsl:namespace-alias element, but the result-prefix is not required to appear in the result. This also applies to the - two other cases of "Literal namespace URI" mentioned in the XSLT Recommendation on - Literal Result Elements. More simply, if the stylesheet calls for - <axsl:foo> to be output as a literal result element, then it will be output as <axsl:foo> in the result, but the namespace - associated with this "axsl" prefix will be as designated in the xsl:namespace-alias declaration.

    • -
    • For HTML output, &xslt4j2; outputs character entity references (&copy; etc.) for the special characters designated in - Appendix A. DTDs of the XHTML 1.0: The Extensible HyperText Markup - Language. &xslt4j; 1.x, on the other hand, outputs literal characters for some of these special characters.

    • -
    • In conformance with the XSLT Recommendation on the HTML - Output Method and Section B.2.1 of the HTML 4.0 - Recommendation, &xslt4j2; uses %hh encoding for each byte of the UTF-8 representation of non-ASCII characters in HTML URI - attributes.

    • -
    • When your stylesheet asks for an explicit carriage-return character (&#13;) to be inserted into the output, it is output during - the serialization process in escaped form unless escaping has been disabled. When your stylesheet asks for an explicit line-feed character - (&#10;) to be output, the system-default line-break character(s) is/are output during the serialization process. Also keep in mind that - the XML parser normalizes line-breaks to line-feeds when it sends character events to the processor.

    • -
    • If your XML input is a DOM, use the javax.xml.parsers.DocumentBuilderFactory setCoalescing() method to set coalescing to true (it is - false by default), if you want to append CDATA sections to adjacent text sections to form a single text node (as the XPath standard calls - for), and if the XML parser supports this feature (&xml4j-used; does not).

    • -
    • When you traverse the namespace axis for a collection of element nodes, &xslt4j; includes one namespace node for each namespace in scope - for one or more of the nodes in that collection. The XPath expression does not return additional (redundant) namespace nodes for each element - for which the namespace nodes are in scope.

    • -
    • See Bugzilla bug 2291 for a discussion of issues surrounding - use of the default character encoding to read META-INF/Services.

    • -
    • As Bugzilla bug 1800 reports, the Transformer does not get the - setTransformState event until after the startDocument event. This could present a problem for tools developers, and we do intend to fix this - bug.
    • -
    -
    - - - - -
    diff --git a/stylebook/sources/xalan/resources.xml b/stylebook/sources/xalan/resources.xml deleted file mode 100644 index 3ea604d27..000000000 --- a/stylebook/sources/xalan/resources.xml +++ /dev/null @@ -1,203 +0,0 @@ - - - - %externalEntity; - - - - - - ]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/sources/xalan/samples.xml b/stylebook/sources/xalan/samples.xml deleted file mode 100644 index 6bb8897b2..000000000 --- a/stylebook/sources/xalan/samples.xml +++ /dev/null @@ -1,713 +0,0 @@ - - - - - - -

    &xslt4ji; samples:

    -
      -
    • SimpleTransform
    • -
    • UseStylesheetPI
    • -
    • UseStylesheetParam
    • -
    • SAX2SAX
    • -
    • DOM2DOM
    • -
    • Pipe
    • -
    • UseXMLFilters
    • -
    • AppletXMLtoHTML
    • -
    • Extensions
    • -
    • Trace
    • -
    • Validate
    • -
    • trax (JAXP transform samples)
    • -
    • TransformThread
    • -
    • ApplyXPath
    • -
    • ApplyXPathDOM
    • -
    • ApplyXPathJAXP
    • -
    • XPathResolver
    • -
    • ExtensionFunctionResolver
    • -
    -

    &xslt4ji; servlet samples:

    -
      -
    • servlet
    • -
    -

    &xslt4jc-long; samples:

    -
      -&xsltcsampleshead; -
    - -

    Each of the subdirectories in the &xslt4j; java/samples directory - contains the source files for one or more sample applications. The class - files for the samples are in the following jar files:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    JAR fileContent
    xalansamples.jarEverything except the &xslt4ji; servlet sample and some - &xslt4jc-short; samples
    xalanservlet.jar&xslt4ji; servlet sample
    xsltcapplet.jar&xslt4jc-short; applet sample
    xsltcbrazil.jar&xslt4jc-short; Brazil server sample
    xsltcejb.jar&xslt4jc-short; EJB sample
    xsltcservlet.jar&xslt4jc-short; servlet sample
    -

    With most of the samples, you can use the following procedure:

    -
      -
    1. Be sure xalan.jar, serializer.jar, xml-apis.jar, the appropriate samples JAR file, - and &xml4j-jar; are on the system class path. For the extension examples, bsf.jar - and (for the JavaScript extensions) js.jar must also be on the class path.
    2. -
    3. Be sure the java executable is on your path.
    4. -
    5. Go to the samples subdirectory containing the sample (use the DOS shell if you are running Windows).
    6. -
    7. Run the sample from the command line (as indicated below).
    8. -
    9. Examine the application source files. You may also want to modify the source files. Remember that if you - modify a java file, you must recompile the class and place it on the classpath before you can run the - modified application.
    10. -
    -

    The basic command line for running most of the samples is

    -

    java classname args

    -

    where classname is the sample class and args are the arguments, if any. As described in - the following sections, some samples take no arguments. The UseStylesheetParam sample takes an - additional argument. Several samples in extensions use the &xslt4j; - command-line utility, so they take arguments for the XML source - file and the XSL stylesheet.

    -
    - - - -

    What it does: The SimpleTransform class uses the birds.xsl stylesheet to transform birds.xml, and prints the - output to birds.out.

    -

    You can run it from the SimpleTransform subdirectory with

    -

    java SimpleTransform

    -
    - - - -

    What it does: The UseStylesheetPI class uses the stylesheet processing instruction in the XML source document to determine - which stylesheet to use to perform the transformation.

    -

    You can run it from the UseStylesheetPI subdirectory with

    -

    java UseStylesheetPI

    -

    For more information, see Working with embedded stylesheets.

    -
    - - - -

    What it does: The UseStyleSheetParam class uses foo.xsl and a stylesheet parameter to transform foo.xml, - and prints the output to System.out. The stylesheet parameter appears as a text node in the output.

    -

    Run this sample from the UseStylesheetParam subdirectory with

    -

    java UseStylesheetParam param

    -

    where param is the stylesheet parameter value (a string of your choice).

    -
    - - - -

    What it does: Explicitly sets the SAX XMLReader and SAX ContentHandler for processing the stylesheet (birds.xsl), processing the XML input (birds.xml), and producing the output (birds.out).

    -

    Run this sample from the SAX2SAX subdirectory with

    -

    java SAX2SAX

    -
    - - - -

    What it does: the DOM2DOM class uses the birds.xsl stylesheet to transform a DOM Document generated from birds.xml, - produces an output DOM, and traverses the DOM, printing the traversal to System.out. In contrast to SimpleTransform, - DOM2DOM illustrates the procedure for processing an input DOM and creating an output DOM that is available for - further processing.

    -

    You can run it from the DOM2DOM subdirectory with

    -

    java DOM2DOM

    -
    - - - -

    What it does: Pipes the output from one transformation to a second transformation, then from the second - transformation to the third transformation. Transformer1 is the ContentHandler for the XMLReader (which parses the - input document). Transformer2 provides the ContentHandler for Transformer1, and Transformer3 for Transformer2.

    - Pipe and UseXMLFilters illustrate two strategies for using the output of one transformation as the input for - another transformation. The Pipe sample incorporates a "push" model -- Transformer1 "pushes" its output to - Transformer2, and so on -- whereas in the UseXMLFilters sample, Transformer3 "pulls" its input from Transformer2, - and so on. -

    Run this sample from the Pipe subdirectory with

    -

    java Pipe

    -
    - - - -

    What it does: Chains together the same transformations as the preceding Pipe sample. Using each Transformer - object as an extension of the SAX XMLFilter interface, sets the XMLReader as the parent of filter1, - filter1 as the parent of filter2, and filter2 as the parent of of filter3.

    -

    xmlfilters.gif

    -

    Run this sample from the UseXMLFilters subdirectory with

    -

    java UseXMLFilters

    -
    - - - -

    This applet uses a stylesheet to transform an XML document into HTML. It displays the XML document, the - stylesheet, and the HTML output.

    -

    How to run it: Open appletXMLtoHTML.html in the Internet Explorer 5 browser.

    - For information about running &xslt4j; applets in Netscape Communicator, see Problems - with Netscape.

    - This applet looks for xalan.jar and serializer.jar in the build directory, or the top level directory, and xml-apis.jar and - xercesImpl.jar in the lib subdirectory. If you have placed these JAR files elsewhere, adjust the applet archive setting in - client.html accordingly.
    -
    - - - -

    For a general introduction, see Using &xslt4j; in a servlet.

    -

    The servlet subdirectory contains four sample servlets and one JSP that use &xslt4j; to perform transformations. The sample - code is compiled and packed in xalanservlet.war. To run these samples, you must place - xalanservlet.war on a web server with a servlet engine. For example, using jakarta-tomcat 4.1.*. - Copy the xalanservlet.war to %Tomcat_Home%/webapps. For more details about deploying - servlets on Tomcat, please refer to Deployment Organization.

    - Dependency on Tomcat version. If encountering "java.lang.VerifyError: Cannot inherit from final class" error, - replace xercesImpl.jar under %Tomcat_Home%/common/endorsed with the one included with &xslt4j; . -

    servlet.SimpleXSLTServlet applies a particular stylesheet to a particular - XML document.

    -

    servlet.UseStylesheetParamServlet sets a stylesheet parameter - (the parameter name is hardwired into the servlet), and requires the user to supply parameters for the - XML document and XSL stylesheet.

    -

    jspSample.jsp is a Java ServerPage that sets a stylesheet parameter and applies the - stylesheet to the XML document.

    -

    servlet.XSLTServletWithParams accepts parameters for the XML document, - the XSL stylesheet, and any number of stylesheet parameters.

    -

    servlet.ApplyXSLT (and associated classes) is closer to a production level servlet. It accepts parameters, provides a - listener for capturing and reporting debugger messages, and supports use of a property file to determine which - stylesheet to apply based on the identity of the client browser/device.

    - - -

    What it does: servlet.SimpleXSLTServlet applies the birds.xsl stylesheet to birds.xml - and returns the transformation result to the HTTP client.

    -

    To run this servlet: set up an HTML page to call the servlet as - follows:

    - -
    - - Paul Campbell <seapwc@halcyon.com> wrote this servlet and the following explanatory text. - Thank you, Paul! -

    What it does: The client (perhaps an HTML form) specifies an XML document, a stylesheet, and a value to be passed - to the stylesheet for a stylesheet parameter named "param1". The servlet performs the transformation and returns - the output to the client. The client must specify which stylesheet (containing a "param1" stylesheet parameter") - and XML file are to be used or use sample files fooparam.xml and fooparam.xsl.

    -

    How to run it: set up an HTML client to call the servlet with arguments along the lines of

    - -

    In the doGet() method, the servlet obtains the PVAL value "GoodBye" from the servlet request and passes it to the - stylesheet as the paramValue argument in a Transformer setParameter() call:

    -

    String paramValue = httpServletRequest.getParameter("PVAL");
    - ...
    - transformer.setParameter("param1", paramValue);

    -

    The result is returned to the client:

    -

    <html><body><p>GoodBye</p></body></html>

    -
    - - Paul Campbell <seapwc@halcyon.com> wrote this Java Server Page. -

    This Java Server Page performs essentially the same operation as - servlet.UseStylesheetParamServlet. It applies a stylesheet parameter - to a stylesheet (fooparam.xsl), applies the stylesheet to an XML source document (fooparam.xml), and returns the - result.

    -

    Call JSP as follows:

    - -

    The JSP obtains the PMA value "GoodBye" from the http request and passes it to the stylesheet as the - paramValue argument in a Transformer setParameter() call.

    -
    - -

    What it does: servlet.XSLTServletWithParams takes parameters in the request -- a URL parameter for - the XML input document URL and an xslURL parameter for the stylesheet URL.

    -

    To use XSLTServletWithParams to perform the same transformation as SimplestServlet: - use birds.xsl and birds.xml as examples. Set up an HTML page to call the servlet as follows:

    - -

    If the XML document contains an associated stylesheet (a stylesheet Processing Instruction) that you want to use, simply omit the - xslURL parameter.

    -

    If the stylesheet takes stylesheet parameters, you can include them in the URL. For example to set the param1 - stylesheet parameter to foo, include param1=foo in the URL.

    -
    - -

    What it does: The client (which you must set up) specifies an XML document and a stylesheet. The servlet - performs the transformation and returns the output to the client. You can use media.properties to specify - which stylesheet is to be used depending on the client browser/device.

    - The source files for this servlet, including ApplyXSLT.java, ApplyXSLTProperties.java, DefaultApplyXSLTProperties.java, - ApplyXSLTListener.java, ApplyXSLTException.java. booklist1.xsl, booklist2.xsl and catalog.xml, - are provided for testing. -

    To run the servlet: set system property server.root=server root. Set up an HTML page to call - servlet.ApplyXSLT with arguments as illustrated below.

    -

    The files catalog.xml, booklist1.xsl and booklist2.xsl are used in the following example. - In the deployment descriptor, booklist1.xsl is set as the default xsl file. If you create these - files yourself, make sure that you set the output method to "xml" in the stylesheet.

    -

    Examples:

    - - - ...applies the booklist2.xsl stylesheet to the catalog.xml data. Both files are
    - served from the Web server's HTTP document root.

    - - ...ensures that XML and XSL processor messages are returned in the event of problems - applying booklist2.xsl to catalog.xml

    - - ...applies the booklist2.xsl stylesheet to the catalog.xml data, just like the first example. - This is an alternative way of specifying the XML XSLTInputSource by utilizing the HTTP request's path - information.

    - - ...examines catalog.xml for an associated XSL stylesheet booklist1.xsl (a stylesheet Processing Instruction). If multiple XSLs are associated with the data, the stylesheet whose media attribute maps to your browser type will be chosen. If no mapping is successful, the primary associated stylesheet is used.

    -
    -
    -
    - - - -

    For an introduction to the creation and use of extension elements and extension functions, and - for information about the extensions library distributed with the &xslt4j; Interpretive processor, - see Extensions. Extensions are also supported for the &xslt4j; - Compiling processor (XSLTC), however no samples exist at this time. See - Extensions for XSLTC.

    -
      -
    • 1-redir
    • -
    • 2-basicJscript
    • -
    • 3-java-namespace
    • -
    • 4-numlistJava
    • -
    • 5-numlistJScript
    • -
    • SQL library extensions
    • -
    -

    The extensions subdirectory contains six samples with &xslt4j; Interpretive extensions. Two of the samples use - extensions implemented in JavaScript, and four of the samples use extensions implemented in Java.

    -

    To run these examples, you must place bsf.jar and js.jar (version 1.5, available from - http://www.mozilla.org/rhino) on the classpath. - You do not need js.jar on the classpath for the samples that use Java extensions. - Problems related to JDK 1.4 or higher.

    -

    Use java.org.apache.xalan.xslt.Process, the &xslt4j; command-line utility, to run most of these samples from - the command line. The command line must include an -in flag with the - XML source and an -xsl flag with the XSL stylesheet. If you want the output to be written to a file, rather - than to the screen, add an -out flag with the output file name.

    -

    Run these samples from the extensions directory as follows (each of the following is a single command - line):

    - - - -

    What it does: Uses the Redirect extension elements shipped with &xslt4j; to direct output to two output - files.

    -

    Run this sample from the extensions subdirectory with

    -

    java org.apache.xalan.xslt.Process -in 1-redir.xml
    -   -xsl 1-redir.xsl

    -

    The standard (non-redirected) output is written to the screen. The redirected output is written to 1-redir-out, or - whatever filename you assign to the doc/foo @file attribute in 1-redir.xml. The stylesheet gets the file name for - redirected output from the XML input file.

    -
    - - - -

    What it does: Uses an extension element and extension function implemented in JavaScript to compute a - deadline for responding to a customer inquiry.

    - js.jar must be on the classpath. -

    Run this sample from the extensions subdirectory with

    -

    java org.apache.xalan.xslt.Process -in 2-basicJscript.xml -
      -xsl 2-basicJscript.xsl

    -
    - - - -

    What it does: Uses extension functions to format dates. This sample illustrates use of the predefined java - extension namespace to provide ready access to extensions implemented in Java.

    -

    Run this sample from the extensions subdirectory with

    -

    java org.apache.xalan.xslt.Process -in 3-java-namespace.xml -
      -xsl 3-java-namespace.xsl

    -
    - - - -

    What it does: Uses a Java extension to transform a set of name elements into a numbered and alphabetized - list.

    -

    Run this sample from the extensions subdirectory with

    -

    java org.apache.xalan.xslt.Process -in numlist.xml -
      -xsl 4-numlistJava.xsl

    -
    - - - -

    What it does: Uses a JavaScript extension to transform a set of name elements into a numbered and - alphabetized list. This sample performs the same operations as the preceding Java extension.

    - js.jar must be on the classpath. -

    Run this sample from the extensions subdirectory with

    -

    java org.apache.xalan.xslt.Process -in numlist.xml -
      -xsl 5-numlistJscript.xsl

    -
    -
    - - - -

    The SQL library - extension enables you to execute SQL queries from within a stylesheet, - and to incorporate query result sets in the XML output. - To use the SQL library, you need a JDBC driver, the underlying DBMS, - and a database.

    -

    Our samples use Apache Derby DBMS, but the SQL Extensions and sample code - can be configured to query data from any DBMS that can be accessed through - JDBC.

    - - - -

    To run the SQL library extension samples, do the following:

    -

    The SQL Extension examples require the Apache Derby jars. - The Derby jars are available from - http://db.apache.org/derby/.

    -

    The sample batch/script files are configured to look for the - derby jars in the xml-xalan/java/samples/extensions/sql directory by default.

    -

    If you already have derby installed and want to use that implementation. - You can do one of the following.

    -
      -
    1. set the environment variable DERBY_JAR_DIR to point to the location of derby.jar and derbytools.jar
    2. -
    3. have the derby.jar and derbytools.jar in your classpath.
    4. -
    -

    First create the sample database using Derby. To do this,

    -
    • on Windows, execute the command
      runDerby.bat createdb.sql
    • -
    • on Unix, execute the command
      sh runDerby.sh createdb.sql
    • -
    -

    You can use the Derby tools to examine the raw database. To do this,

    -
      -
    • on Windows execute the command
      - runDerby.bat
      - At the lj> prompt type the following commands:
      - lj> connect 'sampleDB';
      - lj> select * from import1;

      - To quit the lj session type
      - lj> quit;
      -
    • -
    • To Start lj on Unix type
      - sh runDerby.sh

    • -
    -

    Once the sample database has been created, you can run the sample - stylesheets using the runXalan script.

    -
    - - - -
      -
    • The Details - Dump SQL
    • -
    • Basic Connections
    • -
    • ExternalConnection
    • -
    • Parameterized query
    • -
    • Streamable
    • -
    • Show-error
    • -
    -
    - - - -

    The Dump SQL example is used to show what data is available to the XSLT process.

    -

    To run the DumpSQL Example, execute the following command
    - runXalan.bat -XSL basic-connection/DumpSQL.xsl

    -

    Dump SQL should produce the following output:

    - - <sql> - <metadata> - <column-header searchable="true" writable="false" signed="true" - nullable="true" definitely-writable="false" case-sensitive="false" - table-name="IMPORT1" schema-name="" scale="0" precision="10" - column-typename="INTEGER" column-type="4" column-display-size="11" - catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID"></column-header> - <column-header searchable="true" writable="false" signed="false" - nullable="true" definitely-writable="false" case-sensitive="true" - table-name="IMPORT1" schema-name="" scale="0" precision="40" - column-typename="VARCHAR" column-type="12" column-display-size="40" - catalogue-name="" column-label="NAME" column-name="NAME"></column-header> - </metadata> - <row-set> - <row> - <col searchable="true" writable="false" signed="true" - nullable="true" definitely-writable="false" case-sensitive="false" - table-name="IMPORT1" schema-name="" scale="0" precision="10" - column-typename="INTEGER" column-type="4" column-display-size="11" - catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID">1</col> - <col searchable="true" writable="false" signed="false" - nullable="true" definitely-writable="false" case-sensitive="true" - table-name="IMPORT1" schema-name="" scale="0" precision="40" - column-typename="VARCHAR" column-type="12" column-display-size="40" - catalogue-name="" column-label="NAME" column-name="NAME">toothpaste</col> - </row> - <row> - <col searchable="true" writable="false" signed="true" - nullable="true" definitely-writable="false" case-sensitive="false" - table-name="IMPORT1" schema-name="" scale="0" precision="10" - column-typename="INTEGER" column-type="4" column-display-size="11" - catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID">2</col> - <col searchable="true" writable="false" signed="false" - nullable="true" definitely-writable="false" case-sensitive="true" - table-name="IMPORT1" schema-name="" scale="0" precision="40" - column-typename="VARCHAR" column-type="12" column-display-size="40" - catalogue-name="" column-label="NAME" column-name="NAME">milk</col> - </row> - <row> - <col searchable="true" writable="false" signed="true" - nullable="true" definitely-writable="false" case-sensitive="false" - table-name="IMPORT1" schema-name="" scale="0" precision="10" - column-typename="INTEGER" column-type="4" column-display-size="11" - catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID">3</col> - <col searchable="true" writable="false" signed="false" - nullable="true" definitely-writable="false" case-sensitive="true" - table-name="IMPORT1" schema-name="" scale="0" precision="40" - column-typename="VARCHAR" column-type="12" column-display-size="40" - catalogue-name="" column-label="NAME" column-name="NAME">bread</col> - </row> - <row> - <col searchable="true" writable="false" signed="true" - nullable="true" definitely-writable="false" case-sensitive="false" - table-name="IMPORT1" schema-name="" scale="0" precision="10" - column-typename="INTEGER" column-type="4" column-display-size="11" - catalogue-name="" column-label="PRODUCTID" column-name="PRODUCTID">4</col> - <col searchable="true" writable="false" signed="false" - nullable="true" definitely-writable="false" case-sensitive="true" - table-name="IMPORT1" schema-name="" scale="0" precision="40" - column-typename="VARCHAR" column-type="12" column-display-size="40" - catalogue-name="" column-label="NAME" column-name="NAME">cereal</col> - </row> - </row-set> - </sql> - - -
    - - - -

    Contributed by John Gentilin (johnglinux@eyecatching.com).

    -

    What it does: illustrates two strategies for connecting to a database, executing a - static query, and returning the query result.

    -

    The first strategy is to get connection information along with the static query from - the stylesheet (dbtest.xsl)\ in the form of stylesheet parameters.

    -

    The second strategy is to get connection information from a nodeset in an XML source - document (dbInfo.xml).

    -

    Set up the database, and run this sample from the - extensions/sql/ directory.

    -

    1. To get connection information from the stylesheet:

    - runXalan -xsl basic-connection/dbtest.xsl -out import1.html -

    2. To get connection information in the form of a nodeset from the XML source document:

    - runXalan -in dbinfo.xml -xsl dbtest-cinfo.xsl -out import1.html -
    - - - -

    Contributed by John Gentilin (johnglinux@eyecatching.com).

    -

    What it does: The ExternalConnection classes uses the default implementation of the - ConnectionPool interface to create a pool of connections. A stylesheet in turn uses a - connection from this pool to instantiate an XConnection object and connect to a datasource.

    -

    The stylesheet uses this named connection pool to instantiate an XConnection object and - connect to the datasource. The ExternalConnection class is in xalansamples.jar.

    -

    Set up the database, be sure xalanxamples.jar is on the - class path, and run this sample from the extensions/sql directory:

    - runExtConnection ext-connection/dbtest.xsl -

    ExternalConnection creates the ConnectionPool, and performs a transformation with dbtest.xsl, - which draws from the pool to instantiate an XConnection object, connect to the datasource, - execute a static query, and return the query result.

    -
    - - - -

    Contributed by John Gentilin (johnglinux@eyecatching.com).

    -

    What it does: connects to a datasource, executes a parameterized query, and returns - the result. The XML source document provides the parameter value as well as the connection - information. The parameter value is in a node in the XML source.

    -

    The stylesheet gets the required connection and parameter information from the XML source, - sets up and executes the parameterized query, and retuns the query result set.

    -

    Set up the database, and run this sample from the sql subdirectory:

    - runXalan -in pquery/dbinfo.xml -xsl pquery/dbtest.xsl -out import1.html -
    - - - -

    Contributed by John Gentilin (johnglinux@eyecatching.com).

    -

    What it does: Illustrates enabling and disabling of a streamable result set returned by a query.

    -

    With a streamable result set, you can create a query that will return many rows but the - result will only consume the amount of memory to represent a single row. As a benefit, - you can perform transformations on large amounts of data while maintaining a low memory profile. - On the down side, when you use streaming, you can NOT, visit previous nodes because the SQL - extension only supports unidirectional cursors. If you requires that the whole query be available - so that you can apply templates to previous rows, just disable caching.

    -

    Set up the database, and run these samples from the sql subdirectory.

    -

    1. An example where streaming is disabled:

    - runXalan -in streamable/dbinfo.xml -xsl streamable/cachedNodes.xsl -out import1.html -

    2. An example where streaming is enabled

    - runXalan -in streamable/dbinfo.xml -xsl streamable/streamNodes.xsl -out import1.html -

    3. This example performs a pivor function swaping rows and columns, streaming is - required to be disabled here.

    - runXalan -in streamable/dbinfo.xml -xsl streamable/pivot.xsl -out import1.html -
    - - - -

    Contributed by John Gentilin (johnglinux@eyecatching.com).

    -

    What it does: use the SQL library ExtensionError class to return an error message - in the output stream. The stylesheet calls a template with a select statement that - returns a nodeset when an error occurs.

    -

    Set up the database, and run this sample from the extensions/sql subdirectory:

    -

    1. An example where we specify invalid connection information:

    - runXalan -in show-error/dbinfo.xml -xsl show-error/invalidConn.xsl -out import1.html -

    2. An example where we specify invalid parameters to a parameterized query:

    - runXalan -in show-error/dbinfo.xml -xsl show-error/invalidPQuery.xsl -out import1.html -

    3. An example where we specify an invlaid query:

    - runXalan -in show-error/dbinfo.xml -xsl show-error/invalidQuery.xsl -out import1.html -
    -
    - - - -

    What it does: Trace uses the TraceListener and TraceManager classes to log transformation events.

    -

    Run this sample from the Trace subdirectory with

    -

    java Trace

    -

    and examine the result in events.log. Additionally, run this sample from the extensions subdirectory with

    -

    java Trace 3-java-namespace

    -

    for the trace of a stylesheet with extensions. For more information, see Debugger Interface

    -
    - -
      -
    • ValidateXMLInput
    • -
    • Validate utility
    • -
    - -

    What it does: Uses SAXParserFactory to turn on validation, and - XMLReader to parse the XML input and report errors and warnings to a SAX event - handler. The XML input (birds.xml) contains an internal DOCTYPE declaration, and a few minor document type violations, which you are - invited to fix, add to, and vary in any way you find useful.

    -

    Run this sample from the Validate subdirectory with

    -

    java ValidateXMLInput

    -
    - -

    What it does: Uses the JAXP SAXParser with a SAX event handler - (extends DefaultHandler and implements - LexicalHandler) to verify that XML files conform to their declared - document type. You can use this utility to verify that an individual file or all the .xml files in a directory are - well-formed and valid. Each .xml file should contain a DOCTYPE declaration.

    -

    Run this sample from any directory with

    -

    java Validate file-or-dir-name [logfile]

    -

    where file-or-dir-name is an XML file or directory pathname, and logfile designates a log. - If you omit the second argument, Validate reports its findings to the screen.

    - A limitation: Files containing document parts appear to fail if you check them with Validate. Check readme.xml, - which "includes" by entity reference a number of files, and it passes. The parse operation scans the entire document - with the includes. Check an "included" file (such as history.xml) as if it were an independent document and it fails. -
    -
    - - - -

    What it does: runs a number of samples illustrating uses of the JAXP transform interfaces.

    -

    Run this sample from the trax subdirectory with

    -

    java Examples

    -

    and examine the source in Examples.java and ExampleContentHandler.java.

    -
    - - - -

    What it does: spawns multiple threads, with each thread running two transformations on two different XML files.

    -

    Run this sample from the TransformThread subdirectory with

    -

    java TransformThread

    -

    and examine the source in TransformThread.java. A more detailed description along with configuration options are listed in the header.

    -
    - - - -

    What it does: ApplyXPath uses the convenience methods in the &xslt4j2; specific XPathAPI to - execute an XPath expression against an XML document and return the nodes (if any) it finds.

    - You can use this sample as an aid when you want to find out what a given XPath expression returns from a - given XML file. Keep in mind that the context node (base point of evaluation) for the XPath expression is the document - root. -

    Run this sample from the ApplyXPath subdirectory with

    -

    java ApplyXPath XMLFile XPathExpression

    -

    where XMLFile is an XML source file and XPathExpression is an XPath expression to - apply to that file. The ApplyXPath subdirectory contains an XML file named foo.xml --
    -      <doc><name first="David" last="Marston"/>...</doc>
    -- so you can try command - lines like

    -

    java ApplyXPath foo.xml /

    -

    and

    -

    java ApplyXPath foo.xml /doc/name/@first

    -

    For more information, see Working with XPath expressions.

    -
    - - - -

    What it does: ApplyXPathDOM is very similar to the ApplyXPath sample, but it uses the API - in the DOM Level 3 XPath - Specification to execute an XPath expression against an XML document and return - the nodes (if any) it finds.

    - You can use this sample as an aid when you want to find out what a given XPath expression returns from a - given XML file. Keep in mind that the context node (base point of evaluation) for the XPath expression is the document - root. -

    Run this sample from the ApplyXPathDOM subdirectory with

    -

    java ApplyXPathDOM XMLFile XPathExpression

    -

    where XMLFile is an XML source file and XPathExpression is an XPath expression to - apply to that file. The ApplyXPathDOM subdirectory contains an XML file named foo.xml --
    -      <doc><name first="David" last="Marston"/>...</doc>
    -- so you can try command - lines like

    -

    java ApplyXPathDOM foo.xml /

    -

    and

    -

    java ApplyXPathDOM foo.xml /doc/name/@first

    -

    For more information, see Working with XPath expressions.

    -
    - - - -

    What it does: ApplyXPathJAXP is similar to the ApplyXPath sample, but it uses the XPath API in &jaxp13-short; - to evaluate an XPath expression against an XML document and return the evaluation result in the specified type.

    -

    Run this sample from the XPathAPI subdirectory with

    -

    java ApplyXPathJAXP XMLFile XPathExpression ReturnType

    -

    where XMLFile is an XML source file, XPathExpression is an XPath expression to - apply to that file, and ReturnType is one of the strings from the list {"num", "bool", "str", "node", "nodeset"} - designating the return type of the evaluation. The XPathAPI subdirectory contains an XML file named - foo.xml. So you can try command lines like

    -

    java ApplyXPathJAXP foo.xml /doc/name[1]/@last str

    -

    and

    -

    java ApplyXPathJAXP foo.xml /doc/name nodeset

    -
    - - - -

    What it does: XPathResolver provides sample implementations of the NamespaceContext, XPathFunctionResolver - and XPathVariableResolver interfaces described in the - JAXP 1.3 XPath API. - The sample demonstrates how these implementations can be used to to evaluate XPath expressions that contain - extension functions and references to variables.

    -

    Run this sample from the XPathAPI subdirectory with

    -

    java XPathResolver

    -
    - - - -

    What it does: ExtensionFunctionResolver demonstrates how to use the sample implementation of XPathFunctionResolver to - evaluate XPath expressions containing Java or EXSLT extension functions.

    -

    To run this sample from the XPathAPI subdirectory, you need to compile ExtensionTest.java first and put - the XPathAPI directory on your classpath. Run the sample using

    -

    java ExtensionFunctionResolver

    -
    - - &xsltcsamples; -
    diff --git a/stylebook/sources/xalan/trax.xml b/stylebook/sources/xalan/trax.xml deleted file mode 100644 index bbee8a269..000000000 --- a/stylebook/sources/xalan/trax.xml +++ /dev/null @@ -1,274 +0,0 @@ - - - - - -
      -
    • Introduction
    • -
    • General Terminology
    • -
    • Model
    • -
    • Patterns
    • -
    - -

    This document describes the transformation API for XML (TrAX), the set of APIs contained in - javax.xml.transform, javax.xml.transform.stream, javax.xml.transform.dom, and javax.xml.transform.sax.

    - -

    There is a broad need for Java applications to be able to transform XML - and related tree-shaped data structures. In fact, XML is not normally very - useful to an application without going through some sort of transformation, - unless the semantic structure is used directly as data. Almost all XML-related - applications need to perform transformations. Transformations may be described - by Java code, Perl code, XSLT - Stylesheets, other types of script, or by proprietary formats. The inputs, one - or multiple, to a transformation, may be a URL, XML stream, a DOM tree, SAX - Events, or a proprietary format or data structure. The output types are - pretty much the same types as the inputs, but different inputs may need to be - combined with different outputs.

    - -

    The great challenge of a transformation API is how to deal with all the - possible combinations of inputs and outputs, without becoming specialized for - any of the given types.

    - -
    - - -

    This section will explain some general terminology used in this - document. Technical terminology will be explained in the Model section. In many - cases, the general terminology overlaps with the technical terminology.

    - - - -This term, 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. - - -One or more trees that are the inputs to the - transformation. - - -One or more trees that are the output of the - transformation. - - - - -The process of consuming a stream or tree to produce - another stream or tree. - - - - -The process of transformation from a source to a result, - making as few structural changes as possible and no informational changes. The - term is somewhat loosely used, as the process is really a copy from one - "format" (such as a DOM tree, stream, or set of SAX events) to - another. - - - - -The process of taking a tree and turning it into a stream. In - some sense, a serialization is a specialized transformation. - - - - -The process of taking a stream and turning it into a tree. In - some sense, parsing is a specialized transformation. - - - - -A Transformer is the object that executes the transformation. - - - - - -Describes the transformation. A form of code, script, or - simply a declaration or series of declarations. - - - - -The same as "transformation instructions," except it is - likely to be used in conjunction with XSLT. - - - - -Another form of "transformation instructions." In the TrAX - interface, this term is used to describe processed or compiled transformation - instructions. The Source flows through a Templates object to be formed into the - Result. - - - - -A general term for the thing that may both process the - transformation instructions, and perform the transformation. - - - - - -Document Object Model, specifically referring to the - Specification. - - - -Simple API for XML, specifically referring to the - SAX 2.0 - release. - - -
    - - -

    The section defines the abstract model for TrAX, apart from the details - of the interfaces.

    - -

    A TrAX TransformerFactory is an object - that processes transformation instructions, and produces - Templates (in the technical - terminology). A Templates - object provides a Transformer, which transforms one or - more Sources into one or more - Results.

    - -

    To use the TrAX interface, you create a - TransformerFactory, - which may directly provide a Transformer, or which can provide - Templates from a variety of - Sources. The - Templates object is a processed - or compiled representation of the transformation instructions, and provides a - Transformer. The - Transformer processes a - Source according to the - instructions found in the Templates, and produces a - Result.

    - -

    The process of transformation from a tree, either in the form of an - object model, or in the form of parse events, into a stream, is known as - serialization.

    -
    - -

    The intent, responsibilities, and thread safety of TrAX objects:

    -
      -
    • Processor
    • -
    • TransformerFactory
    • -
    • Templates
    • -
    • Transformer
    • -
    • Source
    • -
    • Result
    • -
    - - - -Generic concept for the - set of objects that implement the TrAX interfaces. - -Create compiled transformation instructions, transform - sources, and manage transformation parameters and - properties. - -Only the Templates object can be - used concurrently in multiple threads. The rest of the processor does not do - synchronized blocking, and so may not be used to perform multiple concurrent - operations. - - - - - -Serve as a vendor-neutral Processor interface for - XSLT and similar - processors. - -Serve as a factory for a concrete - implementation of an TransformerFactory, serve as a direct factory for - Transformer objects, serve as a factory for Templates objects, and manage - processor specific features. - -A TransformerFactory may not perform mulitple concurrent - operations. - - - - - -The runtime representation of the transformation instructions. - -A data bag for transformation instructions; act as a factory - for Transformers. - -Threadsafe for concurrent - usage over multiple threads once construction is complete. - - - - - -Act as a per-thread - execution context for transformations, act as an interface for performing the - transformation. - -Perform the - transformation. - -Only one instance per thread - is safe. - -The Transformer is bound to the Templates - object that created it. - - - - -Serve as a - single vendor-neutral object for multiple types of input. - -Act as simple data holder for System IDs, DOM nodes, streams, - etc. - -Threadsafe concurrently over multiple - threads for read-only operations; must be synchronized for edit - operations. - - - - - -Serve - as a single object for multiple types of output, so there can be simple process - method signatures. - -Act as simple data holder for - output stream, DOM node, ContentHandler, etc. - -Threadsafe concurrently over multiple threads for read-only, - must be synchronized for edit. - - -
    -
    diff --git a/stylebook/sources/xalan/usagepatterns.xml b/stylebook/sources/xalan/usagepatterns.xml deleted file mode 100644 index 5fc77c4ec..000000000 --- a/stylebook/sources/xalan/usagepatterns.xml +++ /dev/null @@ -1,584 +0,0 @@ - - - - - -
      -
    • Basic steps
    • -
    • Plugging in the Transformer and XML parser
    • -
    • Configuring serialization output properties
    • -
    • Caution: setting output encoding in the stylesheet
    • -
    • Performing incremental transformations
    • -
    • Working with embedded stylesheets
    • -
    • Setting stylesheet parameters
    • -
    • Serializing output
    • -
    • Explicitly working with SAX
    • -
    • Using transformation output as input for another transformation
    • -
    • Processing and producing DOM trees
    • -
    • Working with XPath expressions
    • -
    • Using the &xslt4j; applet wrapper
    • -
    • Using &xslt4j; in a servlet
    • -
    • Creating and using extensions
    • -
    • Multithreading
    • -
    • Debugger interface
    • -
    -

    See also: Transform Features.

    -Unless otherwise specified, the usage discussed in this section refers to -the &xslt4j; Interpretive processor. See Getting Started Using -XSLTC for information on using the &xslt4j; Compiling processor.

    - - -
      -
    1. Instantiate a TransformerFactory
    2. -
    3. Process the stylesheet and generate a Transformer
    4. -
    5. Perform the transformation
    6. -
    -

    The following example illustrates the three basic steps involved in performing a transformation.

    - // 1. Instantiate a TransformerFactory. -javax.xml.transform.TransformerFactory tFactory = - javax.xml.transform.TransformerFactory.newInstance(); - -// 2. Use the TransformerFactory to process the stylesheet Source and -// generate a Transformer. -javax.xml.transform.Transformer transformer = tFactory.newTransformer - (new javax.xml.transform.stream.StreamSource("foo.xsl")); - -// 3. Use the Transformer to transform an XML Source and send the -// output to a Result object. -transformer.transform - (new javax.xml.transform.stream.StreamSource("foo.xml"), - new javax.xml.transform.stream.StreamResult( new - java.io.FileOutputStream("foo.out"))); - For a working example of this model at its simplest, see SimpleTransform.java in the java/samples/SimpleTransform subdirectory. -
    - -

    TransformerFactory is an abstract class with a static newInstance() method that instantiates the concrete subclass designated by the javax.xml.transform.TransformerFactory system property.

    -

    The default setting for this system property is org.apache.xalan.processor.TransformerFactoryImpl.

    -
    - -

    The TransformerFactory newTransformer(Source xslSource) method processes the stylesheet Source into a Templates object and returns a Transformer that you can use to perform a transformation (apply the Templates object to an XML Source).

    -

    You may provide the stylesheet Source in the form of a stream of XML markup (StreamSource), a DOM Node (DOMSource), or a SAX InputSource (SAXSource). To specify a StreamSource, you may use a system ID or file name (using URI syntax), a java.io.InputStream, or a java.io.Reader. The use of DOMSource and SAXSource are illustrated in subsequent sections.

    -If you plan to use the stylesheet Source to transform multiple XML Sources, you should use the TransformerFactory newTemplates(Source xslSource) method to explicitly generate a Templates object. For each transformation, use the Templates object to generate a new Transformer. For the details, see Multithreading. -
    - -

    Use the Transformer transform(Source xmlSource, Result transformResult) method to transform the XML Source and place the transformation output in a Result object.

    -

    Just as with the stylesheet, you can supply the XML Source in the form of a StreamSource, DOMSource, or SAXSource. Likewise, the Result may be a StreamResult, DOMResult, or SAXResult.

    -

    For each node in the XML source, the Transformer uses the transformation instructions in the Templates object to determine which template to apply: one of the templates in the Templates object, a default template rule as specified in the XSLT spec, or none.

    -
    - -

    The Java API for XML Processing interfaces enable you to isolate your application from the internal implementation details of a given Transformer, SAX parser, or DOM parser. For each of these objects, there is an abstract Factory class with a static newInstance() method that instantiates a concrete Factory which wraps the underlying implementation. These newInstance() methods use system property settings to determine which implementation to instantiate.

    -

    &xslt4j; is distributed with a system property setting for the &xslt4j; processor. This setting is in xalan.jar in META-INF/services (see src/META-INF/services).

    - - - Setting - - org.apache.xalan.processor.TransformerFactoryImpl - -

    If you are using Xerces, the XML parser factory settings are as follows:

    - - - Setting - - org.apache.xerces.jaxp.DocumentBuilderFactoryImpl - - org.apache.xerces.jaxp.SAXParserFactoryImpl - -

    You can change any of these settings as follows (in order of precedence):

    -
      -
    1. Set the system property from the command line when you launch Java or from within your application.

    2. -
    3. Set the system property in jaxp.properties in the JAVA_HOME/lib directory, where JAVA_HOME is the root of the JDK.

    4. -
    5. Revise the entry in src/META-INF/services and rebuild xalan.jar or &xml4j-jar;, depending on which entry you have changed.

    6. -
    -

    For example, to use the Crimson XML parser in place of the Xerces XML parser, place Crimson on the class path and set the -javax.xml.parsers.SAXParserFactory system property to org.apache.crimson.jaxp.SAXParserFactoryImpl.

    -

    For more information about the mechanism used to determine system property values and how you can plug other implementations into your applications, see "Section 3: Plugability Layer" in the Java API for XML Processing at -JSR-000063 1.1.

    -
    - -

    Output properties for XML, HTML, and text transformation output are defined in property files in the org.apache.xml.serializer package.

    -

    You can override the default value of these properties in your stylesheet by using the attributes of an xsl:output element. -You can override the Xalan specific default settings as follows:

    -
      -
    1. Declare the xalan namespace in your stylesheet element (xmlns:xalan="http://xml.apache.org/xalan").

    2. -
    3. Use the namespace prefix you assign (for example, "xalan") to redefine properties of interest in the stylesheet xsl:output - element (for example, xalan:indent-amount="5").
    4. -
    -

    The following stylesheet fragment declares the xalan namespace and sets indent-amount to 2:

    -<?xml version="1.0" encoding="UTF-8"?> -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:xalan="http://xml.apache.org/xalan"> - - <xsl:output method="xml" - encoding="UTF-8" - indent="yes" - xalan:indent-amount="2"/> -

    If you want to change the property settings globally, edit the values in the property files in src/org/apache/xml/serializer, - and use Ant to rebuild serializer.jar. Be aware that if you change the default value - of a standard property, such as the default encoding value, this may be in conflict with the default value specified by the XSLT 1.0 - recommendation.

    -

    The properties files define the following properties:

    -

    output_xml.properties:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PropertyDefault value
    version1.0
    encodingUTF-8
    indentno
    omit-xml-declarationno
    standaloneno
    media-typetext/xml
    xalan:indent-amount0
    xalan:content-handlerorg.apache.xml.serializer.ToXMLStream
    xalan:entitiesorg/apache/xml/serializer/XMLEntities
    -The xalan:content-handler property specifies the default name of the Java class that implements the -org.xml.sax.ContentHandler -interface and recieves calls during result tree serialization. If you specify an -alternate Java class it must implement the ContentHandler interface. -You can also create your own XML entity file (mapping characters to -entities) or edit src/org/apache/xml/serializer/XMLEntities.properties and -rebuild serializer.jar. -

    output_html.properties:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    PropertyDefault value
    version4.0
    indentyes
    media-typetext/html
    xalan:indent-amount0
    xalan:content-handlerorg.apache.xml.serializer.ToHTMLStream
    xalan:entitiesorg/apache/xml/serializer/HTMLEntities
    xalan:use-url-escapingyes
    xalan:omit-meta-tagno
    -The xalan:content-handler property specifies the default name of the Java class that implements the -org.xml.sax.ContentHandler -interface and recieves calls during result tree serialization. If you specify an -alternate Java class it must implement the ContentHandler interface. -You can also create your own HTML entity file (mapping characters to entities) -or edit src/org/apache/xml/serializer/HTMLEntities.properties and rebuild serializer.jar. -

    output_text.properties:

    - - - - - - - - - - - - - -
    PropertyDefault value
    media-typetext/plain
    xalan:content-handlerorg.apache.xml.serializer.ToTextStream
    -The xalan:content-handler property specifies the default name of the Java class that implements the -org.xml.sax.ContentHandler -interface and recieves calls during result tree serialization. If you specify an -alternate Java class it must implement the ContentHandler interface. -
    - -

    When you use the <xsl:output> encoding attribute to set output character encoding, you should not -use StreamResult(java.io.Writer) to construct a -StreamResult object to hold the transformation result. -If you do, the Writer uses its own encoding rather than the encoding specified in the stylesheet.

    -

    If you want to use a Writer, you can specify an encoding when you create the Writer (java.io.OutputStreamWriter). Once the -Writer exists, you cannot reset the encoding it uses.

    -
    - -

    The DTM (Document Table Model) supports incremental transformations, the incremental generation of the -transformation result while the source document is still being parsed. For more information, see -incremental transformations.

    -You can also enable incremental transformations with the command-line utility by including the -INCREMENTAL flag. -
    - -

    An XML Source may include an xml-stylesheet processing instruction which identifies the stylesheet to be used to process the document. As indicated by the processing instruction href attribute, the stylesheet itself may be embedded in the XML document or located elsewhere.

    -

    Suppose you have an XML document (foo.xml) with the following xml-stylesheet processing instruction:

    -

    <?xml-stylesheet type="text/xml" href="foo.xsl"?>

    -

    The following fragment uses this instruction to locate the stylesheet (foo.xsl in the same directory as foo.xml) and create a Templates object. Note the use of the TransformerFactory getAssociatedStylesheet() in step 2a.

    -An XML document may include more than one xml-stylesheet processing instruction, hence the support for working with multiple stylesheets. If more than one stylesheet is returned, the other stylesheets are imported into the first stylesheet. -// 1. Instantiate the TransformerFactory. -javax.xml.transform.TransformerFactory tFactory = - javax.xml.transform.TransformerFactory.newInstance(); -// 2a. Get the stylesheet from the XML source. -String media = null , title = null, charset = null; -javax.xml.transform.Source stylesheet = tFactory.getAssociatedStylesheet - (new StreamSource("foo.xml"), media, title, charset); - -// 2b. Process the stylesheet and generate a Transformer. -Transformer transformer = tFactory.newTransformer(stylesheet); - -// 3. Use the Transformer to perform the transformation and send the -// the output to a Result object. -transformer.transform - (new javax.xml.transform.stream.StreamSource("foo.xml"), - new StreamResult (new java.io.FileOutputStream("foo.out"))); -

    For a sample that uses this technique, see UseStylesheetPI.

    -

    You can also instruct the command-line utility to use stylesheet processing -instructions:

    -
      -
    1. Include the -in flag with an XML source that contains a stylesheet processing instruction.

    2. -
    3. Do not include the -xsl flag.
    4. -
    -
    - -

    In some cases, you may want to "transform" a DOM tree into a stream, which the XML community calls serialization. - and the &xslt4j; Transformer implementation provide direct -support for this operation. Simply use the TransformerFactory newTransformer() method (no arguments) to create a Transformer -that you can use to "copy" a DOMSource to a StreamResult. For examples, see Examples.exampleDOM2DOM(), -Examples.exampleSerializeNode(), and Examples.exampleAsSerializer() in the trax (JAXP transform) sample.

    -
    - -

    An XSLT stylesheet may include parameters that are set at run time each time a transformation is performed. To set a stylesheet parameter, use the Transformer -setParameter(String name, Object value) method. For a working example, see UseStylesheetParam.java in the samples/UseStylesheetParam subdirectory.

    -

    You can also set a parameter with the command-line utility by including the -param flag. For example:

    -

    java org.apache.xalan.xslt.Process -in foo.xml -xsl foo.xsl -param param1 foobar

    -

    where param is the parameter name and foobar is the parameter value. The parameter namespace is null.

    -&xslt4j2; processes string parameters. You are no longer required (as you were with &xslt4j; version 1) to enclose strings in single -quotes (') as string expressions. -
    - -

    &xslt4j; uses the SAX event model to process stylesheets, to parse XML input documents, and to produce output. For each of these operations, an XMLReader reads input, firing parse events, and a ContentHandler listens to the XMLReader and executes parse event methods.

    -

    When you use the basic procedure described above for performing transformations, &xslt4j; takes care of many of the SAX details under the covers. You are free to make these details explicit, which simply means that you can intervene in the procedure to accommodate the precise environment in which your application operates.

    -

    Suppose, for example, you are using a custom XMLReader (perhaps for doing more than just parsing static XML documents) to generate &xslt4j; SAX parse events. You might even have a custom reader for producing/processing stylesheets. You can cast the TransformerFactory to a SAXTransformerFactory, which provides access to a TransformerHandler, which you can set as the ContentHandler for this reader.

    -

    The following example explicitly sets up the XMLReader and ContentHandlers, and replicates the basic steps described above.

    - // Instantiate a TransformerFactory. -javax.xml.transform.TransformerFactory tFactory = - javax.xml.transform.TransformerFactory.newInstance(); -// Verify that the TransformerFactory implementation you are using -// supports SAX input and output (&xslt4j; does!). -if (tFactory.getFeature(javax.xml.transform.sax.SAXSource.FEATURE) && - tFactory.getFeature(javax.xml.transform.sax.SAXResult.FEATURE)) - { - // Cast the TransformerFactory to SAXTransformerFactory. - javax.xml.transform.sax.SAXTransformerFactory saxTFactory = - ((javax.xml.transform.sax.SAXTransformerFactory) tFactory); - // Create a Templates ContentHandler to handle parsing of the - // stylesheet. - javax.xml.transform.sax.TemplatesHandler templatesHandler = - saxTFactory.newTemplatesHandler(); - - // Create an XMLReader and set its ContentHandler. - org.xml.sax.XMLReader reader = - org.xml.sax.helpers.XMLReaderFactory.createXMLReader(); - reader.setContentHandler(templatesHandler); - - // Parse the stylesheet. - reader.parse("foo.xsl"); - - // Get the Templates object (generated during the parsing of the stylesheet) - // from the TemplatesHandler. - javax.xml.transform.Templates templates = - templatesHandler.getTemplates(); - // Create a Transformer ContentHandler to handle parsing of - // the XML Source. - javax.xml.transform.sax.TransformerHandler transformerHandler - = saxTFactory.newTransformerHandler(templates); - // Reset the XMLReader's ContentHandler to the TransformerHandler. - reader.setContentHandler(transformerHandler); - - // Set the ContentHandler to also function as a LexicalHandler, which - // can process "lexical" events (such as comments and CDATA). - reader.setProperty("http://xml.org/sax/properties/lexical-handler", - transformerHandler); - - // Set up a Serializer to serialize the Result to a file. - org.apache.xml.serializer.Serializer serializer = - org.apache.xml.serializer.SerializerFactory.getSerializer - (org.apache.xml.serializer.OutputPropertiesFactory.getDefaultMethodProperties - ("xml")); - serializer.setOutputStream(new java.io.FileOutputStream("foo.out")); - // The Serializer functions as a SAX ContentHandler. - javax.xml.transform.Result result = - new javax.xml.transform.sax.SAXResult(serializer.asContentHandler()); - transformerHandler.setResult(result); - - // Parse the XML input document. - reader.parse("foo.xml"); - If you want to perform multiple transformations with the same Templates object and a TransformerHandler, you must create a new - TransformerHandler for each transformation. The &xslt4j; implementation of TransformerHandler - (TransformerHandlerImpl fails to respond - to events after the first endDocument event occurs. -
    - - -

    You can chain together a series of transformations such that the output of each transformation provides input for the next transformation. &xslt4j; supports two basic strategies for chaining a series of transformations:

    -
      -
    • Use the SAXTransformerFactory to process the stylesheet and create a TransformerHandler for each transformation. Then you can set -the first TransformerHandler as the ContentHandler for the XMLReader that parses the input, make the second TransformerHandler the ContentHandler for the output of the first TransformerHandler, and so on. For more detail and an example, see the Pipe sample.

    • -
    • Use the SAXTransformerFactory to process the stylesheet and create a SAX XMLFilter for each transformation. Set an XMLReader as the parent of the first XMLFilter, the first XMLFilter as the parent of the second XMLFilter, and so on. You launch the series of transformations by instructing the last XMLFilter to parse the XML Source for the first transformation. For more detail and an example, see the UseXMLFilters sample.
    • -
    -
    - -

    In some cases, the input and/or desired output for a transformation may be a DOM tree object. The javax.xml.transform.DOM package provides DOMSource and a DOMResult, either or both of which you can use when you perform a transformation.

    -

    In some cases, your application provides input in the form of a DOM tree, which accelerates the transformation process, since the input has in effect already been processed. To produce DOM input from a stream, you can use a DocumentBuilderFactory to produce a DocumentBuilder with which you can parse the XML input into a DOM Document, as illustrated below.

    -// Instantiate a DocumentBuilderFactory. -javax.xml.parsers.DocumentBuilderFactory dfactory = - javax.xml.parsers.DocumentBuilderFactory.newInstance(); -// Use the DocumentBuilderFactory to provide access to a DocumentBuilder. -javax.xml.parsers.DocumentBuilder dBuilder = dfactory.newDocumentBuilder(); -// Use the DocumentBuilder to parse the XML input. -org.w3c.dom.Document inDoc = dBuilder.parse("foo.xml"); -

    To produce DOM output, simply use a Transformer to transform to a DOMResult object.

    -// Generate a Transformer. -javax.xml.transform.Transformer transformer = tFactory.newTransformer - (new javax.xml.transform.stream.StreamSource("foo.xsl")); -// Create an empy DOMResult object for the output. -javax.xml.transform.dom.DOMResult domResult = - new javax.xml.transform.dom.DOMResult(); -// Perform the transformation. -transformer.transform(new javax.xml.transform.dom.DOMSource(inDoc), - domResult); -// Now you can get the output Node from the DOMResult. -org.w3c.dom.Node node = domResult.getNode(); -Create a new DOMResult object or use DOMResult.setNode() to assign a new container each time you want to perform a transformation -and place the output in a DOMResult object. -

    The DOM2DOM illustrates both procedures, and serializes the DOMResult to System.out.

    -
    - -

    XSLT stylesheets use XPath expressions to select nodes, specify conditions, and generate text for the result tree. XPath provides an API that you can call directly. For example, you may want to evaluate an XPath expression programmatically and do your own processing without a stylesheet.

    -

    XPath is an independent entity, with clients other than XSLT processors (such as XPointer). Accordingly, &xslt4j2; has packaged XPath as a separate module (org.apache.xpath and its subpackages). The org.apache.xpath.XPathAPI class contains convenience methods that you can use to return single DOM Nodes, NodeIterators, and XObjects. Apart from their own functionality, these methods also provide a path into the lower-level XPath API that you may find useful.

    -

    &jaxp13-short; also provides an API for xpath expression evaluation in the javax.xml.xpath package. Users are - recommended to use the new JAXP 1.3 XPath API rather than the old &xslt4j2; specific XPath API.

    -

    For an example that uses the &xslt4j2; specific XPathAPI to execute XPath expressions against XML source files, -see ApplyXPath. For examples on how to use the new JAXP 1.3 XPath -API, see ApplyXPathJAXP and -XPathResolver.

    -
    - -
      -
    1. Include XSLTProcessorApplet in an HTML client.

    2. -
    3. Specify the XML source document and XSL stylesheet.

      -You can use the DocumentURL and StyleURL PARAM tags or the setdocumentURL() and setStyleURL() methods. If the XML document contains a stylesheet Processing Instruction (PI), you do not need to specify an XSL stylesheet.

    4. -
    5. Call the transformToHtml() or getHtmlText() method, which performs the transformation and returns the new document as a String.
    -The transformToHTML() method takes arguments for the XML source document and XSL stylesheet. The getHtmlText() method takes no arguments: it uses property or parameter settings, as in the example below. -

    For an example, see the AppletXMLtoHTML sample applet. The <applet> tag is in samples/AppletXMLtoHTML/client.html:

    -<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"/> - <param name="styleURL" value="s1ToHTML.xsl"/> -</applet> -

    When the user clicks the Transform button, the HTML client calls the getHtmlText() method, and puts the returned HTML text in a frame for the user to view.

    -

    For samples, see AppletXMLtoHTML.

    - -

    The JAXP strategy of reading system properties - generates SecurityExceptions when you attempt to run &xslt4j; applets in the Netscape Communicator 4.7.

    -

    Stuart Connell - <Stuart.Connell@compuware.com> reports that the &xslt4j; applet wrapper does work in Netscape Communicator 6, - provided that you avoid calls to the AppletContext showStatus() method. In other words, you can remove the showStatus() calls - from org.apache.xalan.client.XSLTProcessorApplet, and run &xslt4j; applets from Netscape Communicator 6. This appears to be a - Netscape bug, which hopefully will be fixed soon. For more information, see - Bugzilla bug 3231.

    -
    -
    - -

    You can set up a servlet to use &xslt4j; to respond to requests for XML documents by transforming those documents into HTML and serving them to web browsers. To respond to HTTP GET requests, all you need to do is overwrite the HttpServlet doGet() method with a procedure that instantiates a Transformer and uses it to perform a transformation. As the following example shows, you can generate a ResultStream that a PrintWriter writes to the HttpResponse OutputStream, returning the transformation output to the web browser.

    - -public class SampleXSLTServlet extends javax.servlet.http.HttpServlet { - - public final static String FS = System.getProperty("file.separator"); - // Respond to HTTP GET requests from browsers. - public void doGet (javax.servlet.http.HttpServletRequest request, - javax.servlet.http.HttpServletResponse response) - throws javax.servlet.ServletException, java.io.IOException - { - // Set content type for HTML. - response.setContentType("text/html; charset=UTF-8"); - // Output goes to the response PrintWriter. - java.io.PrintWriter out = response.getWriter(); - try - { - javax.xml.transform.TransformerFactory tFactory = - javax.xml.transform.TransformerFactory.newInstance(); - //get the real path for xml and xsl files. - String ctx = getServletContext().getRealPath("") + FS; - // Get the XML input document and the stylesheet, both in the servlet - // engine document directory. - javax.xml.transform.Source xmlSource = - new javax.xml.transform.stream.StreamSource - (new java.net.URL("file", "", ctx+"foo.xml").openStream()); - javax.xml.transform.Source xslSource = - new javax.xml.transform.stream.StreamSource - (new java.net.URL("file", "", ctx+"foo.xsl").openStream()); - // Generate the transformer. - javax.xml.transform.Transformer transformer = - tFactory.newTransformer(xslSource); - // Perform the transformation, sending the output to the response. - transformer.transform(xmlSource, - new javax.xml.transform.stream.StreamResult(out)); - } - // If an Exception occurs, return the error to the client. - catch (Exception e) - { - out.write(e.getMessage()); - e.printStackTrace(out); - } - // Close the PrintWriter. - out.close(); - } -} -

    For a working sample, see SimpleXSLTServlet.

    -

    In the preceding example, the URLs for the XML document and XSL stylesheet are hardcoded in the servlet. You can also create a servlet that parses the request URL for input parameters specifying the XML document, XSL stylesheet, and any relevant stylesheet parameters. For samples, see UseStylesheetParamServlet and XSLTServletWithParams. For a more robust and complex sample that also employs a properties file to determine which stylesheet to use depending on the client browser/device, see ApplyXSLT.

    -
    - -

    For those cases where you want to be able to call procedural code from within a stylesheet, the &xslt4j; Extensions facility supports the creation of extension elements and extension functions. See Extensions and Extensions samples.

    -
    - -

    A given Templates object may be used repeatedly and even in multiple threads running concurrently for the transformation of XML input, but you should use the Templates object to instantiate a separate Transformer for each transformation you perform. The Templates object is an immutable runtime representation of the structure and content of a stylesheet (which may include and import multiple stylesheet sources). A Transformer, on the other hand, is a lightweight object that tracks state information during the transformation, and should only be used to perform a single transformation.

    - -

    If you want to perform multiple transformations (sequentially or concurrently) with the same stylesheet instructions, do the following:

    -
      -
    1. Use the TransformerFactory newTemplates(Source xslSource) method to create a Templates object.

    2. -
    3. For each transformation, use the Templates object newTransformer() method to create a Transformer, and use that Transformer's -transform(Source xmlSource, Result transformResult) method to perform the transformation.
    4. -
    -

    For an example, see Examples.exampleUseTemplatesObj() in the trax sample.

    -
    - -

    &xslt4j; contains a debugger interface in the org.apache.xalan.xslt.trace package:

    -
      -
    • TraceListener is an interface that debuggers - can implement. Or, like the command-line utility, you can use the PrintTraceListener implementation of that interface. -

    • -
    • You can register a TraceListener with the - TraceManager associated - with the Transformer that will perform a given transformation.

    • -
    • TracerEvent is an event that is - passed to the TraceListener.trace() function. It is called before a node is 'executed' in the stylesheet.

    • -
    • GenerateEvent is an event that is - passed to the TraceListener.generated() function. It is called after an event occurs to create something in the result - tree.

    • -
    • SelectionEvent is an event triggered by the - selection of a stylesheet node.
    • -
    • ExtensionEvent is an event that is - passed to the TraceListener.extension() function. It is called before an extension call is made.

    • -
    -

    The command-line utility uses the debugger interface when you include one or more of the - following switches: -TT, -TG, -TS, -TTC.

    -

    Example:

    -import org.apache.xalan.transformer.TransformerImpl; -import org.apache.xalan.trace.TraceManager; -import org.apache.xalan.trace.PrintTraceListener; -... -// Set up a PrintTraceListener object to print to a file. -java.io.FileWriter fw = new java.io.FileWriter("events.log"); -java.io.PrintWriter pw = new java.io.PrintWriter(fw); -PrintTraceListener ptl = new PrintTraceListener(pw); - -// Print information as each node is 'executed' in the stylesheet. -ptl.m_traceElements = true; -// Print information after each result-tree generation event. -ptl.m_traceGeneration = true; -// Print information after each selection event. -ptl.m_traceSelection = true; -// Print information whenever a template is invoked. -ptl.m_traceTemplates = true; -// Print information whenever an extension is called. -ptl.m_traceExtension = true; - -// Set up the transformation -javax.xml.transform.TransformerFactory tFactory = - javax.xml.transform.TransformerFactory.newInstance(); -javax.xml.transform.Transformer transformer = - tFactory.newTransformer(new javax.xml.transform.stream.StreamSource - ("foo.xsl")); - -// Cast the Transformer object to TransformerImpl. -if (transformer instanceof TransformerImpl) { - TransformerImpl transformerImpl = (TransformerImpl)transformer; - - // Register the TraceListener with the TraceManager associated - // with the TransformerImpl. - TraceManager trMgr = transformerImpl.getTraceManager(); - trMgr.addTraceListener(ptl); - - // Perform the transformation --printing information to - // the events log during the process. - transformer.transform - ( new javax.xml.transform.stream.StreamSource("foo.xml"), - new javax.xml.transform.stream.StreamResult - (new java.io.FileWriter("foo.out")) ); -} -// Close the PrintWriter and FileWriter. -pw.close(); -fw.close(); -

    For a sample application that uses this technique, see Trace.

    -
    -
    diff --git a/stylebook/sources/xalan/whatsnew.xml b/stylebook/sources/xalan/whatsnew.xml deleted file mode 100644 index ffaa11f8a..000000000 --- a/stylebook/sources/xalan/whatsnew.xml +++ /dev/null @@ -1,42 +0,0 @@ - - - - - - - -

    - Here's what's new in &xslt4j-current;. -

    - - - - - - The distributions contain upgraded versions of xercesImpl.jar and - xml-apis.jar (Xerces-J 2.12.2). - - - - &xslt4j-current; contains performance enhancements and other bug fixes since 2.7.2. You can find the list - in the release notes. - - -
    - -
    diff --git a/stylebook/sources/xalan/xalan-collate.xml b/stylebook/sources/xalan/xalan-collate.xml deleted file mode 100644 index 947ac93d7..000000000 --- a/stylebook/sources/xalan/xalan-collate.xml +++ /dev/null @@ -1,107 +0,0 @@ - -
      -
    • Introduction
    • -
    • Performance settings
    • -
    - -

    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.

    -

    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.

    -

    In general, the "read" APIs to DTM resemble those of the W3C Document Object Model - () 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.

    -

    DTM is intended to be a read-only model, and so does not attempt to replicate the DOM's write or - create-node operations.

    -

    The details of constructing a DTM vary depending on which implementation of this API you are - using. Two reference implementations are currently available:

    -
      -
    • SAX2DTM (built via a SAX stream)
    • -
    • DOM2DTM (which provides DTM access to an existing DOM)
    • -
    -

    Both DTMs can be built incrementally (see incremental transforms). - 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.

    -

    For the convenience of user-written extensions, a proxy mechanism presents the contents of the - DTM as a read-only subset of the DOM.

    -
    - - - -

    Xalan-Java implements two DTM performance features that you can control with the TransformerFactory - setAttribute(String name, Object value) method.

    - - - - - - - - - - - - - - - - -
    Attribute name (URL)Default settingDescription
    "http://xml.apache.org/xalan/features/incremental"falseincremental transforms
    "http://xml.apache.org/xalan/features/optimize"trueoptimized transforms
    -

    Both of these DTM settings are described below.

    - -

    - - -

    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.

    - 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. - The incremental feature is not currently supported by the XSLT Compiling processor, XSLTC. -

    Example: setting incremental transforms to true (for the XSLT Interpretive processor):

    - 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); - ... -
    - - - -

    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.

    -
    -
    - - -

    The DTM also provides a setting that you can use to track location information for each node in - the source document. See "http://apache.org/xalan/features/source_location"

    -
    -
    \ No newline at end of file diff --git a/stylebook/sources/xalan/xsltc_history.xml b/stylebook/sources/xalan/xsltc_history.xml deleted file mode 100644 index eec9ca771..000000000 --- a/stylebook/sources/xalan/xsltc_history.xml +++ /dev/null @@ -1,4792 +0,0 @@ - - - - - -

    The following sections list XSLTC changes back to the incorporation of XSLTC into &xslt4j;.

    - -

    XSLTC source code updates:

    -
      -
    • Committed by zongaro@apache.org on 2004/02/27
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java NodeSortRecordFactory.java SortSettings.java
      -Committer's log entry: -Restored old constructor of NodeSortRecordFactory and _collator field of -NodeSortRecord for binary compatibility. These changes allow translets -compiled with an earlier version of XSLTC to continue to run with the new -version. They should not be used in newly compiled translets or in new code -in XSLTC itself.
      - -Also introduced a SortSettings class that is used to bundle sort settings from -NodeSortRecordFactory into instances of NodeSortRecord. That reduces some of -the space overhead in constructing a NodeSortRecord.
      - -Reviewed by Igor Hersht (igorh@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2004/02/27
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom ForwardPositionIterator.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      -Committer's log entry: -Revived ForwardPositionIterator class and BasisLibrary.positionF purely to -support backwards compatibility with translets compiled with earlier versions -of XSLTC. New code should not reference either.
      - -Reviewed by Christine Li (jycli@ca.ibm.com).

    • - -
    • Committed by igorh@apache.org on 2004/03/09
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeCounter.java
      -Committer's log entry: -xsl:number, minor code cleaning and optimization.

    • - -
    • Committed by bhakti@apache.org on 2004/03/10
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      -Committer's log entry: -Check if the systemId for the stylesheet is null to avoid getting an NPE.

    • - -
    • Committed by santiagopg@apache.org on 2004/03/16
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java
      -Committer's log entry: -Reverting latest patch by Arun. There are some problems with the new code to invoke functions dynamically (e.g. docbook -reports a compile-time type check error). The approach taken to determine when to invoke methods dynamically needs to be revisted. -

    • - -
    • Committed by mkwan@apache.org on 2004/03/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Patch for bug 27417. If an output stream is created by the XSLTC transformer, close -it after the transformation.

    • - -
    • Committed by zongaro@apache.org on 2004/04/10
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyImports.java
      -Committer's log entry: -Applying patch for bugs 27932 and 15333.
      - -Code was incorrectly calculating the set of templates to which an -xsl:apply-imports instruction applies. It should consider all templates that -the current template rule could override, which means that if the template -appeared in a stylesheet that was included in another stylesheet, any templates -imported into the including stylesheet have to be considered as well. The -method Stylesheet.getMinimumDescendantPrecedence is responsible for this -calculation.
      - -In addition, when code is generated for an xsl:apply-imports, if any template -has local parameters, an empty stack frame has to be pushed before attempting -to apply-imports. Otherwise, parameters from the template that contains the -apply-imports instruction will be passed into the matching template.
      - -Reviewed by Joanne Tong (joannet@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2004/04/10
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      -Committer's log entry: -Applying patch for bug 27932.
      - -Code was incorrectly calculating the set of templates to which an -xsl:apply-imports instruction applies. It should consider all templates that -the current template rule could override, which means that if the template -appeared in a stylesheet that was included in another stylesheet, any templates -imported into the including stylesheet have to be considered as well. The -method Stylesheet.getMinimumDescendantPrecedence is responsible for this -calculation.
      - -Reviewed by Joanne Tong (joannet@ca.ibm.com)

    • - -
    • Committed by bhakti@apache.org on 2004/05/13
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java
      -Committer's log entry: -In xsltc currently with the extension redirect the output file is created only if the parent dir exists. -Making the behaviour similar to that of xalan wherein the parent directory is also created.

    • - -
    • Committed by santiagopg@apache.org on 2004/05/20
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java
      -Committer's log entry: -Fix for Bugzilla 29120. The translet now stores a reference to the DocumentBuilderFactory which is used by -nodeList2Iterator() in the basis library. Note that to reuse that reference you need to use the same transformer -(not just the same template).

    • - -
    • Committed by santiagopg@apache.org on 2004/05/21
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler AttributeValueTemplate.java
      -Committer's log entry: -Implemented a new parser for ATVs. The old was buggy: did not handle escaped curly braces in all cases and did -not handled quotes at all. The old parser assumed that braces came in pairs, but it is possible to have an odd -number as in "{{{$foo}}}". The new parser seems to handle all cases correctly.

    • - -
    • Committed by santiagopg@apache.org on 2004/05/21
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler LiteralAttribute.java LiteralElement.java Parser.java -SyntaxTreeNode.java
      -Committer's log entry: -Modified code to ensure line number information is propagated from parent to children to ensure we get informative -error messages. This was particularly bad for errors in ATVs.

    • - -
    • Committed by santiagopg@apache.org on 2004/05/25
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java
      -Committer's log entry: -Improved patch for Bugzilla 29120 based on Matthias' suggestion. A DOMImplementation is now cached for even better performance. -

    • - -
    • Committed by jycli@apache.org on 2004/05/26
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Mode.java Stylesheet.java
      -Committer's log entry: -If the local is set to Turkish, but the codepage is MS-DOS (US) 437. The BCEL -InstructionFinder.search(String) method can not find any instructions contain -letter I. In Turkish, there are 2 lower case i. Since the search() method is case -insensitive, change the pattern string to use lower case.

    • - -
    • Committed by santiagopg@apache.org on 2004/06/10
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler LiteralElement.java
      -Committer's log entry: -Patch for Bugzilla 29411. New algorithm shoudl optimize the way NS decls are reported for nested literal -elements. Note that the algorithm will not work accross non-literal elements. E.g., if there is an -xsl:element between two literal elements, the inner literal element may report unnecessary NS delcs. -This is just a simple way to ensure that any NS decls defined by the xsl:element instruction are re-defined -in the inner literal (see namespace39 in the conf tests).

    • - -
    • Committed by santiagopg@apache.org on 2004/06/11
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Mode.java
      -Committer's log entry: -Fixed a problem with peephole optimization patterns. I don't know if something changed in BCEL since the -code was written, but the pattern syntax was not correct. I've also added a new common peephole pattern -which should reduce then inner loop's length in some Translets.

    • - -
    • Committed by igorh@apache.org on 2004/06/21
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom KeyIndex.java xml-xalan/java/src/org/apache/xalan/xsltc/util -IntegerArray.java
      Committer's log entry: -Fix for Bugzilla Bug 28622.

    • - -
    • Committed by santiagopg@apache.org on 2004/06/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CastExpr.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ObjectType.java StringType.java Type.java
      -Committer's log entry: -Patch for Bugzilla 27539 and related problems. The main problem was that hashCode() was not implemented -correctly in ObjectType. To eleminate further problems I also removed Type.ObjectString as this type is the -same as Type.String and the latter can be used in place of the former.

    • - -
    • Committed by aruny@apache.org on 2004/07/15
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerHandlerImpl.java TransformerImpl.java
      -Committer's log entry: -Description: getNode should return the result DOM tree once TransformerHandler completes the transformation.

    • - -
    • Committed by aruny@apache.org on 2004/07/15
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime -AbstractTranslet.java
      Committer's log entry: -Description: Patch for the support of extension attribute "intent-amount" for xsl:output. Supports the old URI -{http://xml.apache.org/xslt} and new URI{http://xml.apache.org/xalan}.

    • - -
    • Committed by aruny@apache.org on 2004/07/15
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax SAX2DOM.java
      -Committer's log entry: -Description: Patch for concatenating adjacent text nodes.

    • - -
    • Committed by minchau@apache.org on 2004/07/22
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java
      -Committer's log entry: -Submitted by: Yash Talwar
      -Reviewed by: Brian Minchau
      -Fix for bugzilla 28796.

    • - -
    • Committed by jycli@apache.org on 2004/08/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc TransletException.java xml-xalan/java/src/org/apache/xalan/xsltc/cmdline -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/getopt GetOptsException.java IllegalArgumentException.java -MissingOptArgException.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler CompilerException.java IllegalCharException.java -ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util MultiHashtable.java ObjectFactory.java StringStack.java -TypeCheckError.java xml-xalan/java/src/org/apache/xalan/xsltc/dom BitArray.java ObjectFactory.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime ObjectFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -ObjectFactory.java TemplatesImpl.java
      -Committer's log entry: -Added serialVersionUID for classes which implement Serializable interface. Patch created by Christine Li (jycli@ca.ibm.com) -and was reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by zongaro@apache.org on 2004/09/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Variable.java
      -Committer's log entry: -Skip translation for any unreferenced variables. Patch reviewed by Christine Li (jycli@ca.ibm.com).

    • - -
    • Committed by zongaro@apache.org on 2004/11/16
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CallTemplate.java
      -Committer's log entry: -Patch for bug report XALANJ-1994.
      - -The CallTemplate.getCalleeTemplate() method was searching through a Vector of -all templates defined by the logical stylesheet, and picked out the first with -the same name referenced by the current xsl:call-template instruction. However, -that failed to account for import precedence. The SymbolTable.lookupTemplate -method takes into account import precedence, and should be used instead.
      - -Patch was reviewed by Christine Li (jycli@ca.ibm.com)

    • - -
    • Committed by santiagopg@apache.org on 2004/12/06
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java Operators.java
      -Committer's log entry: -Patch for XALANJ-2003. Problem was unrelated to recursion, but simply a bug in the basis library. Swapping -operands requires swapping operators and the latter was not done. A workaround for this bug would be to -swap the operands (and operator) in the stylesheet (as that would not cause any swapping in the basis library).

    • - -
    • Committed by santiagopg@apache.org on 2004/12/10
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2TO.java
      -Committer's log entry: -Patch for XALANJ-2015. Namespace declarations are now reported on a first pass to avoid the problem described in the bug report.

    • - -
    • Committed by santiagopg@apache.org on 2004/12/10
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java Parser.java SyntaxTreeNode.java
      -Committer's log entry: -Patch for XALANJ-1761. Output properties from multiple xsl:output instructions are now correctly merged (previously, -only cdata-section-elements were handled correctly).

    • - -
    • Committed by santiagopg@apache.org on 2004/12/10
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime Operators.java
      -Committer's log entry: -Replaced meaningless numbers by predefined constants in swapArray[] vector.

    • - -
    • Committed by joannet@apache.org on 2004/12/13
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Import.java
      -Committer's log entry: -Fixed XALANJ-1812. Template inlining setting propagated to imported stylesheets.

    • - -
    • Committed by jycli@apache.org on 2005/02/04
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Number.java xml-xalan/java/src/org/apache/xalan/xsltc/dom -AnyNodeCounter.java MultipleNodeCounter.java NodeCounter.java SingleNodeCounter.java
      -Committer's log entry: -Implement Errata E24 for XSLTC, when the value attribute of xsl:number is NaN, infinite or less than 0.5. -More details please refer to bug report XALANJ-1979. Patch is reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by ytalwar@apache.org on 2005/02/09
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyImports.java -Mode.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ClassGenerator.java
      -Committer's log entry: -Fix for XALANJ-1417.

    • - -
    • Committed by ytalwar@apache.org on 2005/02/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Mode.java TestSeq.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -MethodGenerator.java
      -Committer's log entry: -Fix for XALANJ-2058. In the code, the problem is that a pattern gets compiled once, -and then this compiled pattern gets re-used whenever the pattern is -needed in any method. -The fix is that pattern should get compiled once per method. So, pattern get reused only within a given method. -for any new method, a pattern is recompiled. -This fix has been reviewed by Henry Zongaro. Henry had also provided suggestions about the fix to resolve this issue. -Thanks Henry for his valuable input.

    • - -
    • Committed by mcnamara@apache.org on 2005/03/03
      -Modified: xml-xalan/java/xdocs/sources/xalan readme.xml resources.xml xsltc_usage.xml xml-xalan/java/xdocs/sources/xsltc -README.xslt README.xsltc
      -Committer's log entry: -Patch for XALANJ-1937. Change references in the docs from bugzilla to Apache Jira for reporting new issues and checking the -status of existing issues.

    • - -
    • Committed by ytalwar@apache.org on 2005/03/16
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Text.java
      -Committer's log entry: -This is a fix for XALANJ-2081. -In class org.apache.xalan.xsltc.compiler.Text, a check was being done to find out if a given text string is all whitespaces. -In case, a given text string is all whitespace, a call to serializer is not made. -The code was using trim() method from java.lang.String. trim() method trimmed characters as whitespaces -that are not considered as whitespace in XML. -The code logic is changed to check if a given string is all whitespace accoding to XML specifications. -I would like to thank Michael Glavassevich and Brian Minchau for their input to resolve this issue.

    • - -
    • Committed by santiagopg@apache.org on 2005/04/08
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax Util.java
      -Committer's log entry: -Clear XML reader for the case in which them main stylesheet is passed using a DOMSource. This fixes the problem -of trying to use a DOM2SAX reader for included/imported stylesheets that are resolved by user-defined URI resovers.

    • - -
    • Committed by mkwan@apache.org on 2005/05/19
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      -Committer's log entry: -Put in the missing Transformer.reset() implementation when doing the JAXP 1.3 integration.

    • - -
    • Committed by mkwan@apache.org on 2005/05/20
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax SAX2DOM.java TransformerImpl.java
      -Committer's log entry: -Support DOMResult.nextSibling in XSLTC. The nextSibling information is passed from TransformerImpl to TransletOutputHandlerFactory, -then to SAX2DOM. If nextSibling is not null, SAX2DOM inserts the result nodes before it. -Otherwise the result nodes are appended as the last children of the parent.

    • - -
    • Committed by mkwan@apache.org on 2005/05/31
      -Modified: xml-xalan/java/src/org/apache/xalan Version.java xml-xalan/java/src/org/apache/xalan/processor -TransformerFactoryImpl.java xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java ErrorMsg.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax SmartTransformerFactoryImpl.java TransformerFactoryImpl.java
      -Committer's log entry: -Patch for XALANJ-2123. Move hard-coded messages for JAXP 1.3 into resource bundles.

    • - -
    • Committed by mkwan@apache.org on 2005/06/08
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java Parser.java TransletOutput.java XSLTC.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java ErrorMessages.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java TemplatesImpl.java TransformerFactoryImpl.java -TransformerImpl.java TrAXFilter.java Util.java
      -Committer's log entry: -Patch for XALANJ-2136. Implement the secure processing feature for XSLTC. Extension functions -and extension elements are disabled when this feature is set to true.

    • - -
    • Committed by zongaro@apache.org on 2005/06/08
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom KeyIndex.java
      -Committer's log entry: -Fix for XALANJ-1938.
      - -A KeyIndex object contains a Hashtable mappings from key values to the -IntegerArray objects that contain the set of nodes selected by those key values. -For a reference to the key function, the lookupKey method finds the nodes -selected by a particular key value, and the merge method merges all the nodes -selected if more than one key value is specified for the one refernce to the key -function.
      - -The problem was that the lookupKey and merge methods operated on the "live" -versions of the IntegerArrays stored in the mapping Hashtable, so that one -reference to the key function might affect the result of subsequent references -to the key function. Changed those methods to make clones of the selected -IntegerArray objects, which can be safely modified without affecting the -original IntegerArrays.
      - -This patch was reviewed by Joanne Tong (joannet@ca.ibm.com).

    • - -
    • Committed by zongaro@apache.org on 2005/06/15
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java
      -Committer's log entry: -Patch for bug XALANJ-2097 from Nick Van den Bleeken. -(Nick.VandenBleeken@pandora.be), reviewed by Henry Zongaro.
      - -The code generated for a path expression of the form $var/self::node() was -incorrect. It looked like the following, where "i" refers to the context node.
      - - new StepIterator(dtmaxisiterator1.cloneIterator(), new SingletonIterator(i));
      - -That's incorrect, because the SingletonIterator will only return the node used -upon its instantiation, rather than the node provided from the parent step -expression by the StepIterator.
      - -The SingletonIterator should only be used if the self::node() is not a step -in a path expression. In the case of a path expression, dom.getAxisIterator -should be used to create the axis iterator instead.

    • - -
    • Committed by zongaro@apache.org on 2005/06/30
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler AbsoluteLocationPath.java FilteredAbsoluteLocationPath.java -FilterExpr.java FilterParentPath.java FunctionCall.java KeyCall.java ParentLocationPath.java Sort.java Step.java StepPattern.java
      -Committer's log entry: -Patch for XALANJ-2146. Reviewed by Christine Li (jycli@ca.ibm.com).
      - -Section 4.3.4 of the JVM specification prohibits an uninitialized object from -appearing on the stack or in a local variable when a backwards branch is -executed. We need to guard against that in the generated code in XSLTC by -storing arguments to constructors in temporary variables if there's any -possibility that the code used to calculate such arguments might contain a -backwards branch.

    • - -
    • Committed by jycli@apache.org on 2005/07/08
      -Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -ErrorMessages.java
      -Committer's log entry: -Added missing apostrophe for error messages. Fixed bug report XALANJ-2167. Patch is reviewed by Sarah McNamara (mcnamara@ca.ibm.com) -

    • - -
    • Committed by zongaro@apache.org on 2005/07/11
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java
      -Committer's log entry: -Fix for bug report XALANJ-2140.
      - -The AbstractTranslet._keyIndexes field is used to record the sets of keys -for a particular transformation by name. This table was not cleared at the -end of a transformation, so the keys from one transformation persisted to -subsequent transformations. Fixed this by adding a try-finally block in -the AbstractTranslet.transform method and setting _keyIndexes to null in the -finally block.
      - -Reviewed by Brian Minchau (minchau@ca.ibm.com).

    • - -
    • Committed by minchau@apache.org on 2005/07/13
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      -Committer's log entry: -Minor change in the error message, -fix was found by Brian Vargas, patch produced and -reviewed by Brian Minchau.

    • - -
    • Committed by minchau@apache.org on 2005/07/15
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java
      -Committer's log entry: -Fixing a NPE for when _locator is null in the XSLTC Parser. -Applyin the patch in XALANJ-2154 from Brian Minchau, reiwed and approved by Santiago P.G.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/19
      -Modified: xml-xalan/java/src/org/apache/xalan/processor XSLProcessorVersion.java xml-xalan/java/src/org/apache/xalan/xslt -EnvironmentCheck.java xml-xalan/java/src/org/apache/xpath/domapi XPathEvaluatorImpl.java XPathExpressionImpl.java -XPathNSResolverImpl.java XPathResultImpl.java xml-xalan/java/src/org/apache/xml/serializer Version.src xml-xalan/java/xdocs/sources -entities.src xalan-jlocal.xml xalan-jsite.xml xml-xalan/java/xdocs/sources/xalan commandline_xsltc.xml commandline.xml downloads.xml -extensions.xml extensionslib.xml faq.xml features.xml getstarted.xml index.xml overview.xml public_apis.xml resources.xml samples.xml -trax.xml usagepatterns.xml whatsnew.xml xpath_apis.xml xsltc_usage.xml xml-xalan/java/xdocs/sources/xsltc README.xslt README.xsltc
      -Committer's log entry: -Doc changes for Xalan Java 2.7.0 release. -This change was reviewed and approved in XALANJ-2170 by Christine Li.

    • - -
    • Committed by mcnamara@apache.org on 2005/07/13
      -Modified: java/src/org/apache/xalan/xsltc/compiler xpath.lex
      -Committer's log entry: -Patch for XALANJ-1912.
      -Provided by Santiago Pericas-Geertsen
      -Reviewed by Yash Talwar.

    • - -
    -
    - - -

    XSLTC source code updates:

    -
      -
    • Committed by santiagopg@apache.org on 2003/10/31
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java

      -Committer's log entry: -Use translet as whitespace filter if it implements the StripFilter interface (This class should -probably be deprecated to avoid having to get it in sync with the Process class).

    • - -
    • Committed by santiagopg@apache.org on 2003/10/31
      -Modified: xml-xalan/java/src/org/apache/xalan/processor StylesheetPIHandler.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java

      -Committer's log entry: -Patch for Bugzilla 24187 by Bhakti Mehta (Bhakti.Mehta@sun.com).

    • - -
    • Committed by santiagopg@apache.org on 2003/11/04
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java

      -Committer's log entry: -Patch for Bugzilla 24188 by Bhakti Mehta (Bhakti.Mehta@sun.com). The runtime now attempts to resolve a reference when -the URI resolver returns null.

    • - -
    • Committed by santiagopg@apache.org on 2003/11/05
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java

      -Committer's log entry: -Committing patch for Bugzilla 24414 by Bhakti Mehta (Bhakti.Mehta@sun.com).

    • - -
    • Committed by santiagopg@apache.org on 2003/11/11
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Param.java ParameterRef.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java

      -Committer's log entry: -Patch for Bugzilla 24518 by Mehta Bhakti (Mehta.Bhakti@sun.com).

    • - -
    • Committed by santiagopg@apache.org on 2003/11/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java Util.java

      -Committer's log entry: -Patch for Bugzilla 24695 by Bhakti Mehta (Bhakti.Mehta@sun.com).

    • - -
    • Committed by santiagopg@apache.org on 2003/11/21
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java Util.java

      -Committer's log entry: -Updated patch for Bugzilla 24695 by Bhakti Metha. This patch gets an XMLReader from a SAXParserFactory if unable -to obtain one from an XMLReaderFactory.

    • - -
    • Committed by zongaro@apache.org on 2003/11/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java Stylesheet.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java

      -Committer's log entry: -Patch from Morris Kwan (mkwan@ca.ibm.com), reviewed by myself:

      - -Split namesArray in translet into three arrays: namesArray, urisArray and -typesArray.

      - -Previously, entries in the namesArray had to be examined at run-time to -distinguish those that represented elements, from those that represented -attributes (prefixed by an '@'), and those that represented namespace node -names (prefixed by a '?'). In addition, any namespace URI for the element or -attribute was similarly stored in the namesArray entry. So, -"http://example.org:abc" and "http://example.org:@abc" respectively represented -an element and an attribute named abc in the http://example.org namespace; -"?abc" represented a namespace prefix of abc.

      - -With this change, the namesArray will have entries for "abc" in all three -cases; the urisArray will contain entries for "http://example.org" for the -element and attribute, and an empty string for the namespace prefix; and the -typesArray will contain the value 1 for the element, 2 for the attribute and 13 -for the namespace (which correspond to the DTM constant values for those kinds -of nodes).

      - -In addition, these values are stored in static arrays in the translet, and -references to those arrays are copied to instance fields in the translet's -constructor, rather than constructing arrays and initializing all their entries -in the constructor each time.

      - -All this serves to reduce the overhead of initializing a transformation.

      - - -Patch from myself, reviewed by Morris Kwan:

      - -Introduced a versioning mechanism in AbstractTranslet. After constructing an -object of a class that extends AbstractTranslet, the postInitialization method -must be called. That method will detect any versioning differences that can -be resolved automatically, if a translet was compiled with an older version of -the XSLTC than is being used at run-time. The version number is stored in the -translet's transletVersion field.

      - -In many cases, incompabilities run up against Java's binary compatibility -rules, and fail catastrophically. This versioning mechanism is designed to -detect those cases that can't be detected by the JVM. The first use of this -mechanism is to translate from the old form of the namesArray used by old -translets, to the new form expected by the modified version of the XSLTC -run-time, as described above.

      - -In addition, if the translet version detected by the XSLTC run-time is more -recent than any supported by the XSLTC run-time, an error will be reported. -

    • - -
    • Committed by zongaro@apache.org on 2003/11/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime ErrorMessages.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -TemplatesImpl.java

      -Committer's log entry: -Patch from myself, reviewed by Morris Kwan (mkwan@ca.ibm.com):

      - -Introduced a versioning mechanism in AbstractTranslet. After constructing an -object of a class that extends AbstractTranslet, the postInitialization method -must be called. That method will detect any versioning differences that can -be resolved automatically, if a translet was compiled with an older version of -the XSLTC than is being used at run-time. The version number is stored in the -translet's transletVersion field.

      - -In many cases, incompabilities run up against Java's binary compatibility -rules, and fail catastrophically. This versioning mechanism is designed to -detect those cases that can't be detected by the JVM. The first use of this -mechanism is to translate from the old form of the namesArray used by old -translets, to the new form expected by the modified version of the XSLTC -run-time, as described above.

      - -In addition, if the translet version detected by the XSLTC run-time is more -recent than any supported by the XSLTC run-time, an error will be reported. -

    • - -
    • Committed by zongaro@apache.org on 2003/12/04
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc DOMEnhancedForDTM.java -xml-xalan/java/src/org/apache/xalan/xsltc/dom DocumentCache.java DOMAdapter.java DOMWSFilter.java -KeyIndex.java LoadDocument.java SAXImpl.java XSLTCDTMManager.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime -AbstractTranslet.java BasisLibrary.java

      -Committer's log entry: -Changes to permit different DTM implementations to be supplied to XSLTC.

      - -Part of the change was to replace hard-coded references to SAXImpl with -references to a new interface - DOMEnhancedForDTM. This part of the change was -supplied by Joseph Kesselman (keshlam@us.ibm.com).

      - -The other part of the change was to use ObjectFactory to look up a new XSLTC -DTM Manager service provider (org.apache.xalan.xsltc.dom.XSLTCDTMManager). The -provider is looked up once when a TransformerFactory is created, and used by -any Transformer objects created by that TransformerFactory. -

    • - -
    • Committed by zongaro@apache.org on 2003/12/04
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java TransformerImpl.java

      -Committer's log entry: -Changes to permit different DTM implementations to be supplied to XSLTC.

      - -XSLTC will now use ObjectFactory to look up a new XSLTC DTM Manager service -provider (org.apache.xalan.xsltc.dom.XSLTCDTMManager). The provider is looked -up once when a TransformerFactory is created, and used by any Transformer -objects created by that TransformerFactory.

      - -Also, moved code for caching XMLReader objects from XSLTC's -TransformerFactoryImpl to a new org.apache.xml.utils.XMLReaderManager class.

      - -It is now the responsibility of the DTMManagerDefault class to request one of -these cached XMLReader objects, so the benefit of reusing an XMLReader is now -conferred upon both XSLTC and Xalan-J Interpretive, as well as upon references -to the document() function.

    • - -
    • Committed by zongaro@apache.org on 2003/12/04
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom ForwardPositionIterator.java

      -Committer's log entry: -Added comments to describe the situation in which this iterator is used.

    • - -
    • Committed by santiagopg@apache.org on 2003/12/04
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java

      -Committer's log entry: -Creation of translet's class loader should be wrapped in a doPrivileged block (java.lang.RuntimePermission createClassLoader).

    • - -
    • Committed by rameshm@apache.org on 2003/12/11
      -Modified: xml-xalan/java/src/org/apache/xalan/lib/sql SQLQueryParser.java xml-xalan/java/src/org/apache/xalan/processor -XSLProcessorVersion.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util Util.java -xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime Constants.java

      -Committer's log entry: -Adding explicit final keyword to the intended constants which are defined with public static keywords. This will avoid the problem -of cross site java sandbox violation. In the case of xsltc/compiler/util/Util.java making the "filesep" variable to private to avoid -the chance of somebody else changing the value of this static variable.

    • - -
    • Committed by zongaro@apache.org on 2003/12/12
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java xml-xalan/java/src/org/apache/xalan/xsltc/dom -DocumentCache.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerHandlerImpl.java

      -Committer's log entry: -Take advantage of DTM pluggability support for XSLTC.

    • - -
    • Committed by zongaro@apache.org on 2003/12/12
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      -Committer's log entry: -The getDOM method might be entered more than once during a transformation, so -the DTMManager that is created the first time in must be saved so that -subsequent DTM's can be created with respect to it, and then discarded at the -end of the transformation.

      - -This change restores logic that I had foolishly eliminated with my previous -change to this file.

    • - -
    • Committed by santiagopg@apache.org on 2003/12/19
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java BooleanCall.java CastExpr.java -CopyOf.java DocumentCall.java EqualityExpr.java Expression.java FilterExpr.java ForEach.java FunctionCall.java Key.java KeyCall.java -NameBase.java NumberCall.java RelationalExpr.java StringCall.java VariableBase.java WithParam.java

      -Committer's log entry: -Patch for XSLTC's parameter optimization introduced in 2.5.2. The problem is that a param's default value can now be compiled multiple -times, once for every call to the template for which that param is not specified. This essentially turns the AST into a graph, -which requires the state of a param subtree to be reset after the each compilation. In particular, the variable Expression._startReset -was not reset and this resulted in calls to setStartNode() to be generated only the first time the param's default value was -compiled. After some analysis, I realized that _startReset was no longer necessary, so I removed it. I also renamed -Expression.startResetIterator() to Expression.startIterator() since calls to reset() are no longer generated within this method. -

    • - -
    • Committed by santiagopg@apache.org on 2003/12/19
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java

      -Committer's log entry: -Setting the maximum fraction digits on a DecimalFormat object to Integer.MAX_VALUE causes problems in some JDKs. Since -only doubles need to be formatted, I've changed the code to set the maximum to 340. I've also optimized formatNumber(), -the new version uses setters on the DecimalFormat object instead of calling toPattern().

    • - -
    • Committed by santiagopg@apache.org on 2003/12/23
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util BooleanType.java IntType.java RealType.java ReferenceType.java -StringType.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java

      -Committer's log entry: -Type conversions from internal to external Java types revisited: (1) Type.Int and Type.Real are now treated identically -given that the former is an optimization for the latter (i.e. their use should be transparent to the user) (2) Better support -Type.Reference, conversions to integral types are now supported. There are still some conversions that are supported by -Xalan and not by XSLTC. We need to either revisit the conversion table for XSLTC or document the differences.

    • - -
    • Committed by santiagopg@apache.org on 2003/12/23
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CallTemplate.java Param.java ParameterRef.java -Template.java VariableBase.java WithParam.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util NamedMethodGenerator.java

      -Committer's log entry: -The parameter optimization implemented in 2.5.2 does not work in all cases. The problem (see Bugzilla 25449) is that a param's -default value needs to be compiled multiples when there are mulitple calls the a template none of which has a correspoding with-param. -However, ASTs store an internal state which is not restored after compilation; consequently, only the first compilation is -guaranteed to succeed. Stated differently, the AST cannot be operated as a graph because sub-tree sharing causes problems.

      - -The optimization has now been changed so that a param default value is compiled only once by the callee instead of multiple -times by each caller. A caller will now pass 'null' when there is no with-param; a callee will only initialize a param if -its value is 'null'. This ensures that default values are compiled exactly once while at the same time preserving the XSLT semantics. -

    • - -
    • Committed by zongaro@apache.org on 2004/01/06
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java

      -Committer's log entry: -SAXImpl.startDocument was calling SAX2DTM.startDocument followed by -SAX2DTM.startPrefixMapping for the xml prefix. However, the -SAX2DTM.startElement always ensures the xml prefix is declared for the first -element. The effect of the startPrefixMapping call was to create two namespace -nodes on the first element declaring the xml prefix. This had no discernible -consequence, except to throw off the numbering of subsequent nodes with the -generate-id() function.

      - -I've eliminated the redundant call to startPrefixMapping, and adjusted the gold -test output files for the generate-id function.

      - -Reviewed by Christine Li (jycli@ca.ibm.com)

    • - -
    • Committed by santiagopg@apache.org on 2004/01/13
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DupFilterIterator.java

      -Committer's log entry: -Fix for Bugzilla 25924 by Bhakti Mehta (Bhakti.Mehta@sun.com). Variable _lastNext must be preserved in setMark() and -restored in gotoMark().

    • - -
    • Committed by santiagopg@apache.org on 2004/01/14
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java ForEach.java ForwardPositionExpr.java -PositionCall.java xml-xalan/java/src/org/apache/xalan/xsltc/dom ForwardPositionIterator.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java

      -Committer's log entry: -Committing a patch from Bhakti Mehta (Bhakti.Mehta@sun.com). ForwardPositionIterators and ForwardPositionExprs are not -needed anymore after the intergration with DTM. Despite that, ForwardPositionIterators were still being used even though -they did not provide any additional functionally (they were basically identity iterators). This patch eliminates the need -for these iterators (and the corresponding compile-time expressions) and also replaces calls to BasisLibrary.positionF() -with calls to currentIterator.getPosition(). The resulting code should be smaller and faster.

    • - -
    • Committed by santiagopg@apache.org on 2004/01/14
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java
      -Committer's log entry: -Removing unused constant.

    • - -
    • Committed by santiagopg@apache.org on 2004/01/20
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util NodeSetType.java ResultTreeType.java

      -Committer's log entry: -XSLT->Java and Java->XSLT conversion table revisited. I made sure that two internal types corresponding to the same -XSLT type had identical conversion rules (e.g. IntType and RealType). The multi-step conversions NodeSetType->int and -ResultTreeType->double have been eliminated in order to simplify the table (they can always by implemented externally). -The resulting conversion table is still not identical to the interpreter (and perhaps it will never be) so it should be -documented separately.

    • - -
    • Committed by jycli@apache.org on 2004/02/02
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Stylesheet.java

      -Committer's log entry: -Fix for bugzilla bug report 23046. - -For included stylesheet, set the _numberFormattingUsed flag to true -for its including stylesheet too.

      - -Reviewed by Henry Zongaro (zongaro@ca.ibm.com)

    • - -
    • Committed by santiagopg@apache.org on 2004/02/05
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FilterExpr.java Predicate.java Step.java StepPattern.java

      -Committer's log entry: -Patch for Bugzilla 19194. I've made the following changes: (i) re-wrote Predicate.typeCheck() (ii) the predicate optimizations are -turned off for FilterExpr, as they don't apply in all cases (iii) sync up Step, StepPattern and FilterExpr to accomodate the new -changes. The interaction between these classes is non-trivial, and the code for some optimizations is brittle, to say the least. -As part of this patch, I rolled back a patch to FilterExpr and fixed Bugzilla 25783 which wasn't really related despite what the -bug report states. For the 2.0 work, it would be nice to place optimization code in separate classes so that it can be easily -maintained and also easily deactivated via a command-line flag.

    • - -
    • Committed by jycli@apache.org on 2004/02/10
      -Modified: xml-xalan/java/src/org/apache/xpath/functions FuncRound.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler -RoundCall.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java

      -Committer's log entry: -Fix for bugzilla bug report 24111. - -The string values for both positive and nagative zero are 0. However, -a number div 0 returns Infinity, a number div -0 returns -Infinity.

    • - -
    • Committed by santiagopg@apache.org on 2004/02/11
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Predicate.java

      -Committer's log entry: -Fix for Bugzilla 24788. NodeValue optimization was too optimistic. Since the value in 'step = value' is not -compiled in the predicate's context, it must be limited to expressions that are context independent, but this -was not the case as the example in 24788 shows.

    • - -
    • Committed by santiagopg@apache.org on 2004/02/12
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2TO.java

      -Committer's log entry: -Committing patch by Bhakti for XSLTC. If attributes are created without an explicit prefix, then NamespaceMappings.generateNextPrefix -will be called to generate a prefix. Also if elements are created using createElementNS(null,localname) then they will be -serialized properly without being in default namespace.

    • - -
    • Committed by jycli@apache.org on 2004/02/13
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java

      -Committer's log entry: -A slightly faster implementation of round function.

    • - -
    • Committed by jycli@apache.org on 2004/02/16
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java

      -Committer's log entry: -Fix a bug introduced during optimizing for the previous code -Should check for NaN cases.

    • - -
    • Committed by minchau@apache.org on 2004/02/16
      -Modified: Most files in the Xalan Java cvs repository (too many to list)

      -Committer's log entry: -New Apache 2.0 license update.

    • - -
    • Committed by igorh@apache.org on 2004/02/19
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom AdaptiveResultTreeImpl.java

      -Committer's log entry: -Fix for Bugzilla Bugs 24793.

    • - -
    • Committed by bhakti@apache.org on 2004/02/20
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2TO.java

      -Committer's log entry: -Fix for the bug in DOM2TO where there was a call to _handler.addAttribute -which was moved to the if clause and hence attributes in no namespace were -lost when using an identity transformation with DOMSource.

      - -Thanks to Henry Z. for pointing it out and Santiago for reviewing. I have tested it locally. Please let me -know if you see any issues with this.

    • - -
    • Committed by jycli@apache.org on 2004/02/20
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java

      -Committer's log entry: -Fix for bugzilla bug report 26697 - -XSLTC supports convert a NodeList to an internal DOM iterator. -Use setAttributeNS method to copy attribute node when an attribute -has a prefix, which maps to a namespace URI

      - -Reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • - -
    • Committed by jycli@apache.org on 2004/02/23
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java

      -Committer's log entry: -Always use setAttributeNS() method and pass null as its namespace for non-namespaced nodes. -Thanks Joe Kesselman for pointing it out.

    • - -
    • Committed by aruny@apache.org on 2004/02/23
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java FunctionCall.java Param.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ReferenceType.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime -CallFunction.java ObjectFactory.java SecuritySupport.java SecuritySupport12.java

      -Committer's log entry: -Description : Adding the basic functionality for resolving external function dynamically. If static resolution fails then -Dynamic resolution is used as last resort.

    • - -
    • Committed by igorh@apache.org on 2004/02/23
      -Modified: xml-xalan/java/src/org/apache/xalan/res XSLTErrorResources.java xml-xalan/java/src/org/apache/xalan/transformer -TransformerIdentityImpl.java TransformerImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -ErrorMsg.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java

      -Committer's log entry: -Patch for Bugzilla Bug 25368 submitted by Joanne Tong.

    • - -
    • Committed by zongaro@apache.org on 2004/02/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CallTemplate.java VariableBase.java WithParam.java

      -Committer's log entry: -Patch for Bugzilla bug reports 24988 and 25368 from Joanne Tong -(joannet@ca.ibm.com) reviewed by myself.

      - -24988: -Changes required to test whether an attribute value that is required to be -a QName, NCName or whitespace-separated list of QNames actually meets that -requirement.

      - -25368: -Code was basing variable and parameter names on the local part of the name, -rather than including the namespace URI in the name. This resulted in -collisions in the generated code between distinct variables that had the same -local-name.

    • - -
    • Committed by zongaro@apache.org on 2004/02/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Number.java Predicate.java Sort.java Variable.java -VariableRef.java

      -Committer's log entry: -Patch for Bugzilla bug report 25368 from Joanne Tong (joannet@ca.ibm.com) -reviewed by myself.

      - -Code was basing variable and parameter names on the local part of the name, -rather than including the namespace URI in the name. This resulted in -collisions in the generated code between distinct variables that had the same -local-name.

    • - -
    • Committed by zongaro@apache.org on 2004/02/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java

      -Committer's log entry: -Part of fix for bug report 24985. The code that resulted for a NodeTest of -the form "@p:*" or "attribute::p:*" was identical to that for "@*" - in other -words, the prefix was not being tested. Fixed this so that -DOM.getNamespaceAxisIterator is used to create the right kind of iterator.

      - -Reviewed by Morris Kwan (mkwan@ca.ibm.com).

    • - -
    • Committed by zongaro@apache.org on 2004/02/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java

      -Committer's log entry: -Part of fix for bug reports 24985 and 24365.

      - -Moved the NamespaceChildrenIterator and NamespaceAttributeIterator classes into -this class from SAX2DTM2, where they can use fields specific to SAXImpl to -refer to namespace information.

      - -Also added a new NamespaceWildcardIterator that handles axes other than the -child and attribute axes (which are handled by the specific iterators already -mentioned).

      - -Reviewed by Morris Kwan (mkwan@ca.ibm.com).

    • -
    -
    - -

    XSLTC source code updates:

    -
      -
    • Committed by grchiu@apache.org on 2003/06/11
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Expression.java
      -Committer's log entry: -Fix for bugzilla 20685. In startResetIterator(), check see if the -expression wrapped by the CastExpr is a VariableRef. If so, don't -generate a call to setStartNode.

    • -
    • Committed by mkwan@apache.org on 2003/06/16
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java
      -Committer's log entry: Fix a minor bug in MultiDOM.addDOMAdapter().

    • -
    • Committed by ilene@apache.org on 2003/06/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc DOMCache.java xml-xalan/java/src/org/apache/xalan/xsltc/dom -DocumentCache.java LoadDocument.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      -Committer's log entry: -Patch for bugzilla #15828. -Arguments to URIResolver.resolve method for document function, in XSLTC are now -href: argument passed to document function -base: URI of stylesheet

    • -
    • Committed by ilene@apache.org on 2003/06/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      -Committer's log entry: -Putting back LoadDocument.java

    • -
    • Committed by ilene@apache.org on 2003/06/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      -Committer's log entry: -Patch for bugzilla #15828. -Arguments to URIResolver.resolve method for document function, in XSLTC are now -href: argument passed to document function -base: URI of stylesheet

    • -
    • Committed by ilene@apache.org on 2003/06/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      -Committer's log entry: -Putting back TransformerImpl

    • -
    • Committed by ilene@apache.org on 2003/06/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      -Committer's log entry: -Patch for bugzilla #15828. -Arguments to URIResolver.resolve method for document function, in XSLTC are now -href: argument passed to document function -base: URI of stylesheet

    • -
    • Committed by zongaro@apache.org on 2003/06/19
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      -Committer's log entry: -Added SAXTransformerFactory.FEATURE and SAXTransformerFactory.FEATURE_XMLFILTER -to the list of features that are implemented. Fix for bug 20795.

    • -
    • Committed by mkwan@apache.org on 2003/06/23
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc DOM.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler SyntaxTreeNode.java -xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java MultiDOM.java SAXImpl.java SimpleResultTreeImpl.java
      -Committer's log entry: -Performance improvement for XSLTC -Don't add a simple or adaptive RTF to the DTMManager if the nodeset -extension is not used. The DOMAdapters are also not created in -this case. This is a noticeable improvement for stylesheets that use -many small RTFs but do not use the nodeset extension.

    • -
    • Committed by mkwan@apache.org on 2003/06/23
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CallTemplate.java Mode.java Param.java Template.java WithParam.java -xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util NamedMethodGenerator.java
      -Committer's log entry: -Performance improvement for XSLTC - -New codegen solution for parameter passing in named templates, -which provides significant improvement for stylesheets that use -xsl:call-template and xsl:with-param heavily. - -The old solution generates code to call Translet.addParameter(), -which seems to be too expensive. In the new solution, parameters -are passed to named templates via method arguments. The method -signature for a named template is not fixed. It depends on the number -of parameters declared in the template. - -The caller (xsl:call-template) is responsible for generating the -correct parameter list and passes it to the called template. This is -done in the CallTemplate class, which finds out the corresponding -called template and processes its own xsl:with-param children together -with the xsl:params in the called template to generate an effective -parameter list. In the case where a xsl:param references another xsl:param, -local variables are generated to hold the temporary parameter value.

    • -
    • Committed by ilene@apache.org on 2003/06/23
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      -Committer's log entry: -Patch for bugzilla #15828.

    • -
    • Committed by mkwan@apache.org on 2003/06/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TrAXFilter.java
      -Committer's log entry: -Add a "public Transformer getTransformer()" method to XSLTC's TrAXFilter class. -The Xalan TrAXFilter class already has such an interface.

    • -
    • Committed by mkwan@apache.org on 2003/06/24
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java XSLTCSource.java
      -Committer's log entry: -Fix for XSLTCSource (see bugzilla 21048).

    • -
    • Committed by mkwan@apache.org on 2003/06/24
      -Modified: xml-xalan/java/xdocs/sources/xsltc xsltc_trax_api.xml
      -Committer's log entry: -Update documentation about how to use XSLTCSource.

    • -
    • Committed by mkwan@apache.org on 2003/06/25
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java VariableBase.java -xml-xalan/java/src/org/apache/xalan/xsltc/dom CachedNodeListIterator.java ClonedNodeListIterator.java
      -Committer's log entry: -Performance improvement for XSLTC - -Introduce two new iterators (CachedNodeListIterator and CloneNodeListIterator). -They are used by variable/param references that are evaluated to nodesets. -CachedNodeListIterator traverses the underlying iterator once and caches the -nodes in an IntegerArray. Its clone() method returns an object of -CloneNodeListIterator, which also retrieves nodes from the cache. - -This mostly improves the case where a variable is referenced multiple times -in a context. In the old code, the iterator for the variable is traversed -as many times as the variable is referenced. Using the cached iterators, -the iterator is only traversed once. All later references retrieve nodes -from the cache. -

    • -
    • Committed by mkwan@apache.org on 2003/06/25
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java MultiDOM.java -xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java xml-xalan/java/src/org/apache/xalan/xsltc/trax -TemplatesImpl.java
      -Committer's log entry: -Implement a feature to cache the DTM for the stylesheet in -the Templates object. This improves the case where document('') -is used. In this case the DTM for the stylesheet is only built -once per thread. It can be reused by multiple transformers -created by the sample Templates. -

    • -
    • Committed by grchiu@apache.org on 2003/06/26
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom UnionIterator.java
      -Committer's log entry: -Patch from Christine Li (jycli@ca.ibm.com) for bugzilla 20913, with -modifications. In UnionIterator, after calling the getLast() method, the -heap is not restored properly. Recreate the heap in gotoMark(), as well -as restore _returnedLast and _heapSize.

    • -
    • Committed by ilene@apache.org on 2003/06/30
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DocumentCache.java
      -Committer's log entry: -Put back DocumentCache

    • -
    • Committed by ilene@apache.org on 2003/06/30
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java xml-xalan/java/src/org/apache/xalan/xsltc -DOMCache.java xml-xalan/java/src/org/apache/xalan/xsltc/dom DocumentCache.java
      -Committer's log entry: -Update the DocumentCache class to be compatible with the DOMCache -interface. Although, with the native interface no longer supported, users -should not be using the DocumentCache. Instead they should set a -URIResolver on the Transformer in order to resolve arguments -passed to the document function.

    • -
    • Committed by ilene@apache.org on 2003/06/30
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      -Committer's log entry: -Fix for 3 trax.localPath failures.

    • -
    • Committed by mkwan@apache.org on 2003/07/07
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      -Committer's log entry: -Fix a memory leak problem with the DTMManager.

    • -
    • Committed by mkwan@apache.org on 2003/07/08
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CallTemplate.java Stylesheet.java Template.java
      -Committer's log entry: -Fix a few conformance regressions introduced by the addParameter -optimization work.

    • -
    • Committed by mkwan@apache.org on 2003/07/10
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/util IntegerArray.java
      -Committer's log entry: -Fix for bugzilla 20074. Don't create an IntegerArray of size 0.

    • -
    • Committed by ilene@apache.org on 2003/07/11
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java ErrorMsg.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerHandlerImpl.java
      -Committer's log entry: -XSLTC: TransformerHandler.setResult should throw an IllegalArgumentException -when the result argument is null.

    • -
    • Committed by mkwan@apache.org on 2003/07/16
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util MethodGenerator.java
      -Committer's log entry: -Fix for bug 20256. Remove an unused reference to an -inexistent class.

    • -
    • Committed by ilene@apache.org on 2003/07/21
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Import.java Include.java
      -Committer's log entry: -Patch for bugzilla #20537. -When URIResolver was set for includes/imports, the system id of the included/imported -files was not always set correctly.

    • -
    • Committed by zongaro@apache.org on 2003/07/22
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Predicate.java
      -Committer's log entry: -Applying patch from Igor Hersht (igorh@ca.ibm.com) for Bugzilla bug 18821. -At some point in the recent past, Predicate started trying to optimize filter -expressions with positional predicates, but the receiving code in FilterExpr -was always incorrect. The fixes to FilterExpr and related code aren't so -straightforward, so the easiest thing to do for now is to disable the -broken optimization for FilterExpr objects.

    • -
    • Committed by zongaro@apache.org on 2003/07/22
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom UnionIterator.java
      -Committer's log entry: -Applying patch from Igor Hersht (igorh@ca.ibm.com) for Bugzilla bug 18821. -Nested iterators in UnionIterator weren't correctly handling multiple calls to -setStartNode in generated code. Fixed by ignoring calls after the first.

    • -
    • Committed by mkwan@apache.org on 2003/07/25
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler LiteralElement.java
      -Committer's log entry: -Fix for bugzilla 20832. Also fix testcase attribset19.

    • -
    • Committed by mkwan@apache.org on 2003/07/25
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      -Committer's log entry: -Fix for bugzilla 21805.

    • -
    • Committed by zongaro@apache.org on 2003/08/01
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      -Committer's log entry: -Added code to create static char[] fields in the translet containing the -literal text in the source stylesheet. The code generation for xsl:comment and -for literal text that constructs text nodes takes advantage of this by using -the serializer's comment(char[],int,int) and characters(char[],int,int) methods, -respectively, rather than the comment(String) and characters(String) methods. -The former pair of methods avoid some potential overhead in the serializer from -copying the contents of strings to char[] objects. - -Code that creates a static initializer method in a translet was written by -Morris Kwan (mkwan@ca.ibm.com). - -Reviewed by Morris Kwan (mkwan@ca.ibm.com) -

    • -
    • Committed by zongaro@apache.org on 2003/08/01
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Comment.java Constants.java Text.java XSLTC.java
      -Committer's log entry: -Added code to create static char[] fields in the translet containing the -literal text in the source stylesheet. The code generation for xsl:comment and -for literal text that constructs text nodes takes advantage of this by using -the serializer's comment(char[],int,int) and characters(char[],int,int) methods, -respectively, rather than the comment(String) and characters(String) methods. -The former pair of methods avoid some potential overhead in the serializer from -copying the contents of strings to char[] objects. - -Reviewed by Morris Kwan (mkwan@ca.ibm.com)

    • -
    • Committed by grchiu@apache.org on 2003/08/06
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java
      -Committer's log entry: -Patch from Bruno Dumon (bruno@outerthought.org) for bugzilla 20114. -When using XSLTC's TemplatesHandler to create templates, errors are never -reported; getTemplates() just returns null. -Changed behaviour to be inline with Xalan behaviour: stylesheets are -compiled in the endDocument() event and a SAXException wrapping the real -exception is thrown.

    • -\
    • Committed by igorh@apache.org on 2003/08/08
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler AttributeSet.java Constants.java -UseAttributeSets.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util AttributeSetMethodGenerator.java
      -Committer's log entry: -Patch for Bugzilla Bug 19918

    • -
    • Committed by mkwan@apache.org on 2003/08/12
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java
      -Committer's log entry: -Fix bytecode generation problem for extension method calls via -interfaces for bugzilla 22115.

    • -
    • Committed by minchau@apache.org on 2003/08/12
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler LiteralElement.java
      -Committer's log entry: -PR: bugzilla 19972 -Submitted by: William Lee (william.lee@cognos.com) -Reviewed by: Brian Minchau and Gordon Chui - -The code loops over elements in a Vector, incrementing the index j. -Some elements should not be processed so they were removed from the Vector. -The removal of element "j" shifted all higher elements down and made the -Vector 1 shorter. So removal of an element and incrementing "j" actually caused -elements to be skipped. - -It is not quite clear why the element is being removed from the Vector rather -than just skipped over. For safety sake an iteration over the loop either removes an -element, or increments "j", but not both in the same iteration.

    • -
    • Committed by zongaro@apache.org on 2003/08/27
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      -Committer's log entry: -Applying patch for bug 19973 from Christine Li (jycli@ca.ibm.com). -A call to buildKeys (for xsl:key) should be generated before a call to topLevel -(to handle top-level variable and parameter declarations) because top-level -variables and parameters can contain references to the key() function, but not -the other way around.

    • -
    • Committed by zongaro@apache.org on 2003/09/05
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler VariableRefBase.java
      -Committer's log entry: -Applied patch for bug 22769 from Christine Li (jycli@ca.ibm.com). If a -variable reference occurs inside the definition of another variable, XSLTC adds -a dependency link upon the referenced variable to the defined variable. -However, if the referenced variable was overrode by another variable definition -with higher import precendence, the dependency should be placed on the -overriding variable instead.

    • -
    • Committed by santiagopg@apache.org on 2003/09/09
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/trax Util.java
      -Committer's log entry: -Moved return statements outside of finally block. The compiler correctly points out that when an exception is not caught by a catch, the -finally block cannot return normally.

    • -
    • Committed by santiagopg@apache.org on 2003/10/03
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      -Committer's log entry: -Ensure we set a non-empty name for the translet even when one cannot be obtained from the systemId.

    • -
    • Committed by santiagopg@apache.org on 2003/10/06
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CallTemplate.java
      -Committer's log entry: -Fixed problem in XSLT parameter optimization. The search for the template being called should start from the top-level stylesheet. -The incorrect signature was generated when xsl:template and xsl:call-template were located in different stylesheets.

    • -
    • Committed by santiagopg@apache.org on 2003/10/06
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      -Committer's log entry: -(Committing this again to get the log message right! - c.f. revision 1.54) -1. Added Javadoc comments to instance variables. -2. getAllValidTemplates() now caches result in top-level stylesheet. -3. setSystemId() maps a file system path to a URI (if needed).

    • -
    • Committed by santiagopg@apache.org on 2003/10/06
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Import.java Include.java xml-xalan/java/src/org/apache/xalan/xsltc/dom -SAXImpl.java
      -Committer's log entry: -1. New code to map relative paths to URIs in Include.java and Import.java. -2. If SourceLoader returns null, the JAXP API states that the processor -should attempt to resolve the reference. Changed the logic to do this. -(1 and 2 should solve some of the problems we have resolving relative -paths and also using URI resolvers. More testing is needed, though).

    • -
    • Committed by santiagopg@apache.org on 2003/10/07
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CastCall.java Parser.java xpath.cup
      -Committer's log entry: -Adding a new extension function for XSLTC. Using this extension function, it is -possible to recover type information lost by the use of xsl:param (see Bugzilla -19038). Here is an example: - -<xsl:stylesheet version="1.0" - xmlns:xsl="http://www.w3.org/1999/XSL/Transform" - xmlns:java="http://xml.apache.org/xalan/java" - xmlns:xsltc="http://xml.apache.org/xalan/xsltc"> - -<xsl:param name="object"/> - -<xsl:template match="/"> - <xsl:value-of select="java:length(xsltc:cast('java.lang.String', $object))"/> -</xsl:template> - -</xsl:stylesheet> - -Without using xsltc:cast(), XSLTC will report an error as the type of param -'object' cannot be determined statically. The type of xsltc:cast() is: - -object[T] cast('T', reference | object[R]) - -where 'T' indicates that the type of the first argument must be a literal -string. A ClassCastException may be thrown at runtime if R is not convertible -to T. - -I believe we still need a fully-dynamic solution that does not rely on this -extension function. However, the two solutions can coexists, especially since -using xsltc:cast() will always be more efficient than any alternative based -on Java reflection.

    • -
    • Committed by igorh@apache.org on 2003/10/10
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/dom -DOMAdapter.java SAXImpl.java
      Committer's log entry: -Patch for Bugzilla Bug 14607

    • -
    • Committed by mkwan@apache.org on 2003/10/15
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java
      -Committer's log entry: -Fix the makeNode and makeNodeList methods in SAXImpl for bugzilla 23115.

    • -
    • Committed by mkwan@apache.org on 2003/10/15
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Sort.java
      -Committer's log entry: -Apply the patch for bugzilla 23271 from Bruno Fernandez-Ruiz (brunofr@olympum.com).

    • -
    • Committed by minchau@apache.org on 2003/10/15
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      -Committer's log entry: -PR: bugzilla 15901 -Submitted by: Brian Minchau -Reviewed by: John Meyer (bug reporter) - -XSLTC now uses properties from the serializer's factory rather than -setting its own defaults. This makes XSLTC's default serialializer -properties (indentation, entity file ... ) the same as Xalan-J.

    • -
    • Committed by minchau@apache.org on 2003/10/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler BinOpExpr.java LogicalExpr.java Predicate.java -RelationalExpr.java UnaryOpExpr.java
      Committer's log entry: -PR: bugzilla 15327 -Submitted by: Christine Li -Reviewed by: Brian Minchau -Fix for XSLTC problems with [last()] and [last()-1] predicates.

    • -
    • Committed by santiagopg@apache.org on 2003/10/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Import.java -Include.java Stylesheet.java xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java
      -Committer's log entry: -Replace ad-hoc code to resolve relative URIs by calls to the xml.utils.SystemIDResolver -class. This change fixes a few a regressions and also simplifies the code in XSLTC.

    • -
    • Committed by santiagopg@apache.org on 2003/10/17
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CastCall.java -CastExpr.java FunctionCall.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util -ObjectType.java StringType.java Type.java
      -Committer's log entry: -Allow conversion between types 'string' and 'object[java.lang.String]'. -Conversion is trivial as instances of both types have the same runtime -representation. This was needed in order to write expressions such -as, - string:new(xsltc:cast('java.lang.String', $object)) -where 'object' is a param bound to a value of type 'java.lang.String'.

    • -
    • Committed by zongaro@apache.org on 2003/10/20
      -Modified: xml-xalan/java/src/org/apache/xalan/transformer -TransformerIdentityImpl.java TransformerImpl.java -xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      -Committer's log entry: -Patch from Christine Li (jycli@ca.ibm.com) for Bugzilla bug report 22167. -When the zero-argument constructor of DOMSource, StreamSource or SAXSource is -invoked, and no setter method is called to specify an actual source, the -source should be treated as if it contained only a root node.

    • -
    • Committed by santiagopg@apache.org on 2003/10/20
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java
      -Committer's log entry: -Check for null before setting DTM base URI.

    • -
    • Committed by santiagopg@apache.org on 2003/10/21
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax Util.java
      -Committer's log entry: -Fix for regression in Resolve002 TCK.

    • -
    • Committed by mkwan@apache.org on 2003/10/22
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java -UnsupportedElement.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime -BasisLibrary.java ErrorMessages.java
      -Committer's log entry: -Apply Joanne Tong (joannet@ca.ibm.com) patch for bugzilla 23706, -with my own modifications. I also fixed bug 23896 in the same -patch. - -This patch includes the fixes for the following: -1. an unsupported XSL element will trigger a syntax error in 1.0 mode. -2. In forward-compatibility mode, if an unsupported XSL element is in -a template, has no fallback, it will trigger a runtime error if it is -instantiated. -3. All fallback children are called in sequence. The old code only makes -use of the first fallback child. -4. Only direct fallback children are processed. The old code finds the fallback -from all descendants of an unsupported element, which is wrong behavior -according to the spec.

    • -
    • Committed by santiagopg@apache.org on 2003/10/22
      -Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
      -Committer's log entry: -Committing path for bugzilla 22438 from Bhakti Mehta (Bhakti.Mehta@sun.com). This patch -fixes serialization problems of Templates objects in XSLTC. A user-defined URIResolver -associated to a Templates object is also serialized whenever possible (i.e. if it is also -serializable).

    • -
    -
    - -

    XSLTC source code updates:

    • Committed by zongaro@apache.org on 2003/04/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler DocumentCall.java xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      Committer's log entry: -Applying patches from Igor Hersht (igorh@ca.ibm.com) for bug 15200 and -bug 18585. - -Fixed up code that processes the document function when it has two arguments, -the second of which must be a node-set; the code didn't always resolve the -value of the first argument against the first node in the second argument, as it -should have. - -In addition, in order to simplify run-time processing, added a new -LoadDocument.documentF method that is used when the second argument to the XSLT -document function is present; if that argument is an empty node-set, the result -of the document function should be an empty node-set, and that logic is much -easier to code in the run-time than via generated code. -

    • Committed by santiagopg@apache.org on 2003/04/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java
      Committer's log entry: - - Set SourceLocator in stylesheet instead of XSLTC object. This ensures - proper use of user-defined URIResolvers in a TemplatesHandler. -

    • Committed by santiagopg@apache.org on 2003/04/24
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java
      Committer's log entry: - - Output properties were not properly cleared when reusing the same instance - of a TemplatesHandlerImpl. The top-level stylesheet in the XSLTC object - referenced by TemplatesHandlerImpl (indirectly via an instance of Parser) - was not reset after the first use of the instance. -

    • Committed by mkwan@apache.org on 2003/05/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java TransformerFactoryImpl.java
      Committer's log entry: -Fix a multithread safety issue in the use-classpath option. The old code -reuses a Translet object for all newTransformer() calls, which is not the -right thing to do. We should pass in a Class array and let TemplateImpl -create a new Translet instance for each newTransformer() call. -

    -
    - -

    XSLTC source code updates:

    -
    • Committed by santiagopg@apache.org on 2003/02/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java Message.java
      Committer's log entry: - New implementation of xsl:message that does not use RTFs. Using RTFs - is both slow and problematic since the number of RTFs that can be - created is limited in XSLTC. - - The new implementation uses a StreamXMLOutput and a StringWriter to - output the template body as a string (in some cases, NS declarations - will be included and this behavior differs from the old implementation). - Additionally, the new implementation optimizes the case where the - message is empty and where the message is just a literal string. - - The bug was reported by Mark Brunkhart (mark@matchanalysis.com). -

    • Committed by santiagopg@apache.org on 2003/02/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc DOM.java xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java DOMImpl.java MultiDOM.java
      Committer's log entry: - Removed the getTreeString() method from the DOM interface (as well as - from all the classes that implement this interface). This update will - require a sync with the XSLTC_DTM branch, but there was no point in - keeping this method when it's no longer used. -

    • Committed by santiagopg@apache.org on 2003/02/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ReferenceType.java
      Committer's log entry: - Fix for Bugzilla 17447. Conversion from reference type to string type - assumed the existence of the "current" local variable, which is - unavailable at top-level. -

    • Committed by mkwan@apache.org on 2003/02/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java
      Committer's log entry: -XSLTC_DTM performance work -Improvement for xsl:copy-of. Instead of using the expensive getFirstAttribute() -and getFirstNamespace() interfaces, increase the element id by 1 to iterate -through all attribute and namespace nodes. -

    • Committed by mkwan@apache.org on 2003/02/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java
      Committer's log entry: -XSLTC_DTM performance work -Minor cleanup to SAXImpl.copy() and copyElement(). Introduce a new interface -handleTextEvents() to handle Text nodes more efficiently. -

    • Committed by mkwan@apache.org on 2003/03/05
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc DOM.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler SyntaxTreeNode.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ResultTreeType.java xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java DOMImpl.java MultiDOM.java SAXImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java xml-xalan/java/src/org/apache/xalan/xsltc/trax XSLTCSource.java
      Committer's log entry: -XSLTC_DTM performance work - -Design a new DOM model (SimpleResultTreeImpl) for simple result tree -fragment (RTF). A simple RTF is an RTF which has only one Text node. -It can be generated by a combination of Text, xsl:value-of and xsl:number -instructions. It can also be generated by xsl:if or xsl:choose, as far -as the content of the control body is pure Text. The code to detect whether -an RTF is simple is in SyntaxTreeNode.isSimpleRTF(). - -Before this change, an RTF is represented by a SAXImpl object. SAXImpl is -a heavy-weight class in that it allocates a lot of array objects for storage. -In the case where the RTF is only one Text node, creating a SAXImpl is just -too expensive. - -A SimpleResultTreeImpl has only two nodes, i.e. the root node and the Text -node. All DOM interfaces are overridden to handle this simplified model. -SimpleResultTreeImpl has a few internal iterators, which is designed to support -the nodeset() extension function. - -This change brings a significant improvement to stylesheets that create -a lot of simple RTFs. Some testcases are more than 100% faster after the change. -

    • Committed by mkwan@apache.org on 2003/03/05
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SimpleResultTreeImpl.java
      Committer's log entry: -Add a new class SimpleResultTreeImpl as the model for simple RTF. -

    • Committed by mkwan@apache.org on 2003/03/06
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java NodeSortRecord.java SAXImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamXMLOutput.java xml-xalan/java/src/org/apache/xalan/xsltc/util IntegerArray.java
      Committer's log entry: -XSLTC_DTM performance work - -A few small improvements. More space efficient version of IntegerArray.clone(). -Rearrange the condition checking in StreamXML(HTML)Output.escapeCharacters(). -Only create one default Collator instance in NodeSortRecord. -

    • Committed by mkwan@apache.org on 2003/03/07
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java SAXImpl.java
      Committer's log entry: -XSLTC_DTM performance work -Small tweaks in DOMAdapter. Invoking a final method is generally faster than -invoking a method via interface. -

    • Committed by mkwan@apache.org on 2003/03/07
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamOutput.java
      Committer's log entry: -XSLTC_DTM performance work -Improvement in StreamOutput.escapeString(). Do not create the StringBuffer -if there is nothing to escape. - -This change needs to be put back to the new serializer if it uses the same -code. -

    • Committed by mkwan@apache.org on 2003/03/07
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime StringValueHandler.java
      Committer's log entry: -XSLTC_DTM performance work -Use a more sophisticated algorithm in StringValueHandler. -Do not create new Strings if there is only String value. -Creating many new Strings is an expensive operation. -

    • Committed by mkwan@apache.org on 2003/03/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java
      Committer's log entry: -Fix a bug that causes id function testcases to fail in trax.sax flavor. -

    • Committed by mkwan@apache.org on 2003/03/11
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      Committer's log entry: -XSLTC_DTM performance work -Set the namespace feature directly on the XMLReader. SAXParserFactory.setFeature() -actually creates a temporary SAXParser to verify that feature. So we end up creating -two SAXParsers per document() call in the old code. -

    • Committed by mkwan@apache.org on 2003/03/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom AdaptiveResultTreeImpl.java
      Committer's log entry: -file AdaptiveResultTreeImpl.java was initially added on branch XSLTC_DTM. -

    • Committed by mkwan@apache.org on 2003/03/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc DOM.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler SyntaxTreeNode.java xml-xalan/java/src/org/apache/xalan/xsltc/dom AdaptiveResultTreeImpl.java DOMAdapter.java DOMImpl.java MultiDOM.java SAXImpl.java SimpleResultTreeImpl.java
      Committer's log entry: -XSLTC_DTM performance work - -Design a light-weight DOM model (AdaptiveResultTreeImpl) for RTFs with xsl:call-template. - -AdaptiveResultTreeImpl is a adaptive DOM model for result tree fragments (RTF). It is -used in the case where the RTF is likely to be pure text yet it can still be a DOM tree. -It is designed for RTFs which have <xsl:call-template> or <xsl:apply-templates> in -the contents. Example: - - <xsl:variable name = "x"> - <xsl:call-template name = "test"> - <xsl:with-param name="a" select="."/> - </xsl:call-template> - </xsl:variable> - -In this example the result produced by <xsl:call-template> is likely to be a single -Text node. But it can also be a DOM tree. This kind of RTF cannot be modelled by -SimpleResultTreeImpl. - -AdaptiveResultTreeImpl can be considered as a smart switcher between SimpleResultTreeImpl -and SAXImpl. It treats the RTF as simple Text and uses the SimpleResultTreeImpl model -at the beginning. However, if it receives a call which indicates that this is a DOM tree -(e.g. startElement), it will automatically transform itself into a wrapper around a -SAXImpl. In this way we can have a light-weight model when the result only contains -simple text, while at the same time it still works when the RTF is a DOM tree. - -All methods in this class are overridden to delegate the action to the wrapped SAXImpl object -if it is non-null, or delegate the action to the SimpleResultTreeImpl if there is no -wrapped SAXImpl. -

    • Committed by mkwan@apache.org on 2003/03/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java
      Committer's log entry: -XSLTC_DTM performance work -Save the DTMManager in a field in MultiDOM. Don't compute it -everytime in MultiDOM.getDTMId(). -

    • Committed by mkwan@apache.org on 2003/03/13
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime StringValueHandler.java
      Committer's log entry: -Fix a bug which causes the docbook testcase to fail. -

    • Committed by mkwan@apache.org on 2003/03/14
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java
      Committer's log entry: -XSLTC_DTM performance work -Improvement in MultiDOM. Make the nodeHandle to DOMAdapter mapping a -straight map. The code in getDTMId() is much light-weight than before, -because the complicated stuff is moved to addDOMAdapter() which is only -called once per DTM. In the case where the DTM id runs across several -addressing range (the size of each range is 65536 - an unusal case), -there will be several items in the adapter array for one DTM. -

    • Committed by zongaro@apache.org on 2003/03/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ProcessingInstructionPattern.java
      Committer's log entry: -Applying patch for bug 15332 from Igor Hersht (igorh@ca.ibm.com). Ensure that -patterns of the form processing-instruction() and processing-instruction('name') -are given the right priorities. -

    • Committed by zongaro@apache.org on 2003/03/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ProcessingInstructionPattern.java
      Committer's log entry: -Applying patch for bug 15332 from Igor Hersht (igorh@ca.ibm.com). Ensure that -patterns of the form processing-instruction() and processing-instruction('name') -are given the right priorities. -

    • Committed by zongaro@apache.org on 2003/03/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ProcessingInstructionPattern.java
      Committer's log entry: -Applying patch for bug 15332 from Igor Hersht (igorh@ca.ibm.com). Ensure that -patterns of the form processing-instruction() and processing-instruction('name') -are given the right priorities. -

    • Committed by mkwan@apache.org on 2003/03/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java DOMWSFilter.java KeyIndex.java LoadDocument.java SAXImpl.java XSLTCDTMManager.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2SAX.java TransformerImpl.java
      Committer's log entry: -XSLTC_DTM performance work - -New solution for DOM input. Use SAXImpl + DOM2SAX to handle DOM -input. This is the solution used in the old XSLTC. The DOMImpl -class is completely deprecated. This solution is better -than DOMImpl on top of DOM2DTM for the following reasons: - -1. DOM2DTM is known to be slow. -2. DOM2DTM is an incremental model while DOMImpl is not. -3. There are too much code duplication between DOMImpl and SAXImpl - -Under the new solution, any improvement to SAXImpl and SAX2DTM2 will -also benefit the DOM case. There is no need to have separate optimizations -for the DOM case. - -This solution is a little sophisticated than the old XSLTC solution in -that we borrow some code from DOM2DTM (e.g. handling for id function -and unparsed entity). The end result is that conformance in trax.dom -is better than the old XSLTC. -

    • Committed by santiagopg@apache.org on 2003/03/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util VoidType.java
      Committer's log entry: - - Override definition of Type.POP() in VoidType to return NOP instead of POP. - If type is void, there's nothing to be popped. This problem shows up when - invoking an external Java function whose return type is void. -

    • Committed by zongaro@apache.org on 2003/03/19
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Import.java Include.java Parser.java SyntaxTreeNode.java XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages_no.java ErrorMessages.java ErrorMsg.java TypeCheckError.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java ErrorMessages_no.java ErrorMessages.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -Changed XSLTC messages to extend ListResourceBundle, and use String keys to -access messages. Code used to extend ResourceBundle and used to use integer -indices to access error messages. - -Changes from myself and Gordon Chiu (grchiu@uwaterloo.ca). -

    • Committed by zongaro@apache.org on 2003/03/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Import.java Include.java Parser.java SyntaxTreeNode.java XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages_no.java ErrorMessages.java ErrorMsg.java TypeCheckError.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java ErrorMessages_no.java ErrorMessages.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -Changed XSLTC messages to extend ListResourceBundle, and use String keys to -access messages. Code used to extend ResourceBundle and used to use integer -indices to access error messages. - -Changes from myself and Gordon Chiu (grchiu@uwaterloo.ca). -

    • Committed by zongaro@apache.org on 2003/03/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java DecimalFormatting.java Constants.java DecimalFormatting.java
      Committer's log entry: -The generated code for xsl:decimal-format used the no argument constructor of -DecimalFormatSymbols, which is affected by the default locale. The default -attribute values for xsl:decimal-format should not be affected by the default -locale. Instead, the en_US Locale should be passed to the constructor, as it -has settings that are consistent with the defaults for xsl:decimal-format. -

    • Committed by zongaro@apache.org on 2003/03/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java DecimalFormatting.java
      Committer's log entry: -The generated code for xsl:decimal-format used the no argument constructor of -DecimalFormatSymbols, which is affected by the default locale. The default -attribute values for xsl:decimal-format should not be affected by the default -locale. Instead, the en_US Locale should be passed to the constructor, as it -has settings that are consistent with the defaults for xsl:decimal-format. -

    • Committed by santiagopg@apache.org on 2003/03/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XslAttribute.java
      Committer's log entry: - - Fix for Bugzilla 18162. Warnings are still reported if an occurrence of - xsl:attribute *may* result in a runtime error. -

    • Committed by santiagopg@apache.org on 2003/03/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Committing patch by Arun Yadav (Arun.Yadav@sun.com) that fixes the problem -of using "." or "-" as part of the name of a parameter (Bugzilla 15636). -

    • Committed by santiagopg@apache.org on 2003/03/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler KeyCall.java
      Committer's log entry: -Committing patch from Arun Yadav (arun.yadav@sun.com) for Bugzilla -15830. Correct handling for id()/key() values of type result-tree. -

    • Committed by santiagopg@apache.org on 2003/03/31
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java TransformerFactoryImpl.java
      Committer's log entry: - - New implementation for TemplatesHandlerImpl that does not extend - xsltc.compiler.Parser. The new implementation has a simpler init() - method. Also, instances of the new class can be re-used (previously, - there were problems with the output method when an instance was - used more than once). -

    • Committed by mkwan@apache.org on 2003/03/31
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax SmartTransformerFactoryImpl.java
      Committer's log entry: -Remove XSLTC's compile time dependency on Xalan. -

    • Committed by santiagopg@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java TransformerFactoryImpl.java
      Committer's log entry: - New implementation of TemplatesHandlerImpl. Fixes output method problem - when reusing TemplatesHandler instances. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.xsltc.cmdline. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc DOM.java DOMCache.java NodeIterator.java Translet.java TransletOutputHandler.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.xsltc. - -1. Remove TransletOutputHandler.java -2. Adapt the XSLTC interfaces to the DTM model. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/util IntegerArray.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.xsltc.util. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler AbsolutePathPattern.java AncestorPattern.java CastExpr.java Constants.java CopyOf.java DocumentCall.java ForEach.java GenerateIdCall.java IdKeyPattern.java Key.java KeyCall.java Message.java Mode.java NameBase.java NodeTest.java Output.java ParentLocationPath.java Predicate.java ProcessingInstructionPattern.java Step.java StepPattern.java Stylesheet.java SyntaxTreeNode.java UnionPathExpr.java UnparsedEntityUriCall.java ValueOf.java xpath.cup XSLTC.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.xsltc.compiler. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util MethodGenerator.java NodeSetType.java ObjectType.java ReferenceType.java ResultTreeType.java TypeCheckError.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.xsltc.compiler.util. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2SAX.java DOM2TO.java SAX2TO.java TemplatesHandlerImpl.java TransformerHandlerImpl.java TransformerImpl.java XSLTCSource.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.xsltc.trax. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBase.java SAXHTMLOutput.java SAXOutput.java SAXTextOutput.java SAXXMLOutput.java StreamHTMLOutput.java StreamOutput.java StreamTextOutput.java StreamUnknownOutput.java StreamXMLOutput.java TransletOutputHandlerFactory.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.xsltc.runtime.output -Remove the output classes in XSLTC. XSLTC now uses the -output classes in the common serializer. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java AttributeList.java BasisLibrary.java Constants.java DefaultSAXOutputHandler.java SAXAdapter.java StringValueHandler.java TextOutput.java TransletOutputBase.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Changes in org.apache.xalan.xsltc.runtime. -

    • Committed by mkwan@apache.org on 2003/04/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom AbsoluteIterator.java AdaptiveResultTreeImpl.java AnyNodeCounter.java Axis.java BitArray.java CollatorFactoryBase.java CurrentNodeListFilter.java CurrentNodeListIterator.java DocumentCache.java DOMAdapter.java DOMBuilder.java DOMImpl.java DOMWSFilter.java DTDMonitor.java DupFilterIterator.java EmptyFilter.java ExtendedSAX.java Filter.java FilteredStepIterator.java FilterIterator.java ForwardPositionIterator.java KeyIndex.java LoadDocument.java MatchingIterator.java MultiDOM.java MultipleNodeCounter.java NodeCounter.java NodeIteratorBase.java NodeSortRecord.java NodeSortRecordFactory.java NthIterator.java SAXImpl.java SimpleResultTreeImpl.java SingleNodeCounter.java SingletonIterator.java SortingIterator.java StepIterator.java StripWhitespaceFilter.java UnionIterator.java XSLTCDTMManager.java
      Committer's log entry: -Merging XSLTC_DTM and common serializer to the head -Adapt all dom classes in org.apache.xalan.xsltc.dom to -the DTM model. - -Removed DOMImpl, DTDMonitor. -Added a few new classes for the new DOM model. The core -DOM class is SAXImpl. -

    • Committed by ilene@apache.org on 2003/04/02
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -If there is an error listener registered to a TransformerFactory, and the -stylesheet cannot be compiled, call fatalError, in addition to throwing -the TransformerConfigurationException. -

    • Committed by mkwan@apache.org on 2003/04/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom SAXImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime StringValueHandler.java
      Committer's log entry: -According to spec http://www.w3.org/1999/11/REC-xslt-19991116-errata/#E27, -when element nodes are used in the instantiated content of attribute, comment -and processing instructions, we should ignore the elements together with -their content. -

    • Committed by mkwan@apache.org on 2003/04/07
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom AdaptiveResultTreeImpl.java
      Committer's log entry: -Need to override more startElement and endElement interfaces -in AdaptiveResultTreeImpl, because it now extends EmptySerializer, -which has a few more interfaces than the old TransletOutputHandler. -

    • Committed by mkwan@apache.org on 2003/04/07
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java SAXImpl.java
      Committer's log entry: -Fix for a few testcase failures in XSLTC trax.localPath. - -Detect the backslash ("\") character in the path in addtional to the -forward slash ('/') in LoadDocument.document(). - -The XSLTC conformance result in trax.localPath changed from -Pass: 1634/Fail: 14/Errr: 35 to Pass: 1657/Fail: 17/Errr: 9 -after this change. -

    • Committed by mkwan@apache.org on 2003/04/08
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: -Fix for bugzilla 17448. -Stylesheet.setIncludingStylesheet() should use _includedFrom -instead of _importedFrom. -

    • Committed by mkwan@apache.org on 2003/04/08
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: -Fix another problem related to bug 17448. -Only set the import precedence of an included stylesheet when it -is directly included by this stylesheet. If it is indirectly -included via imports, the import precedence will be different. -

    -
    - -

    XSLTC source code updates:

    • Committed by santiagopg@apache.org on 2002/08/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Keep track of parameters for built-in identity transform (needed for -some TCK tests). -

    • Committed by tmiller@apache.org on 2002/08/29
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerHandlerImpl.java TrAXFilter.java
      Committer's log entry: -Fixed XSLTCs implementation of XMLFilter -

    • Committed by tmiller@apache.org on 2002/08/29
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TrAXFilter.java
      Committer's log entry: -added some check for parents of filter chain -

    • Committed by santiagopg@apache.org on 2002/08/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: -Fix for Bugzilla 12125. -

    • Committed by tmiller@apache.org on 2002/08/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler EqualityExpr.java RelationalExpr.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -bug 12148 fixed, xpath pred and relational expr -

    • Committed by zongaro@apache.org on 2002/09/09
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java
      Committer's log entry: -Change committed on behalf of Igor Hersht: added -DIAG option similar to that -supported by org.apache.xalan.xslt.Process class (for bug 12261). - -Also (on my own behalf) changed calculation of average transform time and -throughput rate for -n option to use floating-point division, rather than -integer division; latter yielded meaningless results. -

    • Committed by santiagopg@apache.org on 2002/09/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBuffer.java StreamHTMLOutput.java StreamOutput.java StreamTextOutput.java StreamXMLOutput.java StringOutputBuffer.java WriterOutputBuffer.java
      Committer's log entry: -New buffering system for stream output. -

    • Committed by santiagopg@apache.org on 2002/09/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeCounter.java
      Committer's log entry: -Support for Greek alphabet in xsl:number. -

    • Committed by santiagopg@apache.org on 2002/09/11
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output WriterOutputBuffer.java
      Committer's log entry: -Set a larger buffer size for Solaris. -

    • Committed by santiagopg@apache.org on 2002/09/14
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java SyntaxTreeNode.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ResultTreeType.java xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Set different initial sizes for DOMImpl arrays. The new values result -in better performance for the average case. -

    • Committed by santiagopg@apache.org on 2002/09/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup xml-xalan/java/src/org/apache/xalan/xsltc/dom AbsoluteIterator.java
      Committer's log entry: -Optimized evaluation of //RelativeLocationPath expressions. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ObjectType.java
      Committer's log entry: -For XSLTC extension integration. Support creating ObjectType from a Class -object. Add an additional field to store the Class. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util BooleanType.java IntType.java NodeSetType.java NodeType.java RealType.java ResultTreeType.java StringType.java
      Committer's log entry: -For XSLTC extension integration. Add more translation rules required by -extensions. Specifically, all types can be translated to a generic Java Object. -Numeric types can be translated to their corresponding Java types (e.g. Real to -java.lang.Double). Node, NodeSet and ResultTree can be translated to a Java String. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java
      Committer's log entry: -Support the append attribute in the redirect/output extension. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -For XSLTC extension integration. Implement the object-type extension -function in the EXSLT commons package. Change the behavior of the -nodeList2Iterator interface so that it will do a deep copy on the argument -NodeList, i.e. if a Node in the NodeList is an Element, it will not only -copy the Node itself, but also copy all children and attributes. This is -required to get any extension function that returns a NodeList to work in -XSLTC. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler TransletOutput.java
      Committer's log entry: -Support the append attribute in the output extension element, so that -it behavior is more like redirect:write. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java
      Committer's log entry: -Add a constant string for the redirect namespace. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CastExpr.java
      Committer's log entry: -For extension integration. Allow numeric types to be casted to -Object type. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: -For extension integration. Add the objectType extension function to the -Symbol Table. Maps the redirect:write element to the TransletOutPut class. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: -For extension integration. The nodeset extension function can be used as -node-set in the http://exslt.org/common namespace. -

    • Committed by mkwan@apache.org on 2002/09/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java
      Committer's log entry: -Changes for Java extension and EXSLT extension support. -For Java extension: -- support 3 different namespace formats (Java, class and package). -- fix a bunch of type translation problems -- fix problems in class/method matching algorithm - -For EXSLT extension: -- support the math, set, strings and datetime extension -- support using the nodeset extension in 3 different ways (xsltc, xalan and EXSLT commons) -- support the object-type extension in EXSLT commons as a native XSLTC function -- Maps the redirect:write element to XSLTC's output element -- extension function name translation (e.g. node-set to nodeSet) -

    • Committed by santiagopg@apache.org on 2002/09/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: -Additional optimizations in expansion of '//'. -

    • Committed by santiagopg@apache.org on 2002/09/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java
      Committer's log entry: -Removed "-DIAG" option as it is similar to "-n 1". XSLTC's command line -options are single letters, so -DIAG does not really fit in the synopsis. -Morris K. is working on an extension for Xalan's Process class to allow -the compilation and execution of translets (once that work is completed -the -DIAG option will be available for XSLTC too). -

    • Committed by santiagopg@apache.org on 2002/09/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Compile.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java
      Committer's log entry: -Change default policy for template inlining. -

    • Committed by santiagopg@apache.org on 2002/09/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -Replaced attribute "disable-inlining" by attribute "enable-inlining". -

    • Committed by santiagopg@apache.org on 2002/09/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java
      Committer's log entry: -Lazy computation of mappings and reverse mappings. -

    • Committed by santiagopg@apache.org on 2002/09/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -(1) Synchronize access to static variable. -(2) Pre-allocate static objects for attribute and element types. -

    • Committed by santiagopg@apache.org on 2002/09/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Changed setting to speed up DOM building process. -

    • Committed by santiagopg@apache.org on 2002/09/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -Return a fresh XMLReader for each call to getXMLReader(). Returning the -same instance is incorrect in multi-threaded apps where a single -transformer factory is shared by all threads. -

    • Committed by mkwan@apache.org on 2002/09/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2TO.java
      Committer's log entry: -For Bugzilla 12924. Add handling code for DocumentType Node. -

    • Committed by mkwan@apache.org on 2002/09/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax SAX2DOM.java
      Committer's log entry: -For Bugzilla 12924. In constructor SAX2DOM(Node), the Node might not always -be a Document. Add additional handling code so that SAX2DOM can work with a -non-Document root. -

    • Committed by santiagopg@apache.org on 2002/09/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -Use a thread variable to cache an XMLReader. -

    • Committed by mkwan@apache.org on 2002/09/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionAvailableCall.java FunctionCall.java
      Committer's log entry: -EXtension work. Make function-available work with external Java and EXSLT -extension functions. -

    • Committed by mkwan@apache.org on 2002/09/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionAvailableCall.java
      Committer's log entry: -Handle dots in the local part, e.g. -xmlns:ext="http://xml.apache.org/xalan/java/java.lang -function-available('ext:Thread.currentThread') return true. -

    • Committed by mkwan@apache.org on 2002/09/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionAvailableCall.java
      Committer's log entry: -Minor cleanup in class name handling. -

    • Committed by zongaro@apache.org on 2002/09/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java TypeCheckError.java xml-xalan/java/src/org/apache/xalan/xsltc/dom DocumentCache.java DOMImpl.java DTDMonitor.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java TransformerImpl.java xml-xalan/java/src/org/apache/xalan/xsltc/cmdline/getopt GetOpt.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Include.java TransletOutput.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -Committing changes from Gordon Chiu (grchiu@ca.ibm.com), with some tweaks from -me, to move some hard-coded XSLTC messages into the compiler and run-time -ErrorMessages classes, as appropriate. -

    • Committed by zongaro@apache.org on 2002/09/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime ErrorMessages.java
      Committer's log entry: -Committing changes from Gordon Chiu (grchiu@ca.ibm.com), with some tweaks from -me, to move some hard-coded XSLTC messages into the compiler and run-time -ErrorMessages classes, as appropriate. - -Also, added copious comments to assist anyone who might translate these -resources in the future. -

    • Committed by zongaro@apache.org on 2002/09/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java
      Committer's log entry: -Removed a duplicate error message number I inadvertently entered. -

    • Committed by tmiller@apache.org on 2002/09/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -bugzilla 12813 fixed -

    • Committed by mkwan@apache.org on 2002/09/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java ErrorMsg.java
      Committer's log entry: -Add debug messages for -XX option in the Process command line. These messages -tell the user whether they are transforming using XSLTC. -

    • Committed by mkwan@apache.org on 2002/09/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util Util.java
      Committer's log entry: -Fix problems in the baseName() interface so that it can handle system ids like -file:abc.xsl and file:///c:\test\abc.xsl. -

    • Committed by mkwan@apache.org on 2002/09/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: -XSLTC support in the Process command line - phase 2 -Add two new output types: -- BYTEARRAY_AND_FILE_OUTPUT: return a byte array and generate the translet class -- BYTEARRAY_AND_JAR_OUTPUT: return a byte array and generate the jar file - -Add a new compile() interface which accepts the output type as the third -parameter. Use different Vectors to store bytecodes and JavaClass objects. -

    • Committed by mkwan@apache.org on 2002/09/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax Util.java
      Committer's log entry: -Add a wrapper for the noExtName() method in compiler.util.Util. -The transformerFactoryImpl class makes use of it. -

    • Committed by mkwan@apache.org on 2002/09/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java
      Committer's log entry: -The member name _defaultTransletName in TransformerFactoryImpl -has been changed to _transletName. -

    • Committed by mkwan@apache.org on 2002/09/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -XSLTC support in the Process command line - phase 2 -Most of the changes appear in this class. The changes not only allow you -to use the new XSLTC options in the Process command line. It also give -you the ability to customize the XSLTC behavior using the standard TRAX API. -Previously, the XSLTC TRAX API is not aware of translets. You cannot tell it -to use translets for do transformations. Now you can customize the XSLTC bevaior -using the new attributes. For example, the following code will allow you -to use translets for transformations when the translet is newer than the xsl. - -TransformerFactory tf; -tf.setAttribute("auto-translet", "true"); -Templates templates = tf.newTemplates(xslSource); - -The following attributes are added: -Attributes Corresponding Process command line options -use-translet -translet-name -XO -destination-directory -XD -package-name -XP -jar-name -XJ -auto-translet -XT - -Four of the new attributes (translet-name, destination-directory, package-name and -jar-name) are transient. They only apply to the next newTemplates() or newTransformer() -call. Their values are reset to the default after the call. - -There is also a makefile like feature when you set the "auto-translet" attribute. It will -use the translet to do transformation when the translet is newer than the xsl. If the xsl -is modified, it will use the xsl to transform and regenerate the translet. - -Unlike the XSLTC Transform command line, the new code will NOT use the existing -ClassLoader to load the translet or jar file. It directly reads the file content into a -byte array. This makes the Process command line capable of loading the translet from -any directory the xsl file might be in or any user specified destination directory, without -the need on the user to add that directory to the CLASSPATH first. -

    • Committed by mkwan@apache.org on 2002/10/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java TransformerFactoryImpl.java
      Committer's log entry: -Multi-thread protection for the new attributes. -The four transient attributes are now stored in ThreadLocal objects to prevent -multi-thread contention problems. This ensures that each thread will have a -different copy of the attributes and no collision issue will occur. -

    • Committed by mkwan@apache.org on 2002/10/01
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -Change the four attributes to be instance variables and remove -the ThreadLocal protection. TransformerFactory is not guaranteed -to be thread-safe. We will leave the synchronization issues up -to the user if they want to use one TransformerFactory in multiple -threads. -

    • Committed by mkwan@apache.org on 2002/10/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Param.java
      Committer's log entry: -The default type of a <xsl:param> should be result tree. -

    • Committed by mkwan@apache.org on 2002/10/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java
      Committer's log entry: -Fix a problem in class namespace format and also cleanup the indentation. -

    • Committed by santiagopg@apache.org on 2002/10/06
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Param.java
      Committer's log entry: -Set default type of parameters to be reference. The type of a parameter -cannot be determined statically in XSLT 1.0. -

    • Committed by santiagopg@apache.org on 2002/10/08
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc DOM.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java Constants.java ForEach.java LastCall.java Parser.java PositionCall.java Step.java xml-xalan/java/src/org/apache/xalan/xsltc/dom AbsoluteIterator.java CurrentNodeListIterator.java DOMAdapter.java DOMImpl.java DupFilterIterator.java FilteredStepIterator.java FilterIterator.java ForwardPositionIterator.java KeyIndex.java MatchingIterator.java MultiDOM.java NodeIteratorBase.java NthIterator.java ReverseIterator.java StepIterator.java xml-xalan/java/src/org/apache/xalan/xsltc/util IntegerArray.java
      Committer's log entry: -(1) Eliminated the need for a ReverseIterator. -(2) Added a ForwardPositionIterator as a temporary solution for some -cases. -(3) Added several javadoc-type comments. -(4) Fixed a number of cloneIterator() implementations that were broken. -

    • Committed by santiagopg@apache.org on 2002/10/08
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ForwardPositionExpr.java
      Committer's log entry: -Expression wrapper to compute positions properly. -

    • Committed by santiagopg@apache.org on 2002/10/09
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBase.java StreamXMLOutput.java
      Committer's log entry: -Fix for Bugzilla 13304. -

    • Committed by tmiller@apache.org on 2002/10/09
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom UnionIterator.java
      Committer's log entry: -bug fix 12644, Santiago found that the clone iterator was doing a shallow copy -

    • Committed by santiagopg@apache.org on 2002/10/14
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Key.java KeyCall.java xml-xalan/java/src/org/apache/xalan/xsltc/dom KeyIndex.java xml-xalan/java/src/org/apache/xalan/xsltc/util IntegerArray.java
      Committer's log entry: -(1) Fixed some dynamic typing problems with idkeys. Values are now properly -converted to strings before they are compared. -(2) Eliminated the use of BitArrays in KeyIndex (better space efficiency). -(3) All idkey tests now pass with flavor=stream (the 6 failures that are -reported are due to the use of a different algorithm to generate ids). -

    • Committed by tmiller@apache.org on 2002/10/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java Parser.java
      Committer's log entry: -bug fix 13550, for multiple <xsl:output> elements, cdata-section-elements attrs are now merged -

    • Committed by santiagopg@apache.org on 2002/10/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XslElement.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -New implementation of xsl:element that properly handles the case where -the namespace URI computed at runtime is "". Some of the code implementing -the xsl:element instruction has been factored out from the translet into -the basis library. -

    • Committed by tmiller@apache.org on 2002/10/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java TransformerFactoryImpl.java
      Committer's log entry: -bug fix 12317, serialization of Templates is fixed -

    • Committed by santiagopg@apache.org on 2002/10/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -A RuntimeException cannot be constructed from a Throwable with JDKs -prior to 1.4. -

    • Committed by santiagopg@apache.org on 2002/10/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java
      Committer's log entry: -Clear dom index flag before passing node to DOMAdapter. Bug reported by -Prakash Sridharan. -

    • Committed by santiagopg@apache.org on 2002/10/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -Switch order of calls to startElement() and namespace() in startXslElement(). -

    • Committed by tmiller@apache.org on 2002/10/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: -bug fix 12308, typeCheck, nodeset to node optimization is turned off if node has context -

    • Committed by santiagopg@apache.org on 2002/10/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java
      Committer's log entry: -Added support for all EBCDIC flavors in xsl:output. -

    • Committed by santiagopg@apache.org on 2002/10/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamOutput.java
      Committer's log entry: -Moved EBCDIC support from Output to StreamOutput to ensure correct -serialization of XML header. -

    • Committed by santiagopg@apache.org on 2002/10/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler PositionCall.java xml-xalan/java/src/org/apache/xalan/xsltc/dom CurrentNodeListIterator.java DOMImpl.java FilterIterator.java NthIterator.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -Committing patch from Henry Zongaro. This patch moves the logic from -XPath's position() function from NodeIterator.getPosition() to -BasisLibrary.positionF(). This change simplifies the integration -between XSLTC and DTM. -

    • Committed by zongaro@apache.org on 2002/10/22
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom ForwardPositionIterator.java
      Committer's log entry: -Adding XSLTC_DTM version of file to branch. -

    • Committed by zongaro@apache.org on 2002/10/22
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom ForwardPositionIterator.java
      Committer's log entry: -Whoops! Checked in file on MAIN branch that was meant for XSLTC_DTM branch. -

    • Committed by zongaro@apache.org on 2002/10/22
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom ForwardPositionIterator.java
      Committer's log entry: -Adding DTM version of ForwardPositionIterator to XSLTC_DTM branch. -

    • Committed by zongaro@apache.org on 2002/10/22
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom ForwardPositionIterator.java
      Committer's log entry: -Aarrrgggghhhhh\!\! Checked in file on MAIN branch that was meant for XSLTC_DTM branch, again\! -

    • Committed by santiagopg@apache.org on 2002/10/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom UnionIterator.java
      Committer's log entry: -Fix for Bugzilla 13826. A problem in reset() was the cause of duplicate -nodes in the resulting nodeset. -

    • Committed by santiagopg@apache.org on 2002/10/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util NodeSetType.java ReferenceType.java ResultTreeType.java
      Committer's log entry: -Fix for Bugzilla 13850 provided by Morris Kwan. - -Morris Kwan wrote: - -Changes in NodeSetType.java: -Allow a org.w3c.dom.Node to be converted to a XSLTC internal nodeset - -Changes in ReferenceType.java: -Allow conversions from Reference to Java String, double, w3c Node/NodeList - -Changes in ResultTreeType.java: -The result tree when converted to a nodeset, should contain only one node -starting from the root. If you replace <xsl:param> with <xsl:variable> in -the attached testcase, you will see a problem in "ext:nodelistTest -($a)/h1/h2" because of this problem. - -Changes in BasisLibrary.java: -Added interfaces referenceToNodeList, referenceToNode and node2Iterator. -The changes in copyNodes() fix a problem with the document node. In the -case of an RTF, the NodeList passed to nodeList2Iterator() contains only -one Node, which is a Document Node. The changes try to create a dummy -element for the Document and copy all Nodes under it. -

    • Committed by santiagopg@apache.org on 2002/10/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: - - Fix for Bugzilla 13850 provided by Morris Kwan. - - Changes in BasisLibrary.java: - Added interfaces referenceToNodeList, referenceToNode and node2Iterator. - The changes in copyNodes() fix a problem with the document node. In the - case of an RTF, the NodeList passed to nodeList2Iterator() contains only - one Node, which is a Document Node. The changes try to create a dummy - element for the Document and copy all Nodes under it. -

    • Committed by santiagopg@apache.org on 2002/10/29
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler LocationPathPattern.java Mode.java Step.java StepPattern.java xpath.cup
      Committer's log entry: -Distinguish between child::node() and attribute::node() both in patterns -and expressions. This patch also fixes Bugzilla 11433. -

    • Committed by santiagopg@apache.org on 2002/10/29
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Fixed problem in DOMImpl$ChildrenIterator.getLast(). It now returns 0 -when the nodeset is empty. -

    -
    - -

    XSLTC source code updates:

    • Committed by tmiller@apache.org on 2002/05/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java
      Committer's log entry: -added new method 'setDocumentLocator()' to TemplatesHandlerImpl so that SAX parser can inform handler of doc location- thanks to Scott Boag and Shane Curcuru for the insight into this -

    • Committed by santiagopg@apache.org on 2002/05/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler UnresolvedRef.java
      Committer's log entry: -Assigned type to _type. -

    • Committed by santiagopg@apache.org on 2002/05/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java AttributeSet.java CallTemplate.java DecimalFormatting.java EqualityExpr.java FormatNumberCall.java Key.java KeyCall.java Parser.java QName.java SymbolTable.java Template.java UseAttributeSets.java VariableBase.java xpath.cup
      Committer's log entry: -Fixed problem with default namespace in XPath expressions and XSLT's -named objects (e.g. templates, keys, variables, etc.). -

    • Committed by santiagopg@apache.org on 2002/05/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: -Fixed StepPattern production to include named PIs. -

    • Committed by santiagopg@apache.org on 2002/05/11
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Text.java
      Committer's log entry: -Optimized calls to setEscaping(). -

    • Committed by santiagopg@apache.org on 2002/05/11
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Simple code optimizations. -

    • Committed by santiagopg@apache.org on 2002/05/14
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java
      Committer's log entry: -Replaced Vector by ArrayList (synchronization is not needed here). -

    • Committed by santiagopg@apache.org on 2002/05/14
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: -Fixed looping problem reported by Girish. -

    • Committed by santiagopg@apache.org on 2002/05/14
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc TransletOutputHandler.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Text.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime SAXAdapter.java StringValueHandler.java TextOutput.java TransletOutputBase.java
      Committer's log entry: -Added characters(String) to TextOutputHandler. -

    • Committed by tmiller@apache.org on 2002/05/14
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime DefaultSAXOutputHandler.java
      Committer's log entry: -avoid printing standalone attr if it is set to 'no' -

    • Committed by santiagopg@apache.org on 2002/05/14
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java xml-xalan/java/src/org/apache/xalan/xsltc/dom NodeIteratorBase.java
      Committer's log entry: -Fix for conf test axes113. -

    • Committed by tmiller@apache.org on 2002/05/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime DefaultSAXOutputHandler.java
      Committer's log entry: -fixed a regression in output66 test -

    • Committed by santiagopg@apache.org on 2002/05/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Text.java
      Committer's log entry: -Fix for attribset49. -

    • Committed by santiagopg@apache.org on 2002/05/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: -Fix for axes127. -

    • Committed by santiagopg@apache.org on 2002/05/16
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Do not add the standalone attribute to the XML header unless requested. -

    • Committed by tmiller@apache.org on 2002/05/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output DOMOutput.java OutputBase.java SAXHTMLOutput.java SAXOutput.java SAXXMLOutput.java StreamOutput.java
      Committer's log entry: -New output handlers. -

    • Committed by santiagopg@apache.org on 2002/05/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Fix bug in Attr iterator. -

    • Committed by santiagopg@apache.org on 2002/05/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output HtmlOutput.java StreamOutput.java
      Committer's log entry: -*** empty log message *** -

    • Committed by tmiller@apache.org on 2002/05/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXHTMLOutput.java SAXOutput.java SAXXMLOutput.java
      Committer's log entry: -updated new code, on-going development -

    • Committed by tmiller@apache.org on 2002/05/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXHTMLOutput.java SAXOutput.java SAXXMLOutput.java
      Committer's log entry: -added new methods, on-going -

    • Committed by santiagopg@apache.org on 2002/05/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc TransletOutputHandler.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java SAXAdapter.java TransletOutputBase.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output HtmlOutput.java OutputBase.java StreamOutput.java
      Committer's log entry: -New methods added to the translet output handler. -

    • Committed by santiagopg@apache.org on 2002/05/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output HtmlOutput.java StreamHTMLOutput.java
      Committer's log entry: -Renamed module. -

    • Committed by tmiller@apache.org on 2002/05/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output DOMOutput.java
      Committer's log entry: -temporarily moved out of the way -

    • Committed by tmiller@apache.org on 2002/05/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXOutput.java SAXXMLOutput.java
      Committer's log entry: -updated namespace support -

    • Committed by tmiller@apache.org on 2002/05/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXHTMLOutput.java SAXOutput.java
      Committer's log entry: -fixed uninitialized stack -

    • Committed by santiagopg@apache.org on 2002/05/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamOutput.java StreamXMLOutput.java
      Committer's log entry: -*** empty log message *** -

    • Committed by santiagopg@apache.org on 2002/05/22
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java
      Committer's log entry: -Experimental output system. -

    • Committed by santiagopg@apache.org on 2002/05/22
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamXMLOutput.java
      Committer's log entry: -*** empty log message *** -

    • Committed by santiagopg@apache.org on 2002/05/22
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java
      Committer's log entry: -Experimental output system. -

    • Committed by santiagopg@apache.org on 2002/05/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java
      Committer's log entry: -Added "-n" option to Transform. -

    • Committed by santiagopg@apache.org on 2002/05/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamOutput.java StreamXMLOutput.java
      Committer's log entry: -*** empty log message *** -

    • Committed by santiagopg@apache.org on 2002/05/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamOutput.java StreamUnknownOutput.java StreamXMLOutput.java TransletOutputHandlerFactory.java
      Committer's log entry: -*** empty log message *** -

    • Committed by santiagopg@apache.org on 2002/05/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamTextOutput.java TransletOutputHandlerFactory.java
      Committer's log entry: -*** empty log message *** -

    • Committed by santiagopg@apache.org on 2002/05/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamXMLOutput.java
      Committer's log entry: -Insert XML header at the beginning. -

    • Committed by santiagopg@apache.org on 2002/05/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java
      Committer's log entry: -*** empty log message *** -

    • Committed by tmiller@apache.org on 2002/05/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java
      Committer's log entry: -added sax case support -

    • Committed by tmiller@apache.org on 2002/05/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java
      Committer's log entry: -updated -

    • Committed by santiagopg@apache.org on 2002/05/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax SAX2DOM.java TemplatesHandlerImpl.java TemplatesImpl.java TransformerFactoryImpl.java TransformerImpl.java
      Committer's log entry: -Added 'experimental-output' attribute to transformer factory. -

    • Committed by santiagopg@apache.org on 2002/05/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java
      Committer's log entry: -*** empty log message *** -

    • Committed by tmiller@apache.org on 2002/05/29
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXXMLOutput.java
      Committer's log entry: -added processing instruction support -

    • Committed by santiagopg@apache.org on 2002/05/29
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamOutput.java StreamXMLOutput.java
      Committer's log entry: -Bug fixes after testing. -

    • Committed by santiagopg@apache.org on 2002/05/29
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamOutput.java
      Committer's log entry: -Added DOCTYPE. -

    • Committed by santiagopg@apache.org on 2002/05/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler LiteralElement.java Parser.java
      Committer's log entry: -Fixed problem with 'xmlns' reported as attribute. -

    • Committed by santiagopg@apache.org on 2002/05/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamXMLOutput.java
      Committer's log entry: -*** empty log message *** -

    • Committed by santiagopg@apache.org on 2002/05/31
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamXMLOutput.java
      Committer's log entry: -Fixed problem with offset in characters(). -

    • Committed by santiagopg@apache.org on 2002/06/03
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBase.java SAXHTMLOutput.java SAXOutput.java SAXXMLOutput.java StreamOutput.java StreamXMLOutput.java
      Committer's log entry: -Moved common methods to base classes. -

    • Committed by tmiller@apache.org on 2002/06/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBase.java SAXHTMLOutput.java SAXOutput.java SAXXMLOutput.java StreamOutput.java StreamTextOutput.java StreamXMLOutput.java
      Committer's log entry: -updating work in progress -

    • Committed by santiagopg@apache.org on 2002/06/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXOutput.java SAXXMLOutput.java StreamXMLOutput.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerHandlerImpl.java
      Committer's log entry: -Updated. -

    • Committed by santiagopg@apache.org on 2002/06/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerHandlerImpl.java
      Committer's log entry: -*** empty log message *** -

    • Committed by santiagopg@apache.org on 2002/06/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBase.java SAXXMLOutput.java
      Committer's log entry: -Updated. -

    • Committed by santiagopg@apache.org on 2002/06/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerHandlerImpl.java TransformerImpl.java
      Committer's log entry: -Fixed problems with id/key. -

    • Committed by santiagopg@apache.org on 2002/06/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBase.java SAXOutput.java SAXXMLOutput.java StreamOutput.java
      Committer's log entry: -Updated. -

    • Committed by santiagopg@apache.org on 2002/06/04
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamOutput.java StreamUnknownOutput.java StreamXMLOutput.java
      Committer's log entry: -Updated. -

    • Committed by tmiller@apache.org on 2002/06/05
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -reset output flag -

    • Committed by tmiller@apache.org on 2002/06/05
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -updated xsl:vendor string -

    • Committed by tmiller@apache.org on 2002/06/05
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -updated xsl:vendor string -

    • Committed by tmiller@apache.org on 2002/06/05
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -bug fix 9179, leading zero in localized formatting -

    • Committed by santiagopg@apache.org on 2002/06/06
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Include attributes in xsl:message template body. -

    • Committed by santiagopg@apache.org on 2002/06/07
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamOutput.java
      Committer's log entry: -Set a new buffer size. -

    • Committed by santiagopg@apache.org on 2002/06/08
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java
      Committer's log entry: -Fixed memory leak in AbstractTranslet and moved replace() method -to BasisLibrary. -

    • Committed by santiagopg@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXOutput.java SAXTextOutput.java TransletOutputHandlerFactory.java
      Committer's log entry: -New class. -

    • Committed by tmiller@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax SAX2DOM.java
      Committer's log entry: -fixed processing instruction call -

    • Committed by tmiller@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java
      Committer's log entry: -added text case for SAX -

    • Committed by santiagopg@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java
      Committer's log entry: -Typo. -

    • Committed by santiagopg@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXHTMLOutput.java
      Committer's log entry: -Do not insert <META>. -

    • Committed by santiagopg@apache.org on 2002/06/10
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Fixed problem in the implementation of setOutputProperties(). -

    • Committed by santiagopg@apache.org on 2002/06/11
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: -Added comment() support. -

    • Committed by tmiller@apache.org on 2002/06/11
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output TransletOutputHandlerFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax SAX2DOM.java
      Committer's log entry: -added support for comment handling in DOM -

    • Committed by santiagopg@apache.org on 2002/06/11
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java
      Committer's log entry: -Fixed getTemplates() to return null when compilation fails. -

    • Committed by santiagopg@apache.org on 2002/06/11
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime DefaultRun.java
      Committer's log entry: -No longer in use. -

    • Committed by santiagopg@apache.org on 2002/06/11
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Transform.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java Output.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java TextOutput.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXOutput.java StreamHTMLOutput.java StreamUnknownOutput.java StreamXMLOutput.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java TemplatesImpl.java TransformerFactoryImpl.java TransformerImpl.java
      Committer's log entry: -New output system installed. -

    • Committed by tmiller@apache.org on 2002/06/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: -bug fix for copy32.xsl unit test; cdata handling -

    • Committed by santiagopg@apache.org on 2002/06/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java
      Committer's log entry: -Fixed file creation for xsltc:output extension. -

    • Committed by santiagopg@apache.org on 2002/06/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom BitArray.java
      Committer's log entry: -Added default constructor. -

    • Committed by santiagopg@apache.org on 2002/06/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java
      Committer's log entry: -Fixed insertion of META when HEAD is empty. -

    • Committed by santiagopg@apache.org on 2002/06/13
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom CurrentNodeListIterator.java
      Committer's log entry: -Replaced eager by lazy computation of last. -

    • Committed by santiagopg@apache.org on 2002/06/13
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom StepIterator.java
      Committer's log entry: -Very minor optimization. -

    • Committed by santiagopg@apache.org on 2002/06/13
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Simple hand optimizations. -

    • Committed by santiagopg@apache.org on 2002/06/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java Parser.java Stylesheet.java XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java TemplatesImpl.java TransformerFactoryImpl.java TransformerImpl.java
      Committer's log entry: -Fixed layering of output properties in Trax. -

    • Committed by santiagopg@apache.org on 2002/06/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Replaced getProperty() by get() in setOutputProperties(). -

    • Committed by tmiller@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Include.java
      Committer's log entry: -catching file not found exception fixed -

    • Committed by tmiller@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: -added ability to detect/flag superfluous attributes -

    • Committed by tmiller@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: -removed commented out code -

    • Committed by tmiller@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -fixed bug that passes warnings to listener -

    • Committed by santiagopg@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamUnknownOutput.java
      Committer's log entry: -Added support for XHTML in output system (c.f. embed04). -

    • Committed by tmiller@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -fixed bug with number formatting, richmark test -

    • Committed by tmiller@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java
      Committer's log entry: -fixed escaping of quote in href attribute -

    • Committed by santiagopg@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Fixed problem in creation of output handler. -

    • Committed by santiagopg@apache.org on 2002/06/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBase.java SAXOutput.java SAXXMLOutput.java StreamHTMLOutput.java StreamOutput.java StreamXMLOutput.java
      Committer's log entry: -Fixed problem with cdata-section-elements in xsl:output and namespaces. -

    • Committed by tmiller@apache.org on 2002/06/19
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -fixed nit for Tom -

    • Committed by tmiller@apache.org on 2002/06/19
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamXMLOutput.java
      Committer's log entry: -fixed unescaped quote in attribute, namespace110 unit test -

    • Committed by santiagopg@apache.org on 2002/06/19
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Ignore default properties in setOutputProperties(). -

    • Committed by santiagopg@apache.org on 2002/06/19
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXHTMLOutput.java StreamHTMLOutput.java StreamOutput.java StreamUnknownOutput.java
      Committer's log entry: -Fix to set output properties correctly in the new output system. -

    • Committed by santiagopg@apache.org on 2002/06/19
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Output.java
      Committer's log entry: -Fixed indentation when output method is HTML. -

    • Committed by santiagopg@apache.org on 2002/06/19
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamUnknownOutput.java
      Committer's log entry: -Fixed indentation when output method is HTML. -

    • Committed by santiagopg@apache.org on 2002/06/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java
      Committer's log entry: -Rollback to revision 1.39 -

    • Committed by tmiller@apache.org on 2002/06/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: -whitespace13.xsl fix for trax.dom case -

    • Committed by santiagopg@apache.org on 2002/06/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Fixed regression. -

    • Committed by santiagopg@apache.org on 2002/06/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler NameBase.java
      Committer's log entry: -_type renamed to _paramType to avoid shadowing of protected vars. -

    • Committed by santiagopg@apache.org on 2002/06/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java
      Committer's log entry: -Replaced _type by getType(). -

    • Committed by santiagopg@apache.org on 2002/06/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMAdapter.java MultiDOM.java
      Committer's log entry: -Fixed evaluation of "parent::*" with multiple DOMs. -

    • Committed by santiagopg@apache.org on 2002/06/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java
      Committer's log entry: -Fix for Bugzilla 9068. -

    • Committed by santiagopg@apache.org on 2002/06/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom MultiDOM.java
      Committer's log entry: -Better fix for Bugzilla 9068. -

    • Committed by santiagopg@apache.org on 2002/06/24
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: -Fix for Bugzilla 8551. -

    • Committed by santiagopg@apache.org on 2002/06/24
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Predicate.java
      Committer's log entry: -Fix for Bugzillas 3238 and 10137. -

    • Committed by santiagopg@apache.org on 2002/06/24
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamOutput.java StreamXMLOutput.java
      Committer's log entry: -Fix for Bugzilla 6925. -

    • Committed by amiro@apache.org on 2002/06/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionAvailableCall.java
      Committer's log entry: -fix check for extension functions -

    • Committed by santiagopg@apache.org on 2002/06/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionAvailableCall.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util Util.java
      Committer's log entry: -Fix for function-available() needed to handle XSLTC's extension functions. -

    • Committed by santiagopg@apache.org on 2002/06/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ParentLocationPath.java Step.java
      Committer's log entry: -Fix for axes122. -

    • Committed by santiagopg@apache.org on 2002/06/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: -Fixed regression. -

    • Committed by santiagopg@apache.org on 2002/06/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/util IntegerArray.java
      Committer's log entry: -Fixed bug in clone(). -

    • Committed by santiagopg@apache.org on 2002/06/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ElementAvailableCall.java Expression.java FunctionAvailableCall.java If.java LogicalExpr.java When.java
      Committer's log entry: -Added support for function-available()/element-available() in logical -expressions (note that these functions are resolved at compile time -in XSLTC). -

    • Committed by santiagopg@apache.org on 2002/06/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamOutput.java StreamUnknownOutput.java TransletOutputHandlerFactory.java xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java TemplatesImpl.java TransformerFactoryImpl.java TransformerImpl.java
      Committer's log entry: -Added 'indent-number' attribute to the transformer factory. The value -of this attribute is the number of spaces that will be used by the -output system when indentation is turned on. -

    • Committed by santiagopg@apache.org on 2002/06/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Step.java xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Fix for node21 and some position tests. -

    • Committed by santiagopg@apache.org on 2002/06/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Fix problem in copyElement(). -

    • Committed by santiagopg@apache.org on 2002/06/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: -Use doubles instead of longs for big ints. -

    • Committed by tmiller@apache.org on 2002/06/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler LongExpr.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util LongType.java
      Committer's log entry: -removed unused class, compiler will now use doubles -

    • Committed by tmiller@apache.org on 2002/06/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CastExpr.java Constants.java Parser.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util Type.java
      Committer's log entry: -removed references to the LongExpr classes that were removed -

    • Committed by santiagopg@apache.org on 2002/06/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Copy namespace nodes of an element in xsl:copy. -

    • Committed by santiagopg@apache.org on 2002/06/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler ElementAvailableCall.java FunctionAvailableCall.java
      Committer's log entry: -Better error reporting when argument is not a literal. -

    • Committed by santiagopg@apache.org on 2002/06/28
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: -Use a BufferedOutputStream to write classes. -

    • Committed by tmiller@apache.org on 2002/07/08
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -fixed conf tests copy21, copy22, expression02, idkey04, numbering91 with introduction of setSystemId on InputSource -

    • Committed by santiagopg@apache.org on 2002/07/09
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Compile.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: -Updated XSLTC's version number from 1.0 to 1.1 -

    • Committed by santiagopg@apache.org on 2002/07/09
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler AttributeSet.java
      Committer's log entry: -Fix for Bugzilla 4603 (thanks to Henri Zongaro) -

    • Committed by santiagopg@apache.org on 2002/07/09
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: -Print warning message for superfluous attributes that have a null URI only. -

    • Committed by tmiller@apache.org on 2002/07/09
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Constants.java Sort.java
      Committer's log entry: -bug 5941 fixed, <clinit> access chged to ACC_STATIC from ACC_FINAL -

    • Committed by santiagopg@apache.org on 2002/07/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util TypeCheckError.java
      Committer's log entry: -Enhanced error reporting in calls to external Java functions. -

    • Committed by tmiller@apache.org on 2002/07/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -bug 10832 fix, relational expressions with RTFs -

    • Committed by santiagopg@apache.org on 2002/07/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Mode.java
      Committer's log entry: -Fix for Bugzilla 9174. -

    • Committed by santiagopg@apache.org on 2002/07/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
      Committer's log entry: -Fixed error message in defineTransletClasses() method. -

    • Committed by santiagopg@apache.org on 2002/07/17
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Import.java Include.java Stylesheet.java
      Committer's log entry: -Fix for Bugzilla 9171. -

    • Committed by santiagopg@apache.org on 2002/07/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java
      Committer's log entry: -Fixed problem in error reporting code. -

    • Committed by santiagopg@apache.org on 2002/07/18
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Predicate.java
      Committer's log entry: -Ignore default NS when expanding calls to position(). -

    • Committed by santiagopg@apache.org on 2002/07/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerFactoryImpl.java
      Committer's log entry: -Accept null as a possible return value from URIResolver.resolve() -

    • Committed by santiagopg@apache.org on 2002/07/20
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Import.java Include.java
      Committer's log entry: -Report a decent error when the URI cannot be resolved. -

    • Committed by santiagopg@apache.org on 2002/07/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
      Committer's log entry: -Added a few getters to this class. -

    • Committed by santiagopg@apache.org on 2002/07/22
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
      Committer's log entry: -Use the superclass to determine the main class of a translet. -

    • Committed by santiagopg@apache.org on 2002/07/22
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamOutput.java StreamXMLOutput.java
      Committer's log entry: -Fix for Bugzilla 10715. -

    • Committed by santiagopg@apache.org on 2002/07/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output StreamHTMLOutput.java StreamXMLOutput.java
      Committer's log entry: -Fixed a regression. -

    • Committed by santiagopg@apache.org on 2002/07/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesHandlerImpl.java TemplatesImpl.java TransformerFactoryImpl.java TransformerImpl.java
      Committer's log entry: -Fixed for Bugzilla 10625. URIResolvers were being dropped in several places. -

    • Committed by santiagopg@apache.org on 2002/07/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax Util.java
      Committer's log entry: -Util class for the TrAX package. -

    • Committed by santiagopg@apache.org on 2002/07/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: -Synchronize calls to Stylesheet.translate() using class' lock. -

    • Committed by santiagopg@apache.org on 2002/07/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
      Committer's log entry: -Ensure synchronization for Templates objects. -

    • Committed by santiagopg@apache.org on 2002/07/24
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -Added safety net to getDOM(). -

    • Committed by tmiller@apache.org on 2002/07/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ObjectType.java
      Committer's log entry: -added new type for support of ext java functions -

    • Committed by tmiller@apache.org on 2002/07/25
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc Translet.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler CastExpr.java FunctionCall.java Parser.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ErrorMessages.java ErrorMsg.java NodeSetType.java NodeType.java ReferenceType.java StringType.java Type.java xml-xalan/java/src/org/apache/xalan/xsltc/dom AbsoluteIterator.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java BasisLibrary.java xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: -bug fix 10837, support of ext java functions -

    • Committed by santiagopg@apache.org on 2002/07/29
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Expression.java FlowList.java Mode.java StepPattern.java TestSeq.java
      Committer's log entry: -Fix for Bugzilla 11166. -

    • Committed by santiagopg@apache.org on 2002/07/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Mode.java
      Committer's log entry: -Fixed loop exit condition in prepareTestSequences(). -

    • Committed by santiagopg@apache.org on 2002/07/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionCall.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ReferenceType.java ResultTreeType.java
      Committer's log entry: -Added type promotion from result-tree to object (used in call to nodeset()). -

    • Committed by tmiller@apache.org on 2002/07/30
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler CastExpr.java FunctionCall.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util MultiHashtable.java
      Committer's log entry: -improved selection algorithm for overloaded methods and constructors in ext java funct calls -

    • Committed by santiagopg@apache.org on 2002/08/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler FunctionAvailableCall.java
      Committer's log entry: -Fixed regression of test function-available('xalan:nodeset'). -

    • Committed by santiagopg@apache.org on 2002/08/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -Use factory class methods to instantiate default decimal formatter. -

    • Committed by santiagopg@apache.org on 2002/08/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output SAXHTMLOutput.java
      Committer's log entry: -1. Report attributes with non-empty local names. -2. Ignore attributes reported as content. -

    • Committed by santiagopg@apache.org on 2002/08/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      Committer's log entry: -Use unmodified URI when retrieving the document via the DOM cache. -

    • Committed by santiagopg@apache.org on 2002/08/12
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc TransletOutputHandler.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime SAXAdapter.java TextOutput.java TransletOutputBase.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime/output OutputBase.java SAXXMLOutput.java StreamHTMLOutput.java StreamOutput.java StreamXMLOutput.java xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2SAX.java DOM2TO.java SAX2TO.java TemplatesHandlerImpl.java TemplatesImpl.java TransformerFactoryImpl.java TransformerHandlerImpl.java TransformerImpl.java
      Committer's log entry: -New implementation of identity transform. Fix for Bugzilla 11345. -

    • Committed by tmiller@apache.org on 2002/08/13
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler Expression.java ParameterRef.java VariableRef.java
      Committer's log entry: -bug fix for bugzilla 11221, MK053 -

    • Committed by tmiller@apache.org on 2002/08/15
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
      Committer's log entry: -bug 11704, fixed ErrorMsg to include name information -

    • Committed by tmiller@apache.org on 2002/08/21
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -fixed bug that was calling an inappropriate compare method when the right side of the comparison was a DOM -

    • Committed by tmiller@apache.org on 2002/08/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax DOM2TO.java
      Committer's log entry: -fixes conf tests lre02, lre03, lre11, namespace125, namespace126 -

    • Committed by santiagopg@apache.org on 2002/08/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler RelationalExpr.java
      Committer's log entry: -Fix for bugzilla 11987. Missing case in typeCheck() method. -

    • Committed by santiagopg@apache.org on 2002/08/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -Very minor optimization. -

    • Committed by tmiller@apache.org on 2002/08/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: -conf test string134 fix -

    • Committed by santiagopg@apache.org on 2002/08/23
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler XslElement.java
      Committer's log entry: -Fix for namespace102 (this test worked with Crimson but failed with -Xerces). -

    • Committed by santiagopg@apache.org on 2002/08/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util ResultTreeType.java
      Committer's log entry: -Removed debugging message. -

    • Committed by santiagopg@apache.org on 2002/08/26
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/cmdline Compile.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler Closure.java Constants.java Number.java ParameterRef.java Predicate.java Sort.java SyntaxTreeNode.java Template.java Variable.java VariableRef.java VariableRefBase.java XSLTC.java xml-xalan/java/src/org/apache/xalan/xsltc/compiler/util NodeSortRecordFactGenerator.java xml-xalan/java/src/org/apache/xalan/xsltc/runtime AbstractTranslet.java
      Committer's log entry: -Fix for Bugzilla 11828. A new closure conversion algorithm has been -designed and implemented. The old algorithm did not work in some edge -cases (c.f. description of Bugzilla 11828). Closure variables in an -inner class are now accessed locally instead of via the AbstractTranslet -class. Also, we have set the new version to be "XSLTC 1.2". -

    • Committed by santiagopg@apache.org on 2002/08/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Allow the default namespace to be redefined as "". -

    • Committed by santiagopg@apache.org on 2002/08/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -*** empty log message *** -

    • Committed by tmiller@apache.org on 2002/08/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: -bug fix for output13 conf test -

    • Committed by santiagopg@apache.org on 2002/08/27
      Modified: xml-xalan/java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: -Fix for Bugzilla 12075. -

    -
    - -

    XSLTC source code updates:

    • Committed by tmiller@apache.org on 02/21/2002
      Modified: java/src/org/apache/xalan/xsltc/trax SAX2DOM.java
      Committer's log entry: bug fix 6417, removed extra root element in DOM, - contributed by Tim Elcott

    • Committed by amiro@apache.org on 02/21/2002
      Modified: java/src/org/apache/xalan/xsltc/trax Tag: - jaxp-ri-1_2_0-beta-branch SAX2DOM.java
      Committer's log entry: fix DOMResult SOAP bug 4641035

    • Committed by tmiller@apache.org on 02/26/2002
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: bug fix 6636, Transformers forgets output properties - fix contributed by Tim Elcott (bigfoot.com)

    • Committed by tmiller@apache.org on 02/28/2002
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: bug 6751, null properties are now set properly, - fix contributed by Derek Sayeau- thanks Derek.

    • Committed by tmiller@apache.org on 03/01/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime TransletLoader.java
      Committer's log entry: Tomcat 4.x external Java class bug fix, Tomcat 4.x - could not find external java classes, contrib by Santiago Pericas

    • Committed by tmiller@apache.org on 03/01/2002
      Modified: java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
      Committer's log entry: Tomcat 4.x external Java class bug fix, Tomcat 4.x - could not find external java classes, contrib by Santiago Pericas

    • Committed by tmiller@apache.org on 03/01/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime Tag: - jaxp-ri-1_2_0-beta-branch TransletLoader.java
      Committer's log entry: bugtraq #4644811, Tomcat and ext java classes, Santiago Pericas

    • Committed by tmiller@apache.org on 03/01/2002
      Modified: java/src/org/apache/xalan/xsltc/trax Tag: - jaxp-ri-1_2_0-beta-branch TransformerImpl.java
      Committer's log entry: bugtraq #4644811, Tomcat and ext java classes, Santiago Pericas

    • Committed by tmiller@apache.org on 03/01/2002
      Modified: java/src/org/apache/xalan/xsltc/trax Tag: - jaxp-ri-1_2_0-beta-branch TransformerImpl.java
      Committer's log entry: backed out chg

    • Committed by tmiller@apache.org on 03/01/2002
      Modified: java/src/org/apache/xalan/xsltc/trax Tag: - jaxp-ri-1_2_0-beta-branch TemplatesImpl.java
      Committer's log entry: bugtraq #4644811, Tomcat and ext java classes, Santiago Pericas

    • Committed by tmiller@apache.org on 03/04/2002
      Modified: java/src/org/apache/xalan/xsltc/dom SortingIterator.java
      Committer's log entry: bug 6693- fix by Santiago Pericas, implement a - iterator clone method.

    • Committed by tmiller@apache.org on 03/05/2002
      Modified: java/src/org/apache/xalan/xsltc/trax DOM2SAX.java - SAX2DOM.java TransformerImpl.java
      Committer's log entry: bug 6620 fix: DOMSource no longer requires - Document nodes, fix contrib by Santiago Pericas-Geersten

    • Committed by tmiller@apache.org on 03/05/2002
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: re-entered bug fix 6751, last putback inadvert. - removed this fix

    • Committed by tmiller@apache.org on 03/06/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: bug fixes for 6257,6851,6665,6809; Santiago Pericas-Geerston

    • Committed by tmiller@apache.org on 03/06/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: bug fix 6850, Santiago Pericas-Geerston

    • Committed by tmiller@apache.org on 03/07/2002
      Modified: java/src/org/apache/xalan/xsltc/trax - TemplatesHandlerImpl.java - TransformerFactoryImpl.java
      Committer's log entry: bug 6312, TemplatesHandler and XMLReader, fix - by Santiago Pericas

    • Committed by amiro@apache.org on 03/11/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler StepPattern.java
      Committer's log entry: just minor change to syntax

    • Committed by amiro@apache.org on 03/11/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java - java/src/org/apache/xalan/xsltc/dom UnionIterator.java
      Committer's log entry: fix 5573 for XSLTMark alphabetize test

    • Committed by amiro@apache.org on 03/11/2002
      Modified: java/src/org/apache/xalan/xsltc/dom - CurrentNodeListIterator.java
      Committer's log entry: fix bug 5577 XSLTMark trend test

    • Committed by amiro@apache.org on 03/11/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: got rid of call to forceNaturalOrder code, Santiago Pericasgeersten

    • Committed by amiro@apache.org on 03/11/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Expression.java
      Committer's log entry: fix XSLTMark test dbonerow slow performance, Santiago P.

    • Committed by tmiller@apache.org on 03/12/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler - FormatNumberCall.java
      Committer's log entry: bug 6692, fix by Santiago Pericas-Geersen

    • Committed by tmiller@apache.org on 03/12/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler - ProcessingInstruction.java
      Committer's log entry: bug 5141, fix by Santiago Pericas-Geersen

    • Committed by tmiller@apache.org on 03/12/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime - StringValueHandler.java
      Committer's log entry: bug 5141, fix by Santiago Pericas-Geersen

    • Committed by tmiller@apache.org on 03/12/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util Util.java
      Committer's log entry: bug 6413, fix by Santiago Pericas-Geersen

    • Committed by tmiller@apache.org on 03/13/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: bug 6963, omit header needs to be set before output - occurs, fix by Santiago Pericas-Geersen

    • Committed by tmiller@apache.org on 03/14/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler - ParentLocationPath.java
      Committer's log entry: bug 5576, had to add a new test case in translate() - to set includeself for step iterator, thanks to Santiago Pericas-Geersen

    • Committed by tmiller@apache.org on 03/15/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler LiteralElement.java
      Committer's log entry: bug 6819, variables translated before attrs to fix - problems with dependency, fix by Santiago Pericas-Geertsen

    • Committed by tmiller@apache.org on 03/18/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: bug 6935, fixed char escaping in non-URL HTML - attribute case; also added recognition for URL escaping in HTML4 cite attrs.

    • Committed by tmiller@apache.org on 03/19/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: fix for unit test customer/murphy3.xsl

    • Committed by tmiller@apache.org on 03/27/2002
      Added: java/src/org/apache/xalan/xsltc/dom ExtendedSAX.java
      Committer's log entry: bug 2951, new class

    • Committed by tmiller@apache.org on 03/27/2002
      Modified: java/src/org/apache/xalan/xsltc/dom DOMBuilder.java - DOMImpl.java
      Committer's log entry: bug 2951 fix

    • Committed by tmiller@apache.org on 03/27/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime SAXAdapter.java
      Committer's log entry: bug 2951 fix

    • Committed by tmiller@apache.org on 03/28/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: bug fix for output31, output32 tests, esc chars

    • Committed by tmiller@apache.org on 04/02/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: bug 7679, xsl:vendor fix

    • Committed by tmiller@apache.org on 04/03/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch ApplyTemplates.java - Constants.java Expression.java - FormatNumberCall.java LiteralElement.java - ParentLocationPath.java Parser.java - ProcessingInstruction.java Step.java - StepPattern.java Stylesheet.java SymbolTable.java - SyntaxTreeNode.java XslAttribute.java - XslElement.java - java/src/org/apache/xalan/xsltc/compiler/util Tag: - jaxp-ri-1_2_0-fcs-branch Util.java - java/src/org/apache/xalan/xsltc/dom Tag: - jaxp-ri-1_2_0-fcs-branch - CurrentNodeListIterator.java DOMBuilder.java - DOMImpl.java SortingIterator.java - UnionIterator.java - java/src/org/apache/xalan/xsltc/runtime Tag: - jaxp-ri-1_2_0-fcs-branch AbstractTranslet.java - BasisLibrary.java Constants.java - DefaultSAXOutputHandler.java SAXAdapter.java - StringValueHandler.java TextOutput.java - TransletLoader.java - java/src/org/apache/xalan/xsltc/trax Tag: - jaxp-ri-1_2_0-fcs-branch DOM2SAX.java SAX2DOM.java - TemplatesHandlerImpl.java TemplatesImpl.java - TransformerFactoryImpl.java TransformerImpl.java
      Added: java/src/org/apache/xalan/xsltc/dom Tag: - jaxp-ri-1_2_0-fcs-branch ExtendedSAX.java
      Committer's log entry: merged the latest xsltc subtree with the xalan 2.3.1 fcs branch

    • Committed by santiagopg@apache.org on 04/04/2002
      Modified: java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: Fixed problem with attribute URI

    • Committed by santiagopg@apache.org on 04/04/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler FunctionCall.java
      Committer's log entry: Fix for bugzilla 7721

    • Committed by santiagopg@apache.org on 04/04/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler FunctionCall.java
      Committer's log entry: Fix related to bugzilla 7721

    • Committed by santiagopg@apache.org on 04/05/2002
      Modified: java/src/org/apache/xalan/xsltc/trax Tag: - jaxp-ri-1_2_0-fcs-branch DOM2SAX.java
      Committer's log entry: Fixed attr namespace.

    • Committed by santiagopg@apache.org on 04/05/2002
      Modified: java/src/org/apache/xalan/xsltc/trax Tag: - jaxp-ri-1_2_0-fcs-branch SAX2DOM.java - TransformerImpl.java
      Committer's log entry: Fixed problem when a DOMResult is created with a root node.

    • Committed by santiagopg@apache.org on 04/05/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch FunctionCall.java
      Committer's log entry: Bugzilla 7721.

    • Committed by santiagopg@apache.org on 04/08/2002
      Modified: java/src/org/apache/xalan/xsltc/trax SAX2DOM.java
      Committer's log entry: Add support for user-specified root node.

    • Committed by santiagopg@apache.org on 04/08/2002
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: Add support for user-specified root node.

    • Committed by tmiller@apache.org on 04/09/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch FunctionAvailableCall.java - FunctionCall.java
      Committer's log entry: bug 7375 fixed, handles ext java functions now

    • Committed by santiagopg@apache.org on 04/09/2002
      Modified: java/src/org/apache/xalan/xsltc/trax Tag: - jaxp-ri-1_2_0-fcs-branch SAX2DOM.java
      Committer's log entry: Fixed regression.

    • Committed by santiagopg@apache.org on 04/09/2002
      Modified: java/src/org/apache/xalan/xsltc/trax SAX2DOM.java
      Committer's log entry: Regression fixed.

    • Committed by tmiller@apache.org on 04/15/2002
      Modified: java/src/org/apache/xalan/xsltc/trax Tag: - jaxp-ri-1_2_0-fcs-branch TemplatesHandlerImpl.java
      Committer's log entry: bug 8017, translet class name fixed in getTemplates

    • Committed by santiagopg@apache.org on 04/15/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch AttributeValue.java - AttributeValueTemplate.java Number.java - XslAttribute.java XslElement.java
      Committer's log entry: New implementation of xsl:element

    • Committed by santiagopg@apache.org on 04/15/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime Tag: - jaxp-ri-1_2_0-fcs-branch BasisLibrary.java
      Committer's log entry: New implementation of xsl:element

    • Committed by santiagopg@apache.org on 04/15/2002
      Modified: java/src/org/apache/xalan/xsltc/dom Tag: - jaxp-ri-1_2_0-fcs-branch DOMAdapter.java - DOMImpl.java MultiDOM.java
      Committer's log entry: New implementation of xsl:element

    • Committed by Tom.Amiro@Sun.COM on 04/15/2002
      Committer's log entry: -> bug 8017, translet class name fixed in getTemplates -> ->

    • Committed by tmiller@apache.org on 04/16/2002
      Modified: java/src/org/apache/xalan/xsltc/trax - TemplatesHandlerImpl.java
      Committer's log entry: bug 8017, translet class name fixed in getTemplates

    • Committed by santiagopg@apache.org on 04/16/2002
      Modified: java/src/org/apache/xalan/xsltc/dom Tag: - jaxp-ri-1_2_0-fcs-branch DOMImpl.java
      Committer's log entry: Check for localName == null.

    • Committed by tmiller@apache.org on 04/16/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch Include.java
      Committer's log entry: bug 7835, patch from Stefan Kost to better handle - empty strings and local paths in xsl:include

    • Committed by tmiller@apache.org on 04/16/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Include.java
      Committer's log entry: bug 7835, integrated patch by Stefan Kost which - better handles empty strings and local paths in xsl:include

    • Committed by tmiller@apache.org on 04/16/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch DocumentCall.java
      Committer's log entry: Santiago: fixed type check error when 2nd arg (base-uri) is node instead - of node-set.

    • Committed by mmidy@apache.org on 04/17/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: XSLTC_DTM - Mode.java
      Committer's log entry: get rid of debug line

    • Committed by santiagopg@apache.org on 04/17/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch FunctionCall.java - Parser.java Stylesheet.java SyntaxTreeNode.java - XSLTC.java xpath.cup
      Committer's log entry: Added support for extension function nodeset().

    • Committed by santiagopg@apache.org on 04/17/2002
      Modified: java/src/org/apache/xalan/xsltc/dom Tag: - jaxp-ri-1_2_0-fcs-branch DOMAdapter.java - DOMImpl.java MultiDOM.java
      Committer's log entry: Added support for extension function nodeset().

    • Committed by santiagopg@apache.org on 04/17/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime Tag: - jaxp-ri-1_2_0-fcs-branch BasisLibrary.java
      Committer's log entry: Added support for extension function nodeset().

    • Committed by santiagopg@apache.org on 04/18/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch CastExpr.java - java/src/org/apache/xalan/xsltc/compiler/util Tag: - jaxp-ri-1_2_0-fcs-branch ReferenceType.java - java/src/org/apache/xalan/xsltc/runtime Tag: - jaxp-ri-1_2_0-fcs-branch BasisLibrary.java
      Committer's log entry: Fixed problem with extension function nodeset() and parameters.

    • Committed by mmidy@apache.org on 04/18/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime Tag: XSLTC_DTM - SAXAdapter.java
      Committer's log entry: Pass in the local name of the element

    • Committed by tmiller@apache.org on 04/19/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch FunctionAvailableCall.java
      Committer's log entry: JAVA_EXT_PREFIX renamed to JAVA_EXT_XSLTC

    • Committed by santiagopg@apache.org on 04/22/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util Tag: - jaxp-ri-1_2_0-fcs-branch MethodGenerator.java
      Committer's log entry: Fixed bug in addLocalVariable() when the slot allocator was already -initialized.

    • Committed by santiagopg@apache.org on 04/22/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch ElementAvailableCall.java
      Committer's log entry: Added namespace support to the implementation of element-available().

    • Committed by santiagopg@apache.org on 04/22/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch LiteralExpr.java
      Committer's log entry: - - -

    • Committed by santiagopg@apache.org on 04/22/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch Parser.java
      Committer's log entry: Namespace support for element-available().

    • Committed by santiagopg@apache.org on 04/22/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Tag: - jaxp-ri-1_2_0-fcs-branch Stylesheet.java
      Committer's log entry: Fixed bug in resolveReferences().

    • Committed by tmiller@apache.org on 04/23/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime Tag: - jaxp-ri-1_2_0-fcs-branch TextOutput.java
      Committer's log entry: escaped character handling improved by Santiago

    • Committed by tmiller@apache.org on 04/23/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime Tag: - jaxp-ri-1_2_0-fcs-branch TextOutput.java
      Committer's log entry: escaped character handling improved by Santiago, again

    • Committed by santiagopg@apache.org on 04/23/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util Tag: - jaxp-ri-1_2_0-fcs-branch ErrorMessages.java
      Committer's log entry: Fixed command line synopsis.

    • Committed by santiagopg@apache.org on 04/24/2002
      Modified: java/src/org/apache/xalan/xsltc DOM.java - java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java - AttributeValue.java AttributeValueTemplate.java - CastExpr.java Constants.java DocumentCall.java - ElementAvailableCall.java Expression.java - FormatNumberCall.java FunctionAvailableCall.java - FunctionCall.java Include.java LiteralElement.java - LiteralExpr.java Number.java - ParentLocationPath.java Parser.java - ProcessingInstruction.java Step.java - StepPattern.java Stylesheet.java SymbolTable.java - SyntaxTreeNode.java XSLTC.java XslAttribute.java - XslElement.java xpath.cup - java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages.java MethodGenerator.java - ReferenceType.java Util.java - java/src/org/apache/xalan/xsltc/dom - CurrentNodeListIterator.java DOMAdapter.java - DOMBuilder.java DOMImpl.java ExtendedSAX.java - MultiDOM.java SortingIterator.java - UnionIterator.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java BasisLibrary.java - Constants.java DefaultSAXOutputHandler.java - SAXAdapter.java StringValueHandler.java - TextOutput.java TransletLoader.java - java/src/org/apache/xalan/xsltc/trax DOM2SAX.java - SAX2DOM.java TemplatesHandlerImpl.java - TemplatesImpl.java TransformerFactoryImpl.java - TransformerImpl.java
      Committer's log entry: Commit after syncing trunk with branch jaxp-ri-1_2_0-fcs-04.

    • Committed by tmiller@apache.org on 04/25/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages.java
      Committer's log entry: updated compiler usage statement

    • Committed by tmiller@apache.org on 04/25/2002
      Modified: java/src/org/apache/xalan/xsltc/cmdline Compile.java
      Committer's log entry: added a -v option to compiler,prints out version

    • Committed by tmiller@apache.org on 04/25/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages.java
      Committer's log entry: updated cmdline.Transform usage statement

    • Committed by santiagopg@apache.org on 04/25/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.lex
      Committer's log entry: Added support for the full Unicode char set.

    • Committed by santiagopg@apache.org on 04/25/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util Util.java
      Committer's log entry: Replacing '/' by '$slash$' and ':' by '$colon$' in escape() (bugzilla 6289)

    • Committed by santiagopg@apache.org on 04/26/2002
      Modified: java/src/org/apache/xalan/xsltc/cmdline Compile.java - java/src/org/apache/xalan/xsltc/compiler XSLTC.java - java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages.java - java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Added -n option to disable template inlining. This is useful to avoid - getting very long methods (the limit set by the JVM is 64K). The same - option can be passed to a TransformationFactory via Trax using - the "disable-inlining" attribute.

    • Committed by santiagopg@apache.org on 04/26/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler VariableBase.java
      Committer's log entry: Added check to avoid duplicate dependencies.

    • Committed by santiagopg@apache.org on 04/26/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Constants.java - FilterParentPath.java ParentLocationPath.java
      Committer's log entry: Replaced STEP_ITERATOR by NODE_ITERATOR_BASE when calling includeSelf().

    • Committed by santiagopg@apache.org on 04/26/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: Ensured that global vars are initialized in the order in which they - were defined, whenever possible. This order may be altered due to - the existence of dependencies between the vars.

    • Committed by santiagopg@apache.org on 04/29/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler FunctionCall.java - java/src/org/apache/xalan/xsltc/compiler/util - ReferenceType.java
      Committer's log entry: Added a type mapping between 'reference' and 'java.lang.Object' and - vice versa. With this addition, a stylesheet can pass a parameter - to an external Java function without getting a type check error. - (see Bugzilla 8595).

    • Committed by tmiller@apache.org on 04/29/2002
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: fixed null ptr exception with sax sources that did - not specify an xml reader

    • Committed by santiagopg@apache.org on 04/29/2002
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Fixed Bugzilla 8489.

    • Committed by santiagopg@apache.org on 04/30/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util Util.java
      Committer's log entry: Fixed a bug in replace() by writting a new (and more efficient) version.

    • Committed by Tom.Amiro@Sun.COM on 04/30/2002
      Committer's log entry: -> Fixed a bug in replace() by writting a new (and more efficient) version. -> ->

    • Committed by santiagopg@apache.org on 05/02/2002
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerHandlerImpl.java
      Committer's log entry: Fixed file-not-found problem with flavor=trax.sax by propagating - the systemId.

    • Committed by santiagopg@apache.org on 05/03/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java
      Committer's log entry: Fixed for Bugzilla 2886 (node15).

    • Committed by santiagopg@apache.org on 05/03/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler ApplyImports.java - Include.java Stylesheet.java TestSeq.java - XSLTC.java
      Committer's log entry: Disabling template inlining for included stylesheets.

    • Committed by santiagopg@apache.org on 05/06/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler - AncestorPattern.java Mode.java ParentPattern.java - StepPattern.java
      Committer's log entry: Fixed a few problems with ancestor patterns (//) and patterns with - explicit priorities.

    • Committed by santiagopg@apache.org on 05/06/2002
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Rewrote a couple of if statements as if expressions.

    • Committed by santiagopg@apache.org on 05/06/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - VariableBase.java
      Committer's log entry: Better error reporting for syntax errors in XPath expressions.

    • Committed by santiagopg@apache.org on 05/06/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - xpath.cup
      Committer's log entry: Fix for Bugzilla 8041.

    • Committed by santiagopg@apache.org on 05/06/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages.java ErrorMessages_no.java - ErrorMsg.java
      Committer's log entry: Fix for Bugzilla 8041.

    • Committed by santiagopg@apache.org on 05/06/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler - AbsolutePathPattern.java AncestorPattern.java - ParentPattern.java
      Committer's log entry: Fix for Bugzilla 2836 (modes15).

    • Committed by tmiller@apache.org on 05/08/2002
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: fixes a set of trax.dom conf tests

    • Committed by tmiller@apache.org on 05/08/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: fixes a set of trax.dom conf tests

    -
    - -

    XSLTC source code updates:

    • Committed by tmiller@apache.org on 01/24/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: bug 1520 fix, escape chars over 0080 instead of 00FF

    • Committed by tmiller@apache.org on 01/24/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: bug 1520, adjusted 0080 to 007F in ASCII cutoff

    • Committed by tmiller@apache.org on 02/01/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler - AttributeValueTemplate.java - AbsoluteLocationPath.java AbsolutePathPattern.java - AlternativePattern.java AncestorPattern.java - ApplyImports.java ApplyTemplates.java - AttributeSet.java BooleanCall.java BinOpExpr.java - BooleanExpr.java CallTemplate.java CastExpr.java - CeilingCall.java Choose.java Comment.java - DecimalFormatting.java ConcatCall.java - Constants.java ContainsCall.java Copy.java - CopyOf.java CurrentCall.java DocumentCall.java - EqualityExpr.java Import.java If.java - ElementAvailableCall.java Expression.java - Fallback.java FilterExpr.java FilterParentPath.java - FloorCall.java FlowList.java ForEach.java - FormatNumberCall.java FunctionAvailableCall.java - FunctionCall.java GenerateIdCall.java - IdKeyPattern.java Include.java IntExpr.java - Key.java KeyCall.java LangCall.java LastCall.java - LiteralAttribute.java LiteralElement.java - LiteralExpr.java LocalNameCall.java - NamespaceAlias.java LogicalExpr.java Message.java - Mode.java NameBase.java NameCall.java - NamespaceUriCall.java NotCall.java Number.java - NumberCall.java Output.java Param.java - ParentLocationPath.java ParameterRef.java - ParentPattern.java PositionCall.java - RelationalExpr.java Predicate.java Sort.java - ProcessingInstruction.java RealExpr.java - VariableRef.java RoundCall.java ValueOf.java - SimpleAttributeValue.java StartsWithCall.java - Stylesheet.java StringCall.java - StringLengthCall.java StepPattern.java - Template.java TestSeq.java Text.java - TopLevelElement.java TransletOutput.java - UnaryOpExpr.java UnionPathExpr.java - UnparsedEntityUriCall.java UseAttributeSets.java - LongExpr.java Variable.java Whitespace.java - XslAttribute.java WithParam.java XSLTC.java - XslElement.java UnsupportedElement.java - VariableBase.java VariableRefBase.java - FilteredAbsoluteLocationPath.java - SyntaxTreeNode.java Step.java UnresolvedRef.java - ProcessingInstructionPattern.java
      Committer's log entry: changed de.fub.bytecode to org.apache.bcel

    • Committed by tmiller@apache.org on 02/01/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - NamedMethodGenerator.java NodeCounterGenerator.java - NodeSetType.java NodeSortRecordGenerator.java - NodeType.java RealType.java ReferenceType.java - ResultTreeType.java RtMethodGenerator.java - SlotAllocator.java StringType.java - TestGenerator.java Util.java LongType.java
      Committer's log entry: changed de.fub.bytecode to org.apache.bcel

    • Committed by tmiller@apache.org on 02/01/2002
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - AttributeSetMethodGenerator.java BooleanType.java - ClassGenerator.java CompareGenerator.java - FilterGenerator.java IntType.java - MatchGenerator.java MethodGenerator.java - MethodType.java Type.java VoidType.java
      Committer's log entry: changed de.fub.bytecode to org.apache.bcel

    • Committed by tmiller@apache.org on 02/05/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: bug 1520, spec chars in href attributes

    • Committed by tmiller@apache.org on 02/07/2002
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: bug 1520, updating href attr spec char handling

    • Committed by tmiller@apache.org on 02/13/2002
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: bug fix 6189, ArrayIndexOutOfBoundsException, contrib - by Mirko Seifert

    • Committed by tmiller@apache.org on 02/14/2002
      Added: java/src/org/apache/xalan/xsltc - javax.xml.transform.TransformerFactory
      Committer's log entry: added a service provide source file to be copied into - xsltc.jar (bundled jar)

    -
    - -

    XSLTC source code updates:

    • Committed by morten@apache.org on 11/30/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: A fix to the XPath parser to make sure (again!) that non-prefixed elements - in XPath expressions/patterns are not assigned the default namespace but - rather the null namespace. - PR: bugzilla 4904 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/30/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: Modified the order in which top-level elements are parsed. This to make sure - that xsl:namespace-alias elements are parsed before xsl:import and include, - so that namespace aliases are global to all included stylesheets. - PR: bugzilla 4876 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/04/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Predicate.java - xpath.lex
      Committer's log entry: - - -

    • Committed by morten@apache.org on 12/04/2001
      Modified: java/src/org/apache/xalan/xsltc NodeIterator.java - java/src/org/apache/xalan/xsltc/dom AbsoluteIterator.java - CurrentNodeListIterator.java DOMImpl.java - FilterIterator.java FilteredStepIterator.java - KeyIndex.java MatchingIterator.java MultiDOM.java - NodeIteratorBase.java NthIterator.java - StepIterator.java UnionIterator.java
      Committer's log entry: A fix for the various node iterators cloneIterator() method. This method - should clear the _isRestartable flag to prevent iterators contained within - variables and parameters from changing their value. This flag is now wrapped - inside a setRestartable(boolean flag) method so that the call can be - propagated down a stack of iterators. This seems to solve many of our - iterator problems. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apaceh.org

    • Committed by morten@apache.org on 12/04/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler SyntaxTreeNode.java - XslElement.java
      Committer's log entry: Added a method to the SyntaxTreeNode base class that can be used to check - the existence of an attribute in the input document: hasAttribute(String -name). - This method is used in the XslElement class to verify the existence of a - 'namespace' attribute with an empty value. - PR: bugzilla 4983 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/04/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Updated the realToString() method in the runtime library to always output - numbers on decimal form (and not on Java's "computerized scientific notation." - PR: bugzilla 4199 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/04/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - RoundCall.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Changed the return-type of the round() function form int to double. The result - is still rounded (of course), but it is returned as a double to be able to - return NaN and infinite values. - PR: bugzilla 2805 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/05/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Predicate.java
      Committer's log entry: I am still fiddling around with predicates containing variable references - and position filters. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/05/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.lex
      Committer's log entry: Reverting previous putback.

    • Committed by morten@apache.org on 12/05/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Output.java - java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages.java ErrorMessages_no.java - ErrorMsg.java - java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Added a warning message for unsupported output encodings. - PR: bugzilla 5139 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/05/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.lex
      Committer's log entry: fixed typo

    • Committed by morten@apache.org on 12/10/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: A fix for global parameters whose names contain dots or dashes. - PR: bugzilla 5328 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/10/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: A fix for a bug in the XPath parser. The parser would choke on some XPath - expressions that contained references to element names that were identical - to axis names. - PR: bugzilla 3502 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/10/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Added another fix to properly convert ver small floating point numbers to - strings. - PR: bugzilla 4199 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/10/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: Added a fix for global variables declared in included/imported stylesheets. - PR: bugzilla 5327 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/10/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - MethodGenerator.java
      Committer's log entry: Fix for use of XPath expressions in contexts where there is no 'current' - node (ie. in top-level elements such as variables and attribute sets). - PR: bugzilla 5194 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: added factory creation methods and checks

    • Committed by tmiller@apache.org on 12/11/2001
      Added: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: new prototype class, work in progress

    • Committed by tmiller@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: added factory creation methods and checks

    • Committed by tmiller@apache.org on 12/11/2001
      Added: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: new prototype class, work in progress

    • Committed by morten@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - ResultTreeType.java
      Committer's log entry: A fix for passing result tree fragments and node-sets to external Java - methods. Node sets and RTFs can both be handled as org.w3c.dom.Node or - org.w3c.dom.NodeList in the called method. - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: added factory creation methods and checks

    • Committed by tmiller@apache.org on 12/11/2001
      Added: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: new prototype class, work in progress

    • Committed by tmiller@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: added factory creation methods and checks

    • Committed by tmiller@apache.org on 12/11/2001
      Added: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: new prototype class, work in progress

    • Committed by morten@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - ResultTreeType.java
      Committer's log entry: A fix for passing result tree fragments and node-sets to external Java - methods. Node sets and RTFs can both be handled as org.w3c.dom.Node or - org.w3c.dom.NodeList in the called method. - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: added factory creation methods and checks

    • Committed by tmiller@apache.org on 12/11/2001
      Added: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: new prototype class, work in progress

    • Committed by tmiller@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: added factory creation methods and checks

    • Committed by tmiller@apache.org on 12/11/2001
      Added: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: new prototype class, work in progress

    • Committed by tmiller@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: added factory creation methods and checks

    • Committed by tmiller@apache.org on 12/11/2001
      Added: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: new prototype class, work in progress

    • Committed by tmiller@apache.org on 12/11/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: look for xsltc specific attributes

    • Committed by tmiller@apache.org on 12/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: store error listener and or uri resolver locally - set in real factory when needed

    • Committed by tmiller@apache.org on 12/13/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - SmartTransformerFactoryImpl.java
      Committer's log entry: fixed scope of internal method

    • Committed by morten@apache.org on 12/17/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Transform.java
      Committer's log entry: Removed some stupid debug timing-loop in the command line Transform tool. - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: Removed the main() method from the XSLTC class. This class represents the - native API of the compiler. - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 12/17/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Transform.java - java/src/org/apache/xalan/xsltc/dom DTDMonitor.java
      Committer's log entry: A small cleanup in our native API. - Submitted by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 01/07/2002
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: fixed problem with output content handler creation - (while running xalan conf tests) in method getOutputHandler(Result).

    -
    - -

    XSLTC source code updates:

    • Committed by morten@apache.org on 11/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslAttribute.java
      Committer's log entry: Fixed bug for xsl:attribute - PR: 4175 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Fix for properly creating a SAX InputSource from a TrAX InputStream for - encapsulating a stylesheet before it is compiled. - PR: bugzilla 4711 (I hope to God) - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Fix for last putback.

    • Committed by morten@apache.org on 11/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: This fix should take care of a regression introduced by the code that was - added on the 29.10.2001 to take care of forward referenced variables. - This little patch ensures that variables that do not have any dependencies - are kept in order. - PR: bugzilla 4779 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/14/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: Fixed a minor regression after the fix for 3592. A literal number zero was - always interpreted as an integer zero and never as a double -0 opr 0.0. - PR: bugzill 4810 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/15/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fixed the code that prevents escaping of text inside <script> and <style> - elements in HTML. The code did not handle upper case element names. - PR: bugzilla 2517 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 11/16/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: bug fix 4906

    • Committed by morten@apache.org on 11/20/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java - Template.java xpath.cup
      Committer's log entry: Fix for nested parent location paths / filter parent paths with key() or - id() root. These paths would in some case returnt he root node when they - should not. - PR: bugzilla 4781 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/20/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Sort.java
      Committer's log entry: Fix for a big in the <xsl:sort> implementation. The element would not always - work properly in the innermost loop in nested <xsl:for-each> elements. - PR: bugzilla 4921 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/21/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java - Sort.java
      Committer's log entry: A fix for a regression introduced by a fix for <xsl:sort/> and nested - <xsl:for-each/> elements. - PR: bugzilla 4921 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/21/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fix to ensure that double quotes are escaped inside attribute values in - HTML output. - PR: bugzilla 4845 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/21/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java
      Committer's log entry: Fix for a bug caused by <xsl:apply-templates/> not always passing parameters -to - the invoked template(s). Parameters would not be put on the stack if the - 'select' attribute contained wildcards. - PR: bugzilla 4718 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/21/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - StringType.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Fixed conversion between strings and numbers. Empty strings should return - 0 and not NaN. - PR: bugzilla 4783 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/22/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Choose.java - Parser.java SyntaxTreeNode.java Text.java - java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fix for a whole wack of bugs related to text-nodes and handling of whitespace - and special characters. - PR: bugzilla 1403, 1520, 3005, 3418 and 3690 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/22/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Prevented the namespace-uri() from returning anything for namespace nodes. - PR: bugzilla 4896 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/22/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslElement.java
      Committer's log entry: Added test in <xsl:element> to verify that the local name of the created - element is legal (must have contents, but no whitespaces or colon). - PR: bugzilla 4894 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/22/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: A small fix for the substring() function to output an empty string if the - start index is an infinite value. - PR: bugzilla 4813 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/22/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Constants.java - Stylesheet.java
      Committer's log entry: Fix for XHTML output. - PR: bugzilla 4904 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/22/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Message.java
      Committer's log entry: A cleanup in the Message class. Making way for a fix for 4874 - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Predicate.java
      Committer's log entry: A fix for position predicates used within parameters and variables. - PR: bugzilla 4783 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslAttribute.java
      Committer's log entry: A small fix needed after a fix for stripping/preserving text nodes. The fix - for text-nodes caused us to insert text nodes before <xsl:attribute> elements - in the AST, which again caused the XslAttribute class to complain. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/26/2001
      Modified: java/src/org/apache/xalan/xsltc DOM.java - java/src/org/apache/xalan/xsltc/compiler Message.java - java/src/org/apache/xalan/xsltc/dom DOMAdapter.java - DOMImpl.java MultiDOM.java
      Committer's log entry: Added a new method to the DOM interface for retrieving the DOM as a single - string. This method is different from the existing getStringValue() in the - way that it generates element brackets and copies PIs and comments. - PR: bugzilla 4874 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/27/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java - FilteredStepIterator.java StepIterator.java - UnionIterator.java
      Committer's log entry: Updated the StepIterator and FilteredStepIterator's cloneIterator() and - reset() methods so that the _isRestartable flag is set correctly. - PR: bugzilla 4905 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/27/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: Another fix for 3005 (special characters inside CDATA). - PR: bugzilla 3005 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/27/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: A fix for decimal formatting - PR: bugzilla 4901 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/27/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler AttributeSet.java
      Committer's log entry: A fix for a regression introduced by a fix for whitespace handling. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/27/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler FilterExpr.java - Predicate.java VariableRefBase.java - java/src/org/apache/xalan/xsltc/dom - CurrentNodeListIterator.java DOMImpl.java - FilteredStepIterator.java KeyIndex.java - MatchingIterator.java MultiDOM.java - NthIterator.java StepIterator.java - UnionIterator.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: A fix for trees of step iterators stored inside variables. - Also some fixes for recently introduced regressions. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.iorg

    • Committed by morten@apache.org on 11/29/2001
      Modified: java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java
      Committer's log entry: A fix for the TrAX API when used from within an environment that does _not_ - use one of the standard classloaders. - PR: bigzilla 5130 - Obtained from: n/a - Submitted by: Jochen.Cordes@t-online.de - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/29/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Sort.java - java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java
      Committer's log entry: A fix for multilevel sort-keys. If a set of translets (representing different - stylesheets) are running one the same JVM, and two or more of these translets - use NodeSortRecord objects to represent <xsl:sort/> elements, then the number - of sort keys would be set in the NodeSortRecord _class_ constructor instead of - being set locally for each occurance of <xsl:sort/>. - PR: bugzilla 4755 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/29/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler CastExpr.java - EqualityExpr.java Expression.java LastCall.java - Predicate.java VariableRefBase.java - java/src/org/apache/xalan/xsltc/dom DOMImpl.java - StepIterator.java
      Committer's log entry: A fix for resetting the source iterator of a node-value iterator. - PR: bugzilla 5152 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/29/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - DecimalFormatting.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: A fix for a few regressions from yesterday. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/30/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: A fix to the XPath parser to make sure (again!) that non-prefixed elements - in XPath expressions/patterns are not assigned the default namespace but - rather the null namespace. - PR: bugzilla 4904 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/30/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: Modified the order in which top-level elements are parsed. This to make sure - that xsl:namespace-alias elements are parsed before xsl:import and include, - so that namespace aliases are global to all included stylesheets. - PR: bugzilla 4876 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    -
    - -

    XSLTC source code updates:

    • Committed by morten@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: Changed the values for the output properties "OMIT_XML_DECLARATION" and - "INDENT" from "true" and "false" to "yes" and "no". - PR: bugzilla 4039 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Updated the getAttribute() method to throw an IllegalArgumentException - for unknown attributes. - PR: bugzilla 4046 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler NameBase.java
      Committer's log entry: Fixed a bug in the name() and local-name() functions. The functions would - use the current node and not the context node when no arguments were given. - PR: bugzilla 3322 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Updated Mode.java to properly handle patterns matching on node(), comment() -and - processing-instruction(). Also had to make a small change to the -setStartNode() - method in the FollowingIterator (inner class of DOMImpl.java) to properly - handle attribute-nodes as start nodes. Also, I had to change -ParentLocationPath - to remove duplicates that can be produced by the FollowingIterator when - started with an attribute node. - PR: bugzilla 2551 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: A small for for the output property OMIT_XML_DECLARATION - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: Fix to the transformer implementation to allow for namespace-prefixed - output properties (output property extensions). - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      Committer's log entry: included a more portable way to create an URI from a File

    • Committed by tmiller@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime DefaultRun.java
      Committer's log entry: ncluded a more portable way to create an URI from a File

    • Committed by tmiller@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: ncluded a more portable way to create an URI from a File

    • Committed by tmiller@apache.org on 10/12/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Transform.java
      Committer's log entry: ncluded a more portable way to create an URI from a File

    • Committed by morten@apache.org on 10/15/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java - ParentLocationPath.java Parser.java - RelationalExpr.java SyntaxTreeNode.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java TextOutput.java
      Committer's log entry: A fix for a few regressions. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/15/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java - java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Fix for the "*" pattern. Made it include comment and PI nodes. - PR: bugzilla 4050 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/15/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java
      Committer's log entry: Fix for the last fix. - PR: bugzilla 4050 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/15/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Fix for the last fix. - PR: bugzil.la 4050 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 10/15/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: added catch for malformed url

    • Committed by morten@apache.org on 10/16/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Transform.java
      Committer's log entry: Modified error handling to extract messages from SAXException. This tool - will also print the stack trace of the SAXException if the '-x' flag is - specified (debug turned on). - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/16/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Added code to prevent index-out-of-bounds exception in the output handler. - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/16/2001
      Modified: java/src/org/apache/xalan/xsltc DOM.java - java/src/org/apache/xalan/xsltc/compiler XSLTC.java - xpath.cup - java/src/org/apache/xalan/xsltc/dom DOMAdapter.java - DOMImpl.java
      Committer's log entry: Added support for the namespace axis. - PR: bugzilla 1379 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/16/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java
      Committer's log entry: Missing file from last putback. - PR: bugzilla 1379 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/16/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: A few add'ons to the namespace axis implementation. Added support for - the namespace-uri() function when applied to namespace nodes. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/16/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Code cleanup. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/16/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java
      Committer's log entry: Fix to prevent attribute nodes to be included by the node() pattern. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/16/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Fix for the following:: iterator when started with an attribute node. - PR: bugzilla 2551 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LiteralElement.java - Mode.java - java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: A fix to a recent regression after a fix for some axis iterators. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup xpath.lex
      Committer's log entry: Added 4 symbols to the lexiographical analyser (xpath.lex) to recognise - name-tests with whitespace between the NCName and the "()" brackets. - PR: bugzilla 4208 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslAttribute.java
      Committer's log entry: Fix to prevent xsl:attributes from not compiling itself into the translet -code. - PR: bugzilla 4175 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - FilterParentPath.java
      Committer's log entry: Enabled node ordering for certain filtered parent paths. - PR: bugzilla 4178 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/17/2001
      Modified: java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java
      Committer's log entry: Changed the node sort record base class so that it places NaN values first - in the sorted list/node-set. - PR: bugzilla 3517 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/17/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Changed the DOM's copy() function to always copy the necessary namespace - declaration to the output handler. - PR: bugzilla 3409 (not complete fix) - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler CallTemplate.java - DecimalFormatting.java Param.java SymbolTable.java - Template.java Variable.java VariableBase.java - WithParam.java - java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java
      Committer's log entry: Cleaned up the compiler's symbol table. Added support for detecting multiple - defined decimal formatting symbols. - PR: bugzilla 3872 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler CallTemplate.java - Template.java VariableBase.java WithParam.java - XSLTC.java - java/src/org/apache/xalan/xsltc/compiler/util Util.java
      Committer's log entry: Added/checked proper escaping of -template/variable/parameter/attribute-set/etc. - names. Occurances of the characters '.' and '-' are replaced by '$dot$' and - '$dash$' respectively in method/variable names. The characters are both - replaced by an underbar ('_') in the translet class name. - PR: 2399 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Fix for getting all attributes from the Xerces parser. Xerces and Crimson - report attributes differently, and we have to take that into account. - PR: bugzilla 2465 - Obtained from: n/a - Submitted by: Douglas Sellers <douglasjsellers@hotmail.com> - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - FilterParentPath.java
      Committer's log entry: Added node ordering to FilterParentPath - PR: bugzilla 4248 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Changed one of the compare() methods in the basis library to properly - compare node sets. - PR: bugzilla 4242 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: Fixed the registerAttribute() method so that it always uses the same - id for an attribute name. - PR: bugzilla 4243 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Removed: java/src/org/apache/xalan/xsltc/compiler Param.java.orig
      Committer's log entry: Removed file Param.java.orig - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - VariableBase.java
      Committer's log entry: Changed the variable base class to allow variables to be re-defined in - a different scope. - PR: bugzilla 3268 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/dom MultiDOM.java
      Committer's log entry: Added a node-value iterator to the DOM multiplexer to allow for predicates - in combination with the document() function. - PR: bugzilla 3402 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/dom MultiDOM.java
      Committer's log entry: Fix for variables and parameters containing node sets in stylesheets that - use the document() function. This fix completes the cloneIterator() method - of the axis iterators returned by the DOM multiplexer. - PR: bugzilla 3501 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/18/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Added the default xml=http://www.w3.org/XML/1998/namespac namespace - declaration to the root node of our internal DOM. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/19/2001
      Modified: java/src/org/apache/xalan/xsltc/dom LoadDocument.java - MultiDOM.java
      Committer's log entry: A fix for determining the current working directory when loading XML - documents using the document() function. The base URI (that gives you - the CWD) should normally be taken from the context node, but can also - be determined by the node/node-set defining the document URI. - PR: bugzilla 3471 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/19/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Gave the parent/sibling stacks in the DOM builder dynamic length. - PR: bugzilla 3066 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/19/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Compile.java
      Committer's log entry: Added a '-i' option to the command-line compiler to allow stylesheets to be - passed in through stdin. The '-i' option must be used with the '-o' option - to specify a translet name. - PR: bugzilla 4253 - Obtained from: n/a - Submitted by: johnh@schemasoft.com (John Howard) - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/19/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Include.java - Stylesheet.java XSLTC.java
      Committer's log entry: Cleaned up the include/import precedence code in Import and Include - PR: bugzilla 2695 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/22/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Fixed output formatting of some floating point numbers. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/22/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LogicalExpr.java
      Committer's log entry: Fix for logical expressions that have combinations of not() and "and". - PR: bugzilla 2351 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 10/22/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: added a empty string systemId in cases where it was - set to null, slight rearrangment of StreamSource handling code as well.

    • Committed by morten@apache.org on 10/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java
      Removed: java/src/org/apache/xalan/xsltc/compiler header.txt
      Committer's log entry: Fix for names templates. Dashes and dots in template names are now - escaped using '$dash$' and '$dot$'. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: A fix for a recent regression. A no major change. Just a one-line if to - test for a potential NPE. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ApplyImports.java - Mode.java Stylesheet.java Template.java
      Committer's log entry: A major fix for <xsl:apply-imports/>. This element was previously treated - as <xsl:apply-templates/> but is now handled similar to Java's 'super()' - method. Note that this is not a complete fix. The rest will come tomorrow - or the day after. I just wanted to make sure that today's efforts were not - lost and that they are tested overnight. - PR: bugzilla 1397 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/25/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ApplyImports.java - DocumentCall.java Stylesheet.java - SyntaxTreeNode.java - java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      Committer's log entry: Fixed the document() function so that it will load documents relative to - either the currently loaded document, or if that fails, relative to the - location of the original stylesheet. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/25/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerHandlerImpl.java TransformerImpl.java
      Committer's log entry: Fixed the TransformerHandler so that it's Transformer instance can be used - separateely from the handler itself. - PR: bugzilla 3873 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/25/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Import.java - Include.java
      Committer's log entry: A fix for resulving relative URIs when using <xsl:include/> and <xsl:import/> - through TrAX without using a URIResolver. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/25/2001
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: Fix for a bug that seemed to be triggered by the sequence in which Xerces' - lexical handler and content handler were set. The lexical handler must be - set before the content handler, otherwise Xerces will keep generating the - first startElement() event over and over again. - PR: bugzilla 2465 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/25/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java - java/src/org/apache/xalan/xsltc/dom DOMImpl.java - java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fixed the general handling of the XML namespace mapping. - PR: bugzilla 4331 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ApplyImports.java - Mode.java Stylesheet.java
      Committer's log entry: A fix for setting the scope of templates for an <xsl:apply-imports/> element. - This fix allows for proper "multiple inheritance" in XSLTC. - PR: bugzilla 1397 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: Fix to ensure that the order of the -o and -p command line options is - not significant. - PR: bugzilla 4343 - Obtained from: n/a - Submitted by: johnh@schemasoft.com (John Howard) - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler FunctionCall.java
      Committer's log entry: Changed our extension for calling external static Java methods to allow - both the "http://xml.apache.org/xalan/xsltc/java" namespace and the - "http://xml.apache.org/xslt/java" namespace (Xalan's namespace for Java - function calls). - PR: bugzilla 3994 - Obtained from: n/a - Submitted by: after numerous requests/suggestions on xalan-dev - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/29/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler BinOpExpr.java - Choose.java DocumentCall.java Number.java - Otherwise.java StepPattern.java Stylesheet.java - VariableBase.java VariableRef.java - VariableRefBase.java When.java XSLTC.java xpath.cup - java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java
      Committer's log entry: Implemented code to resolve forward references and dependencies between - global variables and parameters. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/30/2001
      Added: java/src/org/apache/xalan/xsltc/compiler UnresolvedRef.java
      Committer's log entry: Missing file from last putback. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/30/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ApplyTemplates.java - AttributeSet.java AttributeValueTemplate.java - BinOpExpr.java CallTemplate.java ConcatCall.java - ContainsCall.java CopyOf.java - DecimalFormatting.java DocumentCall.java - ElementAvailableCall.java Expression.java - ForEach.java FormatNumberCall.java - FunctionAvailableCall.java FunctionCall.java - If.java Import.java Include.java Instruction.java - Key.java Output.java Param.java Parser.java - ProcessingInstruction.java RelationalExpr.java - StartsWithCall.java StringCall.java Stylesheet.java - Template.java TopLevelElement.java - TransletOutput.java UnsupportedElement.java - UseAttributeSets.java ValueOf.java Variable.java - VariableBase.java When.java Whitespace.java - WithParam.java XslAttribute.java XslElement.java - xpath.cup - java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java
      Committer's log entry: Moved all error messages from the various source files into the ErrorMsg - class in the compiler/util directory. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/30/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Compile.java - Transform.java - java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java - SlotAllocator.java - java/src/org/apache/xalan/xsltc/dom LoadDocument.java - NodeSortRecordFactory.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java BasisLibrary.java - SAXAdapter.java TextOutput.java - java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java - TransformerFactoryImpl.java - TransformerHandlerImpl.java TransformerImpl.java - XSLTCSource.java
      Added: java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages.java ErrorMessages_en.java - ErrorMessages_no.java
      Committer's log entry: A first stab at i18n'ing XSLTC. Error and warning messages from the compiler - and TrAX are handled by the compiler/util/ErrorMsg class, while messages - from the DOM and runtime/translet are handled by the Basis Library class. - Only the ErrorMsg class has so far been updated to dynamically read its - messages from a ResourceBundle. Bundles for British English and Norwegian - are implemented. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/30/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - BooleanType.java ErrorMessages.java - ErrorMessages_no.java ErrorMsg.java IntType.java - NodeSetType.java NodeType.java RealType.java - ReferenceType.java ResultTreeType.java - StringType.java Type.java VoidType.java
      Committer's log entry: Code cleanup. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/30/2001
      Modified: java/src/org/apache/xalan/xsltc/dom AbsoluteIterator.java - CurrentNodeListIterator.java DOMImpl.java - FilterIterator.java FilteredStepIterator.java - MatchingIterator.java MultiDOM.java - NodeIteratorBase.java StepIterator.java - UnionIterator.java
      Committer's log entry: Final code cleanup after i18n work. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/30/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages.java
      Committer's log entry: Removed a typo in console output. - Submitted by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/30/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Added "Compiler Warning" text to output. - Submitted by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Import.java - Include.java StepPattern.java - java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages_no.java - java/src/org/apache/xalan/xsltc/dom LoadDocument.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java - java/src/org/apache/xalan/xsltc/trax - TemplatesHandlerImpl.java - TransformerFactoryImpl.java
      Removed: java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages_en.java
      Committer's log entry: Localised the runtime/dom packages into Norwegian. This proves that the - internationalisation work is completed. I also fixed a regression that - was caused by the error handling being changed. - PR: n/a (i18n and l10n work) - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: Integrated a fix from John Howard for forcing forward slashes in file paths - in JAR files and in manifests in JAR files. - PR: bugzilla 4464 - Obtained from: n/a - Submitted by: John Howard (johnh@schemasoft.com) - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - Stylesheet.java
      Committer's log entry: Fix for simplified stylesheets. A namespace declaration on the root element - in the stylesheet (xmlns="http://www.w3.org/TR/xhtml1/strict") caused XSLTC - to try to match elements in this namespace instead of elements in the null - namespace. - PR: bugzilla 3664 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: Removed a regression from yesterday ('version' attribute missing). - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java
      Committer's log entry: Removed default behaviour of text() and "*" in <xsl:apply-imports/>. - (this element should not invoke built-ins). - PR: bugzilla 1397 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java - java/src/org/apache/xalan/xsltc/runtime SAXAdapter.java
      Committer's log entry: Updated the SAXAdapter used to build result tree fragments to handle comments. - PR: bugzilla 4172 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Fix for the XPath substring() function. - PR: bugzilla 4201 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Number.java
      Committer's log entry: Removed the last putback - should never have been done. Big mistake!!! - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DTDMonitor.java
      Committer's log entry: Fix for generating IDs for implied attributes. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Enabled character escaping by default for HTML output. We are now able to - generate the XSLT and XPath specs without any errors at all. - PR: bugzilla 3065 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Added: java/src/org/apache/xalan/xsltc/runtime ErrorMessages.java - ErrorMessages_no.java
      Committer's log entry: Missing resource bundles for error messages for XSLTC's dom and runtime lib. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 10/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java
      Committer's log entry: Fixed pattern matching on namespace qualified wildcards, such - as match="@blob:*". - PR: bugzilla 2582 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/01/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Predicate.java
      Committer's log entry: Added a fix for predicates that test on node values, where the value to - test agains is stored in a variable or predicate. - PR: bugzilla 3501 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/01/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: Fix for re-definitions of variables inside templates (in different scopes). - PR: bugzilla 3406 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/01/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java
      Committer's log entry: Potential fix for bug 3416. Will not integrate for performance reasons. - Code change is commented. - PR: bugzilla 3416 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/01/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: Removed a desperately bad piece of code that caused XSLTC to misinterpret - some combinations of parent location paths and predicates. - PR: bugzilla 4249 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/01/2001
      Modified: java/src/org/apache/xalan/xsltc/dom NodeCounter.java
      Committer's log entry: Fix for the formatter used with the xsl:count element. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/01/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Sort.java
      Committer's log entry: Fix for sort-elements used with apply-templates elements with no select - attribute. - PR: bugzilla 3519 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/02/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler PositionCall.java - java/src/org/apache/xalan/xsltc/dom NodeCounter.java - SingleNodeCounter.java
      Committer's log entry: A fix for the <xsl:number> element. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org / todd.miller@sun.com - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/05/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Sort.java - java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java - NodeSortRecordFactory.java
      Committer's log entry: Changed the 'order' and 'data-type' attributes of the <xsl:sort> element - from plain attributes to attribute value templates. This required a change - not inly in the way we interpret these attributes but also in the time at - which these attributes are intrepreted. Since these are not treated as AVTs - we need to wait until runtime before reading the values of the attributes. - PR: bugzilla 3835 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/05/2001
      Modified: java/src/org/apache/xalan/xsltc DOM.java - java/src/org/apache/xalan/xsltc/compiler PositionCall.java - StepPattern.java - java/src/org/apache/xalan/xsltc/dom DOMAdapter.java - DOMImpl.java MultiDOM.java NodeSortRecord.java
      Removed: java/src/org/apache/xalan/xsltc/compiler Mode.java.old
      Committer's log entry: Fix for patterns on the format "/foo/*/bar" and "/foo/*[n]/bar". - PR: bugzilla 4604 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/05/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Step.java - java/src/org/apache/xalan/xsltc/dom - CurrentNodeListIterator.java DOMImpl.java
      Committer's log entry: Fixed the last() function for the typed and untyped ancestor iterators. - I also updated our node list iterator (used to implement some predicates) - to handle the last() function properly for reverse-order axes. - PR: bugzilla 4602 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/06/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslAttribute.java
      Committer's log entry: A fix for a regression after a previous fix for bug 3320. - PR: bugzilla 4656 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/06/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler BinOpExpr.java - CastExpr.java EqualityExpr.java Expression.java - LastCall.java LogicalExpr.java PositionCall.java - Predicate.java RelationalExpr.java Step.java - StepPattern.java UnaryOpExpr.java
      Committer's log entry: Fix for compound predicates used in patterns. - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - AttributeValueTemplate.java Constants.java - FilterParentPath.java LiteralAttribute.java - LiteralElement.java LiteralExpr.java Mode.java - ParentLocationPath.java Parser.java - SimpleAttributeValue.java SyntaxTreeNode.java - Text.java UnionPathExpr.java
      Committer's log entry: A bit of a code cleanup. I also added a small fix for ensuring document order - of node sets returned by union expressions. - PR: bugzilla 4677 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Sort.java - java/src/org/apache/xalan/xsltc/compiler/util - ErrorMessages.java ErrorMessages_no.java - ErrorMsg.java
      Committer's log entry: Added a test to verify that <xsl:sort/> elements are only used within - <xsl:apply-templates/> or <xsl:for-each/> elements. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/08/2001
      Modified: java/src/org/apache/xalan/xsltc/dom Axis.java
      Committer's log entry: Added an array to the Axis class to give an easy indication to the direction - of an axis. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/08/2001
      Modified: java/src/org/apache/xalan/xsltc DOMCache.java - java/src/org/apache/xalan/xsltc/cmdline Transform.java - java/src/org/apache/xalan/xsltc/compiler FunctionCall.java - java/src/org/apache/xalan/xsltc/dom - NodeSortRecordFactory.java - java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Added: java/src/org/apache/xalan/xsltc/runtime TransletLoader.java
      Committer's log entry: Added a new TransletLoader class to the runtime package. This class will - be used only when the default Class.forName() call fails. The forName() - call will fail if XSLTC is packed in a JAR and installed under - $JAVA_HOME/jre/lib/ext. This is because the extensions class - loader is used instead of the bootstrap class loader, and that the - extensions class loader does not load classes for the default class path. - But, if the extensions class loader is being used, then we know two things: - - (1) XSLTC is running on Java 1.2 or later (when extensions were introduced) - (2) XSLTC has access to the ClassLoader.getSystemClassLoader() method - - This class takes advantage of this and uses a privileged call to this - method to get a reference to the bootstrap class loader. It then uses this - class loader to load the desired class. - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Added a "debug" attribute to the TransformerFactory implementation. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/09/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Removed a debug statement that was left behind after last putback. - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/09/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Step.java - StepPattern.java XSLTC.java xpath.cup xpath.lex
      Committer's log entry: Added support for processing-instruction() with a literal parameter for - use in node tests in expressions and patterns. - PR: bugzilla 2583 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 11/09/2001
      Added: java/src/org/apache/xalan/xsltc/compiler - ProcessingInstructionPattern.java
      Committer's log entry: Forgot this in last putback. - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 11/09/2001
      Added: java/src/org/apache/xalan/xsltc/compiler LongExpr.java
      Committer's log entry: bug fix 3592, new class to handle Long expresssion

    • Committed by tmiller@apache.org on 11/09/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - xpath.cup xpath.lex Constants.java CastExpr.java
      Committer's log entry: bug fix 3592, handles long now

    • Committed by tmiller@apache.org on 11/09/2001
      Added: java/src/org/apache/xalan/xsltc/compiler/util LongType.java
      Committer's log entry: bug fix 3592, added new class for Long types

    • Committed by tmiller@apache.org on 11/09/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util Type.java
      Committer's log entry: bug fix 3592, handles Long types

    -
    - -

    XSLTC source code updates:

    • Committed by tmiller@apache.org on 09/05/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: bug fix # 3424, memory retension fixed, John Howard contributed fix.

    • Committed by tmiller@apache.org on 09/06/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: bug fix 2807, seth ford's fix

    • Committed by tmiller@apache.org on 09/06/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Include.java - Import.java
      Committer's log entry: bug fix 3426, gunnlaugur briem's fix

    • Committed by tmiller@apache.org on 09/06/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslAttribute.java
      Committer's log entry: bug fix 3320, gunnlaugur briem's fix

    • Committed by "Gunnlaugur Thor Briem" <gthb@dimon.is< on 09/06/2001
      Committer's log entry: -> bug fix 3320, gunnlaugur briem's fix -> ->

    • Committed by "G. Todd Miller - XML Tech Ctr - Development" <Glenn.Miller@Sun.COM> on 09/06/2001
      Committer's log entry: - >>> bug fix 3320, gunnlaugur briem's fix - >>> - >>>

    • Committed by tmiller@apache.org on 09/07/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: updated comments from bug fix 2553

    • Committed by tmiller@apache.org on 09/10/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: bug fix 3360, predicate handling added

    • Committed by morten@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java TextOutput.java
      Committer's log entry: I have updated out output handler to treat this in the same manner as XT does. - We allow AVT's to create namespace mappings between some prefix and the null - URI. But, whenever an attribute or element uses a prefix that maps to the null - URI we replace the prefix with the default prefix. So insead of outputting an - illegal namespace declaration xmlns:ns1="" and ns1:Attr1="Whatsup" we simply - output Attr1="Whatsup" - PR: bugzilla 1518 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Transform.java
      Committer's log entry: Modified some of the error messages that are reported by this command-line - tool to include full and correct error messages.

    • Committed by morten@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Added: java/src/org/apache/xalan/xsltc/dom DOMBuilder.java
      Committer's log entry: Added support for comment nodes in the DOM. This support disappeared when - we upgraded the DOMBuilder's interface from SAX to SAX2. Added a new - interface for the DOMBuilder that includes SAX's ContentHandler _and_ - LexicalHandler. - PR: bugzilla namespace30 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Updated the output handler to URL encode href attributes in HTML output. - I used the URLEncoder class in java.net - PR: bugzilla 1512 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java
      Committer's log entry: Fixed the default output SAX handler so that it does not indent empty HTML - tags such as <col> and <br> - PR: bugzilla 1525 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java TextOutput.java
      Committer's log entry: Fix to prevent character escaping inside <script> and <style> elements in - HTML output. - PR: bugzilla 2517 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Transform.java - java/src/org/apache/xalan/xsltc/compiler BooleanCall.java - StepPattern.java Variable.java - java/src/org/apache/xalan/xsltc/compiler/util - ResultTreeType.java - java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Fix to always return 'true' when result tree fragments are converted to - boolean values (because a result tree always has at least one node - root). - PR: bugzilla 2595 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Added some code to the DOM builder to make sure that text nodes are not - broken up into smaller fragments. - PR: bugzilla 3506 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/dom NodeIteratorBase.java - UnionIterator.java
      Committer's log entry: Fix for the count() function and union iterators. Union iterators would not - reset all the iterators it contained, and it needed a reset() method. - PR: bugzilla 3504 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 09/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: bug fix 3312, //xx/descendant works now

    • Committed by morten@apache.org on 09/13/2001
      Modified: java/src/org/apache/xalan/xsltc/dom NodeIteratorBase.java
      Committer's log entry: Removed a debug statement that was left in here by mistake. Bad, bad, bad! - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 09/13/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - ParentLocationPath.java
      Committer's log entry: added test for ParentLocationPath instance

    • Committed by tmiller@apache.org on 09/13/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: bug fix 3312 completed

    • Committed by morten@apache.org on 09/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LiteralElement.java - Param.java ParameterRef.java - ParentLocationPath.java Variable.java - VariableBase.java VariableRef.java - java/src/org/apache/xalan/xsltc/dom DOMImpl.java - MatchingIterator.java ReverseIterator.java - StepIterator.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java - TextOutput.java - java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: Several bugfixes and fixes for regressions recently introduced by other - bugfixes. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Predicate.java
      Committer's log entry: Fix for parameter references used within predicates. - PR: bugzilla 3405 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/18/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Compile.java
      Committer's log entry: Added '-s' option to command-line compilaton tool to precent calls to - System.exit(); This is needed when the command-line tool is invoked by - our Java-based test harness. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/18/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: Added test in the method that handles stylesheet PIs in embedded stylesheets. - This method did not properly test for the existence of stylesheets referenced - in these PIs (ref. Sun's test embed09). - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/19/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Predicate.java - StepPattern.java TestSeq.java
      Committer's log entry: Fix for predicates used in complex match patterns. The compiler failed to - produce code that would match on patterns like "blob/*[@attr='str']". It - would also fail to identify some position predicates such as "blob[$param]". - Nested parameters were not handled properly either. A pattern such as - "foo[bar[starts-with(@attr, 'baz')]]" would be broken up and actually - compiled twice - the outer predicate would be compiled first and the inner - one after that. This fix makes sure that the predicates are handled together - as one test, and not as two separate tests. - PR: bugzilla 1376 (was an id/key problem, now predicates) - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/19/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java TextOutput.java
      Committer's log entry: Modified the output handler and SAX handler to produce proper HTML output. - Special characters in <script> and <style> elements are no longer escaped, - and end-tags are properly produced (sometimes we would forget the last '>'). - PR: bugzilla 2517 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/19/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java - MatchingIterator.java StepIterator.java
      Committer's log entry: Verious fixes for iterators. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/19/2001
      Modified: java/src/org/apache/xalan/xsltc/dom BitArray.java - DupFilterIterator.java KeyIndex.java
      Committer's log entry: A fix in the duplicate filter iterator to ensure that the iterator can be - reset properly. The iterator was using its own variable for tracking the - current node (not the base class' _position variable) but did not - implement the reset() method). - PR: bugzilla 1430 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/19/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler VariableRef.java
      Committer's log entry: Forgot to add this file with my fix for bug 1430. - PR: bugzilla 1430 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/19/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LastCall.java - ParameterRef.java PositionCall.java Predicate.java - RoundCall.java VariableRefBase.java
      Committer's log entry: Fix for combination of wildcards and position predicates in match patterns. - PR: bugzilla 1532 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 09/19/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler RelationalExpr.java
      Committer's log entry: bug fix 2838, (namedtemplate test)

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fix to prevent escaping of the '"' character. This character should only - be escaped inside attribute values, and not in text nodes. - PR: bug 2952 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Fix for ChildrenIterator to speed up last() and position() calls. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/dom AbsoluteIterator.java
      Committer's log entry: This fix may affect a series of bugs. The AbsoluteIterator (/foo/bar/... etc.) - did not update its _position variable, causing position() to return wrong - values if called more than once. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - MethodGenerator.java
      Committer's log entry: Added shortcut to call the reset() method on any iterator. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Fix to ensure that node iterators stored inside parameters are clones for - each time the parameter is referenced. If this is not done then the node - iterator will be in an unstable state after it has been referenced once. - PR: bugzilla 3238 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: A fix for layers of parent location paths and steps representing an - XPath pattern/expression like /foo/*/bar - PR: bugzilla 3311 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ParameterRef.java - ParentLocationPath.java Predicate.java
      Committer's log entry: Removed a change from yesterday that caused a pretty bad regression in - the position() and last() functions. Also changed a line un Param.java - to add more information in debug outout. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fix to prevent complaints about illegal namespace declarations in output. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler VariableBase.java - WithParam.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Added escaping of special characters in parameter names when passed to a - template using <xsl:with param/>. - PR: bugzilla 3324 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by amiro@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Compile.java
      Committer's log entry: minor edit to usuage for -s option

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Transform.java
      Committer's log entry: Added functionality behind the '-s' flag in the Transform command-line tool. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/20/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Compile.java - Transform.java
      Committer's log entry: Fixed two compile errors (bad, bad, bad). - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/21/2001
      Modified: java/src/org/apache/xalan/xsltc DOM.java - java/src/org/apache/xalan/xsltc/compiler LastCall.java - PositionCall.java - java/src/org/apache/xalan/xsltc/dom DOMAdapter.java - DOMImpl.java MultiDOM.java
      Committer's log entry: Fixed the getTypedPosition() and getTypedLast() methods of the DOM. These - were used to implement XPath patterns such as /foo/bar[8]/baz. - PR: bugzilla 2803 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/21/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Added a little method to the output post-processor to replace whitespaces - in URLs by "%20" sequences. This is all the escaping I think we should - bother our heads doing. - PR: bugzilla 1512 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/21/2001
      Modified: java/src/org/apache/xalan/xsltc DOM.java - java/src/org/apache/xalan/xsltc/compiler Constants.java - Step.java - java/src/org/apache/xalan/xsltc/dom DOMAdapter.java - DOMImpl.java MultiDOM.java NthIterator.java
      Committer's log entry: Two fixes in this one. One to make sure that the context-node is set correctly - when applying templates using an iterator that has a predicate that tests on - '.' (the current node), such as select="foo/bar[. = 'blob']". The other fix - is for the nth position iterator, that failed to count to n backwards in - cases when the underlying iterator was reverse. - PR: bugzilla 2954 (two bugs in one, really) - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/21/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: A fix for CDATA elements. The tags of CDATA sections were passed through the - output post-processor's character escaping function but should be passed - directly to the SAX handler. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/24/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java - NthIterator.java
      Committer's log entry: The fix for 2954 introduced a regression, so I am pulling out the fix. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/24/2001
      Modified: java/src/org/apache/xalan/xsltc/dom NthIterator.java
      Committer's log entry: A revised fix for bug 2954, that does not cause the regressions previously - sown by some tests. - PR: bugzilla 2954 (revised fix) - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/24/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: A fix for the last() function for children iterators. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/24/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Fixed the descendant iterator so that it does not return text-nodes - for descendant::* - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/24/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Import.java - Param.java Stylesheet.java
      Committer's log entry: Fix for resolving mutiple defined global parameters and variables. The - Import class has been fixed to set import precedences properly, and the - Param class has been changed to use the import precedence to resolve - between multiple definitions of the same variable/parameter. - PR: bugzilla 3404 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/24/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util - ClassGenerator.java
      Committer's log entry: Forgot this file in my last update. - Submitted by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/24/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java - NthIterator.java
      Committer's log entry: Another fix for the preceding-sibling iterator. It appeared that this - iterator returned its nodes in the wrong order, and this was the reason - why the position iterator (used to implement preceding-siblling::*[n]) - did not return the correct node. It is quite amazing that this iterator - has been returning nodes in the wrong order for so long without any of - us notising, and hopefully this fix will help eliminate a few of our - open bugs. - PR: bugzilla 2954 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Param.java - Stylesheet.java Variable.java VariableBase.java
      Committer's log entry: Fix to resolving multiple defined global variables or parameters. - PR: bugzilla 3404 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Optimisation for string-2-int and real-2-int conversions. - PR: bugzilla 3448 - Obtained from: n/a - Submitted by: John Howard (johnh@schemasoft.com) - Reviewed by: morten@xml.apache.org

    • -
    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Param.java - Step.java Variable.java VariableBase.java xpath.cup - java/src/org/apache/xalan/xsltc/dom DOMAdapter.java - DOMImpl.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Fix for nth-position typed descendant iterators (previously not fully - implemented). - PR: bugzilla 3468 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fix for our handling of the <xsl:comment? element. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Param.java - Variable.java
      Committer's log entry: Removed previous attempt to fix forward references in globar vars. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: Fix for allowing LRE as top-level elements in the stylesheet (they will be - ignored). - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java
      Committer's log entry: Fix to make sure all num-numeric values are grouped last in numeric sorts. - PR: bugzilla 3517 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java - NodeIteratorBase.java
      Committer's log entry: A fix to ensure that the current position of any iterator is always kept - updated. The returnNode() method of the NodeIteratorBase base class updates - the _position variable for each returned node. This method should be called - by the next() method of any iterator, except for next() methods that call - super.next() (because this method calls returnNode() and so _position - would be incremented twice or more for one returned node). - PR: bugzilla 3816 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Updated the information returned by the system-property() function. - xsl:verision returns "1.0" - xsl:vendor returns "Apache Xalan XSLTC" - must be different from Xalan!!!" - xsl:vendor-url returns "http://xml.apache.org/xalan-j" - PR: bugzilla 3470 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: Fix to allow indentation to be turned off XML/HTML output. - PR: bugzilla 3469 - Obtained from: n/a - Submitted by: Douglas J. Sellers (douglasjsellers@hotmail.com) - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Output.java - Parser.java Stylesheet.java
      Committer's log entry: Fix to make sure the one, and only one, xsl:output element is compiled - per translet (import precedence taken into account). - PR: bugzilla 3099 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Changed BasisLibrary.formatNumer() (this is the implementation of - format-number()) so that it correctly formats NaNs into "NaN". - PR: bugzilla 2890 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/25/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Another little update to format-number() to make sure it returns - "Infinity" and "-Infinity" for infinite numbers. - PR: bugzilla 2889 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Stylesheet.java
      Committer's log entry: Changed the order in which a stylesheet parses its top-level elements. - PR: bugzilla 3812 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Step.java - java/src/org/apache/xalan/xsltc/dom NthIterator.java
      Committer's log entry: Removed a bug in the NthIterator iterator that prevented the iterator from - properly being reset. This bug manifested itself if the Nth iterator was - wrapped inside a step iterator. - PR: bugzilla 3419 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: Added node-ordering for preceding iterators when used in apply-templates - or value-of elements. - PR: bugzilla 3463 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: Removed debug statement in Step.java - Submitted by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/26/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DupFilterIterator.java
      Committer's log entry: Modified the DupFilterIterator so that it also orders nodes. - PR: bugzilla 3466 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 09/26/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Step.java
      Committer's log entry: Fix after a regression for preceding-sibling::* iterator. - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • -
    • Committed by morten@apache.org on 09/28/2001
      Modified: java/src/org/apache/xalan/xsltc Translet.java - java/src/org/apache/xalan/xsltc/cmdline Transform.java - java/src/org/apache/xalan/xsltc/dom - NodeSortRecordFactory.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java - java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java - TransformerImpl.java
      Committer's log entry: A fix for the problem with loading auxiliary classes for sorting when - called from TrAX API. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    -
    - -

    XSLTC source code updates:

    -
    • Committed by morten@apache.org on 08/13/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: I added a flag to the compiler/Parser class that is set if the outermost -element - in the stylesheet contains a definition of the XSL namespace. The parser -already - has a global variable '_target' that is set if the stylesheet contains a - <?xml-stylesheet?> PI or not. The compiler will now flag an error if neither - flags are set after the whole XSL/XML input document has been parsed. - PR: bugzilla 1780 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by morten@apache.org on 08/13/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler UnionPathExpr.java
      Committer's log entry: Added a small fix that orders the expressions inside a union in such a way -that - expressions with an attribute axis or attribute node type will be put first. - PR: bugzilla 2921 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by morten@apache.org on 08/13/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: A small fix that will allow top-level elements of an unknown URI. - XSLTC now ignored the element(s), while it previously reported an error - of an unsupported XSLT extension. - PR: bugzilla 2840 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by morten@apache.org on 08/13/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java DefaultSAXOutputHandler.java - TextOutput.java
      Committer's log entry: A start on a fix for output DOCTYPE declarations based on the attributes - of the <xsl:output> element. I also added a fix for bug 2863, to prevent - us from outputting namespace delcaration that point a prefix to the null - URI (such as 'xmlns:blob=""'). - PR: bugzilla 2863 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by tmiller@apache.org on 08/13/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: bug 2553, fixes AbbreviatedAbsoluteLocationPath, - some relative location paths still give duplicates, will need to filter.

    • Committed by morten@apache.org on 08/14/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Transform.java - java/src/org/apache/xalan/xsltc/compiler Output.java - java/src/org/apache/xalan/xsltc/runtime DefaultRun.java - DefaultSAXOutputHandler.java TextOutput.java - java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: Implemented support for the doctype-system and doctype-public attributes - of the <xsl:output/> element. The translet post-processor (TextOutput) can - now be instanciated with a ContentHandler and an optional LexicalHandler. - The LexicalHandler will receive notofications of the DOCTYPE declaration. - The default SAX output handler now implements both ContentHandler and - LexicalHandler. The LexicalHandler only handles the startDTD() method, - by outputting the DOCTYPE declaration, and all other methods are empty. - The trax.Transformer implementation has also been updated to use the - LexicalHandler, but I still have not found any way in which a SAX client - can set the LexicalHandler. - PR: bugzilla 1504 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by morten@apache.org on 08/14/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslElement.java
      Committer's log entry: A minor change to the class handling the <xsl:element> element to be more - in-sync with the XSLT 1.0 spec (and M.Kay's book). This in order to make - it more readable and maintainable. I was trying to debug the code for - something I thought was a bug, and it was just impossible to navigate. - This change was necessary, even though the code functioned as it should. - PR: n/a - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by morten@apache.org on 08/14/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LiteralElement.java - Parser.java
      Committer's log entry: Fix for outputting all necessary namespace declarations with LREs. - PR: bugzilla 2863 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by morten@apache.org on 08/14/2001
      Modified: java/src/org/apache/xalan/xsltc/dom ReverseIterator.java
      Committer's log entry: A fix to allow reverse iterators to be reset (inside nested for-each loops). - PR: n/a - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by tmiller@apache.org on 08/15/2001
      Added: java/src/org/apache/xalan/xsltc/dom DupFilterIterator.java
      Committer's log entry: bug fix 2553, new iterator to get rid of dups

    • Committed by tmiller@apache.org on 08/15/2001
      Added: java/src/org/apache/xalan/xsltc/compiler - FilteredAbsoluteLocationPath.java
      Committer's log entry: bug fix 2553, new abs location path

    • Committed by tmiller@apache.org on 08/15/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup - Constants.java
      Committer's log entry: bug fix 2553, updated Constants for dup processing - and updated CUP rule for AbbreviatedAbsoluteLocationPaths

    • Committed by morten@apache.org on 08/16/2001
      Modified: java/src/org/apache/xalan/xsltc/dom AbsoluteIterator.java - DOMImpl.java DupFilterIterator.java - StepIterator.java UnionIterator.java
      Committer's log entry: Implementation of id() and key() pattern - finally! - Added a small fix to the DOMImpl$DescendantIterator to prevent NPEs. - PR: bugzilla 1376 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/16/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler IdKeyPattern.java - KeyCall.java Mode.java Output.java Parser.java - TestSeq.java xpath.cup
      Committer's log entry: Forgot an 'import' in DupFilterIterator - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/16/2001
      Modified: java/src/org/apache/xalan/xsltc TransletOutputHandler.java - java/src/org/apache/xalan/xsltc/dom DupFilterIterator.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java DefaultSAXOutputHandler.java - SAXAdapter.java TextOutput.java - TransletOutputBase.java
      Committer's log entry: missing file

    • Committed by morten@apache.org on 08/16/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java
      Committer's log entry: Added another fix for the missing DOCTYPE declaration. XSLTC will now output - DOCTYPE declarations for HTML output if either doctype-system or doctype- - public is declared in the <xsl:output> element. XSL output will get a - DOCTYPE declaration only if doctype-system is declared. - PR: 1504 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/16/2001
      Modified: java/src/org/apache/xalan/xsltc/dom AbsoluteIterator.java
      Committer's log entry: - - -

    • Committed by tmiller@apache.org on 08/16/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: turning on filtering, bug 2553

    • Committed by morten@apache.org on 08/16/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DupFilterIterator.java
      Committer's log entry: Removed a bad optimisation in the duplicate filter iterator. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 08/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler xpath.cup
      Committer's log entry: re-activated the no dups filtering, dont know how - this got reverted back to no filtering, but it is fixed again.

    • Committed by morten@apache.org on 08/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler IdKeyPattern.java - Key.java KeyCall.java Parser.java Sort.java - xpath.cup - java/src/org/apache/xalan/xsltc/compiler/util - CompareGenerator.java NodeSortRecordGenerator.java - java/src/org/apache/xalan/xsltc/dom DTDMonitor.java - DupFilterIterator.java KeyIndex.java - NodeSortRecord.java NodeSortRecordFactory.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java BasisLibrary.java
      Committer's log entry: Major update for id() and key(). Patterns containing id() and key() are - now 100% supported (about time), and id() and key() expressions should - now work in all (at least most) combinations. - PR: bugzilla 1376 (!!!) and 2624 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/20/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: A small fix for a cleanup I did in the basis library (it broke the - substring() function)> - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/20/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Added small fix to prevent NPE in output handler. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/20/2001
      Modified: java/src/org/apache/xalan/xsltc TransletOutputHandler.java - java/src/org/apache/xalan/xsltc/compiler Variable.java - VariableRef.java VariableRefBase.java - java/src/org/apache/xalan/xsltc/compiler/util - MultiHashtable.java - java/src/org/apache/xalan/xsltc/dom DOMImpl.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java - TextOutput.java TransletOutputBase.java
      Committer's log entry: Added element/attribute prefix information in the internal DOM. - This should fix some problems we have had with the copy and copy-of - elements. Added a few lines of code in an attempt to speed up the DOM builder. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/21/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DTDMonitor.java
      Committer's log entry: An attempt to optimise the building of the ID index. The previous version of - this code would traverse the DOM once for each type of element that had a - defined ID attribute. The new version traverses the DOM once, and looks up - each element's type in a hashtable to determine its ID attribute type (if -any). - The new version of the code does not use string comparisons, like the old one. - This update was done to compensate for the possible performance degradation of - having implemented an element/attribute prefix array in the internal DOM. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/21/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TemplatesHandlerImpl.java TemplatesImpl.java - TransformerHandlerImpl.java TransformerImpl.java
      Committer's log entry: Protected some methods in our TrAX code that are not defined in the TrAX API. - These methods were never intended for public use and should have been defined - as "protected" to begin with. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/22/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslElement.java
      Committer's log entry: Fix for a problem with some combinations of <xsl:element> and namespace - aliasing. The output lacked the necessary namespace definitions when an - element created with <xsl:element> was given a qname with a prefix that - was mapped to some other prefix. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 08/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ParameterRef.java
      Committer's log entry: removed typeCheck(), uses the base classes method now

    • Committed by tmiller@apache.org on 08/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - VariableRefBase.java
      Committer's log entry: added default typeCheck() to this base class

    • Committed by tmiller@apache.org on 08/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler RelationalExpr.java
      Committer's log entry: bug fix 2838, cast to type real if both operands are - ResultTreeType

    • Committed by morten@apache.org on 08/27/2001
      Modified: java/src/org/apache/xalan/xsltc DOM.java - java/src/org/apache/xalan/xsltc/compiler - AbsoluteLocationPath.java AbsolutePathPattern.java - AncestorPattern.java ApplyTemplates.java - BooleanExpr.java CallTemplate.java CastExpr.java - Constants.java Copy.java CopyOf.java - DocumentCall.java FilterExpr.java - FilteredAbsoluteLocationPath.java ForEach.java - FunctionCall.java Key.java KeyCall.java - LastCall.java LocalNameCall.java Mode.java - NameCall.java NamespaceUriCall.java Number.java - Param.java ParameterRef.java - ParentLocationPath.java ParentPattern.java - PositionCall.java Predicate.java - RelationalExpr.java Sort.java Step.java - StepPattern.java Stylesheet.java - SyntaxTreeNode.java Template.java TestSeq.java - Text.java TransletOutput.java ValueOf.java - Variable.java VariableRef.java Whitespace.java - XSLTC.java - java/src/org/apache/xalan/xsltc/compiler/util - ClassGenerator.java ErrorMsg.java - MethodGenerator.java NodeSetType.java NodeType.java - ResultTreeType.java - java/src/org/apache/xalan/xsltc/dom Axis.java - DOMAdapter.java DOMImpl.java LoadDocument.java - MultiDOM.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java BasisLibrary.java
      Committer's log entry: Changes all calls from the compiled translet code to the DOM to be calls - to the DOM interface (and not to a specific DOM class). I did this to make - it possible to plugi in any DOM implementation. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/27/2001
      Modified: java/src/org/apache/xalan/xsltc TransletOutputHandler.java - java/src/org/apache/xalan/xsltc/compiler Constants.java - TransletOutput.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java DefaultSAXOutputHandler.java - TextOutput.java TransletOutputBase.java
      Committer's log entry: Added an <xsltc:output> extension to allow for multiple output files. I know - that this is not a prioritised task, but I need this for a little project I - am working on. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/28/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Param.java - ParameterRef.java Variable.java VariableBase.java - VariableRef.java - java/src/org/apache/xalan/xsltc/compiler/util - NodeSetType.java NodeType.java ReferenceType.java - ResultTreeType.java StringType.java Type.java
      Committer's log entry: A few fixes for the regression caused by my last (huge) putback. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/28/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DupFilterIterator.java
      Committer's log entry: A fix for the position() function when using duplicate filter iterators. - PR: n/ - Obtained from: N/A - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • -
    • Committed by amiro@apache.org on 08/30/2001
      Modified: - java/src/org/apache/xalan/xsltc/runtime SAXAdapter.java
      Committer's log entry: - Submitted by: Tom Amiro - I just added an empty close method to resolve the build problem.

    • -
    -
    - -

    XSLTC source code updates:

    • Committed by morten@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Integrated fix for problem with count() function for certain iterators. - PR: Bugzilla 1407 - Obtained from: n/a - Submitted by: John Howard <johnh@schemasoft.com> - Reviewed by: Morten Jorgensen <morten@xml.apache.org>

    • Committed by morten@apache.org on 07/30/2001
      Modified: java/src/org/apache/xalan/xsltc DOM.java - java/src/org/apache/xalan/xsltc/compiler EqualityExpr.java - FilterParentPath.java Parser.java Predicate.java - Step.java SyntaxTreeNode.java Variable.java - XSLTC.java - java/src/org/apache/xalan/xsltc/dom DOMAdapter.java - DOMImpl.java MultiDOM.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java DefaultSAXOutputHandler.java - TextOutput.java - java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Added code that will speed up predicates such as //foo[@attr=$var], - //foo[bar = $var] and //foo/[@attr = 'str']. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Expression.java - Param.java ParameterRef.java Predicate.java - Stylesheet.java SyntaxTreeNode.java Variable.java - VariableRef.java WithParam.java
      Committer's log entry: Fix for parameter and variable handling. This fix makes sure variable slots - are released once a variable goes out of scope. I have also extracted common - functionality from Variable and Param into VariableBase, and similarly - extracted some functionality from VariableRef and ParameterRef into a new - class VariableRefBase. This can potentially make some code more efficient as - one can test for 'if (blob instanceof VariableBase)' instead of testing on - both Variable and Param. - PR: Bugzilla 2661 and 2699 - Obtained from: n/a - Submitted by: John Howard <JohnH@schemasoft.com> - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/31/2001
      Added: java/src/org/apache/xalan/xsltc/compiler VariableBase.java - VariableRefBase.java
      Committer's log entry: Forgot to add these two in my last putback. - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Predicate.java - Step.java Stylesheet.java XSLTC.java
      Committer's log entry: Removed type-cast error in Stylesheet.java - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/31/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler VariableBase.java - java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java
      Committer's log entry: Removed some of the linefeeds we output in the default SAX output handler - to produce output more similar to Saxon (for testing purposes). - Added a test for null-pointers in the new VariableBase class. - PR: bugzilla 2922 & 2598 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org`

    • Committed by morten@apache.org on 07/31/2001
      Modified: java/src/org/apache/xalan/xsltc/dom NodeCounter.java
      Committer's log entry: Added a small fix to prevent unwanted output when using the xsl:number - element. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/01/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Constants.java - If.java Key.java Predicate.java Step.java When.java - java/src/org/apache/xalan/xsltc/compiler/util - CompareGenerator.java - java/src/org/apache/xalan/xsltc/dom NodeCounter.java - java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java
      Committer's log entry: A few changes to make our output look more like Saxon's (to simplyfy - test diffs). - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 08/01/2001
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java - DOM2SAX.java
      Committer's log entry: add support for DOMResult handling

    • Committed by tmiller@apache.org on 08/01/2001
      Added: java/src/org/apache/xalan/xsltc/trax SAX2DOM.java
      Committer's log entry: work in progress, converted needed for DOMResult

    • Committed by tmiller@apache.org on 08/02/2001
      Modified: java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: added setting of systemId in DOMSource handling

    • Committed by morten@apache.org on 08/02/2001
      Modified: java/src/org/apache/xalan/xsltc/trax SAX2DOM.java - TransformerFactoryImpl.java TransformerImpl.java
      Added: java/src/org/apache/xalan/xsltc/trax - TransformerHandlerImpl.java
      Committer's log entry: Added an implementation of the TransformerHandler interface of TrAX/JAXP. - Implemented the 4 methods in TransformerFactory to instanciate this - TransformerHandler implementation. - Added an attribute of the TransformerFactory which contains the default - name for generated translet classes (the default name is GregorSamsa from - Kafka's Metemorphosis), but should be set by the user in cases where the - Templates implementation cannot get the systemId from the Source object.

    • Committed by morten@apache.org on 08/02/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java - java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java - TransformerHandlerImpl.java
      Added: java/src/org/apache/xalan/xsltc/trax - TemplatesHandlerImpl.java
      Committer's log entry: Added missing TemplatesHandlerImpl file (implementation of the TrAX - TemplatesHandler interface). - Added initial implementation of getAssociatedStylesheet() in - the TransformerFactoryImpl class. - Changed behaviour of TransformerHandlerImpl class with regard to - the setResult() method. This method now has to be called before - startDocument() is called, which gives XSLTC the same behaviour - as Xalan. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/02/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - XSLTC.java - java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Added support for the TransformerFactory's getAssociatedStylesheet() - method. Added similar methods to the native XSLTC API, as they can come - in handy. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/03/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Constants.java - DocumentCall.java - java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      Committer's log entry: Fix for the document() function. The code compiled by DocumentCall now - passes the context URI to the LoadDocument.document() method, and the - document() method resolves the base/new URIs and constructs an absolute - path/URI to the document to load. - PR: bugzilla 2832 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 08/03/2001
      Modified: java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: new recursive parse(InputSource) implemented

    • Committed by tmiller@apache.org on 08/03/2001
      Modified: java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: upated

    • Committed by tmiller@apache.org on 08/03/2001
      Modified: java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: updated again

    • Committed by morten@apache.org on 08/03/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java - java/src/org/apache/xalan/xsltc/trax SAX2DOM.java
      Committer's log entry: Fix to get around problem with Crimson. Crimson does not like attribute- - nodes to be created with 'null' or "" namespace URI. Added an if-test to - invoke setAttribute(name, value) instead of setAttributeNS(uri, name, value). - Had to add a little test to DOMImpl$DOMBuilder.makeAttributeNode() to get - around an internal NPE problem. - PR: n/a - Obtained from: n.a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/03/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler CopyOf.java - Step.java - java/src/org/apache/xalan/xsltc/dom DOMImpl.java - UnionIterator.java
      Committer's log entry: Fix for union-iterators wrapping one or more attribute-iterators. - Attributes should be wrapped in TypedAttributeIterator objects and not - SingletonIterator objects when they occur insude unions. - Fix for copying attribute nodes using <xsl:copy> and <xsl:copy-of> - PR: bugzilla 2603 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/07/2001
      Modified: java/src/org/apache/xalan/xsltc/dom LoadDocument.java
      Committer's log entry: Added code behind the document() function to force the parser to be - namespace aware (Crimson is pr. default, Xerces is not). - PR: bugzilla 2862 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/07/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fix to prevent escaping of attribute values in HTML output. - PR: bugzilla 3003 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/07/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fix for grouping a sequence of text nodes inside one CDATA section. - PR: bugzilla 3005 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/07/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ForEach.java - xpath.cup - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: Fix for passing node-sets as parameters into a template with a for-each loop. - The ForEach class resets its node iterator by default. This behaviour is not - desierd for iterators that are passed in through a parameter, so I added an - it-test that checks if the iterator is of type 'Reference'. - PR: bugzilla 2468 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/07/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - AbsolutePathPattern.java
      Committer's log entry: Fix for a certain combination of absolute path patterns and ancestor patterns, - such as <xsl:template match="/foo//*"/>. - PR: bugzilla 2836 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/07/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler DocumentCall.java
      Committer's log entry: Fix for document() function. Prevents run-time error. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 08/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslElement.java
      Committer's log entry: Added a test to the <xsl:element> element to verify that the element name - given in the 'name' attribute contains something other than an empty string. - PR: bugzilla 2794 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by morten@apache.org on 08/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LiteralElement.java
      Committer's log entry: Applied a fix to our class for handling literal result elements. The only - attributes in the XSLT namespace we handle in LREs are exclude-result-prefixes - and extension-element-prefixes. We have a test to check if an attribute is - in the XSLT namespace, and if it is we ignore the attribute. This test was - placed before the test for the two XSLT attributes we do want to handle, - causing us to ignore all xsl:exclude-result-prefixes attributes in LREs. - PR: bugzilla 1506 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by morten@apache.org on 08/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Attribute.java - AttributeSet.java Copy.java UseAttributeSets.java - XslAttribute.java - java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Fix and performance improvement for attribute sets. - PR: bugzilla 2536 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by morten@apache.org on 08/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Copy.java
      Committer's log entry: Fix for use of attribute sets with the xsl:copy element. We were a bit too - restrictive in our tests to see if it was safe to send the attributes to - the output handler. We only compiled in a test to see if the copied node - was an elment, but should also have tested if the xsl:copy element's - parent node was a LRE or a xsl:element element. - PR: bugzilla 2538 - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    -
    - -

    XSLTC source code updates:

    • Committed by morten@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java - java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java TransformerImpl.java
      Committer's log entry: Added support for SAXSource and SAXResult in TransformerFactoryImpl - and TransformerFactory. I had to add a new consturctor the the - default SAX output handler (in the xsltc runtime library) to acommodate - the SAXResult TrAX output handler. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java - java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Added default error-reporting behaviour for our trax code (error messages - are dumped to System.err). - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: in progress, adding DOMSource support

    • Committed by tmiller@apache.org on 07/20/2001
      Added: java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: new class, DOM2SAX, supports DOMSources, in progress

    • Committed by morten@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Import.java - Include.java Stylesheet.java XSLTC.java - java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java TransformerImpl.java
      Added: java/src/org/apache/xalan/xsltc/compiler SourceLoader.java
      Committer's log entry: Added a SourceLoader interface to the compiler package. This interface can - be used to plug in an external document loader for imported and/or - included stylesheets. The trax.TransformerImpl class is updated to - implement this interface and act as an adapter between the internal XSLTC - SourceLoader interface and TrAX's URIResolver interface. - PR: n/a - Obtained from: n/a - Submitted by: morten@apache.org - Reviewed by: morten@apache.org

    • Committed by amiro@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime Constants.java
      Committer's log entry: Added the NAMESPACE_FEATURE constant. Checked to see if it was in - org.xml.sax first, but it wasn't. Since this constant is used both - at compile and runtime, it should be in the runtime Constants class - as well as the compile Constants class. Runtime code needs to be - kept separate from the compile time code.

    • Committed by amiro@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime DefaultRun.java - java/src/org/apache/xalan/xsltc/cmdline Transform.java - java/src/org/apache/xalan/xsltc/dom DocumentCache.java
      Committer's log entry: Added import for org.apache.xalan.xsltc.runtime.Constants; - to the runtime classes that need to use the NAMESPACE_FEATURE constant - and had them reference it rather than define it themselves.

    • Committed by tmiller@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: minor changes for DOMSource impl support

    • Committed by tmiller@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: Added DOMSource support for stylesheet

    • Committed by tmiller@apache.org on 07/20/2001
      Modified: java/src/org/apache/xalan/xsltc/trax DOM2SAX.java
      Committer's log entry: updated convertor which supports DOMSource impl

    • Committed by morten@apache.org on 07/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: Added a small fix to the compiler (XSLTC.java) to make sure that the SAX - parser reference was not reset prior to compiling the translet. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/23/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java TransformerImpl.java
      Committer's log entry: Added support for DOMSource as input to our Transformer implementation

    • Committed by morten@apache.org on 07/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Import.java - Sort.java - java/src/org/apache/xalan/xsltc/dom NodeSortRecord.java - NodeSortRecordFactory.java
      Committer's log entry: For some reason I decided to optimise the <xsl:sort> functionaility. The - sort records we used has some global values stored behind methods, but are - now static fields. Somewhat faster. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Import.java - Include.java
      Committer's log entry: Fix for problem with import & include introduced with the latest updated - for TrAX URIResolvers. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/27/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Integrated fix for problem with count() function for certain iterators. - PR: Bugzilla 1407 - Obtained from: n/a - Submitted by: John Howard <johnh@schemasoft.com> - Reviewed by: Morten Jorgensen <morten@xml.apache.org>

    -
    - -
    • Committed by morten@apache.org on 07/09/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Constants.java - Param.java StepPattern.java Stylesheet.java - SyntaxTreeNode.java Variable.java WithParam.java - java/src/org/apache/xalan/xsltc/dom KeyIndex.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java BasisLibrary.java - DefaultRun.java Parameter.java TextOutput.java
      Committer's log entry: Loads of small fixes and a good few comments added to the source code. - The major fixes are one fix for variable/parameter handlingi and one for - key/id index handling. XSLTC now correctly updates the value of parameters - with changing default values, such as with - <xsl:param name="foo" select="current()"/>. - Also updated bit-arrays to correctly return single node ids, so that the - key() and id() functions return the correct number of nodes (they would - sometimes skip the first node in the defined node set for the key/id). - Added some structure and loads of comments to the Translet base class. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/10/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - AncestorPattern.java AttributeSet.java - CallTemplate.java CastExpr.java EqualityExpr.java - Expression.java FunctionCall.java If.java - Import.java Include.java Mode.java NameBase.java - Param.java ParameterRef.java Parser.java - StepPattern.java SyntaxTreeNode.java Template.java - TestSeq.java Variable.java VariableRef.java - XSLTC.java XslAttribute.java - java/src/org/apache/xalan/xsltc/compiler/util ErrorMsg.java - ReferenceType.java - java/src/org/apache/xalan/xsltc/dom MultiDOM.java - StepIterator.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: A wide range of fixes provided by Erwin Bolwidt. - o) fix for long IF and GOTO instructions inside translets. - 'wide' GOTOs are now used (GOTO_W) instead of plain GOTO - to allow longer jump offsets - o) fix for illegal field/method names in the translet. - Methods and fields no longer contain the '.' or '-' characters - o) source filenames (and if possible also line numbers) are now - provided with error and warning messages - o) external functions that are not supported by XSLTC do not cause - compile errors. They will still cause a warning message at - compile-time if they are not wrapped in proper <xsl:if> or - <xsl:when> elements that test on the availability of the function, - and will cause a runtime error if the function is attempted called. - o) added type cast from reference-type to node-type - o) some other smaller fixes to prevent null-pointer exceptions - Other changes: - o) code cleanup and some added comments - PR: n/a - Obtained from: n/a - Submitted by: Erwin Bolwidt <ejb@klomp.org> - Reviewed by: Morten Jorgensen <morten@xml.apache.org>

    • Committed by morten@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - SyntaxTreeNode.java XSLTC.java
      Committer's log entry: Cleaned up the XSLTC compiler class in an attempt to make it more flexible. - This class was originally written as a command-line interface, but it has - now grown huge and messy. I separated the command-line stuff from the - methods that make up the actual functionality and made some methods public. - This is part of the preparation for our new implementation of the JAXP - Templates object. - PR: n/a - Obtained from: n.a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime DefaultRun.java
      Added: java/src/org/apache/xalan/xsltc/cmdline Compile.java - Transform.java
      Committer's log entry: Extracted the command-line stuff from the core XSLTC packages. The command- - line handling is now in xalan.xsltc.cmdline.Compile and - xalan.xsltc.cmdline.Transform. The command-line stuff is still left in - xalan.xsltc.compiler.XSLTC and xalan.xsltc.runtime.DefaultRun for backwards - compatability. This should be removed shortly. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/xsltc/cmdline Compile.java - java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Added: java/src/org/apache/xalan/xsltc/cmdline/getopt GetOpt.java - GetOptsException.java IllegalArgumentException.java - MissingOptArgException.java - java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java - TransformerImpl.java
      Removed: java/src/org/apache/xalan/xsltc/util/getopt GetOpt.java - GetOptsException.java IllegalArgumentException.java - MissingOptArgException.java
      Committer's log entry: Moved the org.apache.xalan.xsltc.util.getopt package to - org.apache.xalan.xsltc.cmdline.getopt. Also added some skeleton - code in a new org.apache.xalan.xsltc.trax directory. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax TransletTemplates.java
      Committer's log entry: minor adjustment - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: removed obselete try/catch

    • Committed by morten@apache.org on 07/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java - java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java - TransformerFactoryImpl.java TransformerImpl.java
      Removed: java/src/org/apache/xalan/xsltc/trax TransletTemplates.java
      Committer's log entry: A first stab at our new TrAX design.` - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/13/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java - java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java - TransformerFactoryImpl.java TransformerImpl.java
      Committer's log entry: A few minor adjustments to yesterdays JAXP/TrAX implementation. These is one - change in the way the compiler (XSLTC) generates bytecode arrays, and the - rest is basically a cleanup of error reporting and a few added comments. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/16/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DocumentCache.java
      Added: java/src/org/apache/xalan/xsltc/trax OutputSettings.java
      Committer's log entry: Reduced the refresh rate of the DocumentCache to 1 second. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by amiro@apache.org on 07/17/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DocumentCache.java
      Committer's log entry: Submitted by: Tom Amiro - Fixes bug 1591. Changed the lastModified() method to return - the correct timestamp for local files beginnig with the "file:" - protocol. Incorporated Brian Ewin's suggestion to use URLdecode. - Todd Miller and Morten Jorgensen

    • Committed by morten@apache.org on 07/17/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java - java/src/org/apache/xalan/xsltc/trax TemplatesImpl.java - TransformerFactoryImpl.java TransformerImpl.java
      Committer's log entry: Added some javadoc comments to our trax stuff. Added preliminary support - for getting/setting output properties, and for getting/setting URL resolvers. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/18/2001
      Modified: java/src/org/apache/xalan/xsltc TransletOutputHandler.java - java/src/org/apache/xalan/xsltc/cmdline Transform.java - java/src/org/apache/xalan/xsltc/compiler Output.java - Stylesheet.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java DefaultRun.java - DefaultSAXOutputHandler.java SAXAdapter.java - StringValueHandler.java TextOutput.java - TransletOutputBase.java
      Committer's log entry: A series of changes to the XSLTC output handling to accomodate the - set/getOutputSettings() methods in the TrAX API. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/19/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Fixed the handling of the 'cdata-section-elements' attribute of the - <xsl:output> element. Previously we output the whole element, including - all contents, child elements and the start- and end-tags in one big - CDATA section. We now correctly output only immediate text child-nodes - as CDATA sections. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/19/2001
      Modified: java/src/org/apache/xalan/xsltc Translet.java - java/src/org/apache/xalan/xsltc/dom LoadDocument.java - java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java - java/src/org/apache/xalan/xsltc/trax TransformerImpl.java
      Committer's log entry: Added implementation of get/setOutputProperties() of the Transformer - implementation. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 07/19/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DocumentCache.java
      Committer's log entry: Added (a rather brutal) handling of all Exceptions thrown in the - DocumentCache.getLastModified() method. This class is provided only - as an example/skeleton, but should still - for various reasons - - be provided in the base 'xsltc.dom' package. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    -
    - -
    • Committed by tmiller@apache.org on 05/23/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Text.java
      Committer's log entry: bug fix 1403, output escaping fixed

    • Committed by tmiller@apache.org on 05/23/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: bug fix 1403, output escaping fixed

    • Committed by tmiller@apache.org on 06/05/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java
      Committer's log entry: stylesheet compilation error listening added for - TrAX support

    • Committed by tmiller@apache.org on 06/05/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: stylesheet compilation error listening added for - TrAX support

    • Committed by tmiller@apache.org on 06/05/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - TransformerFactoryImpl.java
      Committer's log entry: stylesheet compilation error listening added for - TrAX support

    • Committed by tmiller@apache.org on 06/05/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - TransformerFactoryImpl.java
      Committer's log entry: Transformer factory's setErrorListener() now throws - IllegalArgumentException is listener is null

    • Committed by tmiller@apache.org on 06/05/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - TransformerFactoryImpl.java
      Committer's log entry: translet transformation errors now forwarded to - TrAX error listener when applicable

    • Committed by tmiller@apache.org on 06/05/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: translet transformation errors now forwarded to - TrAX error listener when applicable

    • Committed by morten@apache.org on 06/06/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime AttributeList.java
      Committer's log entry: Added a constructor for copying an org.xml.sax.Attributes to our - org.apache.xalan.xsltc.runtime.AttributeList. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/06/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ApplyImports.java - ApplyTemplates.java Attribute.java - AttributeSet.java AttributeValueTemplate.java - BinOpExpr.java CallTemplate.java Comment.java - ConcatCall.java Constants.java Copy.java - CopyOf.java DecimalFormatting.java - DocumentCall.java Expression.java Fallback.java - ForEach.java FormatNumberCall.java - FunctionAvailableCall.java FunctionCall.java - If.java Import.java Include.java Key.java - LiteralAttribute.java LiteralElement.java - LiteralExpr.java LogicalExpr.java Message.java - NamespaceAlias.java Number.java Output.java - Param.java Parser.java ProcessingInstruction.java - QName.java RelationalExpr.java Sort.java - Stylesheet.java SymbolTable.java - SyntaxTreeNode.java Template.java Text.java - TransletOutput.java UnaryOpExpr.java ValueOf.java - Variable.java When.java Whitespace.java - WithParam.java XSLTC.java XslAttribute.java - XslElement.java xpath.cup - java/src/org/apache/xalan/xsltc/compiler/util - MethodType.java
      Committer's log entry: Removed the intermediate DOM used to contain the input document (the - stylesheet) for the compiler. The compiler now uses SAX2 to import - the stylesheet, and all references to DOM interfaces have been removed. - This means that most classes representing XSL elements have been - changed, but most classes representing XPath functions, expressions - and patterns are unchanged. - PR: After suggestion from Scott Boag - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/06/2001
      Added: java/src/org/apache/xalan/xsltc/compiler - UnsupportedElement.java
      Committer's log entry: Adding a class for handling unsupported stylesheet elements - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/06/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Minor fix to make sure that attributes are processed in the correct order. - PR: n/a - Obtained from: n.a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/06/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java
      Committer's log entry: Minor change in output indentation/line feeds. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xmp.apache.org

    • Committed by morten@apache.org on 06/06/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - LocationPathPattern.java Parser.java Template.java
      Committer's log entry: Fixed the code that resolves conflicts between templates with identical - patterns. The order of the templates is not taken into account - after - import precedence and priority has been checked. - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/06/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - DefaultSAXOutputHandler.java
      Committer's log entry: Reverted changes to SAX output handler. - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 06/06/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - Template.java xpath.cup
      Committer's log entry: unified Parser error reporting to use Mortens - reportError routine

    • Committed by morten@apache.org on 06/07/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler BinOpExpr.java - FunctionCall.java Otherwise.java Param.java - RelationalExpr.java Stylesheet.java - SyntaxTreeNode.java Variable.java When.java - XSLTC.java XslElement.java
      Committer's log entry: Updated a few classes that were still calling Parser.addError(), - Parser.addWarning() and Parser.addFatalError() to use the new common - error handler Prarser.reportError(int category, ErrorMsg message). - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Parser.java - java/src/org/apache/xalan/xsltc/runtime DefaultRun.java
      Committer's log entry: Added two lines of code to explicitly set the feature - "http://xml.org/sax/features/namespaces" of the SAXParser to "true". - The default is "true" but xerces seems to set it to "false", and this - caused some problems for our Stylesheet and XML doc parsers (which are - both using SAX2). - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Constants.java - Parser.java - java/src/org/apache/xalan/xsltc/runtime DefaultRun.java
      Committer's log entry: A few more changes to make sure the parsers used are namespace aware. - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/08/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LiteralElement.java - SyntaxTreeNode.java XslAttribute.java - XslElement.java
      Committer's log entry: The change from using DOM to using SAX in the stylesheet input caused some - of the elements in the Abstract Syntax Tree (AST) to be out of order. I - added a few lines of code to the xsl:element/attribute handling code to - fix this. - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/11/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler AttributeSet.java - Choose.java Constants.java If.java - LiteralElement.java Stylesheet.java - UseAttributeSets.java When.java XSLTC.java - XslAttribute.java
      Committer's log entry: This putback contains three fixes: - o) fix for complex <xsl:attribute-set> inheritance structures - o) fix for xsl:element-available() function used in <xsl:when> or - <xsl:if> to test support for various extension elements - o) fix for preserving namespace prefixes for <xsl:attribute> output. - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/11/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Constants.java - UseAttributeSets.java ValueOf.java - XslAttribute.java - java/src/org/apache/xalan/xsltc/compiler/util - AttributeSetMethodGenerator.java
      Committer's log entry: Fix to allow iterator access within attribute sets. This is necessary for - attribute sets that contain attributes whose values are generated by XSL - functions such as position() and last(). - Obtained from: test mk013 - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/11/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime TextOutput.java
      Committer's log entry: Added output character escaping for non-breaking space characters. - I cannot believe we've waited this long before doing this. Madness! - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 06/11/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java - Parser.java
      Committer's log entry: support for java.io.InputStream StreamSources

    • Committed by tmiller@apache.org on 06/11/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - TransletTemplates.java
      Committer's log entry: support for java.io.InputStream StreamSources

    • Committed by morten@apache.org on 06/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LogicalExpr.java
      Committer's log entry: Fix for bug 1511. Predicates on the format ((a or b) and c) are not - handled correctly. I added a small piece of code to direct the true-list - of the OR expression to the beginning of the AND test. - PR: Bugzilla 1511 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/12/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java - TextOutput.java
      Committer's log entry: Fix attribute node-set comparisons. There was a bug in one of the compare() - methods of the BasisLibrary class which prevented attribute values from - being compared. The method compared node IDs instead of node values. - Pretty stupid bug, but now it is solved anyway. - PR: Bugzilla 1409 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Mode.java
      Committer's log entry: Fix to make sure that the implicit "text()" pattern is run when templates - containing "text()" in their pattern fail. XSLTC would not previously - invoke the built-in pattern for "text()" if a stylesheet contained a - template such as <xsl:template pattern="foo/bar/text()" .../> - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XslElement.java
      Committer's log entry: Modified test for legal element names in <xsl:element>. The element name is - treated as an attribute value. Whitespaces are not allowed in plain text - element names, but should be allowed inside "{...}" attribute values. - PR: Bugzilla 1489 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/12/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: A fix for the preceding:: iterator - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/12/2001
      Modified: java/src/org/apache/xalan/xsltc/dom DOMImpl.java
      Committer's log entry: Minor re-adjustment to last fix for preceding:: iterator - PR: 1407 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ForEach.java - XSLTC.java
      Committer's log entry: Fix to prevent compiler warnings to be output more than once. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/12/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler AttributeSet.java
      Committer's log entry: Final fix (for now) for attribute sets. In cases where multiple - <xsl:attribute-set.../> elements make up one attribute set (ie. they share - the same name) attributes that occured last in the stylesheet will take - precedence. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 06/12/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - TransformerFactoryImpl.java
      Committer's log entry: added support for java.io.InputStream StreamSources

    • Committed by morten@apache.org on 06/13/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LogicalExpr.java
      Committer's log entry: Fix for code handling logical expressions and combinations of logical - expressions. Mindblowing stuff, but it now seems to work as it should. - Added another few lines of code to properly direct the program flow in - compiled predicates with various combinations of "and" and "or" expressions. - PR: Bugzilla 1511 - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/13/2001
      Modified: java/src/org/apache/xalan/xsltc/dom SingletonIterator.java
      Committer's log entry: Fix for singleton iterators encapsulating variable references. - PR: Bugzilla 1412 - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/14/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LiteralElement.java
      Committer's log entry: Added one-line fix to prevent null-pointer error. Simple code cleanup. - PR: n/a - Obtained from: suggestion by Guoliang Cao <cao@ispsoft.com> - Submitted by: cao@ispsoft.com - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/15/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler LogicalExpr.java
      Committer's log entry: Fix to prevent compile-time null-pointer exceptions for certain logical - expressions. Some nexted AND-expressions would cause this error because - their true-list would not be backpatched. This would result in an - instruction list with one or more branch instructions with no target, - such as a GOTO(null) or an IFEQ(null) instruction. - PR: none, bug found in test run and fixed immediately - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by curcuru@apache.org on 06/17/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler - AbsoluteLocationPath.java ApplyImports.java - ApplyTemplates.java CastExpr.java CopyOf.java - DocumentCall.java EqualityExpr.java Expression.java - FilterExpr.java FilterParentPath.java ForEach.java - FunctionCall.java IdKeyPattern.java Key.java - KeyCall.java NameBase.java ParentLocationPath.java - Parser.java Predicate.java RelationalExpr.java - Step.java UnionPathExpr.java - java/src/org/apache/xalan/xsltc/compiler/util - NodeSetType.java NodeType.java ReferenceType.java - ResultTreeType.java Type.java - java/src/org/apache/xalan/xsltc/dom UnionIterator.java - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: OK, I'm going to make a wild guess and assume that sboag's recent commit - of /NodeSet/NodeSetDTM/ got a little out of control and shouldn't have - gone down into org.apache.xalan.xsltc - undone to fix compile error

    • Committed by morten@apache.org on 06/18/2001
      Removed: java/src/org/apache/xalan/xsltc/compiler/util - NodeSetType.java
      Committer's log entry: Removing NodeSetType (renamed to NodeSetDTMType). - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by morten@apache.org on 06/18/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util Type.java
      Added: java/src/org/apache/xalan/xsltc/compiler/util - NodeSetDTMType.java
      Committer's log entry: -

    • Committed by morten@apache.org on 06/18/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler/util Type.java
      Added: java/src/org/apache/xalan/xsltc/compiler/util - NodeSetType.java
      Removed: java/src/org/apache/xalan/xsltc/compiler/util - NodeSetDTMType.java
      Committer's log entry: - - -

    • Committed by morten@apache.org on 06/19/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ContainsCall.java - FunctionCall.java If.java LogicalExpr.java - Param.java QName.java StartsWithCall.java - SymbolTable.java SyntaxTreeNode.java Template.java - Variable.java xpath.cup - java/src/org/apache/xalan/xsltc/runtime BasisLibrary.java
      Committer's log entry: Fix for function calls used as clauses in logical expressions. - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by Tom.Amiro@Sun.COM on 06/19/2001
      Committer's log entry: -> Fix for function calls used as clauses in logical expressions. -> Submitted by: morten@xml.apache.org -> Reviewed by: morten@xml.apache.org -> ->

    • Committed by Morten.Jorgensen@sun.com on 06/19/2001
      Committer's log entry: -> > Fix for function calls used as clauses in logical expressions. -> > Submitted by: morten@xml.apache.org -> > Reviewed by: morten@xml.apache.org -> > -> >

    • Committed by tmiller@apache.org on 06/25/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - TransformerFactoryImpl.java
      Committer's log entry: added check to see if stylesheet is already an URL

    • Committed by tmiller@apache.org on 06/25/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - TransletTemplates.java
      Committer's log entry: added check to see if stylesheet is already an URL

    • Committed by tmiller@apache.org on 06/25/2001
      Added: java/src/org/apache/xalan/xsltc/runtime TrAXFilter.java
      Committer's log entry: proto

    • Committed by tmiller@apache.org on 06/25/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - TransformerFactoryImpl.java
      Committer's log entry: removed debug statements

    • Committed by tmiller@apache.org on 06/26/2001
      Removed: java/src/org/apache/xalan/xsltc/runtime TrAXFilter.java - TransformerFactoryImpl.java TransletTemplates.java
      Committer's log entry: in process of moving these to new subdir

    • Committed by tmiller@apache.org on 06/26/2001
      Added: java/src/org/apache/xalan/xsltc/trax TrAXFilter.java - TransformerFactoryImpl.java TransletTemplates.java
      Committer's log entry: moved from runtime subdir to its own trax subdir

    • Committed by tmiller@apache.org on 06/27/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: fixed bug with deriving translet name from - stylesheet name that included paths, e.g. /tmp/foo.xsl

    • Committed by morten@apache.org on 06/27/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Predicate.java
      Committer's log entry: This update allows variables that contain references to result-tree fragments - to be used inside position filters. - PR: n/a - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    • Committed by tmiller@apache.org on 06/27/2001
      Modified: java/src/org/apache/xalan/xsltc/runtime - AbstractTranslet.java
      Committer's log entry: added url handling in doTransform

    • Committed by tmiller@apache.org on 06/27/2001
      Modified: java/src/org/apache/xalan/xsltc/trax - TransformerFactoryImpl.java
      Committer's log entry: added a new sys property called 'transletPool' - to allow user to set the destination directory for generated translets

    • Committed by tmiller@apache.org on 06/27/2001
      Modified: java/src/org/apache/xalan/xsltc/trax TransletTemplates.java
      Committer's log entry: added a new sys property called 'transletPool' - to allow user to set the destination directory for generated translets

    • Committed by tmiller@apache.org on 06/27/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler XSLTC.java
      Committer's log entry: made private method setDestDirectory() public to - support the new transletPool system property.

    • Committed by morten@apache.org on 06/28/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Predicate.java - Step.java Stylesheet.java VariableRef.java - java/src/org/apache/xalan/xsltc/compiler/util - MethodGenerator.java NodeSortRecordGenerator.java - ResultTreeType.java TestGenerator.java
      Committer's log entry: Various bugfixes in the way auxiliary classes access variables/fields in - the main translet class. Fixes a few VAR tests and customer tests. - Pmorten@xml.apache.org:

    • Committed by morten@apache.org on 06/29/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler Choose.java - ElementAvailableCall.java - FunctionAvailableCall.java Parser.java When.java
      Committer's log entry: Fix for element-available() and function-available() calls. Ties these - calls to tables in the XSL parser and the symbol-table (the actual - implementation) instead of using redundant and not-up-to-date tables - in the classes that implement the X-avaiable() calls. - I also cleaned up the Choose call so that it now properly handles - all types of function calls in the xsl:when elements' test clause.

    • Committed by morten@apache.org on 06/29/2001
      Modified: java/src/org/apache/xalan/xsltc/compiler ForEach.java - Param.java Variable.java - java/src/org/apache/xalan/xsltc/compiler/util - MethodGenerator.java
      Committer's log entry: Added a fix for local variables inside nested xsl:for-each elements. - Local variables are usually not initialized to any default value (such as - with general Java classes), because code compiled for <xsl:variable> - elements always assign values to variable slots before they are accessed. - But the code structure generated by nested <xsl:for-each> elements is too - much for the JVMs verifier to get around, so we have to initialize all - local variables inside such loops to zero, false, null, whatever. - This takes care some of our runtime-errors caused by apparent corrupt code. - (The JVMs verifier thinks that it is corrupt, but it isn't really.) - PR: none - Obtained from: n/a - Submitted by: morten@xml.apache.org - Reviewed by: morten@xml.apache.org

    -
    - -

    The Sun XSLTC team (david.hofert@east.sun.com, tom.amiro@east.sun.com, todd.miller@east.sun.com, -morten.jorgensen@Ireland.sun.com) has checked XSLTC into the Xalan -source tree, and we have begun the process of merging XSLTC into Xalan. XSLTC provides a compiler for compiling -stylesheets into translets, and a streamlined runtime environment for using translets to transform XML input. -In the near term, XSLTC will appear in a separate JAR file (xsltc.jar) with its own API and command-line -utilities. You can already use the same JAXP interfaces to perform -transformations with the Xalan transformer and with translets. Over time, we plan to merge the two codebases. -See XSLTC Design Documents.

    -

    Since this is the first release of XSLTC on Apache (xml.apache.org), changes are -relative to Preview 5 of XSLTC posted on www.sun.com/xml/developers.

    -
      -
    • Simplified stylesheets are now implemented.
    • -
    • Base package name has changed from com.sun.xslt to org.apache.xalan.xsltc
    • -
    • You no longer have to get the BCEL.jar file; it is included in the distribution.
    • -
    • The Project X parser components and APIs have all been replaced with JAXP equivalents. - Consequently, you may deploy XSLTC with JAXP-conformant parsers, such as Xerces or Crimson.
    • -
    • Previously undocumented feature: -x. You can use the -x option on the java command line when you - compile translets or run them to get more detailed information on errors.
    • -
    • Addition of -s to DefaultRun - a new -s option has been added to the DefaultRun class - for use with test auotmation. When you use the option, it prevents System.exit() from being called when - and exception is encountered.
    • -
    -
    -
    diff --git a/stylebook/sources/xalan/xsltc_usage.xml b/stylebook/sources/xalan/xsltc_usage.xml deleted file mode 100644 index 607a3268a..000000000 --- a/stylebook/sources/xalan/xsltc_usage.xml +++ /dev/null @@ -1,624 +0,0 @@ - - - - - - -
      -
    • Introduction
    • -
    • Setting the system classpath for &xslt4jc-short;
    • -
    • Compiling translets from the command line
    • -
    • Running translets from the command line
    • -
    • Calling &xslt4jc-short; with the JAXP API
    • -
    • Smart Transformer Switch
    • -
    • Calling &xslt4jc-short; with the native API
    • -
    • Usage constraints
    • -
    • Sample translets
    • -
    • Extensions for &xslt4jc-short;
    • -
    -

    See also: &xslt4jc-short; Design

    -Unless otherwise specified, the usage discussed in this section refers to -the &xslt4j; Compiling processor, XSLTC. See Basic Usage -Patterns for information on using the &xslt4j; Interpretive processor.

    - - - -

    &xslt4jc-short; provides a compiler and a runtime processor. -Use the compiler to compile an XSL stylesheet into a translet (i.e., a set of -Java classes). Use the runtime processor to apply the translet to an XML -document and perform a transformation.

    -
    - - - -

    The xalan.jar contains support for both &xslt4j; processors. You -can use the JAXP javax.xml.transform.TransformerFactory property -(see "Calling &xslt4jc-short; with the JAXP API" below) to -select which processor to use: the Interpretive or the Compiling processor.

    -

    To use XSLTC, simply put xalan.jar, serializer.jar, xml-apis.jar, and xercesImpl.jar on -your classpath.

    -To compile and run translets, you must use JDK (or JRE) 1.3.1 or higher. -Although the &xslt4jc-short; developers make every effort to avoid changes that -affect binary compatibility, we cannot guarantee that a translet will work with -any version of the run-time processor other than the one that corresponds to -the version of the &xslt4jc-short; compiler that was used to create the translet. -
    - - -

    -To use this newer approach, simply put xalan.jar, serializer.jar, xml-apis.jar and -xercesImpl.jar in your classpath. There is no need to include xsltc.jar, BCEL.jar, JLex.jar, -regexp.jar, java_cup.jar or runtime.jar as required in previous releases. -

    -In order to compile and run translets you must have a JAXP 1.3 compliant XML -parser installed. Our distribution includes . -Include xercesImpl.jar and xml-apis.jar in your class path. -
    - - -

    The binary distribution contains &xslt4jc-short; and all its support classes bundled -into xalan.jar. To use the unbundled approach, rebuild -the xsltc.jar file using the xsltc.unbundledjar target. The support jars that -you'll need to add to your classpath are available in the Xalan Java lib -directory.

    -

    To compile translets, run translets, and use the &xslt4jc-short; API, using -the unbundled jar approach, put the following on the system classpath:

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    Classes or JARTo compile a transletTo run a translet
    the transletrequired
    xsltc.jarrequiredrequired
    runtime.jarrequiredrequired
    BCEL.jarrequired
    JLex.jarrequired
    java_cup.jarrequired
    regexp.jarrequired
    xml-dtm.jarrequired
    -

    The translet is the set of class files or the JAR file that you generate with -the compiler; see Compiling translets.

    -
    - - - -
      -
    • Synopsis
    • -
    • Flags and arguments
    • -
    • Examples
    • -
    -

    The XSLT Compiler is a Java-based tool for compiling XSLT - stylesheets into lightweight and portable Java byte codes - called translets.

    - -

    To run the compiler from the command line or from a script, - set the classpath and - run the class org.apache.xalan.xsltc.cmdline.Compile. The - synopsis of the options and arguments accepted by this class is shown below. -

    - You can also use the - &xslt4j; command-line utility, to - compile or run &xslt4jc-short; translets. - - - -

    -java org.apache.xalan.xsltc.cmdline.Compile
    -    [-o <output>] [-d <directory>] [-j <jarfile>]
    -    [-p <package name>] [-n] [-x] [-v] [-u] [-h]
    -    {<stylesheet> | -i }

    -
    - - - -

    The following flags and arguments are supported:

    - --o <output> - Specifies the name of the generated translet class. - If you omit this argument, the translet class is - named <stylesheet>. Translets are written as - .class files. - --d <directory> - Specifies the destination directory. If you omit - this argument, the translet class files are placed - in the current working directory. - --j <jarfile> - Outputs the generated translet class files into a - jar file named <jarfile>.jar. When this option is - used, only the jar file is output. - --p <package name> - Specifies a package name for the generated translet - classes. - --n Enables template inlining (default behavior better on average). - --x Turns on additional debugging messages. - --s Disables calling System.exit - --u <stylesheet> - Specifies the stylesheet with a URI such as - 'http://myserver/stylesheet1.xsl'. - - <stylesheet> - (No flag) The pathname of the stylesheet file. - --i Force stylesheet to be read from stdin - --v Prints version of compiler - --h Prints usage statement - -The translet name is the same as the name of the Java class that -implements the translet. If the name specified by the -o option -or derived from the URL for the stylesheet contains characters that are not -permitted in a Java class name, any such character will be replaced with an -underscore. For example, if the translet name specified by the -o -option is my-stylesheet, or if the URL of the stylesheet is -http://example.org/my-stylesheet.xsl, the translet will actually -be named my_stylesheet. - -
    - - - -

    The following examples assume that you have already set the - classpath to include the translet and the required JAR - files (see setting the system classpath).

    - -

    Example 1: Creating a translet from the hamlet.xsl - stylesheet.

    -

    java org.apache.xalan.xsltc.cmdline.Compile
    -      hamlet.xsl

    -

    Example 1 produces a set of class files such as hamlet.class, hamlet$0.class, hamlet$1.class.

    - -

    Example 2: Outputting to a JAR file.

    -

    java org.apache.xalan.xsltc.cmdline.Compile
    -      -j hamlet.jar hamlet.xsl

    -

    Example 2 produces hamlet.jar, which contains the translet class - files.

    - -

    Example 3: Specifying the translet class name.

    -

    java org.apache.xalan.xsltc.cmdline.Compile
    -      -o newhamlet hamlet.xsl

    -

    Example 3 produces a set of class files such as newhamlet.class, - newhamlet$0.class, etc., rather than hamlet.class, hamlet$0.class, - etc.

    - - -

    Example 4: Compiling multiple stylesheets.

    -

    java org.apache.xalan.xsltc.cmdline.Compile
    -      hamlet1.xsl hamlet2.xsl hamlet3.xsl

    -

    Example 4 produces three translets and set of class files derived from the three stylesheets.

    - -

    Example 5: Package Specification.

    -

    java org.apache.xalan.xsltc.cmdline.Compile
    -      -p com.mycompany.translets hamlet.xsl

    -

    Example 5 produces a set of class files such as com/mycompany/translets/hamlet.class, - com/mycompany/translets/hamlet$0.class', etc.

    -
    -
    - - - -
      -
    • Synopsis
    • -
    • Flags and arguments
    • -
    • Examples
    • -
    - -

    The &xslt4jc-short; runtime processor is a Java-based tool for - transforming XML document files using a translet (compiled - stylesheet).

    - -

    The &xslt4jc-short; processor can be run on any platform including UNIX, - Windows, NT, Mac that supports Java, including a Palm Pilot - with J2ME CLDC (Java 2 Micro Edition, Connected Limited Device - Configuration).

    - -

    To run a translet from the command line or a script, - set the classpath (be sure to include - the translet) and run the translet with the appropriate flags and arguments - (described below).

    - - You can also use the - &xslt4j; Command-line Utility, to - compile or run &xslt4jc-short; translets. - - - -

    java org.apache.xalan.xsltc.cmdline.Transform
    -     [-j <jarfile>] [-x] {-u <document_url> | <document>} <class>
    -     [<name1>=<value1> ...]

    -
    - - - - -

    The following flags and arguments are supported:

    - - - --j Specifies <jarfile> from which to load translet. - --x Turns on debugging messages. - --s Disables calling System.exit - --u Specifies the XML input <document> with a URI, - such as 'http://myserver/hamlet.xml'. - -Arguments without flags: - - <document> - Filename of the XML input document. - - <document_url> - URI of the XML input document (see the -u flag above). - - <class> - The translet that performs the transformation. The translet - may take a set of stylesheet parameters specified as - name-value pairs. The format for a name-value pair is - <name>=<value>. -
    - - - - -

    The following examples assume that you have already set the classpath to include the translet and the required JAR - files (see setting the system classpath).

    -

    A possible variation: You have set the classpath to include the required JAR files, but when you run the translet, - you use the java -cp flag to add the current working directory (containing the translet class files you have just generated) - to the classpath.

    -

    Windows: java -cp .;%CLASSPATH% ...
    - UNIX:      java -cp .:$CLASSPATH ...

    - -

    Example 1: Processing an XML document.

    - -

    java org.apache.xalan.xsltc.cmdline.Transform
    -      hamlet.xml hamlet

    - -

    Example 1 uses the specified translet (hamlet) to transform the specified XML input document (hamlet.xml). - The XML input document is in the current working directory. The translet was created by using - org.apache.xalan.xslt.cmdline.Compile to compile an XSL stylesheet (hamlet.xsl).

    - -

    Example 2: Passing stylesheet parameters to the translet.

    - -

    java org.apache.xalan.xsltc.cmdline.Transform
    -      hamlet.xml hamlet
    -      speaker=HAMLET 'scene=SCENE IV'

    - -

    Example 2 passes "HAMLET" to the stylesheet for the stylesheet parameter named speaker, and "SCENE IV" for the - stylesheet parameter named scene. The second name-value pair was placed in single quotes to - specify a value containing a space.

    - -

    Example 3: Processing an XML input document specified with a URI.

    - -

    java org.apache.xalan.xsltc.cmdline.Transform
    -      -u http://zarya.east/test.xml hamlet

    - -

    Example 3 applies the translet (hamlet) to the XML input document (http://zarya.east/test.xml hamlet). Inclusion of - the flag (-u) is optional.

    -
    -
    - - - -
      -
    • &xslt4jc-short; TransformerFactory attributes
    • -
    • Examples
    • -
    -

    &xslt4jc-short; translets are integrated with the &jaxp13-short; API. Accordingly, it is now possible to set a -system property and use a TransformerFactory to generate a Transformer that performs a transformation by compiling -and running a translet.

    - -

    When you use the &jaxp13-short; API to run &xslt4j;, the -javax.xml.transform.TransformerFactory system property is set to -org.apache.xalan.processor.TransformerFactoryImpl. As it currently -stands, this &xslt4j; implementation of TransformerFactory always uses the &xslt4j; -Interpretive processor to perform transformations. To use translets to perform -transformations, set this system property to -org.apache.xalan.xsltc.trax.TransformerFactoryImpl. For -information on setting this and related system properties designating XML -parsers and XSL transformers, see -Plugging in a Transformer and XML -parser.

    - -

    To use the &jaxp13-short; API to perform transformations with translets do the - following:

    -
      -
    1. Set the javax.xml.transform.TransformerFactory system - property as indicated above.

    2. -
    3. Instantiate a TransformerFactory.

    4. -
    5. Instantiate a Transformer object either directly from - the TransformerFactory or through a Templates - object. A Transformer is a processed instance of a - stylesheet (a translet) that can be used to perform a - transformation. See below for more information on when you should use - a Templates object.

    6. -
    7. Perform the transformation, using a StreamSource object for the XML - input and a StreamResult object to hold the transformation output.
    8. -
    -

    Both a Templates object and a Transformer object are - processed representations of a stylesheet, but you cannot use a - Templates object to perform transformations. Instead, - you can use a Templates object to create new - Transformer instances, without having to reprocess the - stylesheet each time. You can use a TransformerFactory to - generate a Templates object or a Transformer - object directly. You can use a Transformer more than once, - but you cannot use it concurrently on more than one thread. If you need - to use the same stylesheet to perform transformations on more than one - thread at the same time, use a Templates object and create - as many Transformer objects as you require.

    - -

    &xslt4jc-short; also defines a set of attributes that you can set on the -TransformerFactory in order to save and subsequently use those -translets by way of the JAXP Transform API - without having to recompile the -stylesheet each time.

    - - - -The JAXP Transform API defines a -TransformerFactory.setAttribute - method that you can use to set implementation-defined attributes. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    AttributePurposeType of valueDefault value
    translet-nameSpecifies the name of the transletString"GregorSamsa"
    destination-directorySpecifies where to save translet class filesStringnull
    package-nameSpecifies which package translet class files will be inStringnull
    jar-nameSpecifies the name of a jar file in which translets should be savedStringnull
    generate-transletSpecifies whether translet class files should be generatedBooleanBoolean.FALSE
    auto-transletSpecifies that time-stamp of translet file, if any, should be compared with that of stylesheet to decide whether to recompile the stylesheetBooleanBoolean.FALSE
    use-classpathSpecifies that precompiled translet classes should be looked up from the classpath when a new transformer or templates is createdBooleanBoolean.FALSE
    enable-inliningSpecifies whether methods that represent templates should be inlined. See Usage constraintsBooleanBoolean.FALSE
    debugEnables debugging messagesBooleanBoolean.FALSE
    -

    The translet-name, destination-directory, -package-name and jar-name attributes are transient. -They only apply to the next invocation of either the newTemplates -or the newTransformer method on that -TransformerFactory.

    -The translet name is the same as the name of the Java class that -implements the translet. If the value specified for the -translet-name attribute contains characters that are not -permitted in a Java class name, any such character will be replaced with an -underscore. For example, if the translet name specified was -my-stylesheet, the translet will actually be named -my_stylesheet. -
    - - - -

    Example 1: Using a translet/Templates object for multiple -concurrent transformations

    -import java.util.Properties; -import javax.xml.transform.Transformer; -import java.io.FileOutputStream; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.Templates; -import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.stream.StreamResult; -... -// Set the TransformerFactory system property. -// Note: For more flexibility, load properties from a properties file. -String key = "javax.xml.transform.TransformerFactory"; -String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; -Properties props = System.getProperties(); -props.put(key, value); -System.setProperties(props); -... -String xslInURI; -// Instantiate the TransformerFactory, and use it with a StreamSource -// XSL stylesheet to create a translet as a Templates object. -TransformerFactory tFactory = TransformerFactory.newInstance(); -Templates translet = tFactory.newTemplates(new StreamSource(xslInURI)); -... -String xmlInURI; -String htmlOutURI; -String xmlInURI2; -String htmlOutURI2; -... -// For each thread, instantiate a new Transformer, and perform the -// transformations on that thread from a StreamSource to a StreamResult; -Transformer transformer = translet.newTransformer(); -transformer.transform(new StreamSource(xmlInURI), - new StreamResult(new FileOutputStream(htmlOutURI))); -transformer.transform(new StreamSource(xmlInURI2), - new StreamResult(new FileOutputStream(htmlOutURI2))); -... -

    For a working sample that illustrates this usage pattern, see JAXPTransletOneTransformation.

    -

    Example 2: Compiling a translet/Templates object for a single transformation

    -import java.util.Properties; -import javax.xml.transform.TransformerFactory; -import java.io.FileOutputStream; -import javax.xml.transform.Transformer; -import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.stream.StreamResult; -... -// Set the TransformerFactory system property. -// Note: For more flexibility, load properties from a properties file. -String key = "javax.xml.transform.TransformerFactory"; -String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; -Properties props = System.getProperties(); -props.put(key, value); -System.setProperties(props); -... -String xslInURI; -String xmlInURI; -String xmlInURI2; -String htmlOutURI; -String htmlOutURI2; -// Instantiate the TransformerFactory, and use it along with a StreamSource -// XSL stylesheet to create a Transformer. -TransformerFactory tFactory = TransformerFactory.newInstance(); -Transformer transformer = - tFactory.newTransformer(new StreamSource(xslInURI)); -// Perform the transformation from a StreamSource to a StreamResult; -transformer.transform(new StreamSource(xmlInURI), - new StreamResult(new FileOutputStream(htmlOutURI))); -// Re-use the same transformer for a second transformation -transformer.transform(new StreamSource(xmlInURI2), - new StreamResult(new FileOutputStream(htmlOutURI2))); -

    For a working sample that illustrates this usage pattern, see JAXPTransletMultipleTransformations.

    -
    -
    - - - -

    As part of the JAXP API, a "Smart Transformer Switch" enables automatic switching -between &xslt4ji; and &xslt4jc-short; processors within your application. It uses &xslt4ji; -processor to create your Transformer objects, and uses &xslt4jc-short; to create your -Templates objects.

    -

    To use the switch, you set the JAXP system property, -javax.xml.transform.TransformerFactory, to -org.apache.xalan.xsltc.trax.SmartTransformerFactoryImpl. -For one-time transformations or transformations that require extensions -supported by &xslt4ji;, and not &xslt4jc-short;, you would use the -SmartTransformerFactoryImpl to create Transformer -objects. For a repeated transformation where performance is critical, you would -create a Templates object from which you would create your -Transformer objects.

    -
    - - - -

    The &xslt4jc-short; Native API is no longer supported. Instead, you should always -use &xslt4jc-short; with the JAXP Transform API.

    -
    - - - -
      -
    • The default for template inlining has been changed. Previously, - by default, inlining (putting all the templates into one big method) was on and - the "-n" option to the compile command line disabled inlining. - With inlining on, &xslt4jc-short; can generate methods that are too long (> 64K length) - to run, or contain jump offsets that are too large for the JVM to handle. - Now the default is not to inline templates. Instead, compilation creates separate - methods for each template. Inlining was thought to improve performance, - but with recent hotspot technology in the Java 1.4.x JVM, performance is better with - inlining off. From the command line, you would use "-n" - to turn on inlining, or with JAXP set the "enable-inlining" attribute to the TransformerFactory. - For example, - TransformerFactory tfac = new TransformerFactory(); -tfac.setAttribute("enable-inlining", Boolean.TRUE);
    • -
    • &xslt4jc-short; tries to determine the order in which global variables are initialized - by tracking the dependencies between them. In some cases, the value of a variable - may depend on a template, e.g., if xsl:call-template is used to initialized - a variable whose type is RTF. If this happens, a - NullPointerException may be thrown at run-time - when the translet attempts to access a variable that has not been properly - initialized. In most cases, this problem can be avoided by reordering the - variable declarations.
    • -
    -

    To check on the open bugs in the current Apache xml-xalan/java repository, - follow the instructions below:

    -
      -
    1. Go to http://issues.apache.org/jira.
    2. -
    3. Select project XalanJ2.
    4. -
    5. Select XSLTC from the Components list.
    6. -
    -
    -
    diff --git a/stylebook/sources/xalandesign.xml b/stylebook/sources/xalandesign.xml deleted file mode 100644 index eef7f51b1..000000000 --- a/stylebook/sources/xalandesign.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - - - - diff --git a/stylebook/sources/xsltc.xml b/stylebook/sources/xsltc.xml deleted file mode 100644 index 580fcb4a3..000000000 --- a/stylebook/sources/xsltc.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/sources/xsltc/README b/stylebook/sources/xsltc/README deleted file mode 100644 index 1dc377f35..000000000 --- a/stylebook/sources/xsltc/README +++ /dev/null @@ -1,260 +0,0 @@ -======================================================================= - README FILE FOR THE SUN XSLT COMPILER - Preview Version 6 - April, 2001 -======================================================================= - * 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. -======================================================================= - -The Sun XSLT Compiler (XSLTC) is a Java-based tool for compiling XSL -stylesheets into extremely lightweight and portable Java byte code. -The Sun XSLTC Java Runtime environment can then process XML files -against these compiled stylesheets (Translets) to generate any manner -of output per the style-sheet instructions. - -This preview version of the XSLT Compiler can be run on any -platform -- including UNIX, Windows, NT, Mac -- that supports -Java2 or later. The Translets (compiled stylesheets) can be run on any -Java platform including a Palm Pilot with J2ME CLDC -(Java 2 Micro Edition, Connected Limited Device Configuration). -While the compiler itself requires Java2,translets are designed to run -anywhere Java is available. - -Almost all functions of the XLST 1.0 language are implemented; -more than enough to show you how this new approach to XSLT works -and its advantages! Using the samples provided, you will be able -to see for yourself. Also, demos for the Palm Pilot, Applets, and -Servlets are provided. - ------------------------------------------------------------------------ -ATTRIBUTIONS ------------------------------------------------------------------------ -The XSLT Compiler program uses the CUP Parser Generator -for Java, Copyright 1996-1999 by Scott Hudson, Frank Flannery, -C. Scott Ananian. For more details, please see: -http://www.cs.princeton.edu/~appel/modern/java/CUP/ - -The XSLT Compiler program also uses a modified version of the -Byte Code Engineering Library (BCEL), formerly known as -(JavaClass API), Copyright 2000 Markus Dahm. - -** Please note that this additional package, BCEL, is -** needed in order to generate the class files from the compiler. -** Without the BCEL package, this preview version of the -** compiler WILL NOT WORK. BCEL is freely available for -** download as described below. - ------------------------------------------------------------------------ -REQUIRED PACKAGE ------------------------------------------------------------------------ -BCEL (formerly JavaClass) by Markus Dahm has been -used to automatically create class files from the XSLT compiler output. -You must obtain the BCEL.jar file and install it before using the -XSLT compiler. - -The simplest way to download the BCEL.jar file from - - http://bcel.sourceforge.net/downloads.html - -is to use the "JAR file (without docs)" link. - -You may want to obtain the precompiled class files and documentation. -To download them to a Unix system: - - 1) Choose the "latest version (Precompiled + docs)" - Gzipped Tar-File or ZIP-File link. - - 2) Unpack and expand the downloaded BCEL files in your - download directory (e.g., /usr/local). - - 3) Change directory to BCEL. - - 4) Create the jar file BCEL.jar. - - From within the BCEL directory, you can either use the - included GNUmakefile or create the jar yourself. - - To use the GNUmakefile, type the command 'make jar'. - - To create the jar yourself, type the command: - - jar cvf BCEL.jar `find de gnu -name \*.class` listclass.class - -To download the precompiled class files and documentation -to a Windows system: - - 1) Choose the "latest version (Precompiled + docs)" - ZIP-File link. - - 2) Unzip the downloaded BCEL files in your - download directory. - - 3) Change directory to BCEL and from a DOS command line, - type the command: - - jar -cvf BCEL.jar de\fub\bytecode\classfile\*.class - gnu\regexp\*.class listclass.class - -To complete the BCEL setup: - - 1) Install XSLTC, as described in the section below, - "HOW TO INSTALL XSLTC AND RUN THE SAMPLES." - - 2) Copy the BCEL.jar file into the "lib" directory - under your "xsltc" directory. - - You are now set to run the XSLT compiler. - ------------------------------------------------------------- -ADDITIONS FROM VERSION 5 (of the PREVIEW COMPILER) ------------------------------------------------------------- - -Support for - - - Simplified Stylesheets - - id() and key() in match patterns - ------------------------------------------------------------- -XSLT 1.0 Features Not Suported in PREVIEW VERSION 6 ------------------------------------------------------------- - -The following XSLT 1.0 features are not yet supported: - - * Nonstatic external Java methods. - You may call static Java functions - using a namespace prefix matching the class name that is - associated with the following URL: - - http://www.sun.com/xsltc/java/YourJavaClass - - * Namespace axis - ------------------------------------------------------------- -LIST OF FILES ------------------------------------------------------------- - -The files included in this preview package are as follows: - -xsltc-1_0-alpha5-bin.zip - /xsltc - LICENSE.txt (license file) - XSLTCprn_lg.txt (copyright notice) - README (this file) - README.api (describes Translet API) - README.xslt (describes runtime command line interface) - README.xsltc (describes compiler command line interface) - bin - xslt (runtime for Unix) - xsltc (compiler for Unix) - - xslt.bat (runtime for DOS) - xsltc.bat (compiler for DOS) - demo - README - TransletDemo.prc (Palm Pilot install file) - lib - xml.jar - xsltc.jar - xsltcrt.jar ('rt' = runtime) - [BCEL.jar goes here] (see REQUIRED PACKAGE above) - samples - set of xml and xsl files for you to try - src - subset of the runtime package to complement README.api - plus an Applet demo and a servlet demo - com/sun/xslt/demo/servlet - README.servlet (describes Servlet demo) - com/sun/xslt/demo/applet - README.applet (describes Applet demo) - ------------------------------------------------------------- -HOW TO INSTALL XSLTC AND RUN THE SAMPLES ------------------------------------------------------------- - -1. Unzip the files in a directory of your choice, for example - from the user directory '/home/user1', the distribution - zip file can be unzipped using the jar command as: - - jar xvf xsltc-1_0-alpha5-bin.zip - - The subdirectory 'xslt' will be created in '/home/user1'. - -2. Set the XSLT environment variable to point to your installation - directory. Set your PATH environment variable to include - the bin directory of XSLT. - - For example, in the bash shell: - - export XSLT=/home/user1/xslt - export PATH=$XSLT/bin:$PATH - -3. Compile the stylesheet to produce a Java class file. - - For example, on the Unix platform, to compile the play1.xsl - stylesheet for the play.xml document: - - cd /home/user1/xsltc/samples - xsltc play1.xsl - - The compiled stylesheet will be in the main Java class file - 'play1.class' - - NOTE: The 'xlstc' shell script adds the required jars to your CLASSPATH - - For example, on the Windows platform, to compile the play1.xsl - stylesheet for the play.xml document: - - set classpath=c:\xsltc\samples;c:\xsltc\lib\xsltc.jar; - c:\xsltc\lib\xsltcrt.jar;c:\xsltc\lib\xml.jar; - c:\xsltc\lib\BCEL.jar;. - cd c:\xsltc\samples - java com.sun.xslt.compiler.XSLTC play1.xsl - -4. Use the compiled Java class file (play1.class) to transform - the example XML document. - - For example, on the Unix platform: - - xslt play.xml play1 - - For example, on the Windows platform: - - java com.sun.xslt.runtime.DefaultRun play.xml play1 - - The result is sent to standard output. - - NOTE: When running the compiled stylesheet, you - just specify the name of its Java class, not its - file name (e.g., play1, not play1.class). - You do not include the ".class" extension, nor - the path to the class. The class is found by means - of the Java CLASSPATH variable. If you run - the translet from a directory other - than the directory in which the compiled - stylesheet class is located, you need to add - that directory to your Java CLASSPATH. Also, you - need to remove directories from your CLASSPATH - for prior installations of XSLTC and any references - to Sun's project X parser (com.sun.xml.tree) - installed from some other XML application/tool. - - NOTE: The javadocToHtml sample calls external Java methods - from the JavadocFormatter class. Before compiling the - javadocToHtml.xsl stylesheet, compile the - JavadocFormatter class using 'javac'. - ------------------------------------------------------------- -END OF README diff --git a/stylebook/sources/xsltc/README.APACHE b/stylebook/sources/xsltc/README.APACHE deleted file mode 100644 index 8536b27b8..000000000 --- a/stylebook/sources/xsltc/README.APACHE +++ /dev/null @@ -1,101 +0,0 @@ -README.APACHE -===================================================================== - * 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. -====================================================================== -Entire source tree and support packages are located in the single jar -file 'apache.jar'. - - -Installation -------------- - -(1) create directory [Root], unpack 'apache.jar' there. - ex) % cd /tmp; mkdir xsltc_apache - % cd xsltc_apache - copy apache.jar to xsltc_apache directory - % jar xvf apache.jar - cleanup - % rm -rf META-INF apache.jar - - Unpacking the jar file will result in the following tree: - - [Root] - External/ - BCEL/ ... contains BCEL.jar - JLex/ ... contains JLex.jar - java_cup/ ... contains java_cup.jar, runtime/runtime.jar - xml-tr2/ ... contains xml.jar - bin/ - xslt - xsltc - doc/ - api/ ... contains javadoc for api - src/ - GNUmakefile - GNUmakefile.allinc - docs/ - LICENSE.txt - Message.txt - README - README.api - README.xslt - README.xsltc - XSLTCprn_lg.txt* - xsltcA3.txt - org/ - apache/ - xalan/ - xsltc/ - (src tree) ... all the source code files - - - The 'src tree' is a hierarchy of the following packages: - org.apache.xalan.xsltc - org.apache.xalan.xsltc.compiler - org.apache.xalan.xsltc.compiler.util - org.apache.xalan.xsltc.dom - org.apache.xalan.xsltc.runtime - org.apache.xalan.xsltc.util - org.apache.xalan.xsltc.util.getopt - - -(2) make bin programs executable - % chmod +x bin/* - -(3) set env variable to point to top of directory [Root] - ex) % setenv XSLT /tmp/xsltc_apache - -(4) compile sources (uses gnu make and the provides 'GNUmakefile'). This - will create java classes in [Root]/classes, e.g. /tmp/xsltc_apache/classes. - (No need to set your CLASSPATH variable.) - - ex) % cd src; gmake again - - Note: the 'again' target forces everything to be built from scratch, - including the java_cup source files. Subsequent builds can be done - using the 'classes' target. - -(5) make the javadoc - ex) % gmake jdoc - -(6) add bin directory to your executable path, - ex) % set path=($XSLT/bin $path) - -(7) test distribution, given a stylesheet (test.xsl) and an input xml doc - (test.xml), and be sure current working directory (.) is in your - CLASSPATH. - % xsltc test.xsl ... creates translet, test.class - % xslt test.xml test ... runs translet on xml input diff --git a/stylebook/sources/xsltc/README.api b/stylebook/sources/xsltc/README.api deleted file mode 100644 index eff86b0d5..000000000 --- a/stylebook/sources/xsltc/README.api +++ /dev/null @@ -1,436 +0,0 @@ -============================================================ - README FILE FOR THE SUN XSLT COMPILER API - Preview Version 5 - February, 2001 -============================================================ - * 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. -============================================================ - -The Sun XSLT Compiler (XSLTC) is a Java-based tool for -compiling XSL stylesheets into extremely lightweight and -portable Java byte code. The Sun XSLTC Java Runtime environment -can then process XML files against these compiled stylesheets -(Translets) to generate any manner of output per the style- -sheet instructions. - -CONTENTS OF THIS DOCUMENT: - 1. HOW TO INCLUDE TRANSLETS IN YOUR APPLICATIONS - 2. FULL CODE EXAMPLE 1, (uses a SAX DocumentHandler). - 3. COMPILING AND RUNNING THE EXAMPLE - 4. FULL CODE EXAMPLE 2, (uses DefaultSAXOutputHandler). - 5. APPENDIX (TextOut and DefaultSAXOutputHandler) - - - - -1. HOW TO INCLUDE TRANSLETS IN YOUR APPLICATIONS ---------------------------------------------------------------------- - -Translets implement the interface com.sun.xslt.Translet -that you will find in the src directory. - -public interface Translet { - public void transform(DOM document, TransletOutputHandler handler) - throws TransletException; - - public void transform(DOM document, TransletOutputHandler[] handlers) - throws TransletException; - - public void transform(DOM document, NodeIterator iterator, - TransletOutputHandler handler) throws - TransletException; - - public Object addParameter(String name, Object value); - - public void buildKeys(DOM document, NodeIterator iterator, - TransletOutputHandler handler, int root) throws - TransletException; - - public String getOutputEncoding(); -} - -The Translet takes a DOMImpl object (created from an input XML document), -as input and transforms it. The results of the transformation are -sent to an event-based output handler that implements the -com.sun.xslt.TransletOutputHandler interface : - - -public interface com.sun.xslt.TransletOutputHandler { - public void startDocument() throws TransletException; - public void endDocument() throws TransletException; - public void characters(char[] characters, int offset, int length) - throws TransletException; - public void startElement(String elementName) throws TransletException; - public void endElement(String elementName) throws TransletException; - public void attribute(String attributeName, String attributeValue) - throws TransletException; - public void comment(String comment) throws TransletException; - public void processingInstruction(String target, String data) - throws TransletException; - public void setType(int type); - public void setIndent(boolean indent); - public boolean setEscaping(boolean escape) throws TransletException; - public void insertCdataElement(String elementName); -} - - -You create an instance of the class that implements the Translet interface -using Java reflection: - - Class clazz = Class.forName("classname"); - Translet translet = (Translet) clazz.newInstance(); - -where "classname" is the name of the class generated by XSLTC. -In order to execute a transformation, both a document and a SAX-like -handler (TransletOutputHandler) are needed. -A document instance can be created with the aid of SAX-complaint XML parser. -For example, using Sun's parser you would write, - - import com.sun.xslt.dom.DOMImpl; - import com.sun.xml.parser.Parser; - import com.sun.xml.parser.Resolver; - - // Create new instances of DOM and Parser - DOMImpl dom = new DOMImpl(); - Parser parser = new Parser(); - - // Set a SAX handler to build a DOM tree - parser.setDocumentHandler(dom.getBuilder()); - - // Parse the document and build a DOM tree - InputSource input = new InputSource( - new FileReader("xmlfile.xml")); - parser.parse(input); - -In this example a document is parsed from a file, but it is also -possible to parse a document from a URI by writing, - - parser.parse("http://.../xmlfile.xml"); - -To transform the input XML document, a call is made to the translet's -transform() method. In order to do its work, the transform() method -takes two arguments, (1) the DOMImpl object created from parsing -the input XML document, and (2) an output handler. The output handler -must implement the org.xml.sax.DocumentHandler interface. You -have the option of: (1) writing your own class that implements -DocumentHandler, or (2) using our default class -'com.sun.xslt.runtime.DefaultSAXOutputHandler' instead. -The source code for our DefaultSAXOutputHandler is included -in this package in the com/sun/xslt/runtime directory. -This is a change from the previous releases of -our compiler API. If you wanted to create your own -output handler in previous releases, you would have write a class that -implemented the interface TransletOutputHandler. This change was made -so that users could more easily plug in any SAX compliant output -handler. To plug in the SAX compliant output handler, -(whether it is a user written class or our DefaultSAXOutputHandler) -into the transform() method, it must be wrapped in a -TextOutput object first. - -The Translet.transform() method may also take an array of output handlers. -In this case the transformation will be able to select which handler -to send output to by using the extension element -where 'n' is a 0-based index in the array of output handlers. - -Lets take a look at the code needed to carry out both of the options -for passing the SAX output handler to the translet's transform() method: - - (1) You would write your own output handler that implements - the org.xml.sax.DocumentHandler interface, pass this class - into our com.sun.xslt.runtime.TextOutput class which itself - implements the TransletOutputHandler interface. - - (2) You would create an instance of the default SAX output handler, - com.sun.xslt.runtime.DefaultSAXOutputHandler, pass this - instance into our com.sun.xslt.runtime.TextOutput class which - itself implements the TransletOutputHandler interface. - - -In option (1), we want to use a SAX compliant output handler that we write -ourselves. In this case we create our Handler class, which implements -org.xml.sax.DocumentHandler: - -import org.xml.sax.DocumentHandler; - -// user supplied SAX Handler: -class Handler implements DocumentHandler { - public void startDocument() throws SAXException {} - - public void endDocument() throws SAXException {} - - public void characters(char[] characters, int offset, int length) - throws SAXException - { - System.out.println(new String(characters, offset, length)); - } - public void startElement(String elementName, AttributeList attrs) - throws SAXException {} - public void endElement(String elementName) throws SAXException {} - public void setDocumentLocator(Locator loc) {} - public void ignorableWhitespace(char[] characters, int offset, int length) - throws SAXException {} - public void processingInstruction(String target, String data) - throws SAXException {} -} - -Now before we pass our handler to the transform() method, we wrap it -in a TextOutput object (which implements the TransletOutputHandler -interface for us). Then given the instantiated translet class, -the transform method could be called as: - - import com.sun.xslt.runtime.TextOutput; - - DOMImpl dom; - ... - Handler saxHandler; - TextOutput textOutput; - try { - saxHandler = new Handler(); - textOutput = new TextOutput(saxHandler); - translet.transform(dom, textOutput); - } catch (TransletException e){ - ... - } catch (IOException e){ - ... - } - - -By using the TextOutput wrapper class, one can also control the character -encoding. The TextOutput class has an additional constructor that takes -the DocumentHandler and a String that describes the encoding, for example -'textOutput' could have been created as: - - textOutput = new TextOutput(saxHandler, "utf-8"); - -Finally, option (2) is much like option (1) except you do not have -to write your own DocumentHandler. We provide one by default. To use the -default one, instantiate 'com.sun.xslt.runtime.DefaultSAXOutputHandler' -rather than instantiating your own class (such as Handler above): - - import com.sun.xslt.runtime.DefaultSAXOutputHandler; - import com.sun.xslt.runtime.TextOutput; - - DefaultSAXOutputHandler defhandlr; - try { - defhandlr = new DefaultSAXOutputHandler(System.out, "utf-8"); - translet.transform(dom, new TextOutput(defhandlr)); - } catch (TransletException e){ - ... - } catch (IOException e){ - ... - } - -For a quick reference to the TextOutput and DefaultSAXOutputHandler -constructors available, see the Appendix. - -In the following sections, full code examples are shown. - -Finally, if you want the transformation results in the DOM form: - -DOM result = new DOM(); -translet.transform(dom, result.getOutputDomBuilder()); - -If the compiled stylesheet requires the values of global -parameters to be set, you should call addParameter() before -calling the transform() method. - - -2. FULL CODE EXAMPLE 1, XsltApp.java, uses a SAX DocumentHandler. - This example corresponds to option (1) in discussion above. ------------------------------------------------------------------- -import java.io.FileReader; -import java.io.IOException; -import com.sun.xslt.dom.DOMImpl; -import com.sun.xslt.runtime.TextOutput; -import com.sun.xslt.Translet; -import com.sun.xslt.TransletException; -import com.sun.xml.parser.Parser; -import org.xml.sax.AttributeList; -import org.xml.sax.DocumentHandler; -import org.xml.sax.InputSource; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; - - -// Create a SAX Output Handler -class Handler implements DocumentHandler { - public void startDocument() throws SAXException {} - - public void endDocument() throws SAXException {} - - public void characters(char[] characters, int offset, int length) - throws SAXException - { - System.out.println(new String(characters, offset, length)); - } - - public void startElement(String elementName, AttributeList attrs) - throws SAXException {} - - public void endElement(String elementName) throws SAXException {} - - public void setDocumentLocator(Locator loc) {} - - public void ignorableWhitespace(char[] characters, int offset, int length) - throws SAXException {} - - public void processingInstruction(String target, String data) - throws SAXException {} - -} - -public class XsltApp { - public static void main(String[] args){ - XsltApp app = new XsltApp(); - app.run(args); - } - - public void run(String[] args){ - if(args.length != 2){ - usage(); - } - String inputFileName = args[0]; - String transletName = args[1]; - - DOMImpl dom = new DOMImpl(); - Parser parser = new Parser(); - parser.setDocumentHandler(dom.getBuilder()); - InputSource input = null; - try { - input = new InputSource(new FileReader(inputFileName)); - } catch( java.io.FileNotFoundException e){ - System.err.println("File " + inputFileName + " not found"); - System.exit(1); - } - - try { - parser.parse(input); - } catch (org.xml.sax.SAXException e){ - System.err.println("Error: " + e); - System.exit(1); - } catch (IOException e){ - System.err.println("Error: " + e); - System.exit(1); - } - - Class transletPluggable = null; - try { - transletPluggable = Class.forName(transletName); - } catch (java.lang.ClassNotFoundException e){ - System.err.println("Error: " + e); - System.exit(1); - } - - Translet translet = null; - try { - translet = (Translet)transletPluggable.newInstance(); - } catch (java.lang.Exception e){ - System.err.println("Error instantiating pluggable translet"); - System.exit(1); - } - - Handler saxHandler; - TextOutput textOutput; - try { - saxHandler = new Handler(); - textOutput = new TextOutput(saxHandler, "utf-8"); - translet.transform(dom, textOutput); - } catch (TransletException e){ - System.err.println("Error: " + e); - System.exit(1); - } catch (IOException e){ - System.err.println("Error: " + e); - System.exit(1); - } - } - - public void usage(){ - System.out.println("Usage: \n" + - " xsltapp \n\n" + - " where is xml source (e.g. play.xml). \n" + - " and is java class (e.g. play1). \n" - ); - System.exit(1); - } -} - - - -3. COMPILING AND RUNNING THE EXAMPLE: ---------------------------------------------------------------------- - -To compile the example above, assuming you unpacked the code -into the directory /tmp: - -javac -classpath "/tmp/xsltc/lib/xml.jar:/tmp/xsltc/lib/BCEL.jar:/tmp/xsltc -/lib/xsltcrt.jar" XsltApp.java - -To run the example on xml document 'play.xml' and stylesheet 'play1.xsl': - -(1) compile the stylesheet: - xsltc play1.xsl - - this will produce the translet 'play1.class'. - -(2) run the translet with the XsltApp demo: - -java -classpath /tmp/xsltc/lib/xsltcrt.jar:/tmp/xsltc/lib/xml.jar:. XsltApp play -.xml play1 - - - -4. FULL CODE EXAMPLE 2, DefaultRun.java - This example corresponds to option (2) in the discussion above. ------------------------------------------------------------------- -See the source file for the class 'com.sun.xslt.runtime.DefaultRun', -which is included in the src directory. It uses the -'DefaultSAXOutputHandler' approach. - - - - -5. APPENDIX ------------------------------------------------------------------- - -TextOutput ----------- - -package com.sun.xslt.runtime; - -public final class TextOutput implements TransletOutputHandler { - public TextOutput(DocumentHandler handler) throws IOException; - public TextOutput(DocumentHandler handler, String encoding) throws - IOException; -} - - -DefaultSAXOutputHandler ------------------------ -package com.sun.xslt.runtime; - -public class DefaultSAXOutputHandler implements DocumentHandler{ - public DefaultSAXOutputHandler(Writer writer) throws IOException; - public DefaultSAXOutputHandler(OutputStream out, String encoding) - throws IOException; - public DefaultSAXOutputHandler(String filename, String encoding) - throws IOException; - ... -} - - - ------------------------------------------------------------- -END OF README diff --git a/stylebook/sources/xsltc/README.xslt b/stylebook/sources/xsltc/README.xslt deleted file mode 100644 index 5e03ce159..000000000 --- a/stylebook/sources/xsltc/README.xslt +++ /dev/null @@ -1,135 +0,0 @@ -NAME - xslt - optional command wrapper for Apache/Xalan XSLTC runtime processor. - -SYNOPSIS - xslt [-j ] [-xhs] - {-u | } - [= ...] - - -DESCRIPTION - This command-line tool is a wrapper for the Java class - org.apache.xalan.xsltc.cmdline.Transform. See CODE section - below. - - The Sun XSLT runtime processor is a Java-based tool for - transforming XML document files using a translet (compiled - stylesheet). - - The XSLT processor can be run on any platform including UNIX, - Windows, NT, Mac that supports Java. - -OPTIONS - - The following options are supported: - - -j - gets the translet from the specified - instead of from the user's CLASSPATH. - - -u - Specifies that the XML location will be a URI - such as 'http://myserver/hamlet.xml'. - - -x - Turn debugging messages on. - - -h - Output help screen. - - -s - Prevent the command line tool from calling System.exit() - -OPERANDS - - The following operands are supported: - - An XML document to be processed. - An XML document to be processed, specified - as a URL (See -u option above). - - The translet that will do the processing. - The translet may optionally take a set of - global parameters specified as name-value - pairs. A name-value pair uses the format - =. - -CODE - Here is an example script to implement this command. You will have - to define INSTALLDIR to be the directory where you install XalanJ. - - #!/bin/sh - # apxslt - Apache XSLT run script. - # - # if a -j option is set, find it and save off the - # argument. - # - jOptionSeen="0"; - jarfile=""; - for arg in $* - do - if [ $arg = "-j" ] ; then - jOptionSeen="1"; - elif [ $jOptionSeen = "1" ] ; then - jarfile=$arg - jOptionSeen="0"; - fi - done - - # - XSLTC=${INSTALLDIR}/java/lib/xsltc.jar - XERCES=${INSTALLDIR}/java/lib/xercesImpl.jar - XML=${INSTALLDIR}/java/lib/xml-apis.jar - CLASSPATH=.:${XSLTC}:${XERCES}:${XML}:$jarfile - - java -cp ${CLASSPATH} org.apache.xalan.xsltc.cmdline.Transform "$@" - - -EXAMPLES - Example 1: Processing an XML document. - - example% xslt hamlet.xml hamlet - - where the current working directory contains an XML document - 'hamlet.xml' to be processed by the translet class 'hamlet'. - The translet would have been created initially using - xsltc to compile a XSLT stylesheet named 'hamlet.xsl'. - - Example 2: Loading translet from a jar file. - - example% xslt -j hamlet.jar hamlet.xml hamlet - - In this case the translet class 'hamlet' is loaded from the - specified jar file, 'hamlet.jar' instead of from the user's - CLASSPATH. - - Example 3: If the translet defined global parameters, then - these can be passed on the command line to the runtime processor - as a space separated list of name-value pairs using the format - =. For example, - - example% xslt hamlet.xml hamlet speaker=HAMLET 'scene=SCENE IV' - - Notice that the second name-value pair had to be quoted due to - the intervening space in the value "SCENE IV". - - example% xslt -u http://zarya.east/test.xml hamlet - - where the xml document 'test.xml' can be specified as a URL. - -FILES - file.xml input XML document to be processed. - file.class byte code file. - file.jar java archive file. - -SEE ALSO - xsltc, jar. - -BUGS - See the Apache JIRA issue tracker: http://issues.apache.org/jira - -AUTHORS - Morten Jorgensen morten.jorgensen@ireland.sun.com - G. Todd Miller todd.miller@east.sun.com - Jacek Ambroziak - Santiago Pericas-Geertsen diff --git a/stylebook/sources/xsltc/README.xsltc b/stylebook/sources/xsltc/README.xsltc deleted file mode 100644 index a9cc79da0..000000000 --- a/stylebook/sources/xsltc/README.xsltc +++ /dev/null @@ -1,143 +0,0 @@ -NAME - xsltc - optional command wrapper for Apache/Xalan XSLT Compiler - -SYNOPSIS - xsltc [-o ] [-d ] [-j ] - [-p ] [-uxhsi] [... ] - -DESCRIPTION - This command-line tool is a wrapper for the Java class - org.apache.xalan.xsltc.cmdline.Compile. (See CODE below) - - The Sun XSLT Compiler is a Java-based tool for compiling XSLT - stylesheets into lightweight and portable Java byte codes - called translets. - - The XSLT Compiler can be run on any platform including UNIX, - Windows, NT, Mac that supports Java 1.2.x or later. The generated - translets can be run on any platform that supports a Java - Runtime Environment, including a Palm Pilot with J2ME CLDC - (Java 2 Micro Edition, Connected Limited Device Configuration). - -OPTIONS - - The following options are supported: - - -o - Changes the name of the generated translet class. - By default, the translet class would be named - , if -o is set, then the - translet class would be named . Translet - class files are written as .class files. - - -d - Changes the destination directory. By default, any - translet class files generated would be placed in - the current working directory. If -d - is specified, the files would be output to . - - -j - Outputs all generated translet class files into a - jar file named .jar. When this option is - used only a jar file will be output. - - -p - Specify a package name for all generated translet - class. - - -u - Specifies that location will be a URI - such as 'http://myserver/stylesheet1.xsl'. - - -i - Specify that the stylesheet should be read from stdin. - - -x - Turn debugging messages on. - - -h - Output help screen. - - -s - Prevent the command line tool from calling System.exit() - - -OPERANDS - - The following operand is supported: - - A path name of an input stylesheet file. - -CODE - Here is an example wrapper script to implement this command. - You should define 'INSTALLDIR' to be the directory where you - have installed XalanJ, for example, '/usr/local/xml-xalan'. - - #!/bin/sh - JAR=${INSTALLDIR}/java/lib/xsltc.jar - XER=${INSTALLDIR}/java/lib/xercesImpl.jar - XML=${INSTALLDIR}/java/lib/xml-apis.jar - JCPR=${INSTALLDIR}/java/lib/runtime.jar - BCEL=${INSTALLDIR}/java/lib/BCEL.jar - JCP=${INSTALLDIR}/java/tools/java_cup.jar - JLEX=${INSTALLDIR}/java/tools/JLex.jar - REGEXP=${INSTALLDIR}/java/lib/regexp.jar - - CLASSPATH=.:${JAR}:${XER}:${XML}:${JCPR}:${BCEL}:${JCP}:${JLEX}:${REGEXP} - java -cp ${CLASSPATH} org.apache.xalan.xsltc.cmdline.Compile "$@" - - -EXAMPLES - Example 1: Creating a translet from stylesheet 'hamlet.xsl'. - - example% xsltc hamlet.xsl - - would produce a set of class files such as 'hamlet.class', - 'hamlet$0.class', 'hamlet$1.class'. - - Example 2: Outputting all classes into a jar file. - - example% xsltc -j hamlet.jar hamlet.xsl - - would produce a single jar file output, 'hamlet.jar' which would - contain all the generated .class files for the hamlet translet. - - Example 3: Naming the class file. - - example% xsltc -o newhamlet hamlet.xsl - - would produce a set of class files such as 'newhamlet.class', - 'newhamlet$0.class', etc rather than the default which would - be 'hamlet.class', 'hamlet$0.class', etc. - - Example 4: Multiple stylesheets. - - example% xsltc hamlet1.xsl hamlet2.xsl hamlet3.xsl - - would produce a set of class files derived from the three - stylesheets. - - Example 5: Package Specification. - - example% xsltc -p com.mycompany.translets hamlet.xsl - - would produce a set of class files such as - 'com/mycompany/translets/hamlet.class', - 'com/mycompany/translets/hamlet$0.class', etc. - -FILES - file.xsl input XSLT stylesheet - file.class byte code file - file.jar java archive file - -SEE ALSO - xslt, jar. - -BUGS - See the Apache JIRA issue tracker: http://issues.apache.org/jira - -AUTHORS - Morten Jorgensen, morten.jorgensen@ireland.sun.com - G. Todd Miller, todd.miller@east.sun.com - Santiago Pericas-Geertsen - Jacek Ambroziak diff --git a/stylebook/sources/xsltc/README2 b/stylebook/sources/xsltc/README2 deleted file mode 100644 index ffdd532c2..000000000 --- a/stylebook/sources/xsltc/README2 +++ /dev/null @@ -1,101 +0,0 @@ -README.APACHE -===================================================================== - * 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. -===================================================================== -Entire source tree and support packages are located in the single jar -file 'apache.jar'. - - -Installation -------------- - -(1) create directory [Root], unpack 'apache.jar' there. - ex) % cd /tmp; mkdir xsltc_apache - % cd xsltc_apache - copy apache.jar to xsltc_apache directory - % jar xvf apache.jar - cleanup - % rm -rf META-INF apache.jar - - Unpacking the jar file will result in the following tree: - - [Root] - External/ - BCEL/ ... contains BCEL.jar - JLex/ ... contains JLex.jar - java_cup/ ... contains java_cup.jar, runtime/runtime.jar - xml-tr2/ ... contains xml.jar - bin/ - xslt - xsltc - doc/ - api/ ... contains javadoc for api - src/ - GNUmakefile - GNUmakefile.allinc - docs/ - LICENSE.txt - Message.txt - README - README.api - README.xslt - README.xsltc - XSLTCprn_lg.txt* - xsltcA3.txt - org/ - apache/ - xalan/ - xsltc/ - (src tree) ... all the source code files - - - The 'src tree' is a hierarchy of the following packages: - org.apache.xalan.xsltc - org.apache.xalan.xsltc.compiler - org.apache.xalan.xsltc.compiler.util - org.apache.xalan.xsltc.dom - org.apache.xalan.xsltc.runtime - org.apache.xalan.xsltc.util - org.apache.xalan.xsltc.util.getopt - - -(2) make bin programs executable - % chmod +x bin/* - -(3) set env variable to point to top of directory [Root] - ex) % setenv XSLT /tmp/xsltc_apache - -(4) compile sources (uses gnu make and the provides 'GNUmakefile'). This - will create java classes in [Root]/classes, e.g. /tmp/xsltc_apache/classes. - (No need to set your CLASSPATH variable.) - - ex) % cd src; gmake again - - Note: the 'again' target forces everything to be built from scratch, - including the java_cup source files. Subsequent builds can be done - using the 'classes' target. - -(5) make the javadoc - ex) % gmake jdoc - -(6) add bin directory to your executable path, - ex) % set path=($XSLT/bin $path) - -(7) test distribution, given a stylesheet (test.xsl) and an input xml doc - (test.xml), and be sure current working directory (.) is in your - CLASSPATH. - % xsltc test.xsl ... creates translet, test.class - % xslt test.xml test ... runs translet on xml input diff --git a/stylebook/sources/xsltc/index.xml b/stylebook/sources/xsltc/index.xml deleted file mode 100644 index b38361395..000000000 --- a/stylebook/sources/xsltc/index.xml +++ /dev/null @@ -1,168 +0,0 @@ - - - - - - - - -

    The following user documentation is currently available:

    -
      -
    • Command-line compiler and - runtime man pages.
    • -
    • XSLTC Native API reference
    • -
    • XSLTC TrAX API reference
    • -
    • XSLTC Performance Hints
    • -
    -
    - - -

    The following design documents are currently available:

    -
      -
    • XSLTC overall design
    • -
    • XSLTC compiler design
    • -
    • XSLTC runtime library design
    • -
    • XSLTC internal DOM design
    • -
    • XSLTC TrAX implementation design
    • -
    - - - - - - -

    The figure below describes the overall design of XSLTC's compiler:

    -

    overall_design.gif

    -

    Figure 1: Architectural overview of XSLTC

    - -

    A client application can use XSLTC either through its - native API or through or - implementation of the TrAX API. The - compiler generates one or more Java classes - (we have chosen to call them 'translets'). - The runtime library contains classes that - can load these translets and use them to transform XML documents to some - markup language or plain text. There is also a detailed document describing - namespace handling in all parts of - XSLTC (compiler, internal DOM, and output handler).

    - -
    - - - - - -

    The figure below describes the overall design of XSLTC's compiler:

    -

    compiler_design.gif

    -

    Figure 2: Compiler architecture overview

    - -

    There is also a high-level design - document for XSLTC's compiler. Apart from that you can also find separate - design documents for some XSL elements and XPath expressions, patterns - and functions:

    - - -
      -
    • <xsl:sort>
    • -
    • <xsl:key>
    • -
    • <xsl:preserve-space>
    • -
    • <xsl:strip-space>
    • -
    • <xsl:comment>
    • -
    • <xsl:message>
    • -
    • <xsl:if>
    • -
    • <xsl:choose>
    • -
    • <xsl:variable>
    • -
    • <xsl:param>
    • -
    • <xsl:include>
    • -
    • <xsl:import>
    • -
    -
    - -
      -
    • key()
    • -
    • lang()
    • -
    • unparsed-entity-uri()
    • -
    -
    - -
      -
    • Predicates
    • -
    -
    - - -
      -
    • StepPattern
    • -
    • IdPattern
    • -
    • KeyPattern
    • -
    -
    -
    - - - - - -

    The runtime portion of XSLTC has four main components; the internal DOM - implementation (not W3C), the translet class(es), the runtime - library and the output processor:

    - -

    runtime_design.gif

    -

    Figure 3: Runtime library architecture overview

    - -

    The runtime library design document - describes the structure of the compiled translet as well as the translet - runtime library.

    - -

    The Internal DOM design document - describes the components and structure of the internal DOM, support for - DOM2 navigation, the DOM adapter, DOM multiplexer, and DOM builder.

    - -

    The iterator design document - describes the general design of the internal DOM iterators and describes - some of the more complicated iterators in detail.

    - -
    - - - - - -

    An implementation of the JAXP/ TrAX interface was added on to XSLTC - at a late stage. Special care was taken to preserve the small footprint - and high performance of XSLTC. The following design was used to wrap - XSLTC behind a lightweight (but complete) TrAX implementation:

    - -

    trax_translet_wrapping.gif

    -

    Figure 4: XSLTC TrAX interface implementation

    - -

    The TrAX design document contains - details of XSLTC's TrAX implementation.

    - -

    XSLTC also has a 'smart' TrAX TransformerFactory class - that will alternate between using XSLTC and Xalan for transformations. - This factory class will make its choices based on usage patterns. This will - be described in a separate design document.

    - -
    - -
    - -

    Design documents by Morten Jørgensen - updated 13.12.2001

    - -
    diff --git a/stylebook/sources/xsltc/xsl_choose_design.xml b/stylebook/sources/xsltc/xsl_choose_design.xml deleted file mode 100644 index 069fd4281..000000000 --- a/stylebook/sources/xsltc/xsl_choose_design.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - - -
      -
    • Functionality
    • -
    • Implementation
    • -
    -
    - - - - -

    The <xsl:choose> element is used to determine one - course of action based on a series of tests. Each test is done inside an - <xsl:when> element. If a test succeeds, the body of the - <xsl:when> element is executed. If no tests fail then - a <xsl:otherwise> element can be used to specify a - default action:

    - - - <xsl:choose> - <xsl:when test="element-available('some-extension')"> - ... - </xsl:when> - <xsl:when test="function-availabe('saxon:nodeset')"> - ... - </xsl:when> - <xsl:otherwise> - ... - </xsl:otherwise> - </xsl:choose> - -
    - - - - -

    The Choose class places all When child-nodes - in a vector. The Choose class translates the "test"-attribute - of all When nodes (in strict order) and chains them together - in an if-else style. The expression that holds each test contains a true- - and a false-list. These lists are vectors of branch targets that should be - used if the test succeeds or fails, respectively. The first test's - false-list is pointed to the start of the next test (ie. if the first test - fails, then we run the next test). The last test's false-list points directly - to the code for the body of the <xsl:otherwise> element. -

    - -

    Just as with the <xsl:if>-element, special care is - taken for the element-available() and - function-available() functions. These functions are evaluated at - compile-time (this can be done since all parameters for these functions are - literals) and the body of a <xsl:when> element is not - compiled if we know that it will never be needed at runtime.

    - -
    - -
    diff --git a/stylebook/sources/xsltc/xsl_comment_design.xml b/stylebook/sources/xsltc/xsl_comment_design.xml deleted file mode 100644 index 205bb8675..000000000 --- a/stylebook/sources/xsltc/xsl_comment_design.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - -
      -
    • Functionality
    • -
    • Implementation
    • -
    - - - -

    The <xsl:comment> element is used to insert XML comments - into the result document. The comment is inserted as follows in the XSL - stylesheet:

    - - <element> - <xsl:comment>This is a comment!</xsl:comment> - </element> - -

    and it will be output in the result document as follows:

    - - <element> - <!-- This is a comment! --> - </element> - -

    The <xsl:message> element is used to send messages to - who/whatever is performing the transformation. The message can be displayed - in a terminal, a dialog box, etc. The <xsl:message> element - is used in the same way as the <xsl:comment> element, - however the message is not output in the result document.

    - -

    The <xsl:message> element has an attribute - "terminate" which can be used to terminate the transformation at any - given stage. This is useful when using message to give information about - illegal values in the input document.

    -
    - - -

    The output handler class has a method for outputting comments in the - output document and messages to the operator. The code compiled for a - comment gathers all text that goes into the comment in a StringValueHandler - object, retrieves the full text string from this handler, and then finally - sends it to the output handler. Similarly the code compiled for a message - will simply send the message to the output handler in use.

    - -

    Messages will be output to the terminal (stdout) when a transformation - is run in a terminal. The message will be output before the beginning of the - output document. Messages will be shown in a dialog box if a transformation - is run in an applet.

    - -

    <xsl:message> elements that use the "terminate" - attribute to abort transformations cause an exception to be thrown. A - RuntimeException is used for this, and the exception text is:

    -

    Termination forced by an xsl:message instruction

    -
    -
    diff --git a/stylebook/sources/xsltc/xsl_if_design.xml b/stylebook/sources/xsltc/xsl_if_design.xml deleted file mode 100644 index c183f3ef9..000000000 --- a/stylebook/sources/xsltc/xsl_if_design.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - -
      -
    • Functionality
    • -
    • Implementation
    • -
    -
    - - - - -

    This element is cruical to XSL processing, but still very simple both in - its use and implementation. The element is used like this:

    - <xsl:if test="contains($the-world,'Elvis')"> - <xsl:message>Elvis is still alive!</xsl:message> - </xsl:if> - -

    The element's contents will only be executed if the test succeeds. There - is no <xsl:else> element. One has to use either several - <xsl:if>-elements or use a choose-element.

    - -
    - - - - -

    The basic implementation is very simple:

    -
      -
    • execute the expression from the 'test'-attribute
    • -
    • evaluate the resulting boolean value
    • -
    • ignore the element contents if the value is 'false'
    • -
    • otherwise execute the element contents
    • -
    - -

    There is onle type of function call that makes this a bit more complicated. - The function-available() and element-available() - function calls can be used to test for extension elements and functions. A - very common use for these is to encapsulate all references to extension - elements inside an <xsl:if> element and test for the - existance of this element before attempting to use it. XSLTC has to support - this. Otherwise we may risk either outputting erronuous error or warning - messages about acessing non-existing elements, or even worse, compiling in - calls to non-existing methods in the translet, causing the JVM's verifier to - prevent the translet from being loaded.

    - -

    The function-available() and element-available() - functions have been updated to perform an evaluation at compile-time, so that - the If class can know wether to compile in calls to extensions or - not. This is possible because both functions take only literal expressions as - parameters. See the getResult() methods of the - FunctionAvailableCall and ElementAvailableCall - classes for details.

    - -
    - -
    diff --git a/stylebook/sources/xsltc/xsl_include_design.xml b/stylebook/sources/xsltc/xsl_include_design.xml deleted file mode 100644 index 2573133a8..000000000 --- a/stylebook/sources/xsltc/xsl_include_design.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - - - - -
      -
    • Functionality
    • -
    • Implementation
    • -
    -
    - - - - -

    <xsl:include> allows you to include one stylesheet - into another. The included stylesheet's templates will have the same - default priorities and import precedence as the including stylesheet. - <xsl:import> offers the same, but the import precedence - of elements in an imported stylesheet is always less than that of - the importing stylesheet.

    - -
    - - - - - - - -

    This is the simplest case, so we will look at that first. The algorithm - for including another stylesheet is roughly:

    - -
      -
    • get the including stylesheet from the XSLT parser
    • -
    • get the value of the "href" attribute from the - <xsl:include> element and check for circular - includes/imports
    • -
    • check if there is a defined SourceLoader set either - through the native or the TrAX API
    • -
    • get an InputSource for the document to include, either - from the SourceLoader or from the document's URI
    • -
    • parse the input document using the compiler's XSLT parser
    • -
    • set the import precedence of the included stylesheet to the same as - the import precedence of the including stylesheet
    • -
    • get the top-level stylesheet from the XSLT parser
    • -
    • move all variables, parameters, and top-level elements (include - templates) from the included stylesheet to the top-level stylesheet - (all elements will keep their import precedence even after being moved - to the top-level stylesheet)
    • -
    - -
    - - - - -

    This is very similar to <xsl:include>, but import - precedence has to be handled differently. Looking at the code you'll find - this fragment:

    - // Handle precedence for the including stylesheet - final int currPrecedence = parser.getCurrentImportPrecedence(); - final int nextPrecedence = parser.getNextImportPrecedence(); - _imported.setImportPrecedence(currPrecedence); - context.setImportPrecedence(nextPrecedence); - -

    The important thing here is that the imported stylesheet has import - precedence less than the importing stylesheet. So the imported - stylesheet gets the current import precedence, while the current stylesheet - gets the next available (unused) import precedence. The - Stylesheet class has a method - setImportPrecedence() that ensures that the import precedence - is set not only for the stylesheet itself, but that it is also propagated - down to any included/imported stylesheets:

    - public void setImportPrecedence(final int precedence) { - // Set import precedence for this stylesheet - _importPrecedence = precedence; - - // Set import precedence for all included stylesheets - final Enumeration elements = elements(); - while (elements.hasMoreElements()) { - SyntaxTreeNode child = (SyntaxTreeNode)elements.nextElement(); - if (child instanceof Include) { - Stylesheet included = ((Include)child).getIncludedStylesheet(); - if (included != null) included.setImportPrecedence(precedence); - } - } - - // Set import precedence for the stylesheet that imported this one - if (_importedFrom != null) { - if (_importedFrom.getImportPrecedence() < precedence) { - final Parser parser = getParser(); - final int nextPrecedence = parser.getNextImportPrecedence(); - _importedFrom.setImportPrecedence(nextPrecedence); - } - } - // Set import precedence for the stylesheet that included this one - else if (_includedFrom != null) { - if (_includedFrom.getImportPrecedence() != precedence) - _includedFrom.setImportPrecedence(precedence); - } - } - -

    This method has been carefully cluttered together, and it works, and it - should not be touched.

    - -
    - - - - - - -
    - -
    diff --git a/stylebook/sources/xsltc/xsl_lang_design.xml b/stylebook/sources/xsltc/xsl_lang_design.xml deleted file mode 100644 index 56e2c57d0..000000000 --- a/stylebook/sources/xsltc/xsl_lang_design.xml +++ /dev/null @@ -1,77 +0,0 @@ - - - - - - -
      -
    • Functionality
    • -
    • Implementation
    • -
    - - - -

    The xml:lang can be used to determine the language for a node or - a node-set. The attribute can be used to store language-specific data in an - XML document:

    - - - <phrases> - <greeting xml:lang="en">Hello!</greeting> - <greeting xml:lang="no">Hei!</greeting> - <greeting xml:lang="fr">Salut!</greeting> - <greeting xml:lang="es">Hola!</greeting> - <greeting xml:lang="de">Sweinhund!</greeting> - </phrases> - - -

    The XSL stylesheet can use the lang() function to select the - element with the desired language:

    - - - <xsl:template match="greeting"> - <xsl:if test="lang("de")> - <xsl:value-of select="."/> - <xsl:text> Grossglucklicher wunche!</xsl:text> - </xsl:if> - </xsl:template> - -
    - - -

    The DOM interface has been given a method that returns the language for - a given node. The language is returned as a string (on whatever format is - used in the XML document - should be iso), and may be null if no language is - defined.

    - - - public String DOM.getLanguage(int node); - - -

    The BasisLibrary class has a static method that will compare the language - of the context node with some other language and return the result as a - boolean.

    - - - public static boolean BasisLibrary.testLanguage(String language, DOM dom, int node); - - -

    The compiled code for the lang() method calls this method in the - BasisLibrary and leaves the result on the stack for the calling element.

    -
    -
    diff --git a/stylebook/sources/xsltc/xsl_unparsed_design.xml b/stylebook/sources/xsltc/xsl_unparsed_design.xml deleted file mode 100644 index 3524e270f..000000000 --- a/stylebook/sources/xsltc/xsl_unparsed_design.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - - - -
      -
    • Functionality
    • -
    • Implementation
    • -
    - - - - - -

    The unparsed-entity-uri() function gives access to declarations - of unparsed entities in the DTD of the source document. If the DTD contains - the declaration:

    - - - <!ENTITY mom-picture SYSTEM "http://www.home.com/mom.jpg" NDATA JPEG> - - -

    the expression unparsed-entity-uri('mom-picture') returns an - URI for the file mom.jpg.

    - -
    - - -

    Unparsed entities must be gathered from the XML input document at the time - when the DOM is built. To achieve this our parser must parse the document DTD - (if any) and store all data of type NDATA (not XML data) in a - hashtable in the AbstractTranslet object. All the compiled code for this - function needs to do is call a method in the translet for retrieving the - value for the requested element:

    - - - public String AbstractTranslet.getUnparsedEntity(String entityName); - - -

    The translet will use the supplied entityName to look up the - value in the hashtable and then leave the string value on the stack for the - element that called lang().

    -
    -
    diff --git a/stylebook/sources/xsltc/xsltc_overview.xml b/stylebook/sources/xsltc/xsltc_overview.xml deleted file mode 100644 index 9119a87b1..000000000 --- a/stylebook/sources/xsltc/xsltc_overview.xml +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - diff --git a/stylebook/sources/xsltc/xsltc_performance.xml b/stylebook/sources/xsltc/xsltc_performance.xml deleted file mode 100644 index f471c146b..000000000 --- a/stylebook/sources/xsltc/xsltc_performance.xml +++ /dev/null @@ -1,268 +0,0 @@ - - - - - - - - - -

    XSLT is not a programming language! Just so you remember. - XSLT is a declarative language and can be used by you to describe - what you want put in your output document and - what you want this output to look like. It does not describe - how these tasks should be carried. That is the job of the XSLT - processor. This document is not a "programmer's guide to XSLT" - and should not be considered as such. All XSLT processors have their - properties and ways of handling XSL elements and XPath properties. This - document will give you some insight into the XSLTC internals, so that you - can channel your stylesheets through XSLTC's shortest and most efficient - code paths.

    - -

    XSLTC's performance has always been one of its key selling points. - (I should probably find a better term here, since we're giving XSLTC away - for free.) But, there are some specific patterns and expressions that are - not handled much better than with other interpretive XSLT processors, and - this document is an attempt to pinpoint these and to outline alternatives. -

    - -
    - - -
      -
    • Avoid using predicates in '*' patterns
    • -
    • Avoid using id/key-patterns
    • -
    • Avoid union expressions where possible
    • -
    • Sort stored node-sets once
    • -
    • Cache input documents
    • -
    • TrAX vs. native API
    • -
    -
    - - - - -

    XSLTC gains its speed from the simple dispatch loop in the translet's - applyTemplates() method. This method uses a simple - switch() statement to choose the desired template based on - the current node's node type (an integer). By adding a pattern with a - wildcard (no type) and a predicate, XSLTC is forced to evaluate the - predicate for every single node.

    - <xsl:template match="*[2]"> - -

    The above pattern should be avoided by selecting the desired node when - using <xsl:apply-templates>. Use named templates or - modes to make sure you trigger the correct template:

    - <xsl:template match="/"> - <xsl:apply-templates select="bar"/> - </xsl:template> - - <xsl:template match="*[2]"/> - - <xsl:template match="*"/> - -

    can be replaced by:

    - <xsl:template match="/"> - <xsl:apply-templates select="bar"/> - <xsl:apply-templates select="bar[2]" mode="second"/> - </xsl:template> - - <xsl:template match="*" mode="second"/> - - <xsl:template match="*"/> - -

    This change will only improve performance if the stylesheet is fairly - large and has a good few templates (10 or more). Also note that the order - of the output is changed by this approach, so if the order is significant - you'll have to stick to the original stylesheet.

    - -

    Important note: The type of pattern referred to as a - type-less pattern, as it does not match any specific node type. Such - patterns do in general degrade the performance of XSLTC. Type-less patterns - must be evaluated for every single node in the input document - causing a - general performance degradation.

    - -
    - - - - -

    Id and key patterns can be used to trigger a template if the current - node has a specific id or has a specific value in a key's index:

    - <xsl:template match="id('some-value')"/> - - <xsl:template match="key('key-name', 'some-value')"/> - -

    Looking up a value/node-pair in an index does not require much processing - time at all. But, this is also a type-less pattern and can match any type - of node. This degrades XSLTC's performance, just like wildcard patterns - with predicates (see above paragraph).

    - -
    - - - - -

    Union expressions provide an all-in-one-go easy way of applying templates - to sets of nodes:

    - <xsl:apply-templates select="foo|bar|baz"/> - -

    The union iterator that is used to implement union expressions is - unfortunately not very efficient. If node order is not of importance, then - one can benefit from breaking the union up in several elements:

    - <xsl:apply-templates select="foo"/> - <xsl:apply-templates select="bar"/> - <xsl:apply-templates select="baz"/> - -

    But, remeber that this will give you all <foo> - elements first, then all <bar> elements, and so on. - This is not always desirable. You may want to handle these elements in - the order in which they appear in the input document.

    - -

    Important note: This does not apply to union patterns. - Using unions in patterns actually makes smaller and more efficient code, - as only one copy of the templete body has to be compiled. Use:

    - <xsl:template match="foo|bar|baz"/> - -

    instead of:

    - <xsl:template match="foo"/> - <xsl:template match="bar"/> - <xsl:template match="baz"/> - -
    - - - - -

    This item is very obvious, but nevertheless easy to forget in some - complicated cases. If you put a result-tree fragment inside a variable, and - you want the nodes in a specific, sorted order, then sort the nodes as you - create the variable and not when you use it. Instead of:

    - - <xsl:variable name="bars"> - <xsl:copy-of select="//foo/bar"/> - </xsl:variable> - - <xsl:template match="/"> - <xsl:text>List of bar's in sorted order:&#xa;</xsl:text> - <xsl:for-each select="$bars-sorted"> - <xsl:value-of select="@name"/> - <xsl:text>&#xa;</xsl:text> - </xsl:for-each> - </xsl:template> - -

    A better way, and with most XSLT processors the only legal way, is to - sort the result tree when creating it:

    - - <xsl:variable name="bars"> - <xsl:for-each select="//foo/bar"> - <xsl:sort select="@name"/> - <xsl:copy-of select="."/> - </xsl:for-each> - </xsl:variable> - - <xsl:template match="/"> - <xsl:text>List of bar's in sorted order:&#xa;</xsl:text> - <xsl:for-each select="$bars"> - <xsl:value-of select="@name"/> - <xsl:text>&#xa;</xsl:text> - </xsl:for-each> - </xsl:template> - -

    It is very common to sort node-sets returned by the id() and key() - functions. Instead of doing this sorting over and over again, one should - use a variable and store the node set in the desired sort order, and read - the node set from the variable whenever used.

    - -
    - - - - -

    All XSLT processors use an internal DOM-like structure, and XSLTC is no - exception. The internal DOM is tailored for the XSLTC design and can be - navigated efficiently by the translet. Building the internal DOM is a - rather slow process, and does very many cases take more time than the - actual transformation. This is a general rule, and does not only apply to - XSLTC. It is advisable, and common in most large-scale XSLT-based - applications, to create a cache for the input documents. Not only does this - prevent CPU- and memory-intensive DOM creation, but it also prevents several - translets from having their own private copies of common input documents. - Both XSLTC's internal API and TrAX implementation provide ways of - implementing a decent input document cache:

    - -
      -
    • See below for a description of how - to do this using the TrAX interface.
    • - -
    • The native API - documentation contains a section on using the internal - org.apache.xalan.xsltc.compiler.SourceLoader interface.
    • -
    -
    - - - - - - -

    If XSLTC's two-step approach to XSLT processing suits your application - then there is no reason why you should not use the TrAX API. The API fits - very nicely in with XSLTC internals and processing model. In fact, you may - even benefit from using TrAX in cases where your stylesheet is compiled - into a large ammount of auxiliary classes. The most obvious benefit is that - the translet class and auxiliary classes are all bundled inside the - Templates object. Performance can also be improved due to the - fact that XSLTC chaches all auxiliary classes inside Templates - code, preventing the class loader from being invoked more than necessary. - This is just theory and no tests have been done, but you should see a - performance improvement when using XSLTC and TrAX in such cases.

    - -
    - - - -

    When using TrAX, the Templates object should be considered - the result of a compilation. With XSLTC this is the actual case - the - Templates object contains the translet Java class(es). With - other XSLT processors the Templates directly or indirectly - contains data-structures represent all or parts of the input stylesheet. - The bottom line is: Create your Templates object once, cache - and re-use it as often as possible.

    - -
    - - - - -

    An extension to the TrAX API allows input documents to be cached. The - extensions is a sub-class to the TrAX Source class, which can - be used to wrap XSLTC's internal DOM structures. This is described in - detail in the XSLTC TrAX API reference. -

    - -

    If you do chose to implement a DOM cache, you should have your cache - implement the javax.xml.transform.URIResolver interface so - that documents loaded by the document() function are also read - from your cache.

    - -
    - -
    - -
    diff --git a/stylebook/sources/xsltc/xsltc_trax_api.xml b/stylebook/sources/xsltc/xsltc_trax_api.xml deleted file mode 100644 index 43f33ab8d..000000000 --- a/stylebook/sources/xsltc/xsltc_trax_api.xml +++ /dev/null @@ -1,65 +0,0 @@ - - - - - - - - - -

    XSLTC is 100% compliant with the TrAX poriton of the - JAXP API. This - API is a standard extension to Java and there is not much point in describing - it in detail in this document.

    - -
    - - - -

    The Source and Result classes within TrAX are - used to handle input and output documents. These classes can be extended to - encapsulate additional input types. XSLTC's TrAX implementation contains an - extension to the Source class:

    - org.apache.xalan.xsltc.trax.XSLTCSource - -

    This extension class can be used to build XSLTC's internal - DOM and cache it for later usage. The following sample shows how to - use it with a Transformer:

    - public void run(String xmlfile, String xslfile) { - - // Create an XSLTCSource for the input XML document - XSLTCSource source = new XSLTCSource(xmlfile); - - // Build a StreamSource for the stylesheet - StreamSource stylesheet = new StreamSource(xslfile); - - // Create a Transformer instance and process the input - Transformer transformer = factory.newTransformer(stylesheet); - transformer.transform(source, new StreamResult(System.out)); - : - : - } - -

    If you do chose to implement a DOM cache, you should have your cache - implement the javax.xml.transform.URIResolver interface so - that documents loaded by the document() function are also read - from your cache.

    - -
    - -
    diff --git a/stylebook/style/dtd/blocks.ent b/stylebook/style/dtd/blocks.ent deleted file mode 100644 index 5f352d1bf..000000000 --- a/stylebook/style/dtd/blocks.ent +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - -%markupEntity; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/dtd/book.dtd b/stylebook/style/dtd/book.dtd deleted file mode 100644 index 2f49ce990..000000000 --- a/stylebook/style/dtd/book.dtd +++ /dev/null @@ -1,49 +0,0 @@ - - - - - - -%externalEntity; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/dtd/changes.dtd b/stylebook/style/dtd/changes.dtd deleted file mode 100644 index 661affa86..000000000 --- a/stylebook/style/dtd/changes.dtd +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - -%markupEntity; - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/dtd/characters.ent b/stylebook/style/dtd/characters.ent deleted file mode 100644 index 036c06d5e..000000000 --- a/stylebook/style/dtd/characters.ent +++ /dev/null @@ -1,297 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/style/dtd/document.dtd b/stylebook/style/dtd/document.dtd deleted file mode 100644 index f7cf5b121..000000000 --- a/stylebook/style/dtd/document.dtd +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - -%blocksEntity; - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/dtd/faqs.dtd b/stylebook/style/dtd/faqs.dtd deleted file mode 100644 index 565d99f4b..000000000 --- a/stylebook/style/dtd/faqs.dtd +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - -%blocksEntity; - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/dtd/links.ent b/stylebook/style/dtd/links.ent deleted file mode 100644 index 63b002fff..000000000 --- a/stylebook/style/dtd/links.ent +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/dtd/markup.ent b/stylebook/style/dtd/markup.ent deleted file mode 100644 index 66319e5f7..000000000 --- a/stylebook/style/dtd/markup.ent +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - -%externalEntity; - - -%charEntity; - - -%linksEntity; - - - - - - - \ No newline at end of file diff --git a/stylebook/style/dtd/spec.dtd b/stylebook/style/dtd/spec.dtd deleted file mode 100644 index 260c80fc5..000000000 --- a/stylebook/style/dtd/spec.dtd +++ /dev/null @@ -1,593 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/style/dtd/xsl-html40s.dtd b/stylebook/style/dtd/xsl-html40s.dtd deleted file mode 100644 index 611f56e0f..000000000 --- a/stylebook/style/dtd/xsl-html40s.dtd +++ /dev/null @@ -1,1520 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]]> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/stylebook/style/graphics/button-a.gif b/stylebook/style/graphics/button-a.gif deleted file mode 100644 index 5d0b8c242..000000000 Binary files a/stylebook/style/graphics/button-a.gif and /dev/null differ diff --git a/stylebook/style/graphics/button-b.gif b/stylebook/style/graphics/button-b.gif deleted file mode 100644 index 06e03811a..000000000 Binary files a/stylebook/style/graphics/button-b.gif and /dev/null differ diff --git a/stylebook/style/loader.xml b/stylebook/style/loader.xml deleted file mode 100644 index a416d8426..000000000 --- a/stylebook/style/loader.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/stylebook/style/loaderdesign.xml b/stylebook/style/loaderdesign.xml deleted file mode 100644 index 975055b39..000000000 --- a/stylebook/style/loaderdesign.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/stylebook/style/resources/bottom.gif b/stylebook/style/resources/bottom.gif deleted file mode 100644 index f39031efa..000000000 Binary files a/stylebook/style/resources/bottom.gif and /dev/null differ diff --git a/stylebook/style/resources/button-asf-hi.gif b/stylebook/style/resources/button-asf-hi.gif deleted file mode 100644 index 08b880a74..000000000 Binary files a/stylebook/style/resources/button-asf-hi.gif and /dev/null differ diff --git a/stylebook/style/resources/button-asf-lo.gif b/stylebook/style/resources/button-asf-lo.gif deleted file mode 100644 index 134580f37..000000000 Binary files a/stylebook/style/resources/button-asf-lo.gif and /dev/null differ diff --git a/stylebook/style/resources/button-w3c-hi.gif b/stylebook/style/resources/button-w3c-hi.gif deleted file mode 100644 index 3bf0be395..000000000 Binary files a/stylebook/style/resources/button-w3c-hi.gif and /dev/null differ diff --git a/stylebook/style/resources/button-w3c-lo.gif b/stylebook/style/resources/button-w3c-lo.gif deleted file mode 100644 index d383d3dd9..000000000 Binary files a/stylebook/style/resources/button-w3c-lo.gif and /dev/null differ diff --git a/stylebook/style/resources/button-xml-hi.gif b/stylebook/style/resources/button-xml-hi.gif deleted file mode 100644 index 01d095ce4..000000000 Binary files a/stylebook/style/resources/button-xml-hi.gif and /dev/null differ diff --git a/stylebook/style/resources/button-xml-lo.gif b/stylebook/style/resources/button-xml-lo.gif deleted file mode 100644 index 5719c7ef0..000000000 Binary files a/stylebook/style/resources/button-xml-lo.gif and /dev/null differ diff --git a/stylebook/style/resources/close.gif b/stylebook/style/resources/close.gif deleted file mode 100644 index 48a9782ce..000000000 Binary files a/stylebook/style/resources/close.gif and /dev/null differ diff --git a/stylebook/style/resources/dot.gif b/stylebook/style/resources/dot.gif deleted file mode 100644 index 6227d1d86..000000000 Binary files a/stylebook/style/resources/dot.gif and /dev/null differ diff --git a/stylebook/style/resources/join.gif b/stylebook/style/resources/join.gif deleted file mode 100644 index 02e7611bb..000000000 Binary files a/stylebook/style/resources/join.gif and /dev/null differ diff --git a/stylebook/style/resources/line.gif b/stylebook/style/resources/line.gif deleted file mode 100644 index fd25c3943..000000000 Binary files a/stylebook/style/resources/line.gif and /dev/null differ diff --git a/stylebook/style/resources/logo.gif b/stylebook/style/resources/logo.gif deleted file mode 100644 index 53538c3f6..000000000 Binary files a/stylebook/style/resources/logo.gif and /dev/null differ diff --git a/stylebook/style/resources/right.gif b/stylebook/style/resources/right.gif deleted file mode 100644 index bcb50e386..000000000 Binary files a/stylebook/style/resources/right.gif and /dev/null differ diff --git a/stylebook/style/resources/script.js b/stylebook/style/resources/script.js deleted file mode 100644 index ebadeb2b8..000000000 --- a/stylebook/style/resources/script.js +++ /dev/null @@ -1,21 +0,0 @@ -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 deleted file mode 100644 index e7749432f..000000000 Binary files a/stylebook/style/resources/separator.gif and /dev/null differ diff --git a/stylebook/style/resources/void.gif b/stylebook/style/resources/void.gif deleted file mode 100644 index 75b945d25..000000000 Binary files a/stylebook/style/resources/void.gif and /dev/null differ diff --git a/stylebook/style/stylesheets/any2header.xsl b/stylebook/style/stylesheets/any2header.xsl deleted file mode 100644 index 0c6210050..000000000 --- a/stylebook/style/stylesheets/any2header.xsl +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/stylesheets/any2project.xsl b/stylebook/style/stylesheets/any2project.xsl deleted file mode 100644 index 191961fd5..000000000 --- a/stylebook/style/stylesheets/any2project.xsl +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/stylesheets/book2group.xsl b/stylebook/style/stylesheets/book2group.xsl deleted file mode 100644 index 3c3cc125f..000000000 --- a/stylebook/style/stylesheets/book2group.xsl +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/stylesheets/book2project.xsl b/stylebook/style/stylesheets/book2project.xsl deleted file mode 100644 index f9b306383..000000000 --- a/stylebook/style/stylesheets/book2project.xsl +++ /dev/null @@ -1,257 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/stylesheets/changes2document.xsl b/stylebook/style/stylesheets/changes2document.xsl deleted file mode 100644 index c0fd6ba09..000000000 --- a/stylebook/style/stylesheets/changes2document.xsl +++ /dev/null @@ -1,43 +0,0 @@ - - - - - - - - - - - - - - - - -
    -
    -
    - - - -
    -
    -
    - - - -
    -
    -
    - - -
  • -
    - - - - - - - -
    \ No newline at end of file diff --git a/stylebook/style/stylesheets/context2footer.xsl b/stylebook/style/stylesheets/context2footer.xsl deleted file mode 100644 index 16887a72f..000000000 --- a/stylebook/style/stylesheets/context2footer.xsl +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/stylesheets/context2label.xsl b/stylebook/style/stylesheets/context2label.xsl deleted file mode 100644 index 4970f3a35..000000000 --- a/stylebook/style/stylesheets/context2label.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/stylesheets/design2project.xsl b/stylebook/style/stylesheets/design2project.xsl deleted file mode 100644 index 63a486892..000000000 --- a/stylebook/style/stylesheets/design2project.xsl +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/stylesheets/designdoc2html.xsl b/stylebook/style/stylesheets/designdoc2html.xsl deleted file mode 100644 index b27d6f4c6..000000000 --- a/stylebook/style/stylesheets/designdoc2html.xsl +++ /dev/null @@ -1,274 +0,0 @@ - - - - - - - - - - - - - - - - - - <xsl:value-of select="@title"/> - - - -

    {@alt}   -


    - -
    - - Copyright © - - - -
    - - - -

    - -
    - - -

    - -
    - - -

    - -
    - - - - - -

    -
    - - - - - - - -
    - Note - - - - - - -
    -
    - - - - - - - - - - - - - - -
    -
    - - -
    -
    - - -
  • -
    - - - -
    -
    - - - - - -
    -
    - -
    - -
    -
    - - -

    -
    - - -
    - - - - - -
    -
    - - - -
    -
    -
    -
    -
    - - - - - - - - - - - - - -
    -
    - - - - - - - - -   - - - - - - - -   - - - - - - -   - - - - - - - - - - - -
    -
    - - - - - - -
    -
    - - - - - - - - - - - - - - - - - - - - - - - - - - anchor - - - - - - - -
    {@alt}
    -
    - - - - - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/stylebook/style/stylesheets/directory2project.xsl b/stylebook/style/stylesheets/directory2project.xsl deleted file mode 100644 index 99427886e..000000000 --- a/stylebook/style/stylesheets/directory2project.xsl +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/stylebook/style/stylesheets/document2html.xsl b/stylebook/style/stylesheets/document2html.xsl deleted file mode 100644 index 15b2f5ad9..000000000 --- a/stylebook/style/stylesheets/document2html.xsl +++ /dev/null @@ -1,445 +0,0 @@ - - - - - - - - - - - - - - - - - -
    -

     Transform XML Document

    - - - - - - - - - - - - -
    Document to transformDisplay output as
    - - - HTML   - HTML Source -      - -
    -
    - - - - - - - diff --git a/xalansamples/src/main/java/samples/AppletXMLtoHTML/foo-s1.xml b/xalansamples/src/main/java/samples/AppletXMLtoHTML/foo-s1.xml deleted file mode 100644 index e8ce0339e..000000000 --- a/xalansamples/src/main/java/samples/AppletXMLtoHTML/foo-s1.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - -

    Hello

    -
    -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/AppletXMLtoHTML/lts3611beac.jpg b/xalansamples/src/main/java/samples/AppletXMLtoHTML/lts3611beac.jpg deleted file mode 100644 index c249149b2..000000000 --- a/xalansamples/src/main/java/samples/AppletXMLtoHTML/lts3611beac.jpg +++ /dev/null @@ -1 +0,0 @@ -OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/AppletXMLtoHTML/rabbitwhorn.jpg b/xalansamples/src/main/java/samples/AppletXMLtoHTML/rabbitwhorn.jpg deleted file mode 100644 index 4544a3830..000000000 Binary files a/xalansamples/src/main/java/samples/AppletXMLtoHTML/rabbitwhorn.jpg and /dev/null differ diff --git a/xalansamples/src/main/java/samples/AppletXMLtoHTML/s1ToHTML.xsl b/xalansamples/src/main/java/samples/AppletXMLtoHTML/s1ToHTML.xsl deleted file mode 100644 index ea1b2b91a..000000000 --- a/xalansamples/src/main/java/samples/AppletXMLtoHTML/s1ToHTML.xsl +++ /dev/null @@ -1,159 +0,0 @@ - - - - - - - - - - - - - - <xsl:value-of select="@title"/> - - - - - - - - - - - -
    - - - -
    - -
    -
    - - -

    -
    - - - - - - - - -
      - NOTE: -  
    -
    - - -
    -
    - - -
    -
    - - -
    -
    - - - - - - -
    -
    - - -
    - -
    -
    - - -

    -
    - - - - - - - - -
     
     
    -
    - - -
  • -
    - - - - - - - - - - - - -   - - - -   - - - - - - - - - - - - - - - -
    -
    - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/AppletXMLtoHTML/target.html b/xalansamples/src/main/java/samples/AppletXMLtoHTML/target.html deleted file mode 100644 index f3caa0617..000000000 --- a/xalansamples/src/main/java/samples/AppletXMLtoHTML/target.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - Untitled - -   - diff --git a/xalansamples/src/main/java/samples/AppletXMLtoHTML/trax.xml b/xalansamples/src/main/java/samples/AppletXMLtoHTML/trax.xml deleted file mode 100644 index 8fa92c5ed..000000000 --- a/xalansamples/src/main/java/samples/AppletXMLtoHTML/trax.xml +++ /dev/null @@ -1,260 +0,0 @@ - - - - Transformation API For XML (TrAX) - - November 12, 2000 - Scott - Boag - IBM Research -
    - Scott_Boag@us.ibm.com -
    -
    - - Introduction - This overview describes the set of APIs contained in - javax.xml.transform, javax.xml.transform.stream, javax.xml.transform.dom, and javax.xml.transform.sax. For the sake of brevity, these interfaces are referred to - as TrAX (Transformation API for XML). - There is a broad need for Java applications to be able to transform XML - and related tree-shaped data structures. In fact, XML is not normally very - useful to an application without going through some sort of transformation, - unless the semantic structure is used directly as data. Almost all XML-related - applications need to perform transformations. Transformations may be described - by Java code, Perl code, XSLT - Stylesheets, other types of script, or by proprietary formats. The inputs, one - or multiple, to a transformation, may be a URL, XML stream, a DOM tree, SAX - Events, or a proprietary format or data structure. The output types are the - pretty much the same types as the inputs, but different inputs may need to be - combined with different outputs. - The great challenge of a transformation API is how to deal with all the - possible combinations of inputs and outputs, without becoming specialized for - any of the given types. - The Java community will greatly benefit from a common API that will - allow them to understand and apply a single model, write to consistent - interfaces, and apply the transformations polymorphically. TrAX attempts to - define a model that is clean and generic, yet fills general application - requirements across a wide variety of uses. - - General Terminology - This section will explain some general terminology used in this - document. Technical terminology will be explained in the Model section. In many - cases, the general terminology overlaps with the technical terminology. - - - Tree - This term, 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. - - - Source Tree(s) - One or more trees that are the inputs to the - transformation. - - - Result Tree(s) - One or more trees that are the output of the - transformation. - - - Transformation - The process of consuming a stream or tree to produce - another stream or tree. - - - Identity (or Copy) Transformation - The process of transformation from a source to a result, - making as few structural changes as possible and no informational changes. The - term is somewhat loosely used, as the process is really a copy. from one - "format" (such as a DOM tree, stream, or set of SAX events) to - another. - - - Serialization - The process of taking a tree and turning it into a stream. In - some sense, a serialization is a specialized transformation. - - - Parsing - The process of taking a stream and turning it into a tree. In - some sense, parsing is a specialized transformation. - - - Transformer - A Transformer is the object that executes the transformation. - - - - Transformation instructions - Describes the transformation. A form of code, script, or - simply a declaration or series of declarations. - - - Stylesheet - The same as "transformation instructions," except it is - likely to be used in conjunction with XSLT. - - - Templates - Another form of "transformation instructions." In the TrAX - interface, this term is used to describe processed or compiled transformation - instructions. The Source flows through a Templates object to be formed into the - Result. - - - Processor - A general term for the thing that may both process the - transformation instructions, and perform the transformation. - - - DOM - Document Object Model, specifically referring to the - Document Object Model - (DOM) Level 2 Specification. - - - SAX - Simple API for XML, specifically referring to the - SAX 2.0 - release. - - - - - Requirements - The following requirements have been determined from broad experience - with XML projects from the various members participating on the JCP. - - TrAX must provide a clean, simple - interface for simple uses. - TrAX must be powerful enough to be - applied to a wide range of uses, such as, e-commerce, content management, - server content delivery, and client applications. - A processor that implements a TrAX - interface must be optimizeable. Performance is a critical issue for most - transformation use cases. - As a specialization of the above - requirement, a TrAX processor must be able to support a compiled model, so that - a single set of transformation instructions can be compiled, optimized, and - applied to a large set of input sources. - TrAX must not be dependent an any - given type of transformation instructions. For instance, it must remain - independent of XSLT. - TrAX must be able to allow processors - to transform DOM trees. - TrAX must be able to allow processors to - produce DOM trees. - TrAX must allow processors to transform - SAX events. - TrAX must allow processors to produce SAX - events. - TrAX must allow processors to - transform streams of XML. - TrAX must allow processors to produce - XML, HTML, and other types of streams. - TrAX must allow processors to - implement the various combinations of inputs and outputs within a single - processor. - TrAX must allow processors - to implement only a limited set of inputs. For instance, it should be possible - to write a processor that implements the TrAX interfaces and that only - processes DOM trees, not streams or SAX events. - TrAX should allow a - processor to implement transformations of proprietary data structures. For - instance, it should be possible to implement a processor that provides TrAX - interfaces that performs transformation of JDOM trees. - TrAX must allow the setting - of serialization properties, without constraint as to what the details of those - properties are. - TrAX must allow the setting - of parameters to the transformation instructions. - TrAX must support the - setting of parameters and properties as XML Namespaced items (i.e., qualified - names). - TrAX must support URL - resolution from within the transformation, and have it return the needed data - structure. - TrAX must have a mechanism for - reporting errors and warnings to the calling application. - - - Model - The section defines the abstract model for TrAX, apart from the details - of the interfaces. - A TRaX TransformerFactory is an object - that processes transformation instructions, and produces - Templates (in the technical - terminology). A Templates - object provides a Transformer, which transforms one or - more Sources into one or more - Results. - To use the TRaX interface, you create a - TransformerFactory, - which may directly provide a Transformers, or which can provide - Templates from a variety of - Sources. The - Templates object is a processed - or compiled representation of the transformation instructions, and provides a - Transformer. The - Transformer processes a - Source according to the - instructions found in the Templates, and produces a - Result. - The process of transformation from a tree, either in the form of an - object model, or in the form of parse events, into a stream, is known as - serialization. We believe this is the most suitable term for - this process, despite the overlap with Java object serialization. - ProcessorGeneric concept for the - set of objects that implement the TrAX interfaces. - Create compiled transformation instructions, transform - sources, and manage transformation parameters and - properties.Only the Templates object can be - used concurrently in multiple threads. The rest of the processor does not do - synchronized blocking, and so may not be used to perform multiple concurrent - operations. - TransformerFactory - Serve as a vendor-neutral Processor interface for - XSLT and similar - processors. Serve as a factory for a concrete - implementation of an TransformerFactory, serve as a direct factory for - Transformer objects, serve as a factory for Templates objects, and manage - processor specific features. A - TransformerFactory may not perform mulitple concurrent - operations. - Templates The - runtime representation of the transformation instructions. - A data bag for transformation instructions; act as a factory - for Transformers. Threadsafe for concurrent - usage over multiple threads once construction is complete. - Transformer Act as a per-thread - execution context for transformations, act as an interface for performing the - transformation.Perform the - transformation. Only one instance per thread - is safe. The Transformer is bound to the Templates - object that created it. - Source Serve as a - single vendor-neutral object for multiple types of input. - Act as simple data holder for System IDs, DOM nodes, streams, - etc. Threadsafe concurrently over multiple - threads for read-only operations; must be synchronized for edit - operations. - Result - ResultTarget Serve - as a single object for multiple types of output, so there can be simple process - method signatures. Act as simple data holder for - output stream, DOM node, ContentHandler, etc. - Threadsafe concurrently over multiple threads for read-only, - must be synchronized for edit. - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/AppletXMLtoHTML/xalanApplets.xml b/xalansamples/src/main/java/samples/AppletXMLtoHTML/xalanApplets.xml deleted file mode 100644 index ef86fc101..000000000 --- a/xalansamples/src/main/java/samples/AppletXMLtoHTML/xalanApplets.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - -
      -
    1. -

      Include - org.apache.xalan.xslt.client.XSLTProcessorApplet - in an HTML client.

      -
    2. -
    3. -

      Specify the XML source document and XSL - stylesheet.

      -

      You can use the DocumentURL and StyleURL PARAM tags - or the setDocumentURL() and setStyleURL() methods. - If the XML document contains a stylesheet Processing - Instruction (PI), you do not need to specify an XSL - stylesheet.

      -
    4. -
    5. -

      Call the getHtmlText() method, which performs - the transformation and returns the new document as a - String.

      -
    6. -
    -
    -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/ApplyXPath/ApplyXPath.java b/xalansamples/src/main/java/samples/ApplyXPath/ApplyXPath.java deleted file mode 100644 index a536d26ff..000000000 --- a/xalansamples/src/main/java/samples/ApplyXPath/ApplyXPath.java +++ /dev/null @@ -1,142 +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 file uses 4 space indents, no tabs. -package samples.ApplyXPath; - -import java.io.FileInputStream; -import java.io.OutputStreamWriter; - -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.apache.xpath.XPathAPI; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.traversal.NodeIterator; -import org.xml.sax.InputSource; - -/** - * Very basic utility for applying an XPath epxression to an xml file and printing information - / about the execution of the XPath object and the nodes it finds. - * Takes 2 arguments: - * (1) an xml filename - * (2) an XPath expression to apply to the file - * Examples: - * java ApplyXPath foo.xml / - * java ApplyXPath foo.xml /doc/name[1]/@last - * @see XPathAPI - */ -public class ApplyXPath -{ - protected String filename = null; - protected String xpath = null; - - /** Process input args and execute the XPath. */ - public void doMain(String[] args) - throws Exception - { - filename = args[0]; - xpath = args[1]; - - if ((filename != null) && (filename.length() > 0) - && (xpath != null) && (xpath.length() > 0)) - { - // Tell that we're loading classes and parsing, so the time it - // takes to do this doesn't get confused with the time to do - // the actual query and serialization. - System.out.println("Loading classes, parsing "+filename+", and setting up serializer"); - - // Set up a DOM tree to query. - InputSource in = new InputSource(new FileInputStream(filename)); - DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); - dfactory.setNamespaceAware(true); - Document doc = dfactory.newDocumentBuilder().parse(in); - - // Set up an identity transformer to use as serializer. - Transformer serializer = TransformerFactory.newInstance().newTransformer(); - serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - - // Use the simple XPath API to select a nodeIterator. - System.out.println("Querying DOM using "+xpath); - NodeIterator nl = XPathAPI.selectNodeIterator(doc, xpath); - - // Serialize the found nodes to System.out. - System.out.println(""); - - Node n; - while ((n = nl.nextNode())!= null) - { - if (isTextNode(n)) { - // DOM may have more than one node corresponding to a - // single XPath text node. Coalesce all contiguous text nodes - // at this level - StringBuffer sb = new StringBuffer(n.getNodeValue()); - for ( - Node nn = n.getNextSibling(); - isTextNode(nn); - nn = nn.getNextSibling() - ) { - sb.append(nn.getNodeValue()); - } - System.out.print(sb); - } - else { - serializer.transform(new DOMSource(n), new StreamResult(new OutputStreamWriter(System.out))); - } - System.out.println(); - } - System.out.println(""); - } - else - { - System.out.println("Bad input args: " + filename + ", " + xpath); - } - } - - /** Decide if the node is text, and so must be handled specially */ - static boolean isTextNode(Node n) { - if (n == null) - return false; - short nodeType = n.getNodeType(); - return nodeType == Node.CDATA_SECTION_NODE || nodeType == Node.TEXT_NODE; - } - - /** Main method to run from the command line. */ - public static void main (String[] args) - throws Exception - { - if (args.length != 2) - { - System.out.println("java ApplyXPath filename.xml xpath\n" - + "Reads filename.xml and applies the xpath; prints the nodelist found."); - return; - } - - ApplyXPath app = new ApplyXPath(); - app.doMain(args); - } - -} // end of class ApplyXPath - diff --git a/xalansamples/src/main/java/samples/ApplyXPath/foo.xml b/xalansamples/src/main/java/samples/ApplyXPath/foo.xml deleted file mode 100644 index 0423708f7..000000000 --- a/xalansamples/src/main/java/samples/ApplyXPath/foo.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/ApplyXPath/readme.html b/xalansamples/src/main/java/samples/ApplyXPath/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/ApplyXPath/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/ApplyXPathDOM/ApplyXPathDOM.java b/xalansamples/src/main/java/samples/ApplyXPathDOM/ApplyXPathDOM.java deleted file mode 100644 index b3b3d94d4..000000000 --- a/xalansamples/src/main/java/samples/ApplyXPathDOM/ApplyXPathDOM.java +++ /dev/null @@ -1,157 +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 file uses 4 space indents, no tabs. - -package samples.ApplyXPathDOM; - - -import java.io.FileInputStream; -import java.io.OutputStreamWriter; - -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; - -import org.apache.xpath.domapi.XPathEvaluatorImpl; -import org.w3c.dom.Document; -import org.w3c.dom.Node; -import org.w3c.dom.xpath.XPathEvaluator; -import org.w3c.dom.xpath.XPathNSResolver; -import org.w3c.dom.xpath.XPathResult; -import org.xml.sax.InputSource; - -/** - * Very basic utility for applying the DOM L3 XPath API (currently in Last Call) - * to an xml file and printing information about the execution of the XPath object - * and the nodes it finds. - * Takes 2 arguments: - * (1) an xml filename - * (2) an XPath expression to apply to the file - * Examples: - * java ApplyXPathDOM foo.xml / - * java ApplyXPathDOM foo.xml /doc/name[1]/@last - * - *

    See also the Document Object Model (DOM) Level 3 XPath Specification.

    - * @see XPathEvaluator - * - */ -public class ApplyXPathDOM -{ - protected String filename = null; - protected String xpath = null; - - /** Process input args and execute the XPath. */ - public void doMain(String[] args) - throws Exception - { - filename = args[0]; - xpath = args[1]; - - if ((filename != null) && (filename.length() > 0) - && (xpath != null) && (xpath.length() > 0)) - { - // Tell that we're loading classes and parsing, so the time it - // takes to do this doesn't get confused with the time to do - // the actual query and serialization. - System.out.println("Loading classes, parsing "+filename+", and setting up serializer"); - - // Set up a DOM tree to query. - InputSource in = new InputSource(new FileInputStream(filename)); - DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); - dfactory.setNamespaceAware(true); - Document doc = dfactory.newDocumentBuilder().parse(in); - - // Set up an identity transformer to use as serializer. - Transformer serializer = TransformerFactory.newInstance().newTransformer(); - serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - - // Use the DOM L3 XPath API to apply the xpath expression to the doc. - System.out.println("Querying DOM using "+xpath); - - // Create an XPath evaluator and pass in the document. - XPathEvaluator evaluator = new XPathEvaluatorImpl(doc); - XPathNSResolver resolver = evaluator.createNSResolver(doc); - - // Evaluate the xpath expression - XPathResult result = (XPathResult)evaluator.evaluate(xpath, doc, resolver, XPathResult.UNORDERED_NODE_ITERATOR_TYPE, null); - - - // Serialize the found nodes to System.out. - System.out.println(""); - - Node n; - while ((n = result.iterateNext())!= null) - { - if (isTextNode(n)) { - // DOM may have more than one node corresponding to a - // single XPath text node. Coalesce all contiguous text nodes - // at this level - StringBuffer sb = new StringBuffer(n.getNodeValue()); - for ( - Node nn = n.getNextSibling(); - isTextNode(nn); - nn = nn.getNextSibling() - ) { - sb.append(nn.getNodeValue()); - } - System.out.print(sb); - } - else { - serializer.transform(new DOMSource(n), new StreamResult(new OutputStreamWriter(System.out))); - } - System.out.println(); - } - System.out.println(""); - } - else - { - System.out.println("Bad input args: " + filename + ", " + xpath); - } - } - - /** Decide if the node is text, and so must be handled specially */ - static boolean isTextNode(Node n) { - if (n == null) - return false; - short nodeType = n.getNodeType(); - return nodeType == Node.CDATA_SECTION_NODE || nodeType == Node.TEXT_NODE; - } - - /** Main method to run from the command line. */ - public static void main (String[] args) - throws Exception - { - if (args.length != 2) - { - System.out.println("java ApplyXPathDOM filename.xml xpath\n" - + "Reads filename.xml and applies the xpath; prints the nodelist found."); - return; - } - - ApplyXPathDOM app = new ApplyXPathDOM(); - app.doMain(args); - } - -} // end of class ApplyXPathDOM - diff --git a/xalansamples/src/main/java/samples/ApplyXPathDOM/foo.xml b/xalansamples/src/main/java/samples/ApplyXPathDOM/foo.xml deleted file mode 100644 index 0423708f7..000000000 --- a/xalansamples/src/main/java/samples/ApplyXPathDOM/foo.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/ApplyXPathDOM/readme.html b/xalansamples/src/main/java/samples/ApplyXPathDOM/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/ApplyXPathDOM/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/CompiledJAXP/Compile.java b/xalansamples/src/main/java/samples/CompiledJAXP/Compile.java deleted file mode 100644 index 00250a62d..000000000 --- a/xalansamples/src/main/java/samples/CompiledJAXP/Compile.java +++ /dev/null @@ -1,65 +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 samples.CompiledJAXP; - -import javax.xml.transform.Templates; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamSource; - -public class Compile { - - public static void main(String[] args){ - Compile app = new Compile(); - app.run(args[0]); - } - - /** - * Compiles an XSL stylesheet into a translet, wraps the translet - * inside a Templates object and dumps it to a file. - */ - public void run(String xsl) { - try { - // Set XSLTC's TransformerFactory implementation as the default - System.setProperty("javax.xml.transform.TransformerFactory", - "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"); - - // Get an input stream for the XSL stylesheet - StreamSource stylesheet = new StreamSource(xsl); - - // The TransformerFactory will compile the stylesheet and - // put the translet classes inside the Templates object - TransformerFactory factory = TransformerFactory.newInstance(); - factory.setAttribute("generate-translet", Boolean.TRUE); - Templates templates = factory.newTemplates(stylesheet); - } - catch (Exception e) { - System.err.println("Exception: " + e); - e.printStackTrace(); - } - System.exit(0); - } - - private void usage() { - System.err.println("Usage: compile "); - System.exit(1); - } - -} diff --git a/xalansamples/src/main/java/samples/CompiledJAXP/README.cjaxp b/xalansamples/src/main/java/samples/CompiledJAXP/README.cjaxp deleted file mode 100644 index 585a96be8..000000000 --- a/xalansamples/src/main/java/samples/CompiledJAXP/README.cjaxp +++ /dev/null @@ -1,24 +0,0 @@ -====================================================================== -The XSLT Compiler (XSLTC) is a Java-based tool for compiling XSL -stylesheets into extremely lightweight and portable Java byte code. - -This Compiled JAXP Demo shows you one way to compile and use compiled -translets with JAXP. - -Use the two classes provided, Compile and Transform, just like the -org.apache.xalan.xsltc.cmdline Compile and Transform classes. - -Compile.java - Compiles an XSL stylesheet into a translet, which is written to - a '.class' file. - -Transform.java - Constructs a TransformerFactory and asks it to load a translet - in the form of a Transformer. The translet performs the - transformation on behalf of the Transformer.transform() method. - -Usage - java Compile - java Transform ----------------------------------------------------------------------- -END OF README diff --git a/xalansamples/src/main/java/samples/CompiledJAXP/Transform.java b/xalansamples/src/main/java/samples/CompiledJAXP/Transform.java deleted file mode 100644 index 935f33206..000000000 --- a/xalansamples/src/main/java/samples/CompiledJAXP/Transform.java +++ /dev/null @@ -1,74 +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 samples.CompiledJAXP; - -import java.io.OutputStreamWriter; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -public class Transform { - - public static void main(String[] args){ - Transform app = new Transform(); - app.run(args); - } - - /** - * Asks the TransformerFactory to try to load a precompiled version of - * the translet from the class path to construct a Transformer object. - * The translet performs the transformation on behalf of the - * Transformer.transform() method. - */ - public void run(String[] args){ - String xml = args[0]; - String transletURI = args[1]; - - try { - // Set XSLTC's TransformerFactory implementation as the default - System.setProperty("javax.xml.transform.TransformerFactory", - "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"); - - TransformerFactory tf = TransformerFactory.newInstance(); - tf.setAttribute("use-classpath", Boolean.TRUE); - Transformer transformer = tf.newTransformer( - new StreamSource(transletURI)); - - StreamSource document = new StreamSource(xml); - StreamResult result = new StreamResult( - new OutputStreamWriter(System.out)); - transformer.transform(document, result); - } - catch (Exception e) { - System.err.println("Exception: " + e); - e.printStackTrace(); - } - System.exit(0); - } - - public void usage() { - System.err.println("Usage: run "); - System.exit(1); - } - -} diff --git a/xalansamples/src/main/java/samples/DOM2DOM/DOM2DOM.java b/xalansamples/src/main/java/samples/DOM2DOM/DOM2DOM.java deleted file mode 100644 index fa5e77a60..000000000 --- a/xalansamples/src/main/java/samples/DOM2DOM/DOM2DOM.java +++ /dev/null @@ -1,108 +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 samples.DOM2DOM; - -import java.io.FileNotFoundException; -import java.io.IOException; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; - -import org.apache.xml.serializer.Serializer; -import org.apache.xml.serializer.SerializerFactory; -import org.apache.xml.serializer.OutputPropertiesFactory; -import org.w3c.dom.Document; -import org.xml.sax.SAXException; - - /** - * Show how to transform a DOM tree into another DOM tree. - * This uses the javax.xml.parsers to parse both an XSL file - * and the XML file into a DOM, and create an output DOM. - */ -public class DOM2DOM -{ - public static void main(String[] args) - throws TransformerException, TransformerConfigurationException, FileNotFoundException, - ParserConfigurationException, SAXException, IOException - { - TransformerFactory tFactory = TransformerFactory.newInstance(); - - if(tFactory.getFeature(DOMSource.FEATURE) && tFactory.getFeature(DOMResult.FEATURE)) - { - //Instantiate a DocumentBuilderFactory. - DocumentBuilderFactory dFactory = DocumentBuilderFactory.newInstance(); - - // And setNamespaceAware, which is required when parsing xsl files - dFactory.setNamespaceAware(true); - - //Use the DocumentBuilderFactory to create a DocumentBuilder. - DocumentBuilder dBuilder = dFactory.newDocumentBuilder(); - - //Use the DocumentBuilder to parse the XSL stylesheet. - Document xslDoc = dBuilder.parse("birds.xsl"); - - // Use the DOM Document to define a DOMSource object. - DOMSource xslDomSource = new DOMSource(xslDoc); - - // Set the systemId: note this is actually a URL, not a local filename - xslDomSource.setSystemId("birds.xsl"); - - // Process the stylesheet DOMSource and generate a Transformer. - Transformer transformer = tFactory.newTransformer(xslDomSource); - - //Use the DocumentBuilder to parse the XML input. - Document xmlDoc = dBuilder.parse("birds.xml"); - - // Use the DOM Document to define a DOMSource object. - DOMSource xmlDomSource = new DOMSource(xmlDoc); - - // Set the base URI for the DOMSource so any relative URIs it contains can - // be resolved. - xmlDomSource.setSystemId("birds.xml"); - - // Create an empty DOMResult for the Result. - DOMResult domResult = new DOMResult(); - - // Perform the transformation, placing the output in the DOMResult. - transformer.transform(xmlDomSource, domResult); - - //Instantiate an Xalan XML serializer and use it to serialize the output DOM to System.out - // using the default output format, except for indent="yes" - java.util.Properties xmlProps = OutputPropertiesFactory.getDefaultMethodProperties("xml"); - xmlProps.setProperty("indent", "yes"); - xmlProps.setProperty("standalone", "no"); - Serializer serializer = SerializerFactory.getSerializer(xmlProps); - serializer.setOutputStream(System.out); - serializer.asDOMSerializer().serialize(domResult.getNode()); - } - else - { - throw new org.xml.sax.SAXNotSupportedException("DOM node processing not supported!"); - } - } -} diff --git a/xalansamples/src/main/java/samples/DOM2DOM/birds.xml b/xalansamples/src/main/java/samples/DOM2DOM/birds.xml deleted file mode 100644 index 702764219..000000000 --- a/xalansamples/src/main/java/samples/DOM2DOM/birds.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - Great Tinamou. - Highland Tinamou. - Little Tinamou. - Thicket Tinamou. - Slaty-breasted Tinamou. - Choco Tinamou. - - - - - Red-throated Loon. - Arctic Loon. - Pacific Loon. - Common Loon. - Yellow-billed Loon. - - - - - - - Least Grebe. - Pied-billed Grebe. - Atitlan Grebe. - Horned Grebe. - Red-necked Grebe. - Eared Grebe. - Western Grebe. - Clark's Grebe. - - - - - - - - Yellow-nosed Albatross. (A) - Shy Albatross. (A) - Black-browed Albatross. (A) - Light-mantled Albatross. (A) - Wandering Albatross. (A) - Laysan Albatross. - Black-footed Albatross. - Short-tailed Albatross. (N) - - - Northern Fulmar. - Kermadec Petrel. (A) - Herald Petrel. (A) - Murphy's Petrel. (N) - Mottled Petrel. (A) - Bermuda Petrel. - Black-capped Petrel. - Juan Fernandez Petrel. (N) - Dark-rumped Petrel. - White-necked Petrel. (H) - Bonin Petrel. (H) - Black-winged Petrel. (H, A) - Cook's Petrel. (N) - Stejneger's Petrel. (A) - Bulwer's Petrel. (H) - Jouanin's Petrel. (H, A) - Parkinson's Petrel. (N) - Streaked Shearwater. (A) - Cory's Shearwater. (N) - Pink-footed Shearwater. (N) - Flesh-footed Shearwater. (N) - Greater Shearwater. (N) - Wedge-tailed Shearwater. - Buller's Shearwater. (N) - Sooty Shearwater. (N) - Short-tailed Shearwater. (N) - Christmas Shearwater. (H) - Manx Shearwater. - Townsend's Shearwater. - Black-vented Shearwater. - Audubon's Shearwater. - Little Shearwater. (A) - - - Wilson's Storm-Petrel. (N) - White-faced Storm-Petrel. (A) - European Storm-Petrel. (A) - Fork-tailed Storm-Petrel. - Leach's Storm-Petrel. - Ashy Storm-Petrel. - Band-rumped Storm-Petrel. (N) - Wedge-rumped Storm-Petrel. (N) - Black Storm-Petrel. - Guadalupe Storm-Petrel. - Markham's Storm-Petrel. (A) - Tristram's Storm-Petrel. (H) - Least Storm-Petrel. - - - - - - White-tailed Tropicbird. - Red-billed Tropicbird. - Red-tailed Tropicbird. - - - Masked Booby. - Blue-footed Booby. - Peruvian Booby. (A) - Brown Booby. - Red-footed Booby. - Northern Gannet. - - - American White Pelican. - Brown Pelican. - - - Brandt's Cormorant. - Neotropic Cormorant. - Double-crested Cormorant. - Great Cormorant. - Red-faced Cormorant. - Pelagic Cormorant. - - - Anhinga. - - - Magnificent Frigatebird. - Great Frigatebird. - Lesser Frigatebird. (A) - - - diff --git a/xalansamples/src/main/java/samples/DOM2DOM/birds.xsl b/xalansamples/src/main/java/samples/DOM2DOM/birds.xsl deleted file mode 100644 index 8c21d5831..000000000 --- a/xalansamples/src/main/java/samples/DOM2DOM/birds.xsl +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - -Order is: - - - - - - Family is: - - - - - SubFamily is - - - - - - - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/DOM2DOM/readme.html b/xalansamples/src/main/java/samples/DOM2DOM/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/DOM2DOM/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/Pipe/Pipe.java b/xalansamples/src/main/java/samples/Pipe/Pipe.java deleted file mode 100644 index 8ef67b751..000000000 --- a/xalansamples/src/main/java/samples/Pipe/Pipe.java +++ /dev/null @@ -1,86 +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 samples.Pipe; - -import java.io.IOException; - -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.sax.SAXResult; -import javax.xml.transform.sax.SAXSource; -import javax.xml.transform.sax.SAXTransformerFactory; -import javax.xml.transform.sax.TransformerHandler; -import javax.xml.transform.stream.StreamSource; - -import org.apache.xml.serializer.Serializer; -import org.apache.xml.serializer.SerializerFactory; -import org.apache.xml.serializer.OutputPropertiesFactory; -import org.xml.sax.SAXException; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.XMLReaderFactory; - - /** - * This example shows how to chain a series of transformations by - * piping SAX events from one Transformer to another. Each Transformer - * operates as a SAX2 XMLFilter/XMLReader. - */ -public class Pipe -{ - public static void main(String[] args) - throws TransformerException, TransformerConfigurationException, - SAXException, IOException - { - // Instantiate a TransformerFactory. - TransformerFactory tFactory = TransformerFactory.newInstance(); - // Determine whether the TransformerFactory supports The use uf SAXSource - // and SAXResult - if (tFactory.getFeature(SAXSource.FEATURE) && tFactory.getFeature(SAXResult.FEATURE)) - { - // Cast the TransformerFactory to SAXTransformerFactory. - SAXTransformerFactory saxTFactory = ((SAXTransformerFactory) tFactory); - // Create a TransformerHandler for each stylesheet. - TransformerHandler tHandler1 = saxTFactory.newTransformerHandler(new StreamSource("foo1.xsl")); - TransformerHandler tHandler2 = saxTFactory.newTransformerHandler(new StreamSource("foo2.xsl")); - TransformerHandler tHandler3 = saxTFactory.newTransformerHandler(new StreamSource("foo3.xsl")); - - // Create an XMLReader. - XMLReader reader = XMLReaderFactory.createXMLReader(); - reader.setContentHandler(tHandler1); - reader.setProperty("http://xml.org/sax/properties/lexical-handler", tHandler1); - - tHandler1.setResult(new SAXResult(tHandler2)); - tHandler2.setResult(new SAXResult(tHandler3)); - - // transformer3 outputs SAX events to the serializer. - java.util.Properties xmlProps = OutputPropertiesFactory.getDefaultMethodProperties("xml"); - xmlProps.setProperty("indent", "yes"); - xmlProps.setProperty("standalone", "no"); - Serializer serializer = SerializerFactory.getSerializer(xmlProps); - serializer.setOutputStream(System.out); - tHandler3.setResult(new SAXResult(serializer.asContentHandler())); - - // Parse the XML input document. The input ContentHandler and output ContentHandler - // work in separate threads to optimize performance. - reader.parse("foo.xml"); - } - } -} diff --git a/xalansamples/src/main/java/samples/Pipe/foo.xml b/xalansamples/src/main/java/samples/Pipe/foo.xml deleted file mode 100644 index da9f79b5e..000000000 --- a/xalansamples/src/main/java/samples/Pipe/foo.xml +++ /dev/null @@ -1,2 +0,0 @@ - -Hello \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/Pipe/foo1.xsl b/xalansamples/src/main/java/samples/Pipe/foo1.xsl deleted file mode 100644 index 2dad09a78..000000000 --- a/xalansamples/src/main/java/samples/Pipe/foo1.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/Pipe/foo2.xsl b/xalansamples/src/main/java/samples/Pipe/foo2.xsl deleted file mode 100644 index afd7a4e80..000000000 --- a/xalansamples/src/main/java/samples/Pipe/foo2.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - ...good to see you again! - - diff --git a/xalansamples/src/main/java/samples/Pipe/foo3.xsl b/xalansamples/src/main/java/samples/Pipe/foo3.xsl deleted file mode 100644 index c381124bf..000000000 --- a/xalansamples/src/main/java/samples/Pipe/foo3.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - ...and goodby! - - diff --git a/xalansamples/src/main/java/samples/Pipe/readme.html b/xalansamples/src/main/java/samples/Pipe/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/Pipe/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/SAX2SAX/SAX2SAX.java b/xalansamples/src/main/java/samples/SAX2SAX/SAX2SAX.java deleted file mode 100644 index 68e14e726..000000000 --- a/xalansamples/src/main/java/samples/SAX2SAX/SAX2SAX.java +++ /dev/null @@ -1,109 +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$ - */ - -/** - * 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; - -import javax.xml.transform.Result; -import javax.xml.transform.Templates; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.sax.SAXResult; -import javax.xml.transform.sax.SAXSource; -import javax.xml.transform.sax.SAXTransformerFactory; -import javax.xml.transform.sax.TemplatesHandler; -import javax.xml.transform.sax.TransformerHandler; - -import org.apache.xml.serializer.Serializer; -import org.apache.xml.serializer.SerializerFactory; -import org.apache.xml.serializer.OutputPropertiesFactory; -import org.xml.sax.SAXException; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.XMLReaderFactory; - - -public class SAX2SAX -{ - public static void main(String[] args) - throws TransformerException, TransformerConfigurationException, - SAXException, IOException - { - - // Instantiate a TransformerFactory. - TransformerFactory tFactory = TransformerFactory.newInstance(); - // Determine whether the TransformerFactory supports The use of SAXSource - // and SAXResult - if (tFactory.getFeature(SAXSource.FEATURE) && tFactory.getFeature(SAXResult.FEATURE)) - { - // Cast the TransformerFactory. - SAXTransformerFactory saxTFactory = ((SAXTransformerFactory) tFactory); - // Create a ContentHandler to handle parsing of the stylesheet. - TemplatesHandler templatesHandler = saxTFactory.newTemplatesHandler(); - - // Create an XMLReader and set its ContentHandler. - XMLReader reader = XMLReaderFactory.createXMLReader(); - reader.setContentHandler(templatesHandler); - - // Parse the stylesheet. - reader.parse("birds.xsl"); - - //Get the Templates object from the ContentHandler. - Templates templates = templatesHandler.getTemplates(); - // Create a ContentHandler to handle parsing of the XML source. - TransformerHandler handler - = saxTFactory.newTransformerHandler(templates); - // Reset the XMLReader's ContentHandler. - reader.setContentHandler(handler); - - // Set the ContentHandler to also function as a LexicalHandler, which - // includes "lexical" events (e.g., comments and CDATA). - reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler); - - FileOutputStream fos = new FileOutputStream("birds.out"); - - java.util.Properties xmlProps = OutputPropertiesFactory.getDefaultMethodProperties("xml"); - xmlProps.setProperty("indent", "yes"); - xmlProps.setProperty("standalone", "no"); - Serializer serializer = SerializerFactory.getSerializer(xmlProps); - serializer.setOutputStream(fos); - - - // Set the result handling to be a serialization to the file output stream. - Result result = new SAXResult(serializer.asContentHandler()); - handler.setResult(result); - - // Parse the XML input document. - reader.parse("birds.xml"); - - System.out.println("************* The result is in birds.out *************"); - } - else - System.out.println("The TransformerFactory does not support SAX input and SAX output"); - } -} diff --git a/xalansamples/src/main/java/samples/SAX2SAX/birds.xml b/xalansamples/src/main/java/samples/SAX2SAX/birds.xml deleted file mode 100644 index 702764219..000000000 --- a/xalansamples/src/main/java/samples/SAX2SAX/birds.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - Great Tinamou. - Highland Tinamou. - Little Tinamou. - Thicket Tinamou. - Slaty-breasted Tinamou. - Choco Tinamou. - - - - - Red-throated Loon. - Arctic Loon. - Pacific Loon. - Common Loon. - Yellow-billed Loon. - - - - - - - Least Grebe. - Pied-billed Grebe. - Atitlan Grebe. - Horned Grebe. - Red-necked Grebe. - Eared Grebe. - Western Grebe. - Clark's Grebe. - - - - - - - - Yellow-nosed Albatross. (A) - Shy Albatross. (A) - Black-browed Albatross. (A) - Light-mantled Albatross. (A) - Wandering Albatross. (A) - Laysan Albatross. - Black-footed Albatross. - Short-tailed Albatross. (N) - - - Northern Fulmar. - Kermadec Petrel. (A) - Herald Petrel. (A) - Murphy's Petrel. (N) - Mottled Petrel. (A) - Bermuda Petrel. - Black-capped Petrel. - Juan Fernandez Petrel. (N) - Dark-rumped Petrel. - White-necked Petrel. (H) - Bonin Petrel. (H) - Black-winged Petrel. (H, A) - Cook's Petrel. (N) - Stejneger's Petrel. (A) - Bulwer's Petrel. (H) - Jouanin's Petrel. (H, A) - Parkinson's Petrel. (N) - Streaked Shearwater. (A) - Cory's Shearwater. (N) - Pink-footed Shearwater. (N) - Flesh-footed Shearwater. (N) - Greater Shearwater. (N) - Wedge-tailed Shearwater. - Buller's Shearwater. (N) - Sooty Shearwater. (N) - Short-tailed Shearwater. (N) - Christmas Shearwater. (H) - Manx Shearwater. - Townsend's Shearwater. - Black-vented Shearwater. - Audubon's Shearwater. - Little Shearwater. (A) - - - Wilson's Storm-Petrel. (N) - White-faced Storm-Petrel. (A) - European Storm-Petrel. (A) - Fork-tailed Storm-Petrel. - Leach's Storm-Petrel. - Ashy Storm-Petrel. - Band-rumped Storm-Petrel. (N) - Wedge-rumped Storm-Petrel. (N) - Black Storm-Petrel. - Guadalupe Storm-Petrel. - Markham's Storm-Petrel. (A) - Tristram's Storm-Petrel. (H) - Least Storm-Petrel. - - - - - - White-tailed Tropicbird. - Red-billed Tropicbird. - Red-tailed Tropicbird. - - - Masked Booby. - Blue-footed Booby. - Peruvian Booby. (A) - Brown Booby. - Red-footed Booby. - Northern Gannet. - - - American White Pelican. - Brown Pelican. - - - Brandt's Cormorant. - Neotropic Cormorant. - Double-crested Cormorant. - Great Cormorant. - Red-faced Cormorant. - Pelagic Cormorant. - - - Anhinga. - - - Magnificent Frigatebird. - Great Frigatebird. - Lesser Frigatebird. (A) - - - diff --git a/xalansamples/src/main/java/samples/SAX2SAX/birds.xsl b/xalansamples/src/main/java/samples/SAX2SAX/birds.xsl deleted file mode 100644 index 8c21d5831..000000000 --- a/xalansamples/src/main/java/samples/SAX2SAX/birds.xsl +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - -Order is: - - - - - - Family is: - - - - - SubFamily is - - - - - - - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/SAX2SAX/foo.xml b/xalansamples/src/main/java/samples/SAX2SAX/foo.xml deleted file mode 100644 index da9f79b5e..000000000 --- a/xalansamples/src/main/java/samples/SAX2SAX/foo.xml +++ /dev/null @@ -1,2 +0,0 @@ - -Hello \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/SAX2SAX/foo.xsl b/xalansamples/src/main/java/samples/SAX2SAX/foo.xsl deleted file mode 100644 index 08f2373ea..000000000 --- a/xalansamples/src/main/java/samples/SAX2SAX/foo.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/SimpleTransform/SimpleTransform.java b/xalansamples/src/main/java/samples/SimpleTransform/SimpleTransform.java deleted file mode 100644 index 6b252a76c..000000000 --- a/xalansamples/src/main/java/samples/SimpleTransform/SimpleTransform.java +++ /dev/null @@ -1,72 +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 samples.SimpleTransform; - -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -/** - * Use the TraX interface to perform a transformation in the simplest manner possible - * (3 statements). - */ -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 -- - // 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/xalansamples/src/main/java/samples/SimpleTransform/birds.xml b/xalansamples/src/main/java/samples/SimpleTransform/birds.xml deleted file mode 100644 index 702764219..000000000 --- a/xalansamples/src/main/java/samples/SimpleTransform/birds.xml +++ /dev/null @@ -1,136 +0,0 @@ - - - - - Great Tinamou. - Highland Tinamou. - Little Tinamou. - Thicket Tinamou. - Slaty-breasted Tinamou. - Choco Tinamou. - - - - - Red-throated Loon. - Arctic Loon. - Pacific Loon. - Common Loon. - Yellow-billed Loon. - - - - - - - Least Grebe. - Pied-billed Grebe. - Atitlan Grebe. - Horned Grebe. - Red-necked Grebe. - Eared Grebe. - Western Grebe. - Clark's Grebe. - - - - - - - - Yellow-nosed Albatross. (A) - Shy Albatross. (A) - Black-browed Albatross. (A) - Light-mantled Albatross. (A) - Wandering Albatross. (A) - Laysan Albatross. - Black-footed Albatross. - Short-tailed Albatross. (N) - - - Northern Fulmar. - Kermadec Petrel. (A) - Herald Petrel. (A) - Murphy's Petrel. (N) - Mottled Petrel. (A) - Bermuda Petrel. - Black-capped Petrel. - Juan Fernandez Petrel. (N) - Dark-rumped Petrel. - White-necked Petrel. (H) - Bonin Petrel. (H) - Black-winged Petrel. (H, A) - Cook's Petrel. (N) - Stejneger's Petrel. (A) - Bulwer's Petrel. (H) - Jouanin's Petrel. (H, A) - Parkinson's Petrel. (N) - Streaked Shearwater. (A) - Cory's Shearwater. (N) - Pink-footed Shearwater. (N) - Flesh-footed Shearwater. (N) - Greater Shearwater. (N) - Wedge-tailed Shearwater. - Buller's Shearwater. (N) - Sooty Shearwater. (N) - Short-tailed Shearwater. (N) - Christmas Shearwater. (H) - Manx Shearwater. - Townsend's Shearwater. - Black-vented Shearwater. - Audubon's Shearwater. - Little Shearwater. (A) - - - Wilson's Storm-Petrel. (N) - White-faced Storm-Petrel. (A) - European Storm-Petrel. (A) - Fork-tailed Storm-Petrel. - Leach's Storm-Petrel. - Ashy Storm-Petrel. - Band-rumped Storm-Petrel. (N) - Wedge-rumped Storm-Petrel. (N) - Black Storm-Petrel. - Guadalupe Storm-Petrel. - Markham's Storm-Petrel. (A) - Tristram's Storm-Petrel. (H) - Least Storm-Petrel. - - - - - - White-tailed Tropicbird. - Red-billed Tropicbird. - Red-tailed Tropicbird. - - - Masked Booby. - Blue-footed Booby. - Peruvian Booby. (A) - Brown Booby. - Red-footed Booby. - Northern Gannet. - - - American White Pelican. - Brown Pelican. - - - Brandt's Cormorant. - Neotropic Cormorant. - Double-crested Cormorant. - Great Cormorant. - Red-faced Cormorant. - Pelagic Cormorant. - - - Anhinga. - - - Magnificent Frigatebird. - Great Frigatebird. - Lesser Frigatebird. (A) - - - diff --git a/xalansamples/src/main/java/samples/SimpleTransform/birds.xsl b/xalansamples/src/main/java/samples/SimpleTransform/birds.xsl deleted file mode 100644 index 8c21d5831..000000000 --- a/xalansamples/src/main/java/samples/SimpleTransform/birds.xsl +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - -Order is: - - - - - - Family is: - - - - - SubFamily is - - - - - - - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/SimpleTransform/foo.xml b/xalansamples/src/main/java/samples/SimpleTransform/foo.xml deleted file mode 100644 index da9f79b5e..000000000 --- a/xalansamples/src/main/java/samples/SimpleTransform/foo.xml +++ /dev/null @@ -1,2 +0,0 @@ - -Hello \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/SimpleTransform/foo.xsl b/xalansamples/src/main/java/samples/SimpleTransform/foo.xsl deleted file mode 100644 index 08f2373ea..000000000 --- a/xalansamples/src/main/java/samples/SimpleTransform/foo.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/SimpleTransform/readme.html b/xalansamples/src/main/java/samples/SimpleTransform/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/SimpleTransform/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/Trace/Trace.java b/xalansamples/src/main/java/samples/Trace/Trace.java deleted file mode 100644 index 17615b949..000000000 --- a/xalansamples/src/main/java/samples/Trace/Trace.java +++ /dev/null @@ -1,93 +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 samples.Trace; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.apache.xalan.trace.PrintTraceListener; -import org.apache.xalan.trace.TraceManager; -import org.apache.xalan.transformer.TransformerImpl; - -/** - * Sample for demonstrating Xalan "trace" interface. - * Usage: run in Trace directory: java Trace - * For an extensions trace sample, run in extensions - * directory: java Trace 3-java-namespace - */ -public class Trace -{ - public static void main (String[] args) - throws java.io.IOException, - TransformerException, TransformerConfigurationException, - java.util.TooManyListenersException, - org.xml.sax.SAXException - { - String fileName = "foo"; - if (args.length > 0) - fileName = args[0]; - - // Set up a PrintTraceListener object to print to a file. - java.io.FileWriter fw = new java.io.FileWriter("events.log"); - java.io.PrintWriter pw = new java.io.PrintWriter(fw, true); - PrintTraceListener ptl = new PrintTraceListener(pw); - - // Print information as each node is 'executed' in the stylesheet. - ptl.m_traceElements = true; - // Print information after each result-tree generation event. - ptl.m_traceGeneration = true; - // Print information after each selection event. - ptl.m_traceSelection = true; - // Print information whenever a template is invoked. - ptl.m_traceTemplates = true; - // Print information whenever an extension call is made. - ptl.m_traceExtension = true; - - // Set up the transformation - TransformerFactory tFactory = TransformerFactory.newInstance(); - Transformer transformer = tFactory.newTransformer(new StreamSource(fileName + ".xsl")); - - // Cast the Transformer object to TransformerImpl. - if (transformer instanceof TransformerImpl) - { - TransformerImpl transformerImpl = (TransformerImpl)transformer; - // Register the TraceListener with a TraceManager associated - // with the TransformerImpl. - TraceManager trMgr = transformerImpl.getTraceManager(); - trMgr.addTraceListener(ptl); - - // Perform the transformation --printing information to - // the events log during the process. - transformer.transform - ( new StreamSource(fileName + ".xml"), - new StreamResult(new java.io.FileWriter(fileName + ".out")) ); - } - // Close the PrintWriter and FileWriter. - pw.close(); - fw.close(); - System.out.println("**The output is in " + fileName + ".out; the log is in events.log ****"); - - } -} diff --git a/xalansamples/src/main/java/samples/Trace/foo.xml b/xalansamples/src/main/java/samples/Trace/foo.xml deleted file mode 100644 index 5e72e1557..000000000 --- a/xalansamples/src/main/java/samples/Trace/foo.xml +++ /dev/null @@ -1,67 +0,0 @@ - - - tue - - - Belt - 5.54 - - - - - wed - - - thu - - - Boots - 9.23 - - - - - fri - - - - - - - sat - - - Jacket - 9.84 - - - - - mon - - - - - Tie - 5.37 - - - - - tue - - - wed - - - - - thu - - - Overalls - 3.16 - - - - diff --git a/xalansamples/src/main/java/samples/Trace/foo.xsl b/xalansamples/src/main/java/samples/Trace/foo.xsl deleted file mode 100644 index f145dacf1..000000000 --- a/xalansamples/src/main/java/samples/Trace/foo.xsl +++ /dev/null @@ -1,89 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - . - - . -
    - - - -
    - - -
    -
    diff --git a/xalansamples/src/main/java/samples/TransformThread/TransformThread.java b/xalansamples/src/main/java/samples/TransformThread/TransformThread.java deleted file mode 100644 index 7ece806c3..000000000 --- a/xalansamples/src/main/java/samples/TransformThread/TransformThread.java +++ /dev/null @@ -1,324 +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 samples.TransformThread; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.InputStream; -import java.io.OutputStream; -import java.util.Properties; - -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.transform.Result; -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.sax.SAXResult; -import javax.xml.transform.sax.SAXSource; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.xml.sax.InputSource; -import org.xml.sax.helpers.DefaultHandler; - -/** - * What it does: this sample creates multiple threads - * and runs them. Each thread will be assigned a particular - * stylesheet. Each thread will run multiple transformations on - * various xml files using its own transformer. - * - * Note: the flavors used by the transformations can be - * configured below by changing SOURCE_FLAVOR and - * RESULT_FLAVOR. XSLTC can also be used by changing - * USE_XSLTC. - * - * Description of files included with the sample: - * - * foo0.xsl and foo1.xsl: foo0.xsl is the stylesheet used - * for transformations by thread #0, foo1.xsl is the stylesheet - * used by thread #1. - * - * foo0.xml and foo1.xml: foo0.xml and foo1.xml are the XML - * files used for the first and second transformations done - * by each thread. - * - * Output will go to *.out files in the TransformThread directory. - * - * @author Richard Cao - */ -public class TransformThread implements Runnable -{ - // Flavors - public final static int STREAM = 0; - public final static int SAX = 1; - public final static int DOM = 2; - public final static String[] flavorNames = - new String[] { "Stream", "SAX", "DOM" }; - - // Configurable options - private static int SOURCE_FLAVOR = STREAM; - // private static int SOURCE_FLAVOR = SAX; - // private static int SOURCE_FLAVOR = DOM; - - private static int RESULT_FLAVOR = STREAM; - // private static int RESULT_FLAVOR = SAX; - // private static int RESULT_FLAVOR = DOM; - - private static boolean USE_XSLTC = false; - // private static boolean useXSLTC = true; - - - // Threads - private final static int NUM_THREADS = 2; - private static TransformThread INSTANCES[] = null; - protected Thread m_thread = null; - - // Number of transformations per thread - private final static int NUM_TRANSFORMATIONS = 2; - - // Files names and extensions - private final static String XML_IN_BASE = "foo"; - private final static String XML_EXT = ".xml"; - private final static String XSL_IN_BASE = "foo"; - private final static String XSL_EXT = ".xsl"; - private final static String FILE_OUT_BASE = "foo_"; - private final static String FILE_OUT_EXT = ".out"; - - // Thread identifier - private int m_thrdNum = -1; - - private InputStream[] m_inStream = null; - - private Source[] m_inSource = null; - private Result[] m_outResult = null; - - // One Transformer per thread since Transformers - // are _NOT_ thread-safe - private Transformer m_transformer = null; - - /** Constructs the TransformThread object - * @param thrdNum a unique identifier for this object - */ - public TransformThread(int thrdNum) - { - m_thrdNum = thrdNum; - - m_inStream = new InputStream[NUM_TRANSFORMATIONS]; - m_inSource = new Source[NUM_TRANSFORMATIONS]; - m_outResult = new Result[NUM_TRANSFORMATIONS]; - - try - { - initSource(); - initResult(); - - // ensure xslSourceURI is a valid URI - final String xslSourceFileName = XSL_IN_BASE + m_thrdNum + XSL_EXT; - final String xslSourceURI = (new File(xslSourceFileName)).toURL().toString(); - StreamSource xslSource = new StreamSource(xslSourceFileName); - xslSource.setSystemId(xslSourceURI); - - // Initialize the transformer - m_transformer = - TransformerFactory.newInstance().newTransformer(xslSource); - m_thread = new Thread(this); - } - catch (Throwable e) - { - e.printStackTrace(); - System.exit(1); - } - } - - /** Initialize the results (m_outResult) according - * to RESULT_FLAVOR - */ - private void initResult() - { - try - { - for (int i = 0; i < NUM_TRANSFORMATIONS; i++) - { - switch (RESULT_FLAVOR) - { - case STREAM : - OutputStream outStream = - new FileOutputStream(FILE_OUT_BASE + "thread_" - + m_thrdNum + "_transformation_" + i + FILE_OUT_EXT); - - m_outResult[i] = new StreamResult(outStream); - break; - - case SAX : - DefaultHandler defaultHandler = new DefaultHandler(); - m_outResult[i] = new SAXResult(defaultHandler); - break; - - case DOM : - m_outResult[i] = new DOMResult(); - break; - } - } - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(1); - } - } - - /** Initialize the sources (m_inSource) according - * to SOURCE_FLAVOR - */ - private void initSource() - { - try - { - for (int i = 0; i < NUM_TRANSFORMATIONS; i++) - { - // Ensure we get a valid URI - final String sourceXMLURI = (new File(XML_IN_BASE + i + XML_EXT)).toURL().toString(); - - // Open for input - m_inStream[i] = new FileInputStream(XML_IN_BASE + i + XML_EXT); - - switch (SOURCE_FLAVOR) - { - case STREAM : - m_inSource[i] = new StreamSource(m_inStream[i]); - break; - - case SAX : - m_inSource[i] = new SAXSource(new InputSource(m_inStream[i])); - break; - - case DOM : - try - { - DocumentBuilderFactory dfactory = - DocumentBuilderFactory.newInstance(); - - // Must always setNamespaceAware when - // building xsl stylesheets - dfactory.setNamespaceAware(true); - m_inSource[i] = - new DOMSource(dfactory.newDocumentBuilder().parse(m_inStream[i])); - } - catch (Exception e) - { - e.printStackTrace(); - } - break; - } - - if (m_inSource[i] != null) - { - // If we don't do this, the transformer - // won't know how to resolve relative URLs - // in the stylesheet. - m_inSource[i].setSystemId(sourceXMLURI); - } - } - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(1); - } - } - - /** - * @see java.lang.Runnable#run() - */ - public void run() - { - try - { - // Perform multiple transformations with the same - // transformer - for (int i = 0; i < NUM_TRANSFORMATIONS; i++) - { - m_transformer.transform(m_inSource[i], m_outResult[i]); - } - } - catch (Exception e) - { - e.printStackTrace(); - System.exit(1); - } - } - - /** Creates thread instances - */ - private static void initThreads() - { - INSTANCES = new TransformThread[NUM_THREADS]; - - for (int count = 0; count < NUM_THREADS; count++) - { - INSTANCES[count] = new TransformThread(count); - } - } - - /** Sets the appropriate system properties if XSLTC is - * to be used (according to USE_XSLTC) - */ - private static void initSystemProperties() - { - if (USE_XSLTC) - { - // Set the TransformerFactory system property if XSLTC is required - // Note: To make this sample more flexible, load properties from a properties file. - // The setting for the Xalan Transformer is "org.apache.xalan.processor.TransformerFactoryImpl" - String key = "javax.xml.transform.TransformerFactory"; - String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; - Properties props = System.getProperties(); - props.put(key, value); - System.setProperties(props); - } - } - - /** - * Usage: - * java TransformThread - */ - public static void main(String argv[]) - { - try - { - initSystemProperties(); - initThreads(); - - for (int count = 0; count < NUM_THREADS; count++) - { - INSTANCES[count].m_thread.start(); - } - } - catch (Throwable e) - { - e.printStackTrace(); - System.exit(1); - } - } -} diff --git a/xalansamples/src/main/java/samples/TransformThread/foo0.xml b/xalansamples/src/main/java/samples/TransformThread/foo0.xml deleted file mode 100644 index e6eba47ab..000000000 --- a/xalansamples/src/main/java/samples/TransformThread/foo0.xml +++ /dev/null @@ -1,2 +0,0 @@ - -Hello foo0! \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/TransformThread/foo0.xsl b/xalansamples/src/main/java/samples/TransformThread/foo0.xsl deleted file mode 100644 index 08f2373ea..000000000 --- a/xalansamples/src/main/java/samples/TransformThread/foo0.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/TransformThread/foo1.xml b/xalansamples/src/main/java/samples/TransformThread/foo1.xml deleted file mode 100644 index b6a7604b9..000000000 --- a/xalansamples/src/main/java/samples/TransformThread/foo1.xml +++ /dev/null @@ -1,2 +0,0 @@ - -Hello foo1! \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/TransformThread/foo1.xsl b/xalansamples/src/main/java/samples/TransformThread/foo1.xsl deleted file mode 100644 index 08f2373ea..000000000 --- a/xalansamples/src/main/java/samples/TransformThread/foo1.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/UseStylesheetPI/UseStylesheetPI.java b/xalansamples/src/main/java/samples/UseStylesheetPI/UseStylesheetPI.java deleted file mode 100644 index 77baaf552..000000000 --- a/xalansamples/src/main/java/samples/UseStylesheetPI/UseStylesheetPI.java +++ /dev/null @@ -1,56 +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 samples.UseStylesheetPI; - -import javax.xml.transform.Source; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -public class UseStylesheetPI -{ - public static void main(String[] args) - throws TransformerException, TransformerConfigurationException - { - String media= null , title = null, charset = null; - try - { - TransformerFactory tFactory = TransformerFactory.newInstance(); - Source stylesheet = tFactory.getAssociatedStylesheet - (new StreamSource("fooX.xml"),media, title, charset); - - Transformer transformer = tFactory.newTransformer(stylesheet); - - transformer.transform(new StreamSource("fooX.xml"), - new StreamResult(new java.io.FileOutputStream("foo.out"))); - - System.out.println("************* The result is in foo.out *************"); - - } - catch (Exception e) - { - e.printStackTrace(); - } - } -} diff --git a/xalansamples/src/main/java/samples/UseStylesheetPI/foo.xsl b/xalansamples/src/main/java/samples/UseStylesheetPI/foo.xsl deleted file mode 100644 index a2c06a497..000000000 --- a/xalansamples/src/main/java/samples/UseStylesheetPI/foo.xsl +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/UseStylesheetPI/fooX.xml b/xalansamples/src/main/java/samples/UseStylesheetPI/fooX.xml deleted file mode 100644 index cd4b743d6..000000000 --- a/xalansamples/src/main/java/samples/UseStylesheetPI/fooX.xml +++ /dev/null @@ -1,3 +0,0 @@ - - -Hello \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/UseStylesheetParam/UseStylesheetParam.java b/xalansamples/src/main/java/samples/UseStylesheetParam/UseStylesheetParam.java deleted file mode 100644 index 939361394..000000000 --- a/xalansamples/src/main/java/samples/UseStylesheetParam/UseStylesheetParam.java +++ /dev/null @@ -1,61 +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 samples.UseStylesheetParam; -import java.io.IOException; -import java.io.OutputStreamWriter; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.xml.sax.SAXException; - - /** - * Use command-line input as a stylesheet parameter. - */ - -public class UseStylesheetParam -{ - public static void main(String[] args) - throws TransformerException, TransformerConfigurationException, - SAXException, IOException - { - if(args.length != 1) - { - System.err.println("Please pass one string to this program"); - return; - } - // Get the parameter value from the command line. - String paramValue = args[0]; - - TransformerFactory tFactory = TransformerFactory.newInstance(); - Transformer transformer = tFactory.newTransformer(new StreamSource("foo.xsl")); - - // Set the parameter. I can't get non-null namespaces to work!! - transformer.setParameter("param1", /* parameter name */ - paramValue /* parameter value */ ); - - transformer.transform(new StreamSource("foo.xml"), new StreamResult(new OutputStreamWriter(System.out))); - } -} diff --git a/xalansamples/src/main/java/samples/UseStylesheetParam/foo.xml b/xalansamples/src/main/java/samples/UseStylesheetParam/foo.xml deleted file mode 100644 index 03c32b52e..000000000 --- a/xalansamples/src/main/java/samples/UseStylesheetParam/foo.xml +++ /dev/null @@ -1,2 +0,0 @@ - -Hello diff --git a/xalansamples/src/main/java/samples/UseStylesheetParam/foo.xsl b/xalansamples/src/main/java/samples/UseStylesheetParam/foo.xsl deleted file mode 100644 index 588c13a73..000000000 --- a/xalansamples/src/main/java/samples/UseStylesheetParam/foo.xsl +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/UseStylesheetParam/readme.html b/xalansamples/src/main/java/samples/UseStylesheetParam/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/UseStylesheetParam/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/UseXMLFilters/UseXMLFilters.java b/xalansamples/src/main/java/samples/UseXMLFilters/UseXMLFilters.java deleted file mode 100644 index 7aaddc587..000000000 --- a/xalansamples/src/main/java/samples/UseXMLFilters/UseXMLFilters.java +++ /dev/null @@ -1,102 +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 samples.UseXMLFilters; - -import java.io.IOException; - -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.sax.SAXResult; -import javax.xml.transform.sax.SAXSource; -import javax.xml.transform.sax.SAXTransformerFactory; -import javax.xml.transform.stream.StreamSource; - -import org.apache.xml.serializer.Serializer; -import org.apache.xml.serializer.SerializerFactory; -import org.apache.xml.serializer.OutputPropertiesFactory; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.XMLFilter; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.XMLReaderFactory; - - /** - * This example shows how to chain a series of transformations by - * piping SAX events from one Transformer to another. Each Transformer - * operates as a SAX2 XMLFilter/XMLReader. - */ -public class UseXMLFilters -{ - public static void main(String[] args) - throws TransformerException, TransformerConfigurationException, - SAXException, IOException - { - // Instantiate a TransformerFactory. - TransformerFactory tFactory = TransformerFactory.newInstance(); - // Determine whether the TransformerFactory supports The use uf SAXSource - // and SAXResult - if (tFactory.getFeature(SAXSource.FEATURE) && tFactory.getFeature(SAXResult.FEATURE)) - { - // Cast the TransformerFactory to SAXTransformerFactory. - SAXTransformerFactory saxTFactory = ((SAXTransformerFactory) tFactory); - // Create an XMLFilter for each stylesheet. - XMLFilter xmlFilter1 = saxTFactory.newXMLFilter(new StreamSource("foo1.xsl")); - XMLFilter xmlFilter2 = saxTFactory.newXMLFilter(new StreamSource("foo2.xsl")); - XMLFilter xmlFilter3 = saxTFactory.newXMLFilter(new StreamSource("foo3.xsl")); - - // Create an XMLReader. - XMLReader reader = XMLReaderFactory.createXMLReader(); - - // xmlFilter1 uses the XMLReader as its reader. - xmlFilter1.setParent(reader); - - // xmlFilter2 uses xmlFilter1 as its reader. - xmlFilter2.setParent(xmlFilter1); - - // xmlFilter3 uses xmlFilter2 as its reader. - xmlFilter3.setParent(xmlFilter2); - - // xmlFilter3 outputs SAX events to the serializer. - java.util.Properties xmlProps = OutputPropertiesFactory.getDefaultMethodProperties("xml"); - xmlProps.setProperty("indent", "yes"); - xmlProps.setProperty("standalone", "no"); - Serializer serializer = SerializerFactory.getSerializer(xmlProps); - serializer.setOutputStream(System.out); - xmlFilter3.setContentHandler(serializer.asContentHandler()); - - // Perform the series of transformations as follows: - // - transformer3 gets its parent (transformer2) as the XMLReader/XMLFilter - // and calls transformer2.parse(new InputSource("foo.xml")). - // - transformer2 gets its parent (transformer1) as the XMLReader/XMLFilter - // and calls transformer1.parse(new InputSource("foo.xml")). - // - transformer1 gets its parent (reader, a SAXParser) as the XMLReader - // and calls reader.parse(new InputSource("foo.xml")). - // - reader parses the XML document and sends the SAX parse events to transformer1, - // which performs transformation 1 and sends the output to transformer2. - // - transformer2 parses the transformation 1 output, performs transformation 2, and - // sends the output to transformer3. - // - transformer3 parses the transformation 2 output, performs transformation 3, - // and sends the output to the serializer. - xmlFilter3.parse(new InputSource("foo.xml")); - } - } -} diff --git a/xalansamples/src/main/java/samples/UseXMLFilters/foo.xml b/xalansamples/src/main/java/samples/UseXMLFilters/foo.xml deleted file mode 100644 index da9f79b5e..000000000 --- a/xalansamples/src/main/java/samples/UseXMLFilters/foo.xml +++ /dev/null @@ -1,2 +0,0 @@ - -Hello \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/UseXMLFilters/foo1.xsl b/xalansamples/src/main/java/samples/UseXMLFilters/foo1.xsl deleted file mode 100644 index 08f2373ea..000000000 --- a/xalansamples/src/main/java/samples/UseXMLFilters/foo1.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/UseXMLFilters/foo2.xsl b/xalansamples/src/main/java/samples/UseXMLFilters/foo2.xsl deleted file mode 100644 index 59e2051b3..000000000 --- a/xalansamples/src/main/java/samples/UseXMLFilters/foo2.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - ...good to see you again! - - diff --git a/xalansamples/src/main/java/samples/UseXMLFilters/foo3.xsl b/xalansamples/src/main/java/samples/UseXMLFilters/foo3.xsl deleted file mode 100644 index cdb3e07f1..000000000 --- a/xalansamples/src/main/java/samples/UseXMLFilters/foo3.xsl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - ...and goodby! - - diff --git a/xalansamples/src/main/java/samples/UseXMLFilters/readme.html b/xalansamples/src/main/java/samples/UseXMLFilters/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/UseXMLFilters/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/Validate/Validate.java b/xalansamples/src/main/java/samples/Validate/Validate.java deleted file mode 100644 index 5b794775b..000000000 --- a/xalansamples/src/main/java/samples/Validate/Validate.java +++ /dev/null @@ -1,271 +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 samples.Validate; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.FileWriter; -import java.io.FilenameFilter; -import java.io.IOException; - -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.parsers.SAXParser; -import javax.xml.parsers.SAXParserFactory; - -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.XMLReader; -import org.xml.sax.ext.LexicalHandler; -import org.xml.sax.helpers.DefaultHandler; - -/* Use JAXP SAXParser to parse 1 .xml file or all the .xml files in a directory. - * Takes 1 or 2 command-line arguments: - * Argument 1 (required) is a file name or directory name. - * Argument 2 (optional) is a log file name. If ommitted, messages are written to screen. - */ -public class Validate -{ - static int numXMLFiles = 0; - static int numValidFiles = 0; - static int numInvalidFiles = 0; - static int numFilesMissingDoctype = 0; - static int numMalformedFiles = 0; - static boolean useLogFile = false; - static StringBuffer buff = new StringBuffer(); - - public static void main(String[] args) - throws FileNotFoundException, IOException, ParserConfigurationException, SAXException - { - if (args.length == 0 || args.length > 2) - { - System.out.println("\nEnter 'java validate -help' for information about running Validate"); - return; - } - if (args[0].toLowerCase().equals("-help")) - { - String sep = "\n====================================================\n"; - String a = "Validate uses Xerces to parse the xml files in the directory you specify or the individual xml file you specify. The parser validates each document (checks that it conforms to its DOCTYPE).\n"; - String b = "Each xml file should contain a DOCTYPE declaration.\n\n"; - String c = "Validate takes 1 or 2 arguments:\n"; - String d = " Argument 1 specifies a directory or an individual xml file.\n"; - String e = " Argument 2 specifies a log file. If you include this argument, Validate appends messages to this file. If you do not, Validate writes messages to the screen.\n"; - System.out.println(sep+a+b+c+d+e+sep); - return; - } - try - { - Validate v = new Validate(); - v.validate(args); - } - catch (Exception e) - { - e.printStackTrace(); - } - } - - void validate(String[] args) - throws FileNotFoundException, IOException, ParserConfigurationException, SAXException - { - File dir = new File(args[0]); - - // User may include a 2nd argument for the log file. - useLogFile = (args.length == 2); - - if (dir.isFile()) // Just checking one file. - { - parse(null,args[0]); - } - else if (dir.isDirectory()) // Checking the contents of a directory. - { - // Only interested in .xml files. - XMLFileFilter filter = new XMLFileFilter(); - String [] files = dir.list(filter); - for (int i = 0; i 1) - buff.append("Parsed " + numXMLFiles + " .xml files in " + args[0] + ".\n"); - if (numValidFiles > 1) - buff.append( numValidFiles + " files are valid.\n"); - else if (numValidFiles == 1) - buff.append( numValidFiles + " file is valid.\n"); - if (numInvalidFiles > 1) - buff.append(numInvalidFiles + " files are not valid.\n"); - else if (numInvalidFiles == 1) - buff.append( numInvalidFiles + " file is not valid.\n"); - if (numMalformedFiles > 1) - buff.append(numMalformedFiles + " files are not well-formed.\n"); - else if (numMalformedFiles == 1) - buff.append( numMalformedFiles + " file is not well-formed.\n"); - if (numFilesMissingDoctype > 1) - buff.append(numFilesMissingDoctype + " files do not contain a DOCTYPE declaration.\n"); - else if (numFilesMissingDoctype == 1) - buff.append(numFilesMissingDoctype + " file does not contain a DOCTYPE declaration.\n"); - - if (!useLogFile) - System.out.print(buff.toString()); - else - { - // If log file exists, append. - FileWriter writer = new FileWriter(args[1], true); - writer.write(new java.util.Date().toString()+ "\n"); - writer.write(buff.toString()); - writer.close(); - System.out.println("Done with validation. See " + args[1] + "."); - } - } - - // Parse each XML file. - void parse(String dir, String filename) - throws FileNotFoundException, IOException, ParserConfigurationException, SAXException - { - try - { - File f = new File(dir, filename); - StringBuffer errorBuff = new StringBuffer(); - InputSource input = new InputSource(new FileInputStream(f)); - // Set systemID so parser can find the dtd with a relative URL in the source document. - input.setSystemId(f.toString()); - SAXParserFactory spfact = SAXParserFactory.newInstance(); - - spfact.setValidating(true); - spfact.setNamespaceAware(true); - - SAXParser parser = spfact.newSAXParser(); - XMLReader reader = parser.getXMLReader(); - - //Instantiate inner-class error and lexical handler. - Handler handler = new Handler(filename, errorBuff); - reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler); - parser.parse(input, handler); - - if (handler.containsDTD && !handler.errorOrWarning) // valid - { - buff.append("VALID " + filename +"\n"); - numValidFiles++; - } - else if (handler.containsDTD) // not valid - { - buff.append ("NOT VALID " + filename + "\n"); - buff.append(errorBuff.toString()); - numInvalidFiles++; - } - else // no DOCTYPE to use for validation - { - buff.append("NO DOCTYPE DECLARATION " + filename + "\n"); - numFilesMissingDoctype++; - } - } - catch (Exception e) // Serious problem! - { - buff.append("NOT WELL-FORMED " + filename + ". " + e.getMessage() + "\n"); - numMalformedFiles++; - } - finally - { - numXMLFiles++; - } - } - // Inner classes - - // Only interested in parsing .xml files. - class XMLFileFilter implements FilenameFilter - { - public boolean accept(File dir, String fileName) - { - return fileName.toLowerCase().endsWith(".xml") && new File(dir.toString(),fileName).isFile(); - } - } - - // Catch any errors or warnings, and verify presence of doctype statement. - class Handler extends DefaultHandler implements LexicalHandler - { - boolean errorOrWarning; - boolean containsDTD; - String sourceFile; - StringBuffer errorBuff; - - Handler(String sourceFile, StringBuffer errorBuff) - { - super(); - this.sourceFile = sourceFile; - this.errorBuff = errorBuff; - errorOrWarning = false; - containsDTD = false; - } - - public void error(SAXParseException exc) - { - errorBuff.append(sourceFile + " Error: " + exc.getMessage()+ "\n"); - errorOrWarning = true; - } - public void warning(SAXParseException exc) - { - errorBuff.append(sourceFile + " Warning:" + exc.getMessage()+ "\n"); - errorOrWarning = true; - } - - // LexicalHandler methods; all no-op except startDTD(). - - // Set containsDTD to true when startDTD event occurs. - public void startDTD (String name, String publicId, String systemId) - throws SAXException - { - containsDTD = true; - } - - public void endDTD () throws SAXException - {} - - public void startEntity (String name) throws SAXException - {} - - public void endEntity (String name) throws SAXException - {} - - public void startCDATA () throws SAXException - {} - - public void endCDATA () throws SAXException - {} - - public void comment (char ch[], int start, int length) throws SAXException - {} - } -} diff --git a/xalansamples/src/main/java/samples/Validate/ValidateXMLInput.java b/xalansamples/src/main/java/samples/Validate/ValidateXMLInput.java deleted file mode 100644 index b25f3d79d..000000000 --- a/xalansamples/src/main/java/samples/Validate/ValidateXMLInput.java +++ /dev/null @@ -1,117 +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 samples.Validate; - -import javax.xml.parsers.SAXParserFactory; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.sax.SAXSource; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.SAXParseException; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.DefaultHandler; - -/** - * Validate the XML input by using SAXParserFactory to turn on namespace awareness and - * validation, and a SAX XMLReader to parse the input and report problems to an error - * handler. - * - * This sample uses birds.xml with an internal DOCTYPE declaration. As shipped, birds.xml - * contains an element that violates the declared document type. - */ -public class ValidateXMLInput -{ - - public static void main(String[] args) - throws Exception - { - ValidateXMLInput v = new ValidateXMLInput(); - v.validate(); - } - - void validate() - throws Exception - { - // Since we're going to use a SAX feature, the transformer must support - // input in the form of a SAXSource. - TransformerFactory tfactory = TransformerFactory.newInstance(); - if(tfactory.getFeature(SAXSource.FEATURE)) - { - // Standard way of creating an XMLReader in JAXP 1.1. - SAXParserFactory pfactory= SAXParserFactory.newInstance(); - pfactory.setNamespaceAware(true); // Very important! - // Turn on validation. - pfactory.setValidating(true); - // Get an XMLReader. - XMLReader reader = pfactory.newSAXParser().getXMLReader(); - - // Instantiate an error handler (see the Handler inner class below) that will report any - // errors or warnings that occur as the XMLReader is parsing the XML input. - Handler handler = new Handler(); - reader.setErrorHandler(handler); - - // Standard way of creating a transformer from a URL. - Transformer t = tfactory.newTransformer( - new StreamSource("birds.xsl")); - - // Specify a SAXSource that takes both an XMLReader and a URL. - SAXSource source = new SAXSource(reader, - new InputSource("birds.xml")); - - // Transform to a file. - try - { - t.transform(source, new StreamResult("birds.out")); - } - catch (TransformerException te) - { - // The TransformerException wraps something other than a SAXParseException - // warning or error, either of which should be "caught" by the Handler. - System.out.println("Not a SAXParseException warning or error: " + te.getMessage()); - } - - System.out.println("=====Done====="); - } - else - System.out.println("tfactory does not support SAX features!"); - } - - // Catch any errors or warnings from the XMLReader. - class Handler extends DefaultHandler - { - public void warning (SAXParseException spe) - throws SAXException - { - System.out.println("SAXParseException warning: " + spe.getMessage()); - } - - public void error (SAXParseException spe) - throws SAXException - { - System.out.println("SAXParseException error: " + spe.getMessage()); - } - } -} diff --git a/xalansamples/src/main/java/samples/Validate/birds.xml b/xalansamples/src/main/java/samples/Validate/birds.xml deleted file mode 100644 index 5b1293859..000000000 --- a/xalansamples/src/main/java/samples/Validate/birds.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - - - - - - ]> - - - - - Great Tinamou. - Highland Tinamou. - Little Tinamou. - Thicket Tinamou. - Slaty-breasted Tinamou. - Choco Tinamou. - - - - - Red-throated Loon. - Arctic Loon. - Pacific Loon. - Common Loon. - Yellow-billed Loon. - - - - - - - Least Grebe. - Pied-billed Grebe. - Atitlan Grebe. - Horned Grebe. - Red-necked Grebe. - Eared Grebe. - Western Grebe. - Clark's Grebe. - - - - - - - Yellow-nosed Albatross. (A) - Shy Albatross. (A) - Black-browed Albatross. (A) - Light-mantled Albatross. (A) - Wandering Albatross. (A) - Laysan Albatross. - Black-footed Albatross. - Short-tailed Albatross. (N) - - - Northern Fulmar. - Kermadec Petrel. (A) - Herald Petrel. (A) - Murphy's Petrel. (N) - Mottled Petrel. (A) - Bermuda Petrel. - Black-capped Petrel. - Juan Fernandez Petrel. (N) - Dark-rumped Petrel. - White-necked Petrel. (H) - Bonin Petrel. (H) - Black-winged Petrel. (H, A) - Cook's Petrel. (N) - Stejneger's Petrel. (A) - Bulwer's Petrel. (H) - Jouanin's Petrel. (H, A) - Parkinson's Petrel. (N) - Streaked Shearwater. (A) - Cory's Shearwater. (N) - Pink-footed Shearwater. (N) - Flesh-footed Shearwater. (N) - Greater Shearwater. (N) - Wedge-tailed Shearwater. - Buller's Shearwater. (N) - Sooty Shearwater. (N) - Short-tailed Shearwater. (N) - Christmas Shearwater. (H) - Manx Shearwater. - Townsend's Shearwater. - Black-vented Shearwater. - Audubon's Shearwater. - Little Shearwater. (A) - - - Wilson's Storm-Petrel. (N) - White-faced Storm-Petrel. (A) - European Storm-Petrel. (A) - Fork-tailed Storm-Petrel. - Leach's Storm-Petrel. - Ashy Storm-Petrel. - Band-rumped Storm-Petrel. (N) - Wedge-rumped Storm-Petrel. (N) - Black Storm-Petrel. - Guadalupe Storm-Petrel. - Markham's Storm-Petrel. (A) - Tristram's Storm-Petrel. (H) - Least Storm-Petrel. - - - - - - White-tailed Tropicbird. - Red-billed Tropicbird. - Red-tailed Tropicbird. - - - Masked Booby. - Blue-footed Booby. - Peruvian Booby. (A) - Brown Booby. - Red-footed Booby. - Northern Gannet. - - - American White Pelican. - Brown Pelican. - - - Brandt's Cormorant. - Neotropic Cormorant. - Double-crested Cormorant. - Great Cormorant. - Red-faced Cormorant. - Pelagic Cormorant. - - - Anhinga. - - - Magnificent Frigatebird. - Great Frigatebird. - Lesser Frigatebird. (A) - - - diff --git a/xalansamples/src/main/java/samples/Validate/birds.xsl b/xalansamples/src/main/java/samples/Validate/birds.xsl deleted file mode 100644 index 8c21d5831..000000000 --- a/xalansamples/src/main/java/samples/Validate/birds.xsl +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - -Order is: - - - - - - Family is: - - - - - SubFamily is - - - - - - - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/Validate/readme.html b/xalansamples/src/main/java/samples/Validate/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/Validate/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/XPathAPI/ApplyXPathJAXP.java b/xalansamples/src/main/java/samples/XPathAPI/ApplyXPathJAXP.java deleted file mode 100644 index c18c57c83..000000000 --- a/xalansamples/src/main/java/samples/XPathAPI/ApplyXPathJAXP.java +++ /dev/null @@ -1,179 +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. - */ -package samples.XPathAPI; - -import java.io.OutputStreamWriter; - -import javax.xml.namespace.*; -import javax.xml.transform.*; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.stream.StreamResult; -import javax.xml.xpath.*; -import org.xml.sax.*; -import org.w3c.dom.*; - -/** - * JAXP 1.3 XPath API sample. - * - * Basic utility for applying an XPath expression to an input xml file and printing - * the evaluation result, using JAXP 1.3 XPath API. - * - * Takes 3 arguments: - * (1) an xml file name - * (2) an XPath expression to apply to the input document - * (3) the return type, which is one of the following Strings: - * num, bool, str, node, nodeset - * - * Examples: - * java ApplyXPathJAXP foo.xml /doc/name[1]/@last str - * java ApplyXPathJAXP foo.xml /doc/name nodeset - */ -public class ApplyXPathJAXP -{ - public static void main(String[] args) - { - QName returnType = null; - - if (args.length != 3) - { - System.err.println("Usage: java ApplyXPathAPI xml_file xpath_expression type"); - } - - InputSource xml = new InputSource(args[0]); - String expr = args[1]; - - // set the return type - if (args[2].equals("num")) returnType = XPathConstants.NUMBER; - else if (args[2].equals("bool")) returnType = XPathConstants.BOOLEAN; - else if (args[2].equals("str")) returnType = XPathConstants.STRING; - else if (args[2].equals("node")) returnType = XPathConstants.NODE; - else if (args[2].equals("nodeset")) returnType = XPathConstants.NODESET; - else - System.err.println("Invalid return type: " + args[2]); - - // Create a new XPath - XPathFactory factory = XPathFactory.newInstance(); - XPath xpath = factory.newXPath(); - - Object result = null; - try { - // compile the XPath expression - XPathExpression xpathExpr = xpath.compile(expr); - - // Evaluate the XPath expression against the input document - result = xpathExpr.evaluate(xml, returnType); - - // Print the result to System.out. - printResult(result); - } - catch (Exception e) { - e.printStackTrace(); - } - } - - /** - * Print the type and value of the evaluation result. - */ - static void printResult(Object result) - throws Exception - { - if (result instanceof Double) { - System.out.println("Result type: double"); - System.out.println("Value: " + result); - } - else if (result instanceof Boolean) { - System.out.println("Result type: boolean"); - System.out.println("Value: " + ((Boolean)result).booleanValue()); - } - else if (result instanceof String) { - System.out.println("Result type: String"); - System.out.println("Value: " + result); - } - else if (result instanceof Node) { - Node node = (Node)result; - System.out.println("Result type: Node"); - System.out.println(""); - printNode(node); - System.out.println(""); - } - else if (result instanceof NodeList) { - NodeList nodelist = (NodeList)result; - System.out.println("Result type: NodeList"); - System.out.println(""); - printNodeList(nodelist); - System.out.println(""); - } - } - - /** Decide if the node is text, and so must be handled specially */ - static boolean isTextNode(Node n) - { - if (n == null) - return false; - short nodeType = n.getNodeType(); - return nodeType == Node.CDATA_SECTION_NODE || nodeType == Node.TEXT_NODE; - } - - static void printNode(Node node) - throws Exception - { - if (isTextNode(node)) { - System.out.println(node.getNodeValue()); - } - else { - // Set up an identity transformer to use as serializer. - Transformer serializer = TransformerFactory.newInstance().newTransformer(); - serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - serializer.transform(new DOMSource(node), new StreamResult(new OutputStreamWriter(System.out))); - } - - } - - static void printNodeList(NodeList nodelist) - throws Exception - { - Node n; - - // Set up an identity transformer to use as serializer. - Transformer serializer = TransformerFactory.newInstance().newTransformer(); - serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - - for (int i = 0; i < nodelist.getLength(); i++) - { - n = nodelist.item(i); - if (isTextNode(n)) { - // DOM may have more than one node corresponding to a - // single XPath text node. Coalesce all contiguous text nodes - // at this level - StringBuffer sb = new StringBuffer(n.getNodeValue()); - for ( - Node nn = n.getNextSibling(); - isTextNode(nn); - nn = nn.getNextSibling() - ) { - sb.append(nn.getNodeValue()); - } - System.out.print(sb); - } - else { - serializer.transform(new DOMSource(n), new StreamResult(new OutputStreamWriter(System.out))); - } - System.out.println(); - } - } -} diff --git a/xalansamples/src/main/java/samples/XPathAPI/ExtensionFunctionResolver.java b/xalansamples/src/main/java/samples/XPathAPI/ExtensionFunctionResolver.java deleted file mode 100644 index 6e6ae7835..000000000 --- a/xalansamples/src/main/java/samples/XPathAPI/ExtensionFunctionResolver.java +++ /dev/null @@ -1,90 +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. - */ -package samples.XPathAPI; - -import javax.xml.xpath.XPath; -import javax.xml.xpath.XPathConstants; -import javax.xml.xpath.XPathFactory; -import org.apache.xalan.extensions.XPathFunctionResolverImpl; -import org.apache.xalan.extensions.ExtensionNamespaceContext; -import org.xml.sax.InputSource; - -/** - * JAXP 1.3 XPath API sample. - * - * This sample shows how to use the sample XPathFunctionResolver to evaluate - * XPath expressions containing Java or EXSLT extension functions. - * - * To support extension functions in XPath expressions, you have to set an - * XPathFunctionResolver on the XPath object. You can provide your implementation - * of XPathFunctionResolver or use sample XPathFunctionResolver in - * org.apache.xalan.extensions.XPathFunctionResolverImpl, which supports - * the usage of Java and EXSLT extension functions. - * - * You also need to provide a NamespaceContext for the XPath evaluation. You - * can provide your own implementation of NamespaceContext, or use the sample - * implementation in org.apache.xalan.extensions.ExtensionNamespaceContext, - * which supports the following namespace prefix to URI mappings: - * - * java --> http://xml.apache.org/xalan/java - * exslt --> http://exslt.org/common - * math --> http://exslt.org/math - * set --> http://exslt.org/sets - * str --> http://exslt.org/strings - * dyn --> http://exslt.org/dynamic - * datetime --> http://exslt.org/dates-and-times - * - * To run this sample, you have to put the directory containing ExtensionTest.class - * on your classpath. - */ -public class ExtensionFunctionResolver -{ - // An XPath expression containing an EXSLT extension function call. - public static final String EXPR1 = "math:max(/doc/num)"; - - // An XPath expression containing a Java extension function call. - // You have to compile the Java source file ExtensionTest.java and put - // the directory containing ExtensionTest.class on your classpath. - public static final String EXPR2 = "java:ExtensionTest.test('Bob')"; - - public static void main(String[] args) throws Exception - { - XPathFactory factory = XPathFactory.newInstance(); - XPath xpath = factory.newXPath(); - - // set the NamespaceContext to - // org.apache.xalan.extensions.ExtensionNamespaceContext - xpath.setNamespaceContext(new ExtensionNamespaceContext()); - - // set the XPathFunctionResolver to - // org.apache.xalan.extensions.XPathFunctionResolverImpl - xpath.setXPathFunctionResolver(new XPathFunctionResolverImpl()); - - Object result = null; - // Evaluate the XPath expression "math:max(/doc/num)" against - // the input document numlist.xml - InputSource context = new InputSource("numlist.xml"); - result = xpath.evaluate(EXPR1, context, XPathConstants.NUMBER); - System.out.println(EXPR1 + " = " + result); - - // Evaluate the XPath expression "java:ExtensionTest.test('Bob')" - result = xpath.evaluate(EXPR2, context, XPathConstants.STRING); - System.out.println(EXPR2 + " = " + result); - } - -} diff --git a/xalansamples/src/main/java/samples/XPathAPI/ExtensionTest.java b/xalansamples/src/main/java/samples/XPathAPI/ExtensionTest.java deleted file mode 100644 index c7b8459c2..000000000 --- a/xalansamples/src/main/java/samples/XPathAPI/ExtensionTest.java +++ /dev/null @@ -1,26 +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. - */ -package samples.XPathAPI; - -public class ExtensionTest -{ - public static String test(String name) - { - return "Hello " + name + "!"; - } -} diff --git a/xalansamples/src/main/java/samples/XPathAPI/XPathResolver.java b/xalansamples/src/main/java/samples/XPathAPI/XPathResolver.java deleted file mode 100644 index f11edcb07..000000000 --- a/xalansamples/src/main/java/samples/XPathAPI/XPathResolver.java +++ /dev/null @@ -1,158 +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. - */ -package samples.XPathAPI; - -import javax.xml.namespace.*; -import javax.xml.xpath.*; -import java.util.Iterator; - -/** - * JAXP 1.3 XPath API sample. - * - * This sample demonstrates the use of NamespaceContext, XPathFunctionResolver - * and XPathVariableResolver. The evaluated XPath expression ("ex:addFunc(2, 3) + $xyz") - * contains an extension function and a variable reference. The extension function - * and variable are evaluated using our customized XPathFunctionResolver and - * XPathVariableResolver respectively. A NamespaceContext implementation is also - * needed to map the prefix in the extension function to a valid namespace uri. - */ -public class XPathResolver -{ - /** - * The XPath expression to evaluate, which contains an extension - * function and a variable reference. - */ - private static final String EXPR = "ex:addFunc(2, 3) + $xyz"; - - /** - * The NamespaceContext implementation is used to map the prefix "ex" - * to the namespace uri "http://ex.com". - */ - public static class MyNamespaceContext implements NamespaceContext - { - public String getNamespaceURI(String prefix) - { - if (prefix == null) - throw new IllegalArgumentException("The prefix cannot be null."); - - if (prefix.equals("ex")) - return "http://ex.com"; - else - return null; - } - - public String getPrefix(String namespace) - { - if (namespace == null) - throw new IllegalArgumentException("The namespace uri cannot be null."); - if (namespace.equals("http://ex.com")) - return "ex"; - else - return null; - } - - public Iterator getPrefixes(String namespace) - { - return null; - } - } - - /** - * The XPathFunctionResolver implementation is used to evaluate - * the extension function "ex:addFunc(2, 3)". - */ - public static class MyFunctionResolver implements XPathFunctionResolver - { - /** - * This method returns a customized XPathFunction implementation - * for the extension function "ex:addFunc()". - */ - public XPathFunction resolveFunction(QName fname, int arity) - { - if (fname == null) - throw new NullPointerException("The function name cannot be null."); - - // We only recognize one function, i.e. ex:addFunc(). - if (fname.equals(new QName("http://ex.com", "addFunc", "ex"))) - /** - * Return a customized implementation of XPathFunction. We need - * to implement the evaluate(List) method. - */ - return new XPathFunction() { - /** - * The actual implementation of the extension function. - * Just cast two arguments to Double and add them together. - */ - public Object evaluate(java.util.List args) { - if (args.size() == 2) { - Double arg1 = (Double)args.get(0); - Double arg2 = (Double)args.get(1); - return new Double(arg1.doubleValue() + arg2.doubleValue()); - } - else - return null; - } - }; - else - return null; - } - } - - /** - * Our own implementation of XPathVariableResolver, which resolves the - * variable "xyz" to a double value 4.0. - */ - public static class MyVariableResolver implements XPathVariableResolver - { - public Object resolveVariable(QName varName) - { - if (varName == null) - throw new NullPointerException("The variable name cannot be null."); - - if (varName.equals(new QName("", "xyz"))) - return new Double(4.0); - else - return null; - } - } - - - public static void main(String[] args) - { - XPathFactory factory = XPathFactory.newInstance(); - XPath xpath = factory.newXPath(); - // Set the NamespaceContext - xpath.setNamespaceContext(new MyNamespaceContext()); - // Set the function resolver - xpath.setXPathFunctionResolver(new MyFunctionResolver()); - // Set the variable resolver - xpath.setXPathVariableResolver(new MyVariableResolver()); - - Object result = null; - try { - result = xpath.evaluate(EXPR, (Object)null, XPathConstants.NUMBER); - } - catch (Exception e) { - e.printStackTrace(); - } - - // The evaluation result is 9.0. - System.out.println("The evaluation result: " + result); - } - -} diff --git a/xalansamples/src/main/java/samples/XPathAPI/foo.xml b/xalansamples/src/main/java/samples/XPathAPI/foo.xml deleted file mode 100644 index 0423708f7..000000000 --- a/xalansamples/src/main/java/samples/XPathAPI/foo.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/XPathAPI/numlist.xml b/xalansamples/src/main/java/samples/XPathAPI/numlist.xml deleted file mode 100644 index bf9ebcd02..000000000 --- a/xalansamples/src/main/java/samples/XPathAPI/numlist.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - 2 - 4 - 6 - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/1-redir.xml b/xalansamples/src/main/java/samples/extensions/1-redir.xml deleted file mode 100644 index e99f05af8..000000000 --- a/xalansamples/src/main/java/samples/extensions/1-redir.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - Testing Redirect extension: - A foo subelement text node - -
    - Everything else -
    -
    diff --git a/xalansamples/src/main/java/samples/extensions/1-redir.xsl b/xalansamples/src/main/java/samples/extensions/1-redir.xsl deleted file mode 100644 index 75889b49c..000000000 --- a/xalansamples/src/main/java/samples/extensions/1-redir.xsl +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - Standard output: - - - - - - -
    - -- look in for the redirected output -- - -
    -
    - - - - - - - - - - - - - - - - - - -
    diff --git a/xalansamples/src/main/java/samples/extensions/2-basicJscript.xml b/xalansamples/src/main/java/samples/extensions/2-basicJscript.xml deleted file mode 100644 index 9c66ca11a..000000000 --- a/xalansamples/src/main/java/samples/extensions/2-basicJscript.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/2-basicJscript.xsl b/xalansamples/src/main/java/samples/extensions/2-basicJscript.xsl deleted file mode 100644 index 8ead8a2dc..000000000 --- a/xalansamples/src/main/java/samples/extensions/2-basicJscript.xsl +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - - - - - - var multiplier=1; - // Extension element implementations always take two arguments. The first - // argument is the XSL Processor context; the second argument is the element. - function timelapse(xslProcessorContext, elem) - { - multiplier=parseInt(elem.getAttribute("multiplier")); - // The element return value is placed in the result tree. - // If you do not want a return value, return null. - return null; - } - function getdate(numdays) - { - var d = new Date(); - d.setDate(d.getDate() + parseInt(numdays*multiplier)); - return d.toLocaleString(); - } - - - - -

    We have received your enquiry and will - respond by

    -
    - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/3-java-namespace.xml b/xalansamples/src/main/java/samples/extensions/3-java-namespace.xml deleted file mode 100644 index 6f2eb445c..000000000 --- a/xalansamples/src/main/java/samples/extensions/3-java-namespace.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/3-java-namespace.xsl b/xalansamples/src/main/java/samples/extensions/3-java-namespace.xsl deleted file mode 100644 index 60afa3d92..000000000 --- a/xalansamples/src/main/java/samples/extensions/3-java-namespace.xsl +++ /dev/null @@ -1,41 +0,0 @@ - - - - - - - - - - - - - - - - - -

    Date:

    -
    - -
    diff --git a/xalansamples/src/main/java/samples/extensions/4-numlistJava.xsl b/xalansamples/src/main/java/samples/extensions/4-numlistJava.xsl deleted file mode 100644 index cf27dddf0..000000000 --- a/xalansamples/src/main/java/samples/extensions/4-numlistJava.xsl +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - -

    Java Example

    - -

    Here are the names in alphabetical order by last name:

    - - - -

    - [ - - ]. - - , - -

    - -
    - -
    - -
    diff --git a/xalansamples/src/main/java/samples/extensions/5-numlistJscript.xsl b/xalansamples/src/main/java/samples/extensions/5-numlistJscript.xsl deleted file mode 100644 index 0b658ad81..000000000 --- a/xalansamples/src/main/java/samples/extensions/5-numlistJscript.xsl +++ /dev/null @@ -1,73 +0,0 @@ - - - - - - - - - var counters = new Array(); - - function init (xslproc, elem) { - name = elem.getAttribute ("name"); - value = parseInt(elem.getAttribute ("value")); - counters[name] = value; - return null; - } - - function read (name) { - return "" + (counters[name]); - } - - function incr (xslproc, elem) - { - name = elem.getAttribute ("name"); - counters[name]++; - return null; - } - - - - - -

    JavaScript Example.

    - -

    Here are the names in alphabetical order by last name:

    - - - -

    - [ - - ]. - - , - -

    - -
    - -
    - -
    diff --git a/xalansamples/src/main/java/samples/extensions/IntDate.java b/xalansamples/src/main/java/samples/extensions/IntDate.java deleted file mode 100644 index ca94e29ad..000000000 --- a/xalansamples/src/main/java/samples/extensions/IntDate.java +++ /dev/null @@ -1,37 +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 samples.extensions; -import java.util.Calendar; -import java.util.Date; - -public class IntDate -{ - public static Date getDate(String year, String month, String day) - { - // Date(int, int, int) has been deprecated, so use Calendar to - // set the year, month, and day. - Calendar c = Calendar.getInstance(); - // Convert each argument to int. - c.set(Integer.parseInt(year),Integer.parseInt(month),Integer.parseInt(day)); - return c.getTime(); - } -} - diff --git a/xalansamples/src/main/java/samples/extensions/MyCounter.java b/xalansamples/src/main/java/samples/extensions/MyCounter.java deleted file mode 100644 index e2aa6ae84..000000000 --- a/xalansamples/src/main/java/samples/extensions/MyCounter.java +++ /dev/null @@ -1,59 +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 samples.extensions; -import java.util.Hashtable; - -public class MyCounter { - static Hashtable counters = new Hashtable (); - - - public void init(org.apache.xalan.extensions.XSLProcessorContext context, - org.w3c.dom.Element elem) - { - String name = elem.getAttribute("name"); - String value = elem.getAttribute("value"); - int val; - try - { - val = Integer.parseInt (value); - } - catch (NumberFormatException e) - { - e.printStackTrace (); - val = 0; - } - counters.put (name, new Integer (val)); - } - - public int read(String name) - { - Integer cval = (Integer)counters.get(name); - return (cval == null) ? 0 : cval.intValue(); - } - - public void incr(org.apache.xalan.extensions.XSLProcessorContext context, - org.w3c.dom.Element elem) { - String name = elem.getAttribute("name"); - Integer cval = (Integer) counters.get(name); - int nval = (cval == null) ? 0 : (cval.intValue () + 1); - counters.put (name, new Integer (nval)); - } -} diff --git a/xalansamples/src/main/java/samples/extensions/numlist.xml b/xalansamples/src/main/java/samples/extensions/numlist.xml deleted file mode 100644 index 76d41c245..000000000 --- a/xalansamples/src/main/java/samples/extensions/numlist.xml +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/readme.html b/xalansamples/src/main/java/samples/extensions/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/extensions/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/GETTING_STARTED.txt b/xalansamples/src/main/java/samples/extensions/sql/GETTING_STARTED.txt deleted file mode 100644 index 14385c631..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/GETTING_STARTED.txt +++ /dev/null @@ -1,55 +0,0 @@ -The SQL Extension examples require the Apache Derby jars. -The Derby jars are available from http://incubator.apache.org/derby/ - -The sample batch / script files are configured to look for the -derby jars java/samples/extensions/sql directory by default. - -If you already have derby installed and want to use that implementation. -You can do one of the following. - -1) set the environment variable DERBY_JAR_DIR to point to the location of - derby.jar and derbytools.jar - -2) Have the derby.jar and derbytools.jar in your classpath. - - -First create the sample database using Derby. - -To do this, On Windows execute the command -runDerby.bat createdb.sql - -On Unix -sh runDerby.sh createdb.sql - -You can use the Derby tools to examine the raw database - -To do this on windows execute the command -runDerby.bat - -At the lj> prompt type the following commands -lj> connect 'sampleDB'; -lj> select * from import1; - -To quit the lj session type - -lj> quit; - - -To Start lj on Unix type - -sh runDerby.sh - - -Once the sample database has been created, you can run the sample -stylesheets using the runXalan script. - -For some basic examples; - -runXalan.bat -XSL basic-connection/DumpSQL.xsl - -This example dumps the raw Document that was produced by the query. - -runXalan.bat -XSL basic-connection/dbtest.xsl - -Shows how to manipulate the raw document to produce HTML output - diff --git a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/DumpSQL.xsl b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/DumpSQL.xsl deleted file mode 100644 index 8bfedc204..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/DumpSQL.xsl +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbinfo.xml b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbinfo.xml deleted file mode 100644 index f3c6791e2..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbinfo.xml +++ /dev/null @@ -1,11 +0,0 @@ - - This file contains information required to make a connection to the DBMS - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:sampleDB - - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest-cinfo.xsl b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest-cinfo.xsl deleted file mode 100644 index 8c265b7d5..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest-cinfo.xsl +++ /dev/null @@ -1,84 +0,0 @@ - - - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - - - - - - List of products - - - - - - - - - Error in Query - - - - - - - - - - -
    - - - -
    - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest.xsl b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest.xsl deleted file mode 100644 index 2a4832552..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/dbtest.xsl +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - - - - - - - - List of products - - - - - - - - - - - - - - - - - - Error in Query - - - - - - - - - - - - - - - - - - - -
    - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/readme.html b/xalansamples/src/main/java/samples/extensions/sql/basic-connection/readme.html deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/basic-connection/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/createdb.sql b/xalansamples/src/main/java/samples/extensions/sql/createdb.sql deleted file mode 100644 index 4ec45773a..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/createdb.sql +++ /dev/null @@ -1,8 +0,0 @@ -connect 'sampleDB;create=true'; - -create table import1( ProductID int, Name varchar(40)); - -insert into import1 (ProductID, Name) values (1, 'toothpaste'); -insert into import1 (ProductID, Name) values (2, 'milk'); -insert into import1 (ProductID, Name) values (3, 'bread'); -insert into import1 (ProductID, Name) values (4, 'cereal'); diff --git a/xalansamples/src/main/java/samples/extensions/sql/extConnection/ExternalConnection.java b/xalansamples/src/main/java/samples/extensions/sql/extConnection/ExternalConnection.java deleted file mode 100644 index 5ebba0d59..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/extConnection/ExternalConnection.java +++ /dev/null @@ -1,108 +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 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(" "); - - // 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/dbtest.xsl b/xalansamples/src/main/java/samples/extensions/sql/extConnection/dbtest.xsl deleted file mode 100644 index d613441b6..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/extConnection/dbtest.xsl +++ /dev/null @@ -1,78 +0,0 @@ - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - - - List of products - - - - - - - - - Error in Query - - - - - - - - - -
    - - - -
    - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/sql/extConnection/readme.html b/xalansamples/src/main/java/samples/extensions/sql/extConnection/readme.html deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/extConnection/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/pquery/dbinfo.xml b/xalansamples/src/main/java/samples/extensions/sql/pquery/dbinfo.xml deleted file mode 100644 index ac57a6d67..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/pquery/dbinfo.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - 1 - - - - org.apache.derby.jdbc.EmbeddedDriver - jdbc:derby:sampleDB - - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/pquery/dbtest.xsl b/xalansamples/src/main/java/samples/extensions/sql/pquery/dbtest.xsl deleted file mode 100644 index 0d7344848..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/pquery/dbtest.xsl +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - - List of products - - - - - - - - - - - - Error in Query - - - - - - - - - - -
    - - - -
    - - - - - - - - - -
    diff --git a/xalansamples/src/main/java/samples/extensions/sql/pquery/readme.html b/xalansamples/src/main/java/samples/extensions/sql/pquery/readme.html deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/pquery/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/readme.html b/xalansamples/src/main/java/samples/extensions/sql/readme.html deleted file mode 100644 index dff6155a7..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/runDerby.bat b/xalansamples/src/main/java/samples/extensions/sql/runDerby.bat deleted file mode 100644 index 005304f3f..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/runDerby.bat +++ /dev/null @@ -1,73 +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 runDerby.bat: Script to execute the Derby tool IJ -rem Usage: runDerby script file] -rem Setup: -rem - you should set JAVA_HOME -rem - you can set DERBY_HOME to point to both derby.jar and derbytools.jar -rem - JAVA_OPTS is added to the java command line -rem - DERBY_JAR_DIR, default is the current directory - -echo. - -if not "%JAVA_HOME%" == "" goto setant -:noJavaHome -rem Default command used to call java.exe; hopefully it's on the path here -if "%_JAVACMD%" == "" set _JAVACMD=java -echo. -echo Warning: JAVA_HOME environment variable is not set. -echo If build fails because sun.* classes could not be found -echo you will need to set the JAVA_HOME environment variable -echo to the installation directory of java. -echo. - -:setant -rem Default command used to call java.exe or equivalent -if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java - - -if "%DERBY_JAR_DIR%" == "" set DERBY_JAR_DIR=. - -set _DERBY_JAR=%DERBY_JAR_DIR%\derby.jar;%DERBY_JAR_DIR%\derbytools.jar - - -rem Attempt to automatically add system classes to _CLASSPATH -rem Use _underscore prefix to not conflict with user's settings -set _CLASSPATH=%CLASSPATH% -if exist "%JAVA_HOME%\lib\tools.jar" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar -if exist "%JAVA_HOME%\lib\classes.zip" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\classes.zip -set _CLASSPATH=%_DERBY_JAR%;%_XML-APIS_JAR%;%_PARSER_JAR%;%_CLASSPATH% - -echo %_CLASSPATH% - -@echo on -"%_JAVACMD%" -mx64m %JAVA_OPTS% -classpath "%_CLASSPATH%" -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij %1 %2 -@echo off - -goto end - -:end -rem Cleanup environment variables -set _JAVACMD= -set _CLASSPATH= -set _ANT_HOME= -set _ANT_JAR= -set _PARSER_JAR= -set _XML-APIS_JAR= - diff --git a/xalansamples/src/main/java/samples/extensions/sql/runDerby.sh b/xalansamples/src/main/java/samples/extensions/sql/runDerby.sh deleted file mode 100644 index 357a41646..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/runDerby.sh +++ /dev/null @@ -1,58 +0,0 @@ -#!/bin/sh -# -#========================================================================= -# 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 - -if [ "$DERBY_JAR_DIR" = "" ] ; then - DERBYJAR_DIR=. -fi - - - -_JAVACMD=$JAVA_HOME/bin/java - -_BUILD_DIR=../../../build - -_JAR_DIR=../../../lib - - -_ENDORSED_DIR=$_BUILD_DIR - -if [ "$JAVA_HOME" = "" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." - _JAVACMD=java -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="$DERBYJAR_DIR/derby.jar${CLPATHSEP}$DERBYJAR_DIR/derbytools.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 "Running Derby: $@" -echo " ...with classpath: $_CLASSPATH" - -"$_JAVACMD" $JAVA_OPTS -Djava.endorsed.dirs=$_ENDORSED_DIR -classpath "$_CLASSPATH" -Dij.protocol=jdbc:derby: org.apache.derby.tools.ij $@ - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/runExtConnection.bat b/xalansamples/src/main/java/samples/extensions/sql/runExtConnection.bat deleted file mode 100644 index 826a8bd87..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/runExtConnection.bat +++ /dev/null @@ -1,132 +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 runDerby.bat: Script to execute the Derby tool IJ -rem Usage: runDerby script file] -rem Setup: -rem - you should set JAVA_HOME -rem - you can set DERBY_HOME to point to both derby.jar and derbytools.jar -rem - JAVA_OPTS is added to the java command line -rem - PARSER_JAR may be set to use alternate parser (default:..\..\..\bin\xercesImpl.jar) -rem - DERBY_JAR_DIR, default is the current directory -echo. - -if not "%JAVA_HOME%" == "" goto setant -:noJavaHome -rem Default command used to call java.exe; hopefully it's on the path here -if "%_JAVACMD%" == "" set _JAVACMD=java -echo. -echo Warning: JAVA_HOME environment variable is not set. -echo If build fails because sun.* classes could not be found -echo you will need to set the JAVA_HOME environment variable -echo to the installation directory of java. -echo. - -:setant -rem Default command used to call java.exe or equivalent -if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java - -rem Default command used to call java.exe or equivalent -if "%_JAVACCMD%" == "" set _JAVACCMD=%JAVA_HOME%\bin\javac - - -if "%DERBY_JAR_DIR%" == "" set DERBY_JAR_DIR=. -set _DERBY_JAR=%DERBY_JAR_DIR%\derby.jar;%DERBY_JAR_DIR%\derbytools.jar - - -REM TO Work with JDK 1.3 and JDK 1.4, we will keep the directory -REM component seperate from the JAR name. This way we can use the -REM directory component as part of the Endorsed Dir command line -REM argument when running under JDK 1.4 this should also work for JDK 1.5 - -REM The XML Apis are going to be either in the LIB dir for a source -REM release or in the root direcctory for a binary release. - -IF EXIST "..\..\..\lib\xercesImpl.jar" goto BIN_DIR_BINRELEASE - -:BIN_DIR_SRCRELEASE - Echo Setting bin JAR directory for a sOurce release - set _BIN_JAR_DIR=..\..\..\ - goto REPORT_BIN_DIR - -:BIN_DIR_BINRELEASE - echo Setting bin JAR Directory for a binary release - set _BIN_JAR_DIR=..\..\..\lib - -:REPORT_BIN_DIR -Echo Binary JAR Directory: %_BIN_JAR_DIR% -echo . - - -REM The Parser JAR will be in the Lib Dir for the Source Release and for the -REM Binary Release they are in the root directory. - -if exist "..\..\..\build\xalan.jar" goto XALAN_DIR_BINRELEASE - -:XALAN_DIR_SRCRELEASE - Echo Configuring Xalan for a binary release - set _XALAN_JAR_DIR=..\..\..\ - goto XALAN_DIR_REPORT - -:XALAN_DIR_BINRELEASE - Echo Configuring Xalan for source release - set _XALAN_JAR_DIR=..\..\..\build - -:XALAN_DIR_REPORT -Echo Xalan Directory is: %_XALAN_JAR_DIR% -echo . - - -rem Attempt to automatically add system classes to _CLASSPATH -rem Use _underscore prefix to not conflict with user's settings - -set _CLASSPATH=%CLASSPATH% -if exist "%JAVA_HOME%\lib\tools.jar" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar -if exist "%JAVA_HOME%\lib\classes.zip" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\classes.zip - -set _CLASSPATH=%_XALAN_JAR_DIR%\xalan.jar;%_XALAN_JAR_DIR%\serializer.jar;%_BIN_JAR_DIR%\xml-apis.jar;%_BIN_JAR_DIR%\xercesImpl.jar;%_DERBY_JAR%;%_CLASSPATH% - -set _CLASSPATH=ext-connection;%_CLASSPATH% - -echo Using Classpath: %_CLASSPATH% -echo . - -set _ENDORSED_DIR=%_XALAN_JAR_DIR%;%_BIN_JAR_DIR% -echo Setting Endorsed Dir to: %_ENDORSED_DIR% : Note ONLY USed for JDK 1.4 -echo . - -Echo Compiling the External connection Class -echo %_JAVACCMD% -d ./ext-connection -classpath "%_CLASSPATH%" ./ext-connection/ExternalConnection.java -%_JAVACCMD% -d ./ext-connection -classpath "%_CLASSPATH%" ./ext-connection/ExternalConnection.java - -@echo on -"%_JAVACMD%" -mx64m %JAVA_OPTS% -Djava.endorsed.dirs=%_ENDORSED_DIR% -classpath "%_CLASSPATH%" ExternalConnection %1 %2 %3 %4 %5 %6 %7 %8 -@echo off - -goto end - -:end -rem Cleanup environment variables -set _JAVACMD= -set _CLASSPATH= -set _ANT_HOME= -set _ANT_JAR= -set _PARSER_JAR= -set _XML-APIS_JAR= - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/runExtConnection.sh b/xalansamples/src/main/java/samples/extensions/sql/runExtConnection.sh deleted file mode 100644 index 90facec8c..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/runExtConnection.sh +++ /dev/null @@ -1,104 +0,0 @@ -#!/bin/sh -# -#========================================================================= -# 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 - -if [ "$DERBY_JAR_DIR" = "" ] ; then - DERBYJAR_DIR=. -fi - - -_JAVACMD=$JAVA_HOME/bin/java -_JAVACCMD=$JAVA_HOME/bin/javac - -if [ "$JAVA_HOME" = "" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." - _JAVACMD=java -fi - - - -#TO Work with JDK 1.3 and JDK 1.4, we will keep the directory -#component seperate from the JAR name. This way we can use the -#directory component as part of the Endorsed Dir command line -#argument when running under JDK 1.4 this should also work for JDK 1.5 - -#The XML Apis are going to be either in the LIB dir for a source -#release or in the root directory for a binary release. - - -if [ -f ../../../build/xalan.jar ] ; then -echo "Configuring Xalan for a Source build" -echo . -_XALAN_DIR=../../../build/ -else -echo "Configuring Xalan for a Release build" -_XALAN_DIR=../../../ -fi - -if [ -f ../../../lib/xercesImpl.jar ] ; then -_JAR_DIR=../../../lib/ -else -_JAR_DIR=../../../ -fi - - -if [ "$PARSER_JAR" = "" ] ; then - PARSER_JAR=$_JAR_DIR/xercesImpl.jar -fi - -if [ "$XML_APIS_JAR" = "" ] ; then - XML_APIS_JAR=$_JAR_DIR/xml-apis.jar -fi - -if [ "$XALAN_JAR" = "" ] ; then - XALAN_JAR=$_XALAN_DIR/xalan.jar - SERIALIZER_JAR=$_XALAN_DIR/serializer.jar -fi - -echo "Using Xalan JARS from: " $_XALAN_DIR -echo . - - -# 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="$XALAN_JAR${CLPATHSEP}$XML_APIS_JAR${CLPATHSEP}$PARSER_JAR${CLPATHSEP}$XALAN_JAR${CLPATHSEP}$DERBYJAR_DIR/derby.jar${CLPATHSEP}$DERBYJAR_DIR/derbytools.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 - -_ENDORSED_DIR=${_XALAN_DIR}${CLPATHSEP}${_JAR_DIR} - -_CLASSPATH=${_CLASSPATH}${CLPATHSEP}./ext-connection - -echo Compiling the External connection Class -echo $_JAVACCMD -d ./ext-connection -classpath "$_CLASSPATH" ./ext-connection/ExternalConnection.java -$_JAVACCMD -d ./ext-connection -classpath "$_CLASSPATH" ./ext-connection/ExternalConnection.java -echo . -echo . - -echo "Running External Connection Example Code: $@" -echo "...with classpath: $_CLASSPATH" - - -"$_JAVACMD" $JAVA_OPTS -Djava.endorsed.dirs=$_ENDORSED_DIR -classpath "$_CLASSPATH" -Dij.protocol=jdbc:derby: ExternalConnection $@ - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/runXalan.bat b/xalansamples/src/main/java/samples/extensions/sql/runXalan.bat deleted file mode 100644 index 64cfe768a..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/runXalan.bat +++ /dev/null @@ -1,123 +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 runDerby.bat: Script to execute the Derby tool IJ -rem Usage: runDerby script file] -rem Setup: -rem - you should set JAVA_HOME -rem - you can set DERBY_HOME to point to both derby.jar and derbytools.jar -rem - JAVA_OPTS is added to the java command line -rem - PARSER_JAR may be set to use alternate parser (default:..\..\..\lib\xercesImpl.jar) -rem - DERBY_JAR_DIR, default is the current directory -echo. - -if not "%JAVA_HOME%" == "" goto setant -:noJavaHome -rem Default command used to call java.exe; hopefully it's on the path here -if "%_JAVACMD%" == "" set _JAVACMD=java -echo. -echo Warning: JAVA_HOME environment variable is not set. -echo If build fails because sun.* classes could not be found -echo you will need to set the JAVA_HOME environment variable -echo to the installation directory of java. -echo. - -:setant -rem Default command used to call java.exe or equivalent -if "%_JAVACMD%" == "" set _JAVACMD=%JAVA_HOME%\bin\java - -if "%DERBY_JAR_DIR%" == "" set DERBY_JAR_DIR=. - -set _DERBY_JAR=%DERBY_JAR_DIR%\derby.jar;%DERBY_JAR_DIR%\derbytools.jar - -REM TO Work with JDK 1.3 and JDK 1.4, we will keep the directory -REM component seperate from the JAR name. This way we can use the -REM directory component as part of the Endorsed Dir command line -REM argument when running under JDK 1.4 this should also work for JDK 1.5 - -REM The XML Apis are going to be either in the LIB dir for a source -REM release or in the root direcctory for a binary release. - -IF EXIST "..\..\..\lib\xercesImpl.jar" goto BIN_DIR_BINRELEASE - -:BIN_DIR_SRCRELEASE - Echo Setting bin JAR directory for a sOurce release - set _BIN_JAR_DIR=..\..\..\ - goto REPORT_BIN_DIR - -:BIN_DIR_BINRELEASE - echo Setting bin JAR Directory for a binary release - set _BIN_JAR_DIR=..\..\..\lib - -:REPORT_BIN_DIR -Echo Binary JAR Directory: %_BIN_JAR_DIR% -echo . - - -REM The Parser JAR will be in the Lib Dir for the Source Release and for the -REM Binary Release they are in the root directory. - -if exist "..\..\..\build\xalan.jar" goto XALAN_DIR_BINRELEASE - -:XALAN_DIR_SRCRELEASE - Echo Configuring Xalan for a binary release - set _XALAN_JAR_DIR=..\..\..\ - goto XALAN_DIR_REPORT - -:XALAN_DIR_BINRELEASE - Echo Configuring Xalan for source release - set _XALAN_JAR_DIR=..\..\..\build - -:XALAN_DIR_REPORT -Echo Xalan Directory is: %_XALAN_JAR_DIR% -echo . - - - -rem Attempt to automatically add system classes to _CLASSPATH -rem Use _underscore prefix to not conflict with user's settings -set _CLASSPATH=%CLASSPATH% -if exist "%JAVA_HOME%\lib\tools.jar" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\tools.jar -if exist "%JAVA_HOME%\lib\classes.zip" set _CLASSPATH=%CLASSPATH%;%JAVA_HOME%\lib\classes.zip - - -set _CLASSPATH=%_XALAN_JAR_DIR%\xalan.jar;%_XALAN_JAR_DIR%\serializer.jar;%_BIN_JAR_DIR%\xml-apis.jar;%_BIN_JAR_DIR%\xercesImpl.jar;%_DERBY_JAR%;%_CLASSPATH% - -echo Using Classpath: %_CLASSPATH% -echo . - -set _ENDORSED_DIR=%_XALAN_JAR_DIR%;%_BIN_JAR_DIR% -echo Setting Endorsed Dir to: %_ENDORSED_DIR% : Note ONLY USed for JDK 1.4 -echo . - - -@echo on -"%_JAVACMD%" -mx64m %JAVA_OPTS% -Djava.endorsed.dirs=%_ENDORSED_DIR% -classpath "%_CLASSPATH%" org.apache.xalan.xslt.Process %1 %2 %3 %4 %5 %6 %7 %8 -@echo off - -goto end - -:end -rem Cleanup environment variables -set _JAVACMD= -set _CLASSPATH= -set _ANT_HOME= -set _ANT_JAR= -set _PARSER_JAR= -set _XML-APIS_JAR= - diff --git a/xalansamples/src/main/java/samples/extensions/sql/runXalan.sh b/xalansamples/src/main/java/samples/extensions/sql/runXalan.sh deleted file mode 100644 index 1ded8f467..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/runXalan.sh +++ /dev/null @@ -1,93 +0,0 @@ -#!/bin/sh -# -#========================================================================= -# 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 - -if [ "$DERBY_JAR_DIR" = "" ] ; then - DERBYJAR_DIR=. -fi - - -_JAVACMD=$JAVA_HOME/bin/java - - -if [ "$JAVA_HOME" = "" ] ; then - echo "Warning: JAVA_HOME environment variable is not set." - _JAVACMD=java -fi - - - -#TO Work with JDK 1.3 and JDK 1.4, we will keep the directory -#component seperate from the JAR name. This way we can use the -#directory component as part of the Endorsed Dir command line -#argument when running under JDK 1.4 this should also work for JDK 1.5 - -#The XML Apis are going to be either in the LIB dir for a source -#release or in the root directory for a binary release. - - -if [ -f ../../../build/xalan.jar ] ; then -echo "Configuring Xalan for a Source build" -_XALAN_DIR=../../../build/ -else -echo "Configuring Xalan for a Release build" -_XALAN_DIR=../../../ -fi - -if [ -f ../../../lib/xercesImpl.jar ] ; then - -_JAR_DIR=../../../lib/ -else -_JAR_DIR=../../../ -fi - - -if [ "$PARSER_JAR" = "" ] ; then - PARSER_JAR=$_JAR_DIR/xercesImpl.jar -fi - -if [ "$XML_APIS_JAR" = "" ] ; then - XML_APIS_JAR=$_JAR_DIR/xml-apis.jar -fi - -if [ "$XALAN_JAR" = "" ] ; then - XALAN_JAR=$_XALAN_DIR/xalan.jar - SERIALIZER_JAR=$_XALAN_DIR/serializer.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="$XALAN_JAR${CLPATHSEP}$XML_APIS_JAR${CLPATHSEP}$PARSER_JAR${CLPATHSEP}$XALAN_JAR${CLPATHSEP}$DERBYJAR_DIR/derby.jar${CLPATHSEP}$DERBYJAR_DIR/derbytools.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 - -_ENDORSED_DIR=${_XALAN_DIR}${CLPATHSEP}${_JAR_DIR} - -echo "Running Xalan: $@" -echo "...with classpath: $_CLASSPATH" - -"$_JAVACMD" $JAVA_OPTS -Djava.endorsed.dirs=$_ENDORSED_DIR -classpath "$_CLASSPATH" -Dij.protocol=jdbc:derby: org.apache.xalan.xslt.Process $@ - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/show-error/dbinfo.xml b/xalansamples/src/main/java/samples/extensions/sql/show-error/dbinfo.xml deleted file mode 100644 index 89eabbc92..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/show-error/dbinfo.xml +++ /dev/null @@ -1,14 +0,0 @@ - - - - 1 - - - - com.lutris.instantdb.jdbc.idbDriver - jdbc:idb:../../instantdb/sample.prp - - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidConn.xsl b/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidConn.xsl deleted file mode 100644 index 831b07c22..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidConn.xsl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - List of products - - - - - - - Error in Query - - - - - - - - -
    - -
    - - - -
    - - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidPQuery.xsl b/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidPQuery.xsl deleted file mode 100644 index 01064b89a..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidPQuery.xsl +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - - List of products - - - - - - - - - - - - - Error in Query - - - - - - - - - -
    - - - -
    - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidQuery.xsl b/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidQuery.xsl deleted file mode 100644 index b896f5470..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/show-error/invalidQuery.xsl +++ /dev/null @@ -1,86 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - - List of products - - - - - - - - - Error in Query - - - - - - - - - -
    - - - -
    - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/sql/show-error/readme.html b/xalansamples/src/main/java/samples/extensions/sql/show-error/readme.html deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/show-error/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/streamable/cachedNodes.xsl b/xalansamples/src/main/java/samples/extensions/sql/streamable/cachedNodes.xsl deleted file mode 100644 index 347f5ccea..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/streamable/cachedNodes.xsl +++ /dev/null @@ -1,142 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - - - - - - - - - - List of products - - - - - - - - - - - - - - - - - - - - - Error in Query - - - - - - - - - - - - - - - - - - - -
    - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/sql/streamable/dbinfo.xml b/xalansamples/src/main/java/samples/extensions/sql/streamable/dbinfo.xml deleted file mode 100644 index 8c92030ee..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/streamable/dbinfo.xml +++ /dev/null @@ -1,12 +0,0 @@ - - This file contains information required to make a connection to the DBMS - - - com.lutris.instantdb.jdbc.idbDriver - jdbc:idb:../../instantdb/sample.prp - - - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/streamable/pivot.xsl b/xalansamples/src/main/java/samples/extensions/sql/streamable/pivot.xsl deleted file mode 100644 index 93c705e5f..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/streamable/pivot.xsl +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - - - - - - - - - - List of products - - - - - - - - - - - - - - - - - - - - - - - - Error in Query - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - - - - - - - -
    - - - - - - - - - - - -
    - - - - - - - - - - - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/extensions/sql/streamable/readme.html b/xalansamples/src/main/java/samples/extensions/sql/streamable/readme.html deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/streamable/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/extensions/sql/streamable/streamNodes.xsl b/xalansamples/src/main/java/samples/extensions/sql/streamable/streamNodes.xsl deleted file mode 100644 index 1504ff106..000000000 --- a/xalansamples/src/main/java/samples/extensions/sql/streamable/streamNodes.xsl +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - - - - - - - - - - - Error Connecting to the Database - - - - - - - List of products - - - - - - - - - - - - - - -
    - - - - -
    - - - - - - - - - -
    \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/translets/JAXPTransletMultipleTransformations.java b/xalansamples/src/main/java/samples/translets/JAXPTransletMultipleTransformations.java deleted file mode 100644 index 7ecfa3ba2..000000000 --- a/xalansamples/src/main/java/samples/translets/JAXPTransletMultipleTransformations.java +++ /dev/null @@ -1,91 +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 samples.translets; - -import java.io.FileNotFoundException; -import java.io.FileOutputStream; - -import java.util.Properties; - -import javax.xml.transform.Templates; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - - -/** - * Using the TrAX/JAXP 1.1 interface to compile a translet and use it - * to perform multiple transformations. The translet implements - * the Templates interface. If you want to use the translet to perform a - * single transformation, see JAXPTransletOneTransformation.java. - * - * - * @author Donald Leslie - */ -public class JAXPTransletMultipleTransformations -{ - static void doTransform(Templates translet, String xmlInURI, String htmlOutURI) - throws TransformerException, FileNotFoundException - { - // For each transformation, instantiate a new Transformer, and perform - // the transformation from a StreamSource to a StreamResult; - Transformer transformer = translet.newTransformer(); - transformer.transform( new StreamSource(xmlInURI), - new StreamResult(new FileOutputStream(htmlOutURI))); - } - - public static void main(String argv[]) - { - // Set the TransformerFactory system property to generate and use translets. - // Note: To make this sample more flexible, load properties from a properties file. - // The setting for the Xalan Transformer is "org.apache.xalan.processor.TransformerFactoryImpl" - String key = "javax.xml.transform.TransformerFactory"; - String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; - Properties props = System.getProperties(); - props.put(key, value); - - System.setProperties(props); - - String xslInURI = "todo.xsl"; - - try - { - // Instantiate the TransformerFactory, and use it along with a SteamSource - // XSL stylesheet to create a translet as a Templates object. - TransformerFactory tFactory = TransformerFactory.newInstance(); - Templates translet = tFactory.newTemplates(new StreamSource(xslInURI)); - - // Perform each transformation - doTransform(translet, "todo.xml", "todo.html"); - System.out.println("Produced todo.html"); - - doTransform(translet, "todotoo.xml", "todotoo.html"); - System.out.println("Produced todotoo.html"); - } - catch (Exception e) - { - e.printStackTrace(); - } - } -} diff --git a/xalansamples/src/main/java/samples/translets/JAXPTransletOneTransformation.java b/xalansamples/src/main/java/samples/translets/JAXPTransletOneTransformation.java deleted file mode 100644 index e320d15aa..000000000 --- a/xalansamples/src/main/java/samples/translets/JAXPTransletOneTransformation.java +++ /dev/null @@ -1,83 +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 samples.translets; - -import java.io.FileNotFoundException; -import java.io.FileOutputStream; -import java.io.IOException; - -import java.util.Properties; - -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.xml.sax.SAXException; - - -/** - * Using the TrAX/JAXP 1.1 interface to compile and run a translet. The translet - * extends the abstract Transformer class and is used to perform a single - * transformation. If you want to use the translet to perform multiple - * transformations, see JAXPTransletMultipleTransformations.java. - * - * @author Donald Leslie - */ -public class JAXPTransletOneTransformation -{ - public static void main(String argv[]) - throws TransformerException, TransformerConfigurationException, IOException, SAXException, - ParserConfigurationException, FileNotFoundException - { - // Set the TransformerFactory system property to generate and use a translet. - // Note: To make this sample more flexible, load properties from a properties file. - // The setting for the Xalan Transformer is "org.apache.xalan.processor.TransformerFactoryImpl" - String key = "javax.xml.transform.TransformerFactory"; - String value = "org.apache.xalan.xsltc.trax.TransformerFactoryImpl"; - Properties props = System.getProperties(); - props.put(key, value); - System.setProperties(props); - - String xslInURI = "todo.xsl"; - String xmlInURI = "todo.xml"; - String htmlOutURI = "todo.html"; - try - { - // Instantiate the TransformerFactory, and use it along with a SteamSource - // XSL stylesheet to create a Transformer. - TransformerFactory tFactory = TransformerFactory.newInstance(); - Transformer transformer = tFactory.newTransformer(new StreamSource(xslInURI)); - // Perform the transformation from a StreamSource to a StreamResult; - transformer.transform(new StreamSource(xmlInURI), - new StreamResult(new FileOutputStream(htmlOutURI))); - System.out.println("Produced todo.html"); - } - catch (Exception e) - { - System.out.println(e.toString()); - e.printStackTrace(); - } - } -} diff --git a/xalansamples/src/main/java/samples/translets/readme.html b/xalansamples/src/main/java/samples/translets/readme.html deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/main/java/samples/translets/readme.html +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/main/java/samples/translets/todo.xml b/xalansamples/src/main/java/samples/translets/todo.xml deleted file mode 100644 index 578adb223..000000000 --- a/xalansamples/src/main/java/samples/translets/todo.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - Shuffling papers, looking busy - - - Stuffing envelopes, folding flaps, licking stamps - - - Scrutinizing - - - - - - Make the coffee - - - Chat around the water cooler - - - - - - Buy bandages for paper-cuts - - - Sharpen pencils - - - diff --git a/xalansamples/src/main/java/samples/translets/todo.xsl b/xalansamples/src/main/java/samples/translets/todo.xsl deleted file mode 100644 index e7b88471a..000000000 --- a/xalansamples/src/main/java/samples/translets/todo.xsl +++ /dev/null @@ -1,178 +0,0 @@ - - - - - - - - - - <xsl:value-of select="$title"/> - - - -

    -

    See a - - #developer-list - list of developers/initials. - -

    -

    Planned releases: -
    - - #release-date- - - - - - #release-date-completed - Completed - - -

    - - - -

    - -

    -
    - - -

    - ) - -
    -
    - -

    -
    -
    -
    -
    - - - - release-date-completed -

    Completed:

    -
    - - -

    - ) - -
    -
    - -

    -
    -
    -
    -
    - - -
    - - - -
    - - - - : - - - - #personref- - - - - - - - - - , - - - - - - release-date- - For release: - - - - - -
    Issue [ - ]: - -
    - - - , - - - -
    Goal [ - ]: - -
    - - - -

    - - developer-list - Developers: - -

    -

    A list of some of the people currently working on :

    -
      - -
    • - -
    • -
      -
    - -

    And the Hall-of-Fame list of past developers:

    -
      - -
    • - -
    • -
      -
    -
    -
    - - - - - - - personref- - () - -
    -
    -
    diff --git a/xalansamples/src/main/java/samples/translets/todotoo.xml b/xalansamples/src/main/java/samples/translets/todotoo.xml deleted file mode 100644 index 706e0ef66..000000000 --- a/xalansamples/src/main/java/samples/translets/todotoo.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - Shuffling papers - - - Stuffing envelopes, folding flaps, licking stamps - - - Scrutinizing, retirement - - - - - - Shred documents - - - Make paper-clip sculptures - - - Create next year's to-do lists - - - diff --git a/xalansamples/src/main/java/samples/trax/ExampleContentHandler.java b/xalansamples/src/main/java/samples/trax/ExampleContentHandler.java deleted file mode 100644 index cfaed15ea..000000000 --- a/xalansamples/src/main/java/samples/trax/ExampleContentHandler.java +++ /dev/null @@ -1,119 +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 samples.trax; - -import org.xml.sax.Attributes; -import org.xml.sax.ContentHandler; -import org.xml.sax.Locator; -import org.xml.sax.SAXException; - -public class ExampleContentHandler implements ContentHandler -{ - public void setDocumentLocator (Locator locator) - { - System.out.println("setDocumentLocator"); - } - - - public void startDocument () - throws SAXException - { - System.out.println("startDocument"); - } - - - public void endDocument() - throws SAXException - { - System.out.println("endDocument"); - } - - - public void startPrefixMapping (String prefix, String uri) - throws SAXException - { - System.out.println("startPrefixMapping: "+prefix+", "+uri); - } - - - public void endPrefixMapping (String prefix) - throws SAXException - { - System.out.println("endPrefixMapping: "+prefix); - } - - - public void startElement (String namespaceURI, String localName, - String qName, Attributes atts) - throws SAXException - { - System.out.print("startElement: "+namespaceURI+", "+localName+ - ", "+qName); - int n = atts.getLength(); - for(int i = 0; i < n; i++) - { - System.out.print(", "+atts.getQName(i)); - } - System.out.println(""); - } - - - public void endElement (String namespaceURI, String localName, - String qName) - throws SAXException - { - System.out.println("endElement: "+namespaceURI+", "+localName+ - ", "+qName); - } - - - public void characters (char ch[], int start, int length) - throws SAXException - { - String s = new String(ch, start, (length > 30) ? 30 : length); - if(length > 30) - System.out.println("characters: \""+s+"\"..."); - else - System.out.println("characters: \""+s+"\""); - } - - - public void ignorableWhitespace (char ch[], int start, int length) - throws SAXException - { - System.out.println("ignorableWhitespace"); - } - - - public void processingInstruction (String target, String data) - throws SAXException - { - System.out.println("processingInstruction: "+target+", "+target); - } - - - public void skippedEntity (String name) - throws SAXException - { - System.out.println("skippedEntity: "+name); - } - -} diff --git a/xalansamples/src/main/java/samples/trax/Examples.java b/xalansamples/src/main/java/samples/trax/Examples.java deleted file mode 100644 index 88975d7a5..000000000 --- a/xalansamples/src/main/java/samples/trax/Examples.java +++ /dev/null @@ -1,846 +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 samples.trax; - -import java.io.BufferedInputStream; -import java.io.BufferedReader; -import java.io.File; -import java.io.FileInputStream; -import java.io.FileNotFoundException; -import java.io.IOException; -import java.io.InputStream; -import java.io.InputStreamReader; -import java.io.OutputStreamWriter; -import java.io.Reader; -import java.io.UnsupportedEncodingException; -import java.util.Properties; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; -import javax.xml.parsers.ParserConfigurationException; -import javax.xml.transform.OutputKeys; -import javax.xml.transform.Result; -import javax.xml.transform.Source; -import javax.xml.transform.Templates; -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerConfigurationException; -import javax.xml.transform.TransformerException; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.dom.DOMResult; -import javax.xml.transform.dom.DOMSource; -import javax.xml.transform.sax.SAXResult; -import javax.xml.transform.sax.SAXSource; -import javax.xml.transform.sax.SAXTransformerFactory; -import javax.xml.transform.sax.TransformerHandler; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.w3c.dom.Node; -import org.xml.sax.InputSource; -import org.xml.sax.SAXException; -import org.xml.sax.XMLFilter; -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.XMLReaderFactory; -/** - * Some examples to show how the Simple API for Transformations - * could be used. - * - * Xalan Developers: please see - * xml-xalan/test/java/src/org/apache/qetest/trax/ExamplesTest.java - * when updating this file, and update that test file as well. - * - * @author Scott Boag - */ -public class Examples -{ - /** - * Method main - */ - public static void main(String argv[]) - throws TransformerException, TransformerConfigurationException, IOException, SAXException, - ParserConfigurationException, FileNotFoundException - { - System.out.println("\n\n==== exampleSimple ===="); - try { - exampleSimple1("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleSimple2 (see foo.out) ===="); - try { - exampleSimple2("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleFromStream ===="); - try { - exampleFromStream("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleFromReader ===="); - try { - exampleFromReader("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleUseTemplatesObj ===="); - try { - exampleUseTemplatesObj("xml/foo.xml", "xml/baz.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleContentHandlerToContentHandler ===="); - try { - exampleContentHandlerToContentHandler("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleXMLReader ===="); - try { - exampleXMLReader("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleXMLFilter ===="); - try { - exampleXMLFilter("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleXMLFilterChain ===="); - try { - exampleXMLFilterChain("xml/foo.xml", "xsl/foo.xsl", "xsl/foo2.xsl", "xsl/foo3.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleDOM2DOM ===="); - try { - exampleDOM2DOM("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleParam ===="); - try { - exampleParam("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleTransformerReuse ===="); - try { - exampleTransformerReuse("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleOutputProperties ===="); - try { - exampleOutputProperties("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleUseAssociated ===="); - try { - exampleUseAssociated("xml/foo.xml"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleContentHandler2DOM ===="); - try { - exampleContentHandler2DOM("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleAsSerializer ===="); - try { - exampleAsSerializer("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n\n==== exampleContentHandler2DOM ===="); - try { - exampleContentHandler2DOM("xml/foo.xml", "xsl/foo.xsl"); - } catch( Exception ex ) { - handleException(ex); - } - - System.out.println("\n==== done! ===="); - } - - /** - * Show the simplest possible transformation from system id - * to output stream. - */ - public static void exampleSimple1(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException - { - // Create a transform factory instance. - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // Create a transformer for the stylesheet. - Transformer transformer - = tfactory.newTransformer(new StreamSource(xslID)); - - // Transform the source XML to System.out. - transformer.transform( new StreamSource(sourceID), - new StreamResult(new OutputStreamWriter(System.out))); - } - - /** - * Show the simplest possible transformation from File - * to a File. - */ - public static void exampleSimple2(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException - { - // Create a transform factory instance. - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // Create a transformer for the stylesheet. - Transformer transformer - = tfactory.newTransformer(new StreamSource(xslID)); - - // Transform the source XML to foo.out. - transformer.transform( new StreamSource(new File(sourceID)), - new StreamResult(new File("foo.out"))); - } - - - /** - * Show simple transformation from input stream to output stream. - */ - public static void exampleFromStream(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException, - FileNotFoundException - { - // Create a transform factory instance. - TransformerFactory tfactory = TransformerFactory.newInstance(); - - InputStream xslIS = new BufferedInputStream(new FileInputStream(xslID)); - StreamSource xslSource = new StreamSource(xslIS); - // Note that if we don't do this, relative URLs can not be resolved correctly! - xslSource.setSystemId(xslID); - - // Create a transformer for the stylesheet. - Transformer transformer = tfactory.newTransformer(xslSource); - - InputStream xmlIS = new BufferedInputStream(new FileInputStream(sourceID)); - StreamSource xmlSource = new StreamSource(xmlIS); - // Note that if we don't do this, relative URLs can not be resolved correctly! - xmlSource.setSystemId(sourceID); - - // Transform the source XML to System.out. - transformer.transform( xmlSource, new StreamResult(new OutputStreamWriter(System.out))); - } - - /** - * Show simple transformation from reader to output stream. In general - * this use case is discouraged, since the XML encoding can not be - * processed. - */ - public static void exampleFromReader(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException, - FileNotFoundException, UnsupportedEncodingException - { - // Create a transform factory instance. - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // Note that in this case the XML encoding can not be processed! - Reader xslReader = new BufferedReader(new InputStreamReader(new FileInputStream(xslID), "UTF-8")); - StreamSource xslSource = new StreamSource(xslReader); - // Note that if we don't do this, relative URLs can not be resolved correctly! - xslSource.setSystemId(xslID); - - // Create a transformer for the stylesheet. - Transformer transformer = tfactory.newTransformer(xslSource); - - // Note that in this case the XML encoding can not be processed! - Reader xmlReader = new BufferedReader(new InputStreamReader(new FileInputStream(sourceID), "UTF-8")); - StreamSource xmlSource = new StreamSource(xmlReader); - // Note that if we don't do this, relative URLs can not be resolved correctly! - xmlSource.setSystemId(sourceID); - - // Transform the source XML to System.out. - transformer.transform( xmlSource, new StreamResult(new OutputStreamWriter(System.out))); - } - - - - /** - * Show the simplest possible transformation from system id to output stream. - */ - public static void exampleUseTemplatesObj(String sourceID1, - String sourceID2, - String xslID) - throws TransformerException, TransformerConfigurationException - { - - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // Create a templates object, which is the processed, - // thread-safe representation of the stylesheet. - Templates templates = tfactory.newTemplates(new StreamSource(xslID)); - - // Illustrate the fact that you can make multiple transformers - // from the same template. - Transformer transformer1 = templates.newTransformer(); - Transformer transformer2 = templates.newTransformer(); - - System.out.println("\n\n----- transform of "+sourceID1+" -----"); - - transformer1.transform(new StreamSource(sourceID1), - new StreamResult(new OutputStreamWriter(System.out))); - - System.out.println("\n\n----- transform of "+sourceID2+" -----"); - - transformer2.transform(new StreamSource(sourceID2), - new StreamResult(new OutputStreamWriter(System.out))); - } - - - - /** - * Show the Transformer using SAX events in and SAX events out. - */ - public static void exampleContentHandlerToContentHandler(String sourceID, - String xslID) - throws TransformerException, - TransformerConfigurationException, - SAXException, IOException - { - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // Does this factory support SAX features? - if (tfactory.getFeature(SAXSource.FEATURE)) - { - // If so, we can safely cast. - SAXTransformerFactory stfactory = ((SAXTransformerFactory) tfactory); - - // A TransformerHandler is a ContentHandler that will listen for - // SAX events, and transform them to the result. - TransformerHandler handler - = stfactory.newTransformerHandler(new StreamSource(xslID)); - - // Set the result handling to be a serialization to System.out. - Result result = new SAXResult(new ExampleContentHandler()); - handler.setResult(result); - - // Create a reader, and set it's content handler to be the TransformerHandler. - XMLReader reader=null; - - // Use JAXP1.1 ( if possible ) - try { - javax.xml.parsers.SAXParserFactory factory= - javax.xml.parsers.SAXParserFactory.newInstance(); - factory.setNamespaceAware( true ); - javax.xml.parsers.SAXParser jaxpParser= - factory.newSAXParser(); - reader=jaxpParser.getXMLReader(); - - } catch( javax.xml.parsers.ParserConfigurationException ex ) { - throw new org.xml.sax.SAXException( ex ); - } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) { - throw new org.xml.sax.SAXException( ex1.toString() ); - } catch( NoSuchMethodError ex2 ) { - } - if( reader==null ) reader = XMLReaderFactory.createXMLReader(); - reader.setContentHandler(handler); - - // It's a good idea for the parser to send lexical events. - // The TransformerHandler is also a LexicalHandler. - reader.setProperty("http://xml.org/sax/properties/lexical-handler", handler); - - // Parse the source XML, and send the parse events to the TransformerHandler. - reader.parse(sourceID); - } - else - { - System.out.println( - "Can't do exampleContentHandlerToContentHandler because tfactory is not a SAXTransformerFactory"); - } - } - - /** - * Show the Transformer as a SAX2 XMLReader. An XMLFilter obtained - * from newXMLFilter should act as a transforming XMLReader if setParent is not - * called. Internally, an XMLReader is created as the parent for the XMLFilter. - */ - public static void exampleXMLReader(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException, SAXException, IOException // , ParserConfigurationException - { - TransformerFactory tfactory = TransformerFactory.newInstance(); - if(tfactory.getFeature(SAXSource.FEATURE)) - { - XMLReader reader - = ((SAXTransformerFactory) tfactory).newXMLFilter(new StreamSource(xslID)); - - reader.setContentHandler(new ExampleContentHandler()); - - reader.parse(new InputSource(sourceID)); - } - else - System.out.println("tfactory does not support SAX features!"); - } - - /** - * Show the Transformer as a simple XMLFilter. This is pretty similar - * to exampleXMLReader, except that here the parent XMLReader is created - * by the caller, instead of automatically within the XMLFilter. This - * gives the caller more direct control over the parent reader. - */ - public static void exampleXMLFilter(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException, SAXException, IOException // , ParserConfigurationException - { - TransformerFactory tfactory = TransformerFactory.newInstance(); - - XMLReader reader=null; - - // Use JAXP1.1 ( if possible ) - try { - javax.xml.parsers.SAXParserFactory factory= - javax.xml.parsers.SAXParserFactory.newInstance(); - factory.setNamespaceAware( true ); - javax.xml.parsers.SAXParser jaxpParser= - factory.newSAXParser(); - reader=jaxpParser.getXMLReader(); - - } catch( javax.xml.parsers.ParserConfigurationException ex ) { - throw new org.xml.sax.SAXException( ex ); - } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) { - throw new org.xml.sax.SAXException( ex1.toString() ); - } catch( NoSuchMethodError ex2 ) { - } - if( reader==null ) reader = XMLReaderFactory.createXMLReader(); - // The transformer will use a SAX parser as it's reader. - reader.setContentHandler(new ExampleContentHandler()); - try - { - reader.setFeature("http://xml.org/sax/features/namespace-prefixes", - true); - reader.setFeature("http://apache.org/xml/features/validation/dynamic", - true); - } - catch (SAXException se) - { - - // What can we do? - // TODO: User diagnostics. - } - - XMLFilter filter - = ((SAXTransformerFactory) tfactory).newXMLFilter(new StreamSource(xslID)); - - filter.setParent(reader); - - // Now, when you call transformer.parse, it will set itself as - // the content handler for the parser object (it's "parent"), and - // will then call the parse method on the parser. - filter.parse(new InputSource(sourceID)); - } - - /** - * This example shows how to chain events from one Transformer - * to another transformer, using the Transformer as a - * SAX2 XMLFilter/XMLReader. - */ - public static void exampleXMLFilterChain( - String sourceID, String xslID_1, - String xslID_2, String xslID_3) - throws TransformerException, TransformerConfigurationException, SAXException, IOException - { - TransformerFactory tfactory = TransformerFactory.newInstance(); - - Templates stylesheet1 = tfactory.newTemplates(new StreamSource(xslID_1)); - Transformer transformer1 = stylesheet1.newTransformer(); - - // If one success, assume all will succeed. - if (tfactory.getFeature(SAXSource.FEATURE)) - { - SAXTransformerFactory stf = (SAXTransformerFactory)tfactory; - XMLReader reader=null; - - // Use JAXP1.1 ( if possible ) - try { - javax.xml.parsers.SAXParserFactory factory= - javax.xml.parsers.SAXParserFactory.newInstance(); - factory.setNamespaceAware( true ); - javax.xml.parsers.SAXParser jaxpParser= - factory.newSAXParser(); - reader=jaxpParser.getXMLReader(); - - } catch( javax.xml.parsers.ParserConfigurationException ex ) { - throw new org.xml.sax.SAXException( ex ); - } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) { - throw new org.xml.sax.SAXException( ex1.toString() ); - } catch( NoSuchMethodError ex2 ) { - } - if( reader==null ) reader = XMLReaderFactory.createXMLReader(); - - XMLFilter filter1 = stf.newXMLFilter(new StreamSource(xslID_1)); - XMLFilter filter2 = stf.newXMLFilter(new StreamSource(xslID_2)); - XMLFilter filter3 = stf.newXMLFilter(new StreamSource(xslID_3)); - - if (null != filter1) // If one success, assume all were success. - { - // transformer1 will use a SAX parser as it's reader. - filter1.setParent(reader); - - // transformer2 will use transformer1 as it's reader. - filter2.setParent(filter1); - - // transform3 will use transform2 as it's reader. - filter3.setParent(filter2); - - filter3.setContentHandler(new ExampleContentHandler()); - // filter3.setContentHandler(new org.xml.sax.helpers.DefaultHandler()); - - // Now, when you call transformer3 to parse, it will set - // itself as the ContentHandler for transform2, and - // call transform2.parse, which will set itself as the - // content handler for transform1, and call transform1.parse, - // which will set itself as the content listener for the - // SAX parser, and call parser.parse(new InputSource("xml/foo.xml")). - filter3.parse(new InputSource(sourceID)); - } - else - { - System.out.println( - "Can't do exampleXMLFilter because "+ - "tfactory doesn't support asXMLFilter()"); - } - } - else - { - System.out.println( - "Can't do exampleXMLFilter because "+ - "tfactory is not a SAXTransformerFactory"); - } - } - - /** - * Show how to transform a DOM tree into another DOM tree. - * This uses the javax.xml.parsers to parse an XML file into a - * DOM, and create an output DOM. - */ - public static Node exampleDOM2DOM(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException, SAXException, IOException, - ParserConfigurationException - { - TransformerFactory tfactory = TransformerFactory.newInstance(); - - if (tfactory.getFeature(DOMSource.FEATURE)) - { - Templates templates; - - { - DocumentBuilderFactory dfactory = - DocumentBuilderFactory.newInstance(); - dfactory.setNamespaceAware(true); - DocumentBuilder docBuilder = dfactory.newDocumentBuilder(); - org.w3c.dom.Document outNode = docBuilder.newDocument(); - Node doc = docBuilder.parse(new InputSource(xslID)); - - DOMSource dsource = new DOMSource(doc); - // If we don't do this, the transformer won't know how to - // resolve relative URLs in the stylesheet. - dsource.setSystemId(xslID); - - templates = tfactory.newTemplates(dsource); - } - - Transformer transformer = templates.newTransformer(); - DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); - // Note you must always setNamespaceAware when building .xsl stylesheets - dfactory.setNamespaceAware(true); - DocumentBuilder docBuilder = dfactory.newDocumentBuilder(); - org.w3c.dom.Document outNode = docBuilder.newDocument(); - Node doc = docBuilder.parse(new InputSource(sourceID)); - - transformer.transform(new DOMSource(doc), new DOMResult(outNode)); - - Transformer serializer = tfactory.newTransformer(); - serializer.transform(new DOMSource(outNode), new StreamResult(new OutputStreamWriter(System.out))); - - return outNode; - } - else - { - throw new org.xml.sax - .SAXNotSupportedException("DOM node processing not supported!"); - } - } - - /** - * This shows how to set a parameter for use by the templates. Use - * two transformers to show that different parameters may be set - * on different transformers. - */ - public static void exampleParam(String sourceID, - String xslID) - throws TransformerException, TransformerConfigurationException - { - TransformerFactory tfactory = TransformerFactory.newInstance(); - Templates templates = tfactory.newTemplates(new StreamSource(xslID)); - Transformer transformer1 = templates.newTransformer(); - Transformer transformer2 = templates.newTransformer(); - - transformer1.setParameter("a-param", - "hello to you!"); - transformer1.transform(new StreamSource(sourceID), - new StreamResult(new OutputStreamWriter(System.out))); - - System.out.println("\n========="); - - transformer2.setOutputProperty(OutputKeys.INDENT, "yes"); - transformer2.transform(new StreamSource(sourceID), - new StreamResult(new OutputStreamWriter(System.out))); - } - - /** - * Show the that a transformer can be reused, and show resetting - * a parameter on the transformer. - */ - public static void exampleTransformerReuse(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException - { - // Create a transform factory instance. - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // Create a transformer for the stylesheet. - Transformer transformer - = tfactory.newTransformer(new StreamSource(xslID)); - - transformer.setParameter("a-param", - "hello to you!"); - - // Transform the source XML to System.out. - transformer.transform( new StreamSource(sourceID), - new StreamResult(new OutputStreamWriter(System.out))); - - System.out.println("\n=========\n"); - - transformer.setParameter("a-param", - "hello to me!"); - transformer.setOutputProperty(OutputKeys.INDENT, "yes"); - - // Transform the source XML to System.out. - transformer.transform( new StreamSource(sourceID), - new StreamResult(new OutputStreamWriter(System.out))); - } - - /** - * Show how to override output properties. - */ - public static void exampleOutputProperties(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException - { - - TransformerFactory tfactory = TransformerFactory.newInstance(); - Templates templates = tfactory.newTemplates(new StreamSource(xslID)); - Properties oprops = templates.getOutputProperties(); - - oprops.put(OutputKeys.INDENT, "yes"); - - Transformer transformer = templates.newTransformer(); - - transformer.setOutputProperties(oprops); - transformer.transform(new StreamSource(sourceID), - new StreamResult(new OutputStreamWriter(System.out))); - } - - /** - * Show how to get stylesheets that are associated with a given - * xml document via the xml-stylesheet PI (see http://www.w3.org/TR/xml-stylesheet/). - */ - public static void exampleUseAssociated(String sourceID) - throws TransformerException, TransformerConfigurationException - { - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // The DOM tfactory will have it's own way, based on DOM2, - // of getting associated stylesheets. - if (tfactory instanceof SAXTransformerFactory) - { - SAXTransformerFactory stf = ((SAXTransformerFactory) tfactory); - Source sources = - stf.getAssociatedStylesheet(new StreamSource(sourceID), - null, null, null); - - if(null != sources) - { - Transformer transformer = tfactory.newTransformer(sources); - - transformer.transform(new StreamSource(sourceID), - new StreamResult(new OutputStreamWriter(System.out))); - } - else - { - System.out.println("Can't find the associated stylesheet!"); - } - } - } - - /** - * Show the Transformer using SAX events in and DOM nodes out. - */ - public static void exampleContentHandler2DOM(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException, SAXException, IOException, ParserConfigurationException - { - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // Make sure the transformer factory we obtained supports both - // DOM and SAX. - if (tfactory.getFeature(SAXSource.FEATURE) - && tfactory.getFeature(DOMSource.FEATURE)) - { - // We can now safely cast to a SAXTransformerFactory. - SAXTransformerFactory sfactory = (SAXTransformerFactory) tfactory; - - // Create an Document node as the root for the output. - DocumentBuilderFactory dfactory - = DocumentBuilderFactory.newInstance(); - DocumentBuilder docBuilder = dfactory.newDocumentBuilder(); - org.w3c.dom.Document outNode = docBuilder.newDocument(); - - // Create a ContentHandler that can liston to SAX events - // and transform the output to DOM nodes. - TransformerHandler handler - = sfactory.newTransformerHandler(new StreamSource(xslID)); - handler.setResult(new DOMResult(outNode)); - - // Create a reader and set it's ContentHandler to be the - // transformer. - XMLReader reader=null; - - // Use JAXP1.1 ( if possible ) - try { - javax.xml.parsers.SAXParserFactory factory= - javax.xml.parsers.SAXParserFactory.newInstance(); - factory.setNamespaceAware( true ); - javax.xml.parsers.SAXParser jaxpParser= - factory.newSAXParser(); - reader=jaxpParser.getXMLReader(); - - } catch( javax.xml.parsers.ParserConfigurationException ex ) { - throw new org.xml.sax.SAXException( ex ); - } catch( javax.xml.parsers.FactoryConfigurationError ex1 ) { - throw new org.xml.sax.SAXException( ex1.toString() ); - } catch( NoSuchMethodError ex2 ) { - } - if( reader==null ) reader= XMLReaderFactory.createXMLReader(); - reader.setContentHandler(handler); - reader.setProperty("http://xml.org/sax/properties/lexical-handler", - handler); - - // Send the SAX events from the parser to the transformer, - // and thus to the DOM tree. - reader.parse(sourceID); - - // Serialize the node for diagnosis. - exampleSerializeNode(outNode); - } - else - { - System.out.println( - "Can't do exampleContentHandlerToContentHandler because tfactory is not a SAXTransformerFactory"); - } - } - - /** - * Serialize a node to System.out. - */ - public static void exampleSerializeNode(Node node) - throws TransformerException, TransformerConfigurationException, SAXException, IOException, - ParserConfigurationException - { - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // This creates a transformer that does a simple identity transform, - // and thus can be used for all intents and purposes as a serializer. - Transformer serializer = tfactory.newTransformer(); - - serializer.setOutputProperty(OutputKeys.INDENT, "yes"); - serializer.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes"); - serializer.transform(new DOMSource(node), - new StreamResult(new OutputStreamWriter(System.out))); - } - - /** - * A fuller example showing how the TrAX interface can be used - * to serialize a DOM tree. - */ - public static void exampleAsSerializer(String sourceID, String xslID) - throws TransformerException, TransformerConfigurationException, SAXException, IOException, - ParserConfigurationException - { - DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); - DocumentBuilder docBuilder = dfactory.newDocumentBuilder(); - org.w3c.dom.Document outNode = docBuilder.newDocument(); - Node doc = docBuilder.parse(new InputSource(sourceID)); - - TransformerFactory tfactory = TransformerFactory.newInstance(); - - // This creates a transformer that does a simple identity transform, - // and thus can be used for all intents and purposes as a serializer. - Transformer serializer = tfactory.newTransformer(); - - Properties oprops = new Properties(); - oprops.put("method", "html"); - serializer.setOutputProperties(oprops); - serializer.transform(new DOMSource(doc), - new StreamResult(new OutputStreamWriter(System.out))); - } - - - private static void handleException( Exception ex ) { - System.out.println("EXCEPTION: " ); - ex.printStackTrace(); - - if( ex instanceof TransformerConfigurationException ) { - System.out.println(); - System.out.println("Internal exception: " ); - Throwable ex1=((TransformerConfigurationException)ex).getException(); - ex1.printStackTrace(); - - if( ex1 instanceof SAXException ) { - Exception ex2=((SAXException)ex1).getException(); - System.out.println("Internal sub-exception: " ); - ex2.printStackTrace(); - } - } - } - -} diff --git a/xalansamples/src/main/java/samples/trax/xml/baz.xml b/xalansamples/src/main/java/samples/trax/xml/baz.xml deleted file mode 100644 index 9ecf473b0..000000000 --- a/xalansamples/src/main/java/samples/trax/xml/baz.xml +++ /dev/null @@ -1,6 +0,0 @@ - - -MyBaz - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/trax/xml/foo.xml b/xalansamples/src/main/java/samples/trax/xml/foo.xml deleted file mode 100644 index 79597abcd..000000000 --- a/xalansamples/src/main/java/samples/trax/xml/foo.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - -MyBar - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/trax/xml/subdir1/foo2.xml b/xalansamples/src/main/java/samples/trax/xml/subdir1/foo2.xml deleted file mode 100644 index 5708ae4e0..000000000 --- a/xalansamples/src/main/java/samples/trax/xml/subdir1/foo2.xml +++ /dev/null @@ -1,2 +0,0 @@ - -text in foo2.xml \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/trax/xml/subdir1/subdir2/foo3.xml b/xalansamples/src/main/java/samples/trax/xml/subdir1/subdir2/foo3.xml deleted file mode 100644 index 77da1f0d0..000000000 --- a/xalansamples/src/main/java/samples/trax/xml/subdir1/subdir2/foo3.xml +++ /dev/null @@ -1,2 +0,0 @@ - -text in foo3.xml \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/trax/xsl/baz.xsl b/xalansamples/src/main/java/samples/trax/xsl/baz.xsl deleted file mode 100644 index 39de15c26..000000000 --- a/xalansamples/src/main/java/samples/trax/xsl/baz.xsl +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/trax/xsl/foo.xsl b/xalansamples/src/main/java/samples/trax/xsl/foo.xsl deleted file mode 100644 index cf4deee73..000000000 --- a/xalansamples/src/main/java/samples/trax/xsl/foo.xsl +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - default param value - - - - - , - - - - - - - - - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/trax/xsl/foo2.xsl b/xalansamples/src/main/java/samples/trax/xsl/foo2.xsl deleted file mode 100644 index 680032c8c..000000000 --- a/xalansamples/src/main/java/samples/trax/xsl/foo2.xsl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/trax/xsl/foo3.xsl b/xalansamples/src/main/java/samples/trax/xsl/foo3.xsl deleted file mode 100644 index 0a63f58e2..000000000 --- a/xalansamples/src/main/java/samples/trax/xsl/foo3.xsl +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/xalansamples/src/main/java/samples/trax/xsl/inc1/inc1.xsl b/xalansamples/src/main/java/samples/trax/xsl/inc1/inc1.xsl deleted file mode 100644 index c00756b33..000000000 --- a/xalansamples/src/main/java/samples/trax/xsl/inc1/inc1.xsl +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/xalansamples/src/main/java/samples/trax/xsl/inc1/inc2/inc2.xsl b/xalansamples/src/main/java/samples/trax/xsl/inc1/inc2/inc2.xsl deleted file mode 100644 index 9b904e8ec..000000000 --- a/xalansamples/src/main/java/samples/trax/xsl/inc1/inc2/inc2.xsl +++ /dev/null @@ -1,21 +0,0 @@ - - - - \ No newline at end of file diff --git a/xalansamples/src/site/xhtml/AppletXMLtoHTML/README.xhtml b/xalansamples/src/site/xhtml/AppletXMLtoHTML/README.xhtml deleted file mode 100644 index 77e95cfea..000000000 --- a/xalansamples/src/site/xhtml/AppletXMLtoHTML/README.xhtml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - Xalan Sample Applet - - - - - - - -

     Running the Xalan sample applet

    -
    -
      -
    • appletXMLtoHTML.html transforms XML into HTML, and displays the XML document and XSL stylesheet as well as the HTML transformation result.

    • -

      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.

      -
    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/AppletXMLtoHTML/appletXMLtoHTML.xhtml b/xalansamples/src/site/xhtml/AppletXMLtoHTML/appletXMLtoHTML.xhtml deleted file mode 100644 index 6944d7249..000000000 --- a/xalansamples/src/site/xhtml/AppletXMLtoHTML/appletXMLtoHTML.xhtml +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - Using an applet to perform XSL transformations - - - - - - - - - - - - diff --git a/xalansamples/src/site/xhtml/AppletXMLtoHTML/client.xhtml b/xalansamples/src/site/xhtml/AppletXMLtoHTML/client.xhtml deleted file mode 100644 index a9facfe3a..000000000 --- a/xalansamples/src/site/xhtml/AppletXMLtoHTML/client.xhtml +++ /dev/null @@ -1,137 +0,0 @@ - - - - AppletXMLtoHTML - - - -
    -

     Transform XML Document

    - - - - - - - - - - - - -
    Document to transformDisplay output as
    - - - HTML   - HTML Source -      - -
    -
    - - - - - - - diff --git a/xalansamples/src/site/xhtml/AppletXMLtoHTML/target.xhtml b/xalansamples/src/site/xhtml/AppletXMLtoHTML/target.xhtml deleted file mode 100644 index f3caa0617..000000000 --- a/xalansamples/src/site/xhtml/AppletXMLtoHTML/target.xhtml +++ /dev/null @@ -1,24 +0,0 @@ - - - - - Untitled - -   - diff --git a/xalansamples/src/site/xhtml/ApplyXPath/readme.xhtml b/xalansamples/src/site/xhtml/ApplyXPath/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/ApplyXPath/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/ApplyXPathDOM/readme.xhtml b/xalansamples/src/site/xhtml/ApplyXPathDOM/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/ApplyXPathDOM/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/DOM2DOM/readme.xhtml b/xalansamples/src/site/xhtml/DOM2DOM/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/DOM2DOM/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/Pipe/readme.xhtml b/xalansamples/src/site/xhtml/Pipe/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/Pipe/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/SimpleTransform/readme.xhtml b/xalansamples/src/site/xhtml/SimpleTransform/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/SimpleTransform/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/UseStylesheetParam/readme.xhtml b/xalansamples/src/site/xhtml/UseStylesheetParam/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/UseStylesheetParam/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/UseXMLFilters/readme.xhtml b/xalansamples/src/site/xhtml/UseXMLFilters/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/UseXMLFilters/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/Validate/readme.xhtml b/xalansamples/src/site/xhtml/Validate/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/Validate/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/extensions/readme.xhtml b/xalansamples/src/site/xhtml/extensions/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/extensions/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/extensions/sql/basic-connection/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/basic-connection/readme.xhtml deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/site/xhtml/extensions/sql/basic-connection/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/extensions/sql/extConnection/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/extConnection/readme.xhtml deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/site/xhtml/extensions/sql/extConnection/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/extensions/sql/pquery/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/pquery/readme.xhtml deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/site/xhtml/extensions/sql/pquery/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/extensions/sql/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/readme.xhtml deleted file mode 100644 index dff6155a7..000000000 --- a/xalansamples/src/site/xhtml/extensions/sql/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/extensions/sql/show-error/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/show-error/readme.xhtml deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/site/xhtml/extensions/sql/show-error/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/extensions/sql/streamable/readme.xhtml b/xalansamples/src/site/xhtml/extensions/sql/streamable/readme.xhtml deleted file mode 100644 index b7b4fb7b8..000000000 --- a/xalansamples/src/site/xhtml/extensions/sql/streamable/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalansamples/src/site/xhtml/translets/readme.xhtml b/xalansamples/src/site/xhtml/translets/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalansamples/src/site/xhtml/translets/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xalanservlet/pom.xml b/xalanservlet/pom.xml deleted file mode 100644 index f6e35e1d8..000000000 --- a/xalanservlet/pom.xml +++ /dev/null @@ -1,141 +0,0 @@ - - - - 4.0.0 - - xalan-j - xalan - 2.7.3 - - - xalanservlet - Apache Xalan-Java Servlet Sample - war - - http://www.example.com - - - UTF-8 - 1.8 - 1.8 - - - - - - xalan - serializer - - - xalan - xalan - - - - xalan - ${xalan.taglet.artifactId} - provided - - - - - javax.servlet - servlet-api - 2.5 - provided - - - - - javax.ejb - ejb-api - 3.0 - provided - - - - - xerces - xercesImpl - 2.12.2 - provided - - - - - dev.aspectj - sunlabs.brazil - 2.3.1 - - - - - org.jboss.spec.javax.rmi - jboss-rmi-api_1.0_spec - 1.0.6.Final - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - - - - create-javadocs - - - [1,) - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - - - - create-sources - - - [1,) - - - - - org.apache.maven.plugins - maven-source-plugin - - - - - - - diff --git a/xalanservlet/src/main/java/servlet/ApplyXSLT.java b/xalanservlet/src/main/java/servlet/ApplyXSLT.java deleted file mode 100644 index e326a6758..000000000 --- a/xalanservlet/src/main/java/servlet/ApplyXSLT.java +++ /dev/null @@ -1,861 +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 servlet; - -import java.io.*; -import java.util.*; -import javax.servlet.*; -import javax.servlet.http.*; -import java.net.URL; -import java.net.MalformedURLException; -import java.net.URLConnection; -import javax.xml.transform.OutputKeys; - -import org.apache.xalan.templates.Constants; -import org.apache.xalan.templates.StylesheetRoot; -// SAX2 Imports -import org.xml.sax.ContentHandler; -import org.xml.sax.SAXException; -import org.xml.sax.XMLReader; -import org.xml.sax.Locator; -import org.xml.sax.helpers.XMLReaderFactory; -import org.xml.sax.ext.DeclHandler; -import org.xml.sax.ext.LexicalHandler; -import org.xml.sax.SAXNotRecognizedException; -import org.xml.sax.SAXNotSupportedException; - -import org.w3c.dom.*; -import javax.xml.transform.*; -import javax.xml.transform.stream.*; -import org.apache.xalan.transformer.TransformerImpl; -import org.apache.xpath.objects.XObject; -import org.apache.xpath.objects.XString; -import org.apache.xalan.processor.*; - -import javax.xml.parsers.DocumentBuilder; -import javax.xml.parsers.DocumentBuilderFactory; - -import org.xml.sax.XMLReader; -import org.xml.sax.helpers.XMLReaderFactory; -import org.xml.sax.helpers.XMLFilterImpl; - -/***************************************************************************************************** - * - * ApplyXSLT supplies the basic - * functions for transforming XML data using XSL stylesheets. - * - * @author Spencer Shepard (sshepard@us.ibm.com) - * @author R. Adam King (rak@us.ibm.com) - * @author Tom Rowe (trowe@us.ibm.com) - * @author Don Leslie (donald_leslie@lotus.com) - * - *****************************************************************************************************/ - -public class ApplyXSLT extends HttpServlet -{ - - /** - * Operational parameters for this class. - *

    Request-time values override init-time values which override class defaults.

    - * @see #init - * @serial - */ - protected ApplyXSLTProperties ourDefaultParameters = null; - - /** - * String representing the end of line characters for the System. - */ - public final static String EOL = System.getProperty("line.separator"); - - /** - * String representing the file separator characters for the System. - */ - public final static String FS = System.getProperty("file.separator"); - - /** - * String representing the current directory for properties files. See init(). - */ - public final static String ROOT = System.getProperty("server.root"); - public static String CURRENTDIR; - - /** - * Initialize operational parameters from the configuration. - * @param config Configuration - * @exception ServletException Never thrown - */ - public void init(ServletConfig config) - throws ServletException - { - 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) { - CURRENTDIR= getServletContext().getRealPath("/WEB-INF/classes/servlet/") + FS; - System.out.println ( CURRENTDIR); - } - else - CURRENTDIR = System.getProperty("user.dir")+ FS; - - 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 - * 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. - * @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. - * @see ApplyXSL#CURRENTDIR - */ - protected void setMediaProps(String mediaURLstring) - { - if (mediaURLstring != null) - { - URL url = null; - try - { - url = new URL(mediaURLstring); - } - catch (MalformedURLException mue1) - { - try - { - url = new URL("file", "", CURRENTDIR + mediaURLstring); - } - catch (MalformedURLException mue2) - { - writeLog("Unable to find the media properties file based on parameter 'mediaURL' = " - + mediaURLstring, HttpServletResponse.SC_ACCEPTED, mue2); - url = null; - } - } - if (url != null) - { - try - { - ourMediaProps = new OrderedProps(url.openStream()); - } - catch (IOException ioe1) - { - writeLog("Exception occurred while opening media properties file: " + mediaURLstring + - ". Media table may be invalid.", HttpServletResponse.SC_ACCEPTED, ioe1); - } - } - } - else - { - String defaultProp = CURRENTDIR + "media.properties"; - try - { - ourMediaProps = new OrderedProps(new FileInputStream(defaultProp)); - } - catch (IOException ioe2) - { - writeLog("Default media properties file " + defaultProp + " not found.", - HttpServletResponse.SC_ACCEPTED, ioe2); - } - } - } - - 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 - - /** - * HTTP Get method passed on to process(). - * @param request The request - * @param response The response - * @see #process - * @exception ServletException Never thrown - * @exception IOException Never thrown - */ - public void doGet (HttpServletRequest request, - HttpServletResponse response) - 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.

    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).

    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.

    - - * @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 - * @see #getDocument - * @see #getStylesheet - * @see #getContentType - * @see #displayException - * @see #setStylesheetParams - * @exception ServletException Never thrown - * @exception IOException Never thrown - */ - - public void process(TransformerFactory tFactory, - HttpServletRequest request, - HttpServletResponse response) - throws ServletException, IOException, SAXException - { - boolean debug = ourDefaultParameters.isDebug(request); - - long time = 0; - if (debug) - time = System.currentTimeMillis(); - - // Listener to be used for all reporting - ApplyXSLTListener listener = new ApplyXSLTListener(); - listener.out.println("debug is " + debug); - - StreamSource xmlSource = null; - StreamSource xslSource = null; - try - { - if ((xmlSource = getDocument(request, listener)) == null) - throw new ApplyXSLTException("getDocument() returned null", - new NullPointerException(), - response.SC_NOT_FOUND); - } - catch (ApplyXSLTException axe) - { - axe.appendMessage(EOL - + "getDocument() resulted in ApplyXSLTException" - + EOL - + listener.getMessage()); - if (debug) writeLog(axe); - displayException(response, axe, debug); - xmlSource = null; - } - // creating XSL Stylesheet - if (xmlSource != null) - { - try - { - 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); - } - catch (ApplyXSLTException axe) - { - 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(); - { - 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); - } - 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 (/*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); - } // 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); - } - } - } - - /** - * Returns an XML XSLTInputSource DOM. Attempts will be make to create the DOM from the following - * sources: - *
      - *
    1. A relative URL specified in the HTTP request's path information. This capability is intended - * for use by servlet engines that map some or all XML data to be processed at the server.
    2. - *
    3. A URL specified in the HTTP request's URL= parameter. This capability - * is intended for clients wishing to selectively process XML data at the server. For - * security reasons, this URL will be forced to the local IP host.
    4. - *
    5. The HTTP request's XML input stream. This capability is intended for use by chained servlets.
    6. - *
    - * @param request May contain or point to the XML XSLTInputSource - * @param listener To record detailed parsing messages for possible return to requestor - * @return XML XSLTInputSource DOM, or null if the XSLTInputSource could not be parsed - * @exception ApplyXSLTException Thrown if exception occurs while handling request - */ - protected StreamSource getDocument(HttpServletRequest request, - ApplyXSLTListener listener) - throws ApplyXSLTException - { - try - { - String xmlURL = null; - // document from PathInfo - if ((xmlURL = request.getPathInfo()) != null) - { - listener.out.println("Parsing XML Document from PathInfo: " + xmlURL); - return new StreamSource(new URL("http", - ((DefaultApplyXSLTProperties) ourDefaultParameters).getLocalHost(), - request.getServerPort(), - xmlURL.replace('\\', '/')).openStream()); - } - // document from Request parameter - if ((xmlURL = ourDefaultParameters.getXMLurl(request)) != null) - { - listener.out.println("Parsing XML Document from request parameter: " + xmlURL); - return new StreamSource(new URL(xmlURL).openStream()); - } - // document from chain - String contentType = request.getContentType(); - if ((contentType != null) && contentType.startsWith("text/xml")) - { - listener.out.println("Parsing XML Document from request chain"); - return new StreamSource(request.getInputStream()); - } - } - catch (IOException ioe) - { - throw new ApplyXSLTException(ioe, HttpServletResponse.SC_NOT_FOUND); - } - catch (Exception e) - { - throw new ApplyXSLTException(e, HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - } - return null; - } - - /** - * Returns a Templates (StylesheetRoot) object. Attempts will be make to create the Stylesheet - * from the followingsources: - *
      - *
    1. A URL specified in the HTTP request's xslURL= parameter. This capability - * is intended for clients wishing to selectively override the server algorithm for applying XSL - * stylesheets. For security reasons, this URL will be forced to the local IP host.
    2. - *
    3. XML association. XML documents may contain references to one or more stylesheets using - * this W3C proposed recommendation. - * If the XML document does contain such references, a best match will be chosen based on the browser - * type making the request and the default association. This capability enables relationships to be - * defined between client capabilities and stylesheets capable of acting on these capabilities.
    4. - *
    5. A configured default stylesheet URL
    6. - *
    - * @param request May contain or point to the XSL XSLTInputSource - * @param xmlSource May point to the XSL XSLTInputSource - * @param listener To record detailed parsing messages for possible return to requestor - * @return XSL XSLTInputSource, or null if the request could not be parsed - * @see #makeDocument - * @see #getMedia - * @see #STYLESHEET_ATTRIBUTE - * @see #getXSLURLfromDoc - * @see #toAcceptLanguageConnection - * @exception ApplyXSLTException Thrown if exception occurs while handling request - */ - protected StreamSource getStylesheet(TransformerFactory tFactory, - HttpServletRequest request, - StreamSource xmlSource, - ApplyXSLTListener listener) - throws ApplyXSLTException - { - try - { - //stylesheet URL from request - String xslURL = ((DefaultApplyXSLTProperties) ourDefaultParameters).getXSLRequestURL(request); - - if (xslURL != null) - listener.out.println("Parsing XSL Stylesheet Document from request parameter: " - + xslURL); - else - { - // find stylesheet from XML Document, Media tag preference - if (xmlSource != null){ - listener.out.println("calling getXSLURLfromDoc and getMedia " + getMedia(request) ); - xslURL = getXSLURLfromDoc(xmlSource, STYLESHEET_ATTRIBUTE, getMedia(request), tFactory); - } - if (xslURL != null) - listener.out.println("Parsing XSL Stylesheet Document from XML Document tag: " + xslURL); - else - // Configuration Default - if ((xslURL = ourDefaultParameters.getXSLurl(null)) != null) - listener.out.println("Parsing XSL Stylesheet Document from configuration: " + xslURL); - } - return new StreamSource(xslURL); - } - catch (IOException ioe) - { - throw new ApplyXSLTException(ioe, HttpServletResponse.SC_NOT_FOUND); - } - catch (Exception e) - { - throw new ApplyXSLTException(e, HttpServletResponse.SC_INTERNAL_SERVER_ERROR); - } - } - - /** - * Returns the response content type specified by the media-type and encoding attributes of - * the <xsl:output> element(s) of the stylesheet. - * @param xslSourceRoot XSL Stylesheet to be examined for <xsl:output> elements. - * @return The response content type (MIME type and charset) of the stylesheet output - * @see #process - */ - 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) - { - 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"; - } - } - - - /** - * Defines and sets select top-level XSL stylesheet variables from the HTTP request, which - * can be evaluated using <xsl:param-variable>. The following variables will be - * automatically set: - *
    - *
    ParameterName
    - *
    Each non-reserved request parameter returned from request.getParameterNames(). If a - * parameter contains more than a single value, only the first value is available.
    - *
    servlet-RemoteAddr
    - *
    Contains String output from request.getRemoteAddr(), which is the IP address - * of the client machine.
    - *
    servlet-RemoteHost
    - *
    Contains String output from request.getRemoteHost(), which is the host name - * of the client machine.
    - *
    servlet-RemoteUser
    - *
    Contains String output from request.getRemoteUser(), which was the user name - * accepted by the server to grant access to this servlet.
    - *
    servlet-Request
    - *
    Contains the request object.
    - *
    - * @param xslprocessor Where to register parameters to be set - * @param request Provides access to all meaningful parameters to set - * @see #process - */ - public void setStylesheetParams(Transformer transformer, HttpServletRequest request) - { - Enumeration paramNames = request.getParameterNames(); - while (paramNames.hasMoreElements()) - { - String paramName = (String) paramNames.nextElement(); - try - { - String[] paramVals = request.getParameterValues(paramName); - if (paramVals != null) - transformer.setParameter(paramName, new XString(paramVals[0])); - - } - catch (Exception e) - { - } - } - try - { - transformer.setParameter("servlet-RemoteAddr", new XString(request.getRemoteAddr())); - - } - catch (Exception e) - { - } - try - { - transformer.setParameter("servlet-RemoteHost", new XString(request.getRemoteHost())); - - } - catch (Exception e) - { - } - try - { - transformer.setParameter("servlet-RemoteUser", new XString(request.getRemoteUser())); - - } - catch (Exception e) - { - } - } - - - /** - * Writes the following information to the servlet log: - *
      - *
    1. HTTP status code
    2. - *
    3. Message
    4. - *
    5. Stack trace
    6. - *
    - * @param axe Contains valid HTTP status code, message, and stack trace (optional) - */ - protected void writeLog(ApplyXSLTException axe) - { - writeLog(axe.getMessage(), axe.getStatusCode(), axe.getException()); - } - - /** - * Writes the following information to the servlet log: - *
      - *
    1. HTTP status code
    2. - *
    3. Message
    4. - *
    5. Stack trace
    6. - *
    - * @param msg Message to be logged - * @param statusCode Valid status code from javax.servlet.http.HttpServletResponse - * @param t Used to generate stack trace (may be =null to suppress stack trace) - */ - protected void writeLog(String msg, int statusCode, Throwable t) - { - if (t == null) - writeLog(msg, statusCode); - else - { - ByteArrayOutputStream bytes = new ByteArrayOutputStream(); - PrintWriter writer = new PrintWriter(bytes, true); - System.out.println("Exception is " + t.getClass().getName()); - t.printStackTrace(writer); - log("HTTP Status Code: " + statusCode + " - " + msg + EOL + bytes.toString()); - } - } - - /** - * Writes the following information to the servlet log: - *
      - *
    1. HTTP status code
    2. - *
    3. Message
    4. - *
    - * @param msg Message to be logged - * @param statusCode Valid status code from javax.servlet.http.HttpServletResponse - */ - protected void writeLog(String msg, int statusCode) - { - log("HTTP Status Code: " + statusCode + " - " + msg); - } - - /** - * Invokes response.sendError setting an HTTP status code and optionally an error message - * as an HTML page. - *

    If running in debug mode, also try to return a stack trace of the exception and - * and xml/xsl processor messages.

    - * @param response Where to stream the exception to - * @param xse The wrapper which contains the exception and its HTTP status code - * @param debug Indicates whether to include stack trace, etc. - */ - protected void displayException(HttpServletResponse response, ApplyXSLTException xse, boolean debug) - { - String mesg = xse.getMessage(); - if (mesg == null) - mesg = ""; - else mesg = "" + mesg + ""; - StringTokenizer tokens = new StringTokenizer(mesg, EOL); - StringBuffer strBuf = new StringBuffer(); - while (tokens.hasMoreTokens()) - strBuf.append(tokens.nextToken() + EOL + "
    "); - mesg = strBuf.toString(); - if (debug) - { - ByteArrayOutputStream bytes = new ByteArrayOutputStream(); - PrintWriter writer = new PrintWriter(bytes, true); - xse.getException().printStackTrace(writer); - mesg += "
     " + bytes.toString() + " 
    "; - } - response.setContentType("text/html"); - try - { - response.sendError(xse.getStatusCode(), mesg); - } - catch (IOException ioe) - { - System.err.println("IOException is occurring when sendError is called"); - } - } - - /** - * Mapping of HTTP request's user-Agent values to stylesheet media= values. - *

    This mapping is defined by a file pointed to by the operational parameter "mediaURL" which can - * either contain a full URL or a path relative to the System's server.root /servlets directory.

    - * @see #setMediaProps - * @see #getMedia - * @serial - */ - protected OrderedProps ourMediaProps = null; - - /** - * Returns a connection which respects the Accept-Language header of the HTTP request. This - * is useful when XSL files are internationalized for use with Web servers which respect this - * header. - *

    For example, Apache 1.3.6 may be configured for multiviews. Under this configuration, - * requests for http://myhost/index.html would return http://myhost/index.html.fr to French browsers - * and http://myhost/index.html.en to English browsers.

    - * @param url Location to connect to - * @param request Could contain an Accept-Language header - * @return An Accept-Language-enabled URL connection - * @see #getStylesheet - */ - protected URLConnection toAcceptLanguageConnection(URL url, HttpServletRequest request) - throws Exception - { - URLConnection tempConnection = url.openConnection(); - tempConnection.setRequestProperty("Accept-Language", request.getHeader("Accept-Language")); - return tempConnection; - } - - - /** - * Returns the XSL stylesheet URL associated with the specified XML document. If multiple XSL - * stylesheets are associated with the XML document, preference will be given to the stylesheet - * which contains an attribute name/value pair that corresponds to the specified attributeName - * and attributeValue. - * @param xmlSource XML XSLTInputSource to be searched for associated XSL stylesheets - * @param attributeName Attribute name to provide preferential matching - * @param attributeValue Attribute value to provide preferential matching - * @return The preferred XSL stylesheet URL, or null if no XSL stylesheet association is found - * @see #getStylesheet - */ - public static String getXSLURLfromDoc(StreamSource xmlSource, - String attributeName, - String attributeValue, - TransformerFactory tFactory) - { - String tempURL = null, returnURL = null; - try - { - DocumentBuilderFactory dfactory = DocumentBuilderFactory.newInstance(); - DocumentBuilder docBuilder = dfactory.newDocumentBuilder(); - Node sourceTree = docBuilder.parse(xmlSource.getInputStream()); - for(Node child=sourceTree.getFirstChild(); null != child; child=child.getNextSibling()) - { - if(Node.PROCESSING_INSTRUCTION_NODE == child.getNodeType()) - { - ProcessingInstruction pi = (ProcessingInstruction)child; - if(pi.getNodeName().equals("xml-stylesheet")) - { - PIA pia = new PIA(pi); - if("text/xsl".equals(pia.getAttribute("type"))) - { - tempURL = pia.getAttribute("href"); - String attribute = pia.getAttribute(attributeName); - if ((attribute != null) && (attribute.indexOf(attributeValue) > -1)) - return tempURL; - if (!"yes".equals(pia.getAttribute("alternate"))) - returnURL = tempURL; - } - } - } - } - } - catch(Exception saxExc) - { - } - return returnURL; - } - - /** - * The attribute name in the tag used in stylesheet selection. - */ - protected static final String STYLESHEET_ATTRIBUTE = "media"; - - /** - * The HTTP Header used for matching the Stylesheet attribute via the - * media properties file selected. - */ - protected static final String HEADER_NAME = "user-Agent"; -} - -/** - * Stores the keys and values from a file (similar to a properties file) and - * can return the first value which has a key contained in its string. - * File can have comment lines starting with '#" and for each line the entries are - * separated by tabs and '=' char. - */ -class OrderedProps -{ - - /** - * Stores the Key and Values as an array of Strings - */ - private Vector attVec = new Vector(15); - - /** - * Constructor. - * @param inputStream Stream containing the properties file. - * @exception IOException Thrown if unable to read from stream - */ - OrderedProps(InputStream inputStream) - throws IOException - { - BufferedReader input = new BufferedReader(new InputStreamReader(inputStream)); - String currentLine, Key = null; - StringTokenizer currentTokens; - while ((currentLine = input.readLine()) != null) - { - currentTokens = new StringTokenizer(currentLine, "=\t\r\n"); - if (currentTokens.hasMoreTokens()) Key = currentTokens.nextToken().trim(); - if ((Key != null) && !Key.startsWith("#") && currentTokens.hasMoreTokens()) - { - String temp[] = new String[2]; - temp[0] = Key; temp[1] = currentTokens.nextToken().trim(); - attVec.addElement(temp); - } - } - } - - /** - * Iterates through the Key list and returns the first value for whose - * key the given string contains. Returns "unknown" if no key is contained - * in the string. - * @param s String being searched for a key. - * @return Value for key found in string, otherwise "unknown" - */ - String getValue(String s) - { - int i, j = attVec.size(); - for (i = 0; i < j; i++) - { - String temp[] = (String[]) attVec.elementAt(i); - if (s.indexOf(temp[0]) > -1) - return temp[1]; - } - return "unknown"; - } -} - -/** - * Parses a processing instruction's (PI) attributes for easy retrieval. - */ -class PIA -{ - private Hashtable piAttributes = null; - - /** - * Constructor. - * @param pi The processing instruction whose attributes are to be parsed - */ - PIA(ProcessingInstruction pi) - { - piAttributes = new Hashtable(); - StringTokenizer tokenizer = new StringTokenizer(pi.getNodeValue(), "=\""); - while(tokenizer.hasMoreTokens()) - { - piAttributes.put(tokenizer.nextToken().trim(), tokenizer.nextToken().trim()); - } - } - - /** - * Returns value of specified attribute. - * @param name Attribute name - * @return Attribute value, or null if the attribute name does not exist - */ - String getAttribute(String name) - { - return (String) piAttributes.get(name); - } -} diff --git a/xalanservlet/src/main/java/servlet/ApplyXSLTException.java b/xalanservlet/src/main/java/servlet/ApplyXSLTException.java deleted file mode 100644 index 023b3c947..000000000 --- a/xalanservlet/src/main/java/servlet/ApplyXSLTException.java +++ /dev/null @@ -1,175 +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. - */ -/***************************************************************************************************** - * - * Wrapper for exceptions occurring during apply XSL processing. - * Allows for exceptions to be returned with an associated HTTP Status Code. - * - * @author Spencer Shepard (sshepard@us.ibm.com) - * @author R. Adam King (rak@us.ibm.com) - * @author Tom Rowe (trowe@us.ibm.com) - * - *****************************************************************************************************/ -package servlet; - -public class ApplyXSLTException extends Exception { - - /** - * Exception Message. - * @serial - */ - private String myMessage = ""; - - /** - * HTTP Status Code. Default= internal server error. - * @serial - */ - private int myHttpStatusCode = javax.servlet.http.HttpServletResponse.SC_INTERNAL_SERVER_ERROR; - - /** - * Wrapped exception - * @serial - */ - private Exception myException = null; - - /** - * Constructor for exception with no additional detail. - */ - public ApplyXSLTException() - { - super(); - } - - /** - * Constructor for exception with message. - * @param s Exception message - */ - public ApplyXSLTException(String s) - { - super(); - myMessage = s; - } - - /** - * Constructor for exception with HTTP status code. - * @param hsc Valid status code from javax.servlet.http.HttpServletResponse - */ - public ApplyXSLTException(int hsc) - { - super(); - myHttpStatusCode = hsc; - } - - /** - * Constructor for exception with message and HTTP status code. - * @param s Exception message - * @param hsc Valid status code from javax.servlet.http.HttpServletResponse - */ - public ApplyXSLTException(String s, int hsc) - { - super(); - myHttpStatusCode = hsc; - } - - /** - * Constructor for exception. - * @param e Exception to be wrapped. - */ - public ApplyXSLTException(Exception e) - { - super(); - myMessage = e.getMessage(); - myException = e; - } - - /** - * Constructor for passed exception with message. - * @param s Exception message - * @param e Exception to be wrapped. - */ - public ApplyXSLTException (String s, Exception e) - { - super(); - myMessage = s; - myException = e; - } - - /** - * Constructor for passed exception with HTTP status code. - * @param e Exception to be wrapped. - * @param hsc Valid status code from javax.servlet.http.HttpServletResponse - */ - public ApplyXSLTException(Exception e, int hsc) - { - super(); - myMessage = e.getMessage(); - myException = e; - myHttpStatusCode = hsc; - } - - /** - * Constructor for passed exception with HTTP status code and message. - * @param s Exception message - * @param e Exception to be wrapped. - * @param hsc Valid status code from javax.servlet.http.HttpServletResponse - */ - public ApplyXSLTException(String s, Exception e, int hsc) - { - super(); - myMessage = s; - myException = e; - myHttpStatusCode = hsc; - } - - /** - * Returns exception message. - * @return exception message - */ - public String getMessage() - { - return myMessage; - } - - /** - * Appends string to exception message. - * @param s String to be added to message - */ - public void appendMessage(String s) - { - myMessage += s; - } - - /** - * Returns the wrapped exception. - * @return Wrapped exception - */ - public Exception getException() - { - return myException; - } - - /** - * Returns the HTTP status code associated with the exception. - * @return Valid status code from javax.servlet.http.HttpServletResponse - */ - public int getStatusCode() - { - return myHttpStatusCode; - } -} - diff --git a/xalanservlet/src/main/java/servlet/ApplyXSLTListener.java b/xalanservlet/src/main/java/servlet/ApplyXSLTListener.java deleted file mode 100644 index 0fab4b914..000000000 --- a/xalanservlet/src/main/java/servlet/ApplyXSLTListener.java +++ /dev/null @@ -1,102 +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 servlet; - -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 - * reporting, XML and XSL processor messages which may be of use in debugging XML+XSL processed at - * the server. - * - * @author Spencer Shepard (sshepard@us.ibm.com) - * @author R. Adam King (rak@us.ibm.com) - * @author Tom Rowe (trowe@us.ibm.com) - * - *****************************************************************************************************/ - -public class ApplyXSLTListener extends DefaultErrorHandler implements ErrorHandler -{ - - /** - * Output stream - */ - private ByteArrayOutputStream outStream = new ByteArrayOutputStream(); - - /** - * Buffered output stream - */ - public PrintWriter out = null; - - /** - * Constructor. - */ - public ApplyXSLTListener() - { - out = new PrintWriter(new BufferedOutputStream(outStream), true); - } - - /** - * Receive notification of a warning. - * - * @param spe The warning information encapsulated in a SAX parse exception. - */ - public void warning(SAXParseException spe) - { - out.println("Parser Warning: " + spe.getMessage()); - } - - /** - * Receive notification of a recoverable error. - * - * @param spe The error information encapsulated in a SAX parse exception. - */ - public void error(SAXParseException spe) - { - out.println("Parser Error: " + spe.getMessage()); - } - - /** - * Receive notification of a non-recoverable error. - * - * @param spe The error information encapsulated in a SAX parse exception. - * @exception SAXException Always thrown - */ - public void fatalError(SAXParseException spe) - throws SAXException - { - out.println("Parser Fatal Error: " + spe.getMessage()); - throw spe; - } - - /** - * Returns the buffered processing message(s). - * @return Buffered processing message(s) - */ - public String getMessage() - { - return outStream.toString(); - } -} - diff --git a/xalanservlet/src/main/java/servlet/ApplyXSLTProperties.java b/xalanservlet/src/main/java/servlet/ApplyXSLTProperties.java deleted file mode 100644 index c62a2d2b1..000000000 --- a/xalanservlet/src/main/java/servlet/ApplyXSLTProperties.java +++ /dev/null @@ -1,165 +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 servlet; - -import java.net.MalformedURLException; -import javax.servlet.*; -import javax.servlet.http.*; - -/***************************************************************************************************** - * - * ApplyXSLTProperties contains operational parameters for ApplyXSLT based - * on program defaults and configuration. - *

    This class is also used to return values for request-time parameters.

    - * - * @author Spencer Shepard (sshepard@us.ibm.com) - * @author R. Adam King (rak@us.ibm.com) - * @author Tom Rowe (trowe@us.ibm.com) - * - *****************************************************************************************************/ - -public class ApplyXSLTProperties { - - /** - * Program default for parameter "URL" - */ - private final String DEFAULT_URL; - - /** - * Program default for parameter "xslURL" - */ - private final String DEFAULT_xslURL; - - /** - * Program default for parameter "debug" - */ - private final boolean DEFAULT_debug; - - /** - * Program default for parameter "noConflictWarnings" - */ - private final boolean DEFAULT_noCW; - - /** - * Constructor to use program defaults. - */ - public ApplyXSLTProperties() - { - DEFAULT_URL = null; - DEFAULT_xslURL = null; - DEFAULT_debug = false; - DEFAULT_noCW = false; - } - - /** - * Constructor to use to override program defaults. - * @param config Servlet configuration - */ - public ApplyXSLTProperties(ServletConfig config) - { - String xm = config.getInitParameter("URL"), - xu = config.getInitParameter("xslURL"), - db = config.getInitParameter("debug"), - cw = config.getInitParameter("noConflictWarnings"); - - if (xm != null) DEFAULT_URL = xm; - else DEFAULT_URL = null; - if (xu != null) DEFAULT_xslURL = xu; - else DEFAULT_xslURL = null; - if (db != null) DEFAULT_debug = new Boolean(db).booleanValue(); - else DEFAULT_debug = false; - if (cw != null) DEFAULT_noCW = new Boolean(cw).booleanValue(); - else DEFAULT_noCW = false; - } - - /** - * Given a parameter name, returns the HTTP request's String value; - * if not present in request, returns default String value. - * @param request Request to check for default override - * @param param Name of the parameter - * @return String value of named parameter - */ - public String getRequestParmString(HttpServletRequest request, String param) - { - if (request != null) { - String[] paramVals = request.getParameterValues(param); - if (paramVals != null) - return paramVals[0]; - } - return null; - } - - /** - * Returns the current setting for "URL". - * @param request Request to check for parameter value - * @return String value for "URL" - * @exception MalformedURLException Will not be thrown - */ - public String getXMLurl(HttpServletRequest request) - throws MalformedURLException - { - String temp = getRequestParmString(request, "URL"); - if (temp != null) - return temp; - return DEFAULT_URL; - } - - /** - * Returns the current setting for "xslURL". - * @param request Request to check for parameter value - * @return String value for "xslURL" - * @exception MalformedURLException Will not be thrown - */ - public String getXSLurl(HttpServletRequest request) - throws MalformedURLException - { - String temp = getRequestParmString(request, "xslURL"); - if (temp != null) - return temp; - return DEFAULT_xslURL; - } - - /** - * Returns the current setting for "debug". - * @param request Request to check for parameter value - * @return Boolean value for "debug" - */ - public boolean isDebug(HttpServletRequest request) - { - String temp = getRequestParmString(request, "debug"); - if (temp != null) - return new Boolean(temp).booleanValue(); - return DEFAULT_debug; - } - - /** - * Returns the current setting for "noConflictWarnings". - * @param request Request to check for parameter value - * @return Boolean value for "noConflictWarnings" - */ - boolean isNoCW(HttpServletRequest request) - { - String temp = getRequestParmString(request, "noConflictWarnings"); - if (temp != null) - return new Boolean(temp).booleanValue(); - return DEFAULT_noCW; - } -} diff --git a/xalanservlet/src/main/java/servlet/DefaultApplyXSLTProperties.java b/xalanservlet/src/main/java/servlet/DefaultApplyXSLTProperties.java deleted file mode 100644 index b3b726100..000000000 --- a/xalanservlet/src/main/java/servlet/DefaultApplyXSLTProperties.java +++ /dev/null @@ -1,272 +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 servlet; - -import java.net.*; -import javax.servlet.*; -import javax.servlet.http.*; -import java.util.Enumeration; -import java.util.Properties; - -/***************************************************************************************************** - * - * DefaultApplyXSLTProperties contains operational parameters for DefaultApplyXSLT based - * on program defaults and configuration. - *

    This class is also used to return values for request-time parameters.

    - * - * @author Spencer Shepard (sshepard@us.ibm.com) - * @author R. Adam King (rak@us.ibm.com) - * @author Tom Rowe (trowe@us.ibm.com) - * - *****************************************************************************************************/ - -public class DefaultApplyXSLTProperties extends ApplyXSLTProperties { - - /** - * Program default for parameter "catalog". - * @see #getCatalog - */ - private final String DEFAULT_catalog; - - /** - * Host used for local context comparisons. - * @see #getLocalHost - * @see #setLocalHost - */ - protected transient String localHost = null; - - /** - * Server port. Used in toSafeURL() -- fix submitted by Ritesh Kumar. - */ - protected static int port =0; - - /** - * Constructor to use program defaults. - */ - public DefaultApplyXSLTProperties() - { - super(); - DEFAULT_catalog = null; - setLocalHost(); - // setSystemProperties(); - } - - /** - * Constructor to use to override program defaults. - * @param config Servlet configuration - * @see #setLocalHost - */ - public DefaultApplyXSLTProperties(ServletConfig config) - { - super(config); - String cat = config.getInitParameter("catalog"); - if (cat != null) DEFAULT_catalog = cat; - else DEFAULT_catalog = null; - setLocalHost(); - setSystemProperties(); - } - - /** - * Sets the name of the local IP host name; this value will be used to constrain untrusted - * XML document and XSL stylesheet URLs to this trusted host. - * @see #getLocalHost - */ - protected void setLocalHost() - { - try - { - localHost = InetAddress.getLocalHost().getHostName(); - } - catch (Exception uhe) - { - localHost = null; - } - } - - /** - * Returns the name of trusted IP host. - * @return Name of trusted host - * @see #setLocalHost - */ - public String getLocalHost() - { - return localHost; - } - - /** - * Returns a URL which is constrained to a trusted IP host. - * @param xURL URL or file path to be made safe - * @return Safe URL - * @exception MalformedURLException Thrown when xURL is not a valid URL - * @see #setLocalHost - * @see #getLocalHost - */ - public URL toSafeURL(String xURL, HttpServletRequest request) - throws MalformedURLException - { - // Fix submitted by Ritesh Kumar. Port is included in construction of URL that is returned. - if (port == 0) - port = request.getServerPort(); - - if (xURL == null) - return null; - - if (xURL.startsWith("/")) - { - try - { - return new URL("http", localHost, port, xURL); - } - catch (MalformedURLException mue) - { - throw new MalformedURLException("toSafeURL(): " + xURL + - " did not map to local"); - } - } - URL tempURL = null; - try - { - tempURL = new URL(xURL); - } - catch (MalformedURLException mue) - { - throw new MalformedURLException("toSafeURL(): " + xURL + - " not a valid URL"); - } - try - { - return new URL(tempURL.getProtocol(), localHost, - port, tempURL.getFile()); - } - catch (MalformedURLException mue) - { - throw new MalformedURLException("toSafeURL(): " + xURL + - " could not be converted to local host"); - } - } - - /** - * Returns a string representing the constrained URL for the XML document. - * If there is no request parameter for the XML document, return the configured default. - * @param request May contain an XML document URL parameter - * @return String form of XML URL - * @exception MalformedURLException Thrown when request URL is not a valid URL or path - * @see #toSafeURL - */ - public String getXMLurl(HttpServletRequest request) - throws MalformedURLException - { - URL url = toSafeURL(getRequestParmString(request, "URL"),request); - if (url == null) - return super.getXMLurl(null); - return url.toExternalForm(); - } - - /** - * Returns a string representing the constrained URL for the XSL stylesheet - * from the request. - * @param request May contain an XSL stylesheet URL parameter - * @return String form of request XSL URL, or null if request contains no xslURL parameter - * @exception MalformedURLException Thrown when request URL is not a valid URL or path - * @see #toSafeURL - */ - public String getXSLRequestURL(HttpServletRequest request) - throws MalformedURLException - { - URL url = toSafeURL(getRequestParmString(request, "xslURL"),request); - if (url == null) - return null; - return url.toExternalForm(); - } - - /** - * Returns a string representing the constrained request URL for the XSL stylesheet. - * If there is no request parameter for the XSL stylesheet, return the configured default. - * @param request May contain an XSL stylesheet URL parameter - * @return String form of XSL URL - * @exception MalformedURLException Thrown when request URL is not a valid URL or path - * @see #toSafeURL - */ - public String getXSLurl(HttpServletRequest request) - throws MalformedURLException - { - String reqURL = getXSLRequestURL(request); - if (reqURL != null) - return reqURL; - URL url = toSafeURL(super.getXSLurl(null), request); - return url.toExternalForm(); - } - - /** - * Returns URLs for all XCatalogs - * that are to be used to process the request. Catalogs are used to resolve XML public identifiers - * into system identifiers. - *

    A single XCatalog can be configured as a default, - * but multiple XCatalogs can be specified at request time to augment the configured default. - * @param request May contain one or more XCatalog parameters - * @return Array of strings for all catalog URLs - */ - public String[] getCatalog(HttpServletRequest request) - { - String temp[] = request.getParameterValues("catalog"); - if (DEFAULT_catalog == null) - return temp; - if (temp == null) - { - String defaultArray[] = new String [1]; - defaultArray[0] = DEFAULT_catalog; - return defaultArray; - } - int i, len = temp.length + 1; - String newCatalogs[] = new String[len]; - newCatalogs[0] = DEFAULT_catalog; - for (i=1; i < len; i++) - { - newCatalogs[i] = temp[i-1]; - } - return newCatalogs; - } - - /** - * I think we no longer need this. Sets the 3 jaxp core system properties. - */ - protected void setSystemProperties() - { - Properties props = new Properties(); - props.put("javax.xml.transform.TransformerFactory", - "org.apache.xalan.processor.TransformerFactoryImpl"); - props.put("javax.xml.parsers.DocumentBuilderFactory", - "org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"); - props.put("javax.xml.parsers.SAXParserFactory", - "org.apache.xerces.jaxp.SAXParserFactoryImpl"); - - Properties systemProps = System.getProperties(); - Enumeration propEnum = props.propertyNames(); - while(propEnum.hasMoreElements()) - { - String prop = (String)propEnum.nextElement(); - if(!systemProps.containsKey(prop)) - systemProps.put(prop, props.getProperty(prop)); - } - System.setProperties(systemProps); - } - -} diff --git a/xalanservlet/src/main/java/servlet/SimpleXSLTServlet.java b/xalanservlet/src/main/java/servlet/SimpleXSLTServlet.java deleted file mode 100644 index 82c9ef6e4..000000000 --- a/xalanservlet/src/main/java/servlet/SimpleXSLTServlet.java +++ /dev/null @@ -1,85 +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 servlet; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.*; -import java.net.URL; - -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.Transformer; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.stream.StreamResult; - -/* - * This sample applies the todo.xsl stylesheet to the - * todo.xml XML document, and returns the transformation - * output (HTML) to the client browser. - * - * IMPORTANT: For this to work, you must place todo.xsl and todo.xml - * in the servlet root directory for documents. - * - */ - -public class SimpleXSLTServlet extends HttpServlet { - - /** - * String representing the file separator characters for the System. - */ - public final static String FS = System.getProperty("file.separator"); - - public void init(ServletConfig config) throws ServletException - { - super.init(config); - } - - public void doGet (HttpServletRequest request, - HttpServletResponse response) - throws ServletException, IOException, java.net.MalformedURLException - { - // The servlet returns HTML. - response.setContentType("text/html; charset=UTF-8"); - // Output goes in the response stream. - PrintWriter out = response.getWriter(); - try - { - TransformerFactory tFactory = TransformerFactory.newInstance(); - //get the real path for xml and xsl files. - String ctx = getServletContext().getRealPath("") + FS; - // Get the XML input document and the stylesheet. - Source xmlSource = new StreamSource(new URL("file", "", ctx+"birds.xml").openStream()); - Source xslSource = new StreamSource(new URL("file", "", ctx+"birds.xsl").openStream()); - // Generate the transformer. - Transformer transformer = tFactory.newTransformer(xslSource); - // Perform the transformation, sending the output to the response. - transformer.transform(xmlSource, new StreamResult(out)); - } - catch (Exception e) - { - out.write(e.getMessage()); - e.printStackTrace(out); - } - out.close(); - } - -} diff --git a/xalanservlet/src/main/java/servlet/UseStylesheetParamServlet.java b/xalanservlet/src/main/java/servlet/UseStylesheetParamServlet.java deleted file mode 100644 index fdbcc54cd..000000000 --- a/xalanservlet/src/main/java/servlet/UseStylesheetParamServlet.java +++ /dev/null @@ -1,103 +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$ - */ - -/* -Simple Servlet Example using a stylesheet parameter - */ -package servlet; -// 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; - -// Imported SAX classes -import org.xml.sax.SAXException; - -// Imported java.io and javax.servlet classes -import java.io.*; -import javax.servlet.*; -import javax.servlet.http.*; - -public class UseStylesheetParamServlet extends HttpServlet { - - - /** - * String representing the file separator characters for the System. - */ - public final static String FS = System.getProperty("file.separator"); - - PrintWriter out; - String xslFile, xmlFile, paramValue; - public void doGet(HttpServletRequest req, - HttpServletResponse res) - throws ServletException, IOException { - try { - res.setContentType("text/html; charset=UTF-8"); - out = res.getWriter(); - - paramValue = req.getParameter("PVAL"); - xmlFile = req.getParameter("XML"); - xslFile = req.getParameter("XSL"); - if (paramValue == null) { - out.println( - "

    No input for paramValue

    "); - return; - } - if ( xmlFile == null) { - out.println( - "

    No input for xmlFile

    "); - return; - } - if ( xslFile == null) { - out.println( - "

    No input for xslFile

    "); - return; - } - - // get the real path for xml and xsl files; - String ctx = getServletContext().getRealPath("") + FS; - xslFile = ctx + xslFile; - xmlFile = ctx + xmlFile; - - TransformerFactory tFactory = - TransformerFactory.newInstance(); - Transformer transformer = - tFactory.newTransformer(new StreamSource(xslFile)); - - // Set the stylesheet parameter (named param1). - transformer.setParameter("param1", paramValue); - // Perform the transformation. - transformer.transform(new StreamSource(xmlFile), - new StreamResult(out)); - } - catch (IOException e) { - e.printStackTrace(); - System.exit(-1); - } - catch (TransformerException e) { - e.printStackTrace(out); - return; - } - } -} diff --git a/xalanservlet/src/main/java/servlet/XSLTServletWithParams.java b/xalanservlet/src/main/java/servlet/XSLTServletWithParams.java deleted file mode 100644 index e59df6c61..000000000 --- a/xalanservlet/src/main/java/servlet/XSLTServletWithParams.java +++ /dev/null @@ -1,147 +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 servlet; - -import javax.servlet.*; -import javax.servlet.http.*; -import java.io.*; -import java.util.Enumeration; -import java.net.URL; - -import org.xml.sax.*; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.Transformer; -import javax.xml.transform.Source; -import javax.xml.transform.stream.StreamSource; -import javax.xml.transform.stream.StreamResult; - -/* - * This sample takes input parameters in the request URL: a URL - * parameter for the XML input, an xslURL parameter for the stylesheet, - * and optional stylesheet parameters. - * To run the equivalent of SimplestXSLServlet (with the documents in the - * servlet document root directory), the request URL is - * http://servlet.SimpleXSLServlet?URL=file:todo.xml&xslURL=file:todo.xsl - * - * Using a stylesheet Processing Instruction: - * If the XML document includes a stylesheet PI that you want to use, - * omit the xslURL parameter. - * - * Sending stylesheet parameters: - * If, for example, a servlet takes a stylesheet parameter named param1 - * param1 that you want to set to foo, include param1=foo in the URL. - */ - -public class XSLTServletWithParams extends HttpServlet { - - /** - * String representing the file separator characters for the System. - */ - public final static String FS = System.getProperty("file.separator"); - - public void init(ServletConfig config) throws ServletException - { - super.init(config); - } - - public void doGet (HttpServletRequest request, - HttpServletResponse response) - throws ServletException, IOException - { - // The servlet returns HTML; charset is UTF8. - // See ApplyXSLT.getContentType() to get output properties from . - response.setContentType("text/html; charset=UTF-8"); - PrintWriter out = response.getWriter(); - try - { - TransformerFactory tFactory = TransformerFactory.newInstance(); - // Get params from URL. - String xml = getRequestParam(request, "URL"); - String xsl = getRequestParam(request, "xslURL"); - Source xmlSource = null; - Source xslSource = null; - Transformer transformer = null; -//get the real path for xml and xsl files. - String ctx = getServletContext().getRealPath("") + FS; - - // Get the XML input document. - if (xml != null && xml.length()> 0) - xmlSource = new StreamSource(new URL("file", "", ctx + xml).openStream()); - // Get the stylesheet. - if (xsl != null && xsl.length()> 0) - xslSource = new StreamSource(new URL("file", "", ctx + xsl).openStream()); - if (xmlSource != null) // We have an XML input document. - { - if (xslSource == null) // If no stylesheet, look for PI in XML input document. - { - String media= null , title = null, charset = null; - xslSource = tFactory.getAssociatedStylesheet(xmlSource,media, title, charset); - } - if (xslSource != null) // Now do we have a stylesheet? - { - transformer = tFactory.newTransformer(xslSource); - setParameters(transformer, request); // Set stylesheet params. - // Perform the transformation. - transformer.transform(xmlSource, new StreamResult(out)); - } - else - out.write("No Stylesheet!"); - } - else - out.write("No XML Input Document!"); - } - catch (Exception e) - { - e.printStackTrace(out); - } - out.close(); - } - - // Get parameters from the request URL. - String getRequestParam(HttpServletRequest request, String param) - { - if (request != null) - { - String paramVal = request.getParameter(param); - return paramVal; - } - return null; - } - - // Set stylesheet parameters from the request URL. - void setParameters(Transformer transformer, HttpServletRequest request) - { - Enumeration paramNames = request.getParameterNames(); - while (paramNames.hasMoreElements()) - { - String paramName = (String) paramNames.nextElement(); - try - { - String paramVal = request.getParameter(paramName); - if (paramVal != null) - transformer.setParameter(paramName, paramVal); - } - catch (Exception e) - { - } - } - } -} diff --git a/xalanservlet/src/main/webapp/WEB-INF/web.xml b/xalanservlet/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index ce1a17bcc..000000000 --- a/xalanservlet/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - xalanservlet - - SimpleXSLTServlet - SimpleXSLTServlet - servlet.SimpleXSLTServlet - - - UseStylesheetParamServlet - UseStylesheetParamServlet - servlet.UseStylesheetParamServlet - - - XSLTServletWithParams - XSLTServletWithParams - servlet.XSLTServletWithParams - - - ApplyXSLT - ApplyXSLT - servlet.ApplyXSLT - - mediaURL - media.properties - - - xslURL - /xalanservlet/booklist1.xsl - - - - SimpleXSLTServlet - /SimpleXSLTServlet - - - UseStylesheetParamServlet - /UseStylesheetParamServlet - - - XSLTServletWithParams - /XSLTServletWithParams - - - ApplyXSLT - /ApplyXSLT/* - - diff --git a/xalanservlet/src/main/webapp/birds.xml b/xalanservlet/src/main/webapp/birds.xml deleted file mode 100644 index 016c36c3a..000000000 --- a/xalanservlet/src/main/webapp/birds.xml +++ /dev/null @@ -1,137 +0,0 @@ - - - - - - Great Tinamou. - Highland Tinamou. - Little Tinamou. - Thicket Tinamou. - Slaty-breasted Tinamou. - Choco Tinamou. - - - - - Red-throated Loon. - Arctic Loon. - Pacific Loon. - Common Loon. - Yellow-billed Loon. - - - - - - - Least Grebe. - Pied-billed Grebe. - Atitlan Grebe. - Horned Grebe. - Red-necked Grebe. - Eared Grebe. - Western Grebe. - Clark's Grebe. - - - - - - - - Yellow-nosed Albatross. (A) - Shy Albatross. (A) - Black-browed Albatross. (A) - Light-mantled Albatross. (A) - Wandering Albatross. (A) - Laysan Albatross. - Black-footed Albatross. - Short-tailed Albatross. (N) - - - Northern Fulmar. - Kermadec Petrel. (A) - Herald Petrel. (A) - Murphy's Petrel. (N) - Mottled Petrel. (A) - Bermuda Petrel. - Black-capped Petrel. - Juan Fernandez Petrel. (N) - Dark-rumped Petrel. - White-necked Petrel. (H) - Bonin Petrel. (H) - Black-winged Petrel. (H, A) - Cook's Petrel. (N) - Stejneger's Petrel. (A) - Bulwer's Petrel. (H) - Jouanin's Petrel. (H, A) - Parkinson's Petrel. (N) - Streaked Shearwater. (A) - Cory's Shearwater. (N) - Pink-footed Shearwater. (N) - Flesh-footed Shearwater. (N) - Greater Shearwater. (N) - Wedge-tailed Shearwater. - Buller's Shearwater. (N) - Sooty Shearwater. (N) - Short-tailed Shearwater. (N) - Christmas Shearwater. (H) - Manx Shearwater. - Townsend's Shearwater. - Black-vented Shearwater. - Audubon's Shearwater. - Little Shearwater. (A) - - - Wilson's Storm-Petrel. (N) - White-faced Storm-Petrel. (A) - European Storm-Petrel. (A) - Fork-tailed Storm-Petrel. - Leach's Storm-Petrel. - Ashy Storm-Petrel. - Band-rumped Storm-Petrel. (N) - Wedge-rumped Storm-Petrel. (N) - Black Storm-Petrel. - Guadalupe Storm-Petrel. - Markham's Storm-Petrel. (A) - Tristram's Storm-Petrel. (H) - Least Storm-Petrel. - - - - - - White-tailed Tropicbird. - Red-billed Tropicbird. - Red-tailed Tropicbird. - - - Masked Booby. - Blue-footed Booby. - Peruvian Booby. (A) - Brown Booby. - Red-footed Booby. - Northern Gannet. - - - American White Pelican. - Brown Pelican. - - - Brandt's Cormorant. - Neotropic Cormorant. - Double-crested Cormorant. - Great Cormorant. - Red-faced Cormorant. - Pelagic Cormorant. - - - Anhinga. - - - Magnificent Frigatebird. - Great Frigatebird. - Lesser Frigatebird. (A) - - - diff --git a/xalanservlet/src/main/webapp/birds.xsl b/xalanservlet/src/main/webapp/birds.xsl deleted file mode 100644 index 8c21d5831..000000000 --- a/xalanservlet/src/main/webapp/birds.xsl +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - -Order is: - - - - - - Family is: - - - - - SubFamily is - - - - - - - - - - - - - - - diff --git a/xalanservlet/src/main/webapp/booklist1.xsl b/xalanservlet/src/main/webapp/booklist1.xsl deleted file mode 100644 index c7868e3f7..000000000 --- a/xalanservlet/src/main/webapp/booklist1.xsl +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - - - - - -

    -

    Books Checked Out

    -

    - - - - - -
    - - -

    - -

    -
    - - - -
    diff --git a/xalanservlet/src/main/webapp/booklist2.xsl b/xalanservlet/src/main/webapp/booklist2.xsl deleted file mode 100644 index 3855955d9..000000000 --- a/xalanservlet/src/main/webapp/booklist2.xsl +++ /dev/null @@ -1,53 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - -
    My Books
    ISBNTitleAuthorPublished
    - - -
    - - - - - - - - - - -
    diff --git a/xalanservlet/src/main/webapp/catalog.xml b/xalanservlet/src/main/webapp/catalog.xml deleted file mode 100644 index 60afd1b93..000000000 --- a/xalanservlet/src/main/webapp/catalog.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - - - - - - A Certain Justice - P.D. James - 1998 - 0375401091 - - - - - Ashworth Hall - Anne Perry - 1997 - 0449908445 - - - - - L.A. Confidential - James Ellroy - 1997 0446674249 - - - - - Shadow Woman - Thomas Perry - 1997 - 0679453024 - - - - diff --git a/xalanservlet/src/main/webapp/default.xsl b/xalanservlet/src/main/webapp/default.xsl deleted file mode 100644 index 9a45c4b96..000000000 --- a/xalanservlet/src/main/webapp/default.xsl +++ /dev/null @@ -1,294 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -   - <? ?> -
    -
    - - - - - ="" - - - - - - -
    -   - -
    -
    - - - -
    - <!-- -
    -   --> -
    -
    - - - -
    - <![CDATA[ -
    -   ]]> -
    -
    - - - -
    -   - < /> -
    -
    - - - - - -
    -   < - ></> -
    -
    - - - -
    -
    - <>
    -
    -
     </>
    -
    -
    - -
    diff --git a/xalanservlet/src/main/webapp/default2.xsl b/xalanservlet/src/main/webapp/default2.xsl deleted file mode 100644 index 1e07af41b..000000000 --- a/xalanservlet/src/main/webapp/default2.xsl +++ /dev/null @@ -1,170 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    -   - <? ?> -
    -
    - - - - - ="" - - - - - - -
    -   - -
    -
    - - - -
    - <!-- -
    -   --> -
    -
    - - - -
    - <![CDATA[ -
    -   ]]> -
    -
    - - - -
    -   - < /> -
    -
    - - - - - -
    -   < - ></> -
    -
    - - - -
    -
    -< >
    -
    -
      </>
    -
    -
    - -
    \ No newline at end of file diff --git a/xalanservlet/src/main/webapp/fooparam.xml b/xalanservlet/src/main/webapp/fooparam.xml deleted file mode 100644 index 03c32b52e..000000000 --- a/xalanservlet/src/main/webapp/fooparam.xml +++ /dev/null @@ -1,2 +0,0 @@ - -Hello diff --git a/xalanservlet/src/main/webapp/fooparam.xsl b/xalanservlet/src/main/webapp/fooparam.xsl deleted file mode 100644 index d85d5b9e9..000000000 --- a/xalanservlet/src/main/webapp/fooparam.xsl +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - Stylesheet parameter - -

    XML source

    -

    -

    Stylesheet parameter

    -

    The param1 stylesheet parameter has been set to .

    - - -
    -
    diff --git a/xalanservlet/src/main/webapp/jspSample.jsp b/xalanservlet/src/main/webapp/jspSample.jsp deleted file mode 100644 index c33fc433e..000000000 --- a/xalanservlet/src/main/webapp/jspSample.jsp +++ /dev/null @@ -1,48 +0,0 @@ -<%@ page language="java" contentType="text/html" %> -<%@ page import="javax.xml.transform.*"%> -<%@ page import="javax.xml.transform.stream.*"%> - - -JSP sample passing a parameter to XSL - - -<%! String FS = System.getProperty("file.separator"); %> -<% -/** - * This JSP uses PMA to set param1 in the -* foo.xsl stylesheet before using the - * stylesheet to transform foo.xml - * and outputting the result. - * - * Invoke the jsp from the appropriate - * context for your servlet/jsp server. - * For example: http://localhost:8080/samples/jspSample.jsp?PMA=HellowWorld!&XML=foo.xml&XSL=foo.xsl - * This example assumes that foo.xsl and foo.xml - * are in the same directory. - * Output should be Hello (from foo.xsml) and HelloWorld! - * (value of param1 in foo.xsl). - - *@author Paul Campbell seapwc@halcyon.com - *@version $Id$ - */ - - -String paramValue = request.getParameter("PMA"); -String xmlFile = request.getParameter("XML"); -String xslFile = request.getParameter("XSL"); - -// get the real path for xml and xsl files; - String ctx = getServletContext().getRealPath("") + FS; - xslFile = ctx + xslFile; - xmlFile = ctx + xmlFile; - -TransformerFactory tFactory = - TransformerFactory.newInstance(); -Transformer transformer = - tFactory.newTransformer(new StreamSource(xslFile)); - transformer.setParameter("param1", paramValue); - transformer.transform( - new StreamSource(xmlFile), new StreamResult(out)); -%> - - diff --git a/xalanservlet/src/site/xhtml/servlet/readme.xhtml b/xalanservlet/src/site/xhtml/servlet/readme.xhtml deleted file mode 100644 index 415137e63..000000000 --- a/xalanservlet/src/site/xhtml/servlet/readme.xhtml +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - Xalan Samples - - -

    Xalan Samples

    -

    For information about the samples (what they illustrate and how to run them), see Samples.

    - - - - diff --git a/xsltc_todo.xml b/xsltc_todo.xml deleted file mode 100644 index 06aab2b64..000000000 --- a/xsltc_todo.xml +++ /dev/null @@ -1,118 +0,0 @@ - - - - - - Testing. - - - Developer on Interpretive Xalan and XSLTC - - - Developer on Interpretive Xalan and XSLTC - - - Developer on Interpretive Xalan and XSLTC - - - Developer - key contributor on TrAX. - - - Developer - key contributor on compilation strategy. - - - Developer on Interpretive Xalan and XSLTC - - - Developer on Interpretive Xalan and XSLTC - - - This could be you! - - - Inventor, architect, former lead developer and evangelist. - - - Former lead developer - key contributor on design documentation, ID/Keys, - performance, JAXP. - - - - - - Change samples to no longer use the XSLTC Native API. - - - Change test harness to no longer use XSLTC Native API with jar.xsltc - target. - - - Investigate performance of SuballocatedIntVector - - - Enable StepPattern[last()] optimization - - - Enable building stand-alone versions of XSLTC and interpretive Xalan. - - - Drop MultiDOM(?) class - - - Eliminate uses of DTM.ROOTNODE value; it was dropped on MAIN branch - - - Keep XSLTC_DTM up-to-date with changes in HEAD - - - Update XSLTC design documentation - - - - - - Add support for incremental building of the DTM - - - Fix (or abandon?) DOMImpl and SAXImpl readExternal() and writeExternal() - methods - - - Update documentation to remove references to XSLTC Native API - - - Update documentation to describe new build procedures, how to select - right TransformerFactory, etc. - - - Reconcile DTM handling of whitespace with XSLTC DOM handling. - Might improve performance, as well as simplifying code. - - - diff --git a/xsltcapplet/pom.xml b/xsltcapplet/pom.xml deleted file mode 100644 index 529c0bccb..000000000 --- a/xsltcapplet/pom.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - 4.0.0 - - xalan-j - xalan - 2.7.3 - - - xsltcapplet - Apache Xalan-Java Applet Sample - - http://www.example.com - - - UTF-8 - 1.8 - 1.8 - - - - - xalan - serializer - - - xalan - xalan - - - - xalan - ${xalan.taglet.artifactId} - provided - - - - - javax.servlet - servlet-api - 2.5 - provided - - - - - javax.ejb - ejb-api - 3.0 - provided - - - - - xerces - xercesImpl - 2.12.2 - provided - - - - - dev.aspectj - sunlabs.brazil - 2.3.1 - - - - - org.jboss.spec.javax.rmi - jboss-rmi-api_1.0_spec - 1.0.6.Final - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - - - - create-javadocs - - - [1,) - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - - - - create-sources - - - [1,) - - - - - org.apache.maven.plugins - maven-source-plugin - - - - - - - diff --git a/xsltcapplet/src/main/java/samples/CompiledApplet/README.applet b/xsltcapplet/src/main/java/samples/CompiledApplet/README.applet deleted file mode 100644 index 56bd7e057..000000000 --- a/xsltcapplet/src/main/java/samples/CompiledApplet/README.applet +++ /dev/null @@ -1,111 +0,0 @@ -====================================================================== -The Apache XSLT Compiler (XSLTC) is a Java-based tool for compiling -XSL stylesheets into extremely lightweight and portable Java byte -code. The XSLTC Java Runtime environment can then process XML files -against these compiled stylesheets (Translets) to generate any manner -of output per the stylesheet instructions. - -This Applet Demo shows you how translets can be run in a client -browser as Java applets to perform XSLT transformations on XML -source documents residing on a Web server. Because of XSLTC's small -footprint, it is possible to download the compiled stylesheets -(translets) and the runtime classes in the applet. Whereas, this -would not be easy with a fullsize Java-based XSLT processor. - -There are two important advantages of this approach: - - 1) It offloads XSLT processing from the server - 2) It enables browsers, such as Netscape 4.x, that do not have native - XSLT support to perform XSLT transformations today! - ------------------------------------------------------------------------ -DEMO CONTENTS ------------------------------------------------------------------------ -The applet demo is very generic. It will let you run any pre-compiled -translet through an applet, and it lets you use that on any XML file -you can refer to using an URL. The contents of this demo are: - - TransformApplet.java - The applet that wraps the XSLTC runtime - classes and your translet(s). - - index.html - Your main HTML document (displays two frames) - - menu.html - The HTML document for your dialog frame. This is the - document that invokes the TransformApplet - - - singleTransform.html - - Another main HTML document that invokes the applet using - two tags to specify the input document and stylesheet URI - ------------------------------------------------------------------------ -HOW TO SET UP THE DEMO ON YOUR SITE ------------------------------------------------------------------------ -1. Install and configure Xalan with XSLTC - -2. Compile the stylesheets you want to export. This will result in one - or more small Java classes (translets). - -3. Create a JAR file containing your translet classes. Include a file - named META-INF/services/javax.xml.transform.TransformerFactory in - your JAR file that contains the following line: - - org.apache.xalan.xsltc.trax.TransformerFactoryImpl - - Be sure to make the JAR file world readable! - -4. Copy the JAR file containing your translet classes and the following - JAR files to the same directory containing index.html: xalan.jar, - xml-apis.jar, xercesImpl.jar and xsltcapplet.jar. - -5. Make your XML source documents readable through a URL (either place - them behind a web server or make them readable for your browser as - a file). - -6. Open the supplied index.html and try out the demo! Alternatively, - open the singleTransform.html, with the value attribute of the - "input-document" tag set to the URI of your input document, - and the value attribute of the "stylesheet-name" tag set to - the URI of the stylesheet. - -7. This sample has been tested successfully with JDK 1.4.0 using IE5.5 - and NetScape7.0. With an earlier version of the JDK, you may have - problems with the JavaScript code. - ----------------------------------------------------------------------- -KNOWN PROBLEMS ----------------------------------------------------------------------- -. The following problems are specific to the Netscape 4.x browser. - -Class Already Loaded - If you start up the Netscape client browser on -a Unix system where you have been running XSLTC, and consequently -have a CLASSPATH that includes xml.jar, and xlstcrt.jar, the applet -demo fails. You'll see a message saying a class has already been -loaded in the Javascript console. To bring up the Javascript console, -you type - - javascript: - -in the location/URL field of the browser. To work around this problem, -unset your CLASSPATH before starting Netscape from a terminal window. -This still may not resolve the problem if Netscape is started from -a wrapper that sets your environment from your startup file (e.g., -your .cshrc file for the C-shell). - -Parser Exception - This problem only applies to Netscape on the -Windows platform with XML documents that have an external DTD. -If you see the following message: - - org.xml.sax.SAXParseException: - External parameter entity "%(DOCTYPE);" - has characters after markup. - -try removing the reference to an external DTD in your XML source. - -. The following problems are specific to the Sun JRE 1.4.* plugin for browsers. - -java.lang.IllegalAccessError - Sun JRE 1.4.* has bundled with it an old version -of Xalan-J Interpretive (2.2.D11). -Copy a new version of xalan.jar to the %Java_JRE%/lib/endorsed/ directory. ----------------------------------------------------------------------- -END OF README diff --git a/xsltcapplet/src/main/java/samples/CompiledApplet/TransformApplet.java b/xsltcapplet/src/main/java/samples/CompiledApplet/TransformApplet.java deleted file mode 100644 index 8d2e34ffe..000000000 --- a/xsltcapplet/src/main/java/samples/CompiledApplet/TransformApplet.java +++ /dev/null @@ -1,261 +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 samples.CompiledApplet; - -import java.applet.Applet; - -import java.awt.BorderLayout; -import java.awt.Button; -import java.awt.Frame; -import java.awt.Label; -import java.awt.Panel; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; - -import java.io.PrintWriter; -import java.io.StringWriter; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.TransformerException; -import javax.xml.transform.ErrorListener; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -/** - * This applet demonstrates how XSL transformations can be made to run in - * browsers without native XSLT support. - * - * Note that the XSLTC transformation engine is invoked through the JAXP - * interface, using the XSLTC "use-classpath" attribute. The - * "use-classpath" attribute specifies to the XSLTC TransformerFactory - * that a precompiled version of the stylesheet (translet) may be available, - * and that that should be used in preference to recompiling the stylesheet. - * @author Morten Jorgensen - * @author Jacek Ambroziak - */ -public final class TransformApplet extends Applet { - TransformerFactory tf; - TransformDelegate transformThread; - /** - * This class implements a dialog box used for XSL messages/comments - */ - public class MessageFrame extends Frame { - - public Frame frame; - - public class ButtonHandler implements ActionListener { - public void actionPerformed(ActionEvent e) { - frame.setVisible(false); - } - } - - /** - * This method handles xml:message and xsl:comment by displaying - * the message/comment in a dialog box. - */ - public MessageFrame(String title, String message) { - super(title); - frame = this; // Make visible to ButtonHandler - setSize(320,200); - - // Create a panel for the message itself - Panel center = new Panel(); - center.add(new Label(message)); - - // Create a panel for the 'OK' button - Panel bottom = new Panel(); - Button okButton = new Button(" OK "); - okButton.addActionListener(new ButtonHandler()); - bottom.add(okButton); - - // Add the two panels to the window/frame - add(center, BorderLayout.CENTER); - add(bottom,BorderLayout.SOUTH); - - // Show the whole thing - setVisible(true); - } - - } - - /** - * The applet uses this method to display messages and comments - * generated by xsl:message and xsl:comment elements. - */ - public class AppletErrorListener implements ErrorListener { - public void displayMessage(TransformerException e) { - MessageFrame z = new MessageFrame("XSL transformation alert", - e.getMessageAndLocation()); - } - - public void error(TransformerException e) { - displayMessage(e); - } - - public void fatalError(TransformerException e) { - displayMessage(e); - } - - public void warning(TransformerException e) { - displayMessage(e); - } - } - - /** - * This method is the main body of the applet. The method is called - * by some JavaScript code in an HTML document. - */ - public synchronized String transform(Object arg1, Object arg2) { - final String stylesheetURL = (String)arg1; - final String documentURL = (String)arg2; - - transformThread.setStylesheetURL(stylesheetURL); - transformThread.setDocumentURL(documentURL); - transformThread.setWaiting(false); - transformThread.wakeUp(); - try{ - wait(); - } catch (InterruptedException e){} - return transformThread.getOutput(); - } - - public void start() { - transform(getParameter("stylesheet-name"), - getParameter("input-document")); - } - public void destroy() { - transformThread.destroy(); - } - public void init() { - tf = TransformerFactory.newInstance(); - try { - tf.setAttribute("use-classpath", Boolean.TRUE); - } catch (IllegalArgumentException iae) { - System.err.println("Could not set XSLTC-specific TransformerFactory" - + " attributes. Transformation failed."); - } - // Another thread is created to keep the context class loader - // information. When use JDK 1.4 plugin for browser, to get around the - // problem with the bundled old version of xalan and endorsed class - // loading mechanism - transformThread = new TransformDelegate(true); - Thread t = new Thread(transformThread); - t.setName("transformThread"); - t.start(); - } - public String getOutput(){ - return transformThread.getOutput(); - } - public synchronized void wakeUp() { - notifyAll(); - } - class TransformDelegate implements Runnable { - private boolean isRunning, isWaiting; - private String stylesheetURL, documentURL; - private String outPut; - public TransformDelegate(boolean arg) { - isRunning = arg; - isWaiting = true; - } - public synchronized void run() { - while(isRunning){ - while(isWaiting){ - try { - wait(); - } catch (InterruptedException e){} - } - transform(); - isWaiting = true; - TransformApplet.this.wakeUp(); - } - } - - public void setStylesheetURL(String arg){ - stylesheetURL = arg; - } - public void setDocumentURL(String arg) { - documentURL = arg; - } - public String getStylesheetURL(){ - return stylesheetURL; - } - public String getDocumentURL() { - return documentURL; - } - public void setWaiting(boolean arg) { - isWaiting = arg; - } - public void destroy() { - isRunning = false; - } - public synchronized void wakeUp() { - notifyAll(); - } - public String getOutput(){ - return outPut; - } - - public void transform(){ - String xslURL = getStylesheetURL(); - String docURL = getDocumentURL(); - // Initialise the output stream - StringWriter sout = new StringWriter(); - PrintWriter out = new PrintWriter(sout); - // Check that the parameters are valid - try { - if (xslURL == null || docURL == null) { - out.println("

    Transformation error

    "); - out.println("The parameters stylesheetURL "+ - "and source must be specified"); - } else { - Transformer t = tf.newTransformer(new StreamSource(xslURL)); - t.setErrorListener(new AppletErrorListener()); - - final long start = System.currentTimeMillis(); - - t.transform(new StreamSource(docURL), - new StreamResult(out)); - - final long done = System.currentTimeMillis() - start; - out.println(""); - } - // Now close up the sink, and return the HTML output in the - // StringWrite object as a string. - out.close(); - System.err.println("Transformation complete!"); - System.err.println(sout.toString()); - outPut = sout.toString(); - sout.close(); - } catch (RuntimeException e) { - out.println("

    RTE

    "); - out.close(); - outPut = sout.toString(); - } catch (Exception e) { - out.println("

    exception

    "); - out.println(e.toString()); - out.close(); - outPut = sout.toString(); - } - } - } -} diff --git a/xsltcapplet/src/main/java/samples/CompiledApplet/index.html b/xsltcapplet/src/main/java/samples/CompiledApplet/index.html deleted file mode 100644 index 4130c3a7c..000000000 --- a/xsltcapplet/src/main/java/samples/CompiledApplet/index.html +++ /dev/null @@ -1,28 +0,0 @@ - - -XSLT Applet Demonstration - - - - - - - - - diff --git a/xsltcapplet/src/main/java/samples/CompiledApplet/menu.html b/xsltcapplet/src/main/java/samples/CompiledApplet/menu.html deleted file mode 100644 index 7567946a7..000000000 --- a/xsltcapplet/src/main/java/samples/CompiledApplet/menu.html +++ /dev/null @@ -1,67 +0,0 @@ - - - - -
    - -

    Xalan/XSLTC Applet Demo

    -Each of these examples illustrate the use of translets -within a Java applet: -

    - - - -

    -

    Select translet:

    -

    -

    Select XML source document:

    -

    -

    - -
    - - - - - - diff --git a/xsltcapplet/src/main/java/samples/CompiledApplet/singleTransform.html b/xsltcapplet/src/main/java/samples/CompiledApplet/singleTransform.html deleted file mode 100644 index 54696bbd7..000000000 --- a/xsltcapplet/src/main/java/samples/CompiledApplet/singleTransform.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - diff --git a/xsltcapplet/src/site/xhtml/CompiledApplet/index.xhtml b/xsltcapplet/src/site/xhtml/CompiledApplet/index.xhtml deleted file mode 100644 index a55208f03..000000000 --- a/xsltcapplet/src/site/xhtml/CompiledApplet/index.xhtml +++ /dev/null @@ -1,28 +0,0 @@ - - -XSLT Applet Demonstration - - - - - - - - - diff --git a/xsltcapplet/src/site/xhtml/CompiledApplet/menu.xhtml b/xsltcapplet/src/site/xhtml/CompiledApplet/menu.xhtml deleted file mode 100644 index 59b9f5de6..000000000 --- a/xsltcapplet/src/site/xhtml/CompiledApplet/menu.xhtml +++ /dev/null @@ -1,68 +0,0 @@ - - - - -
    - -

    Xalan/XSLTC Applet Demo

    -

    -Each of these examples illustrate the use of translets -within a Java applet: -

    - - - -
    -

    Select translet:

    -

    -

    Select XML source document:

    -

    -

    -
    - - - - - - diff --git a/xsltcapplet/src/site/xhtml/CompiledApplet/singleTransform.xhtml b/xsltcapplet/src/site/xhtml/CompiledApplet/singleTransform.xhtml deleted file mode 100644 index 4ce8824d2..000000000 --- a/xsltcapplet/src/site/xhtml/CompiledApplet/singleTransform.xhtml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - diff --git a/xsltcbrazil/pom.xml b/xsltcbrazil/pom.xml deleted file mode 100644 index 33d6b7780..000000000 --- a/xsltcbrazil/pom.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - 4.0.0 - - xalan-j - xalan - 2.7.3 - - - xsltcbrazil - Apache Xalan-Java Brazil Sample - - http://www.example.com - - - UTF-8 - 1.8 - 1.8 - - - - - xalan - serializer - - - xalan - xalan - - - - xalan - ${xalan.taglet.artifactId} - provided - - - - - javax.servlet - servlet-api - 2.5 - provided - - - - - javax.ejb - ejb-api - 3.0 - provided - - - - - xerces - xercesImpl - 2.12.2 - provided - - - - - dev.aspectj - sunlabs.brazil - 2.3.1 - - - - - org.jboss.spec.javax.rmi - jboss-rmi-api_1.0_spec - 1.0.6.Final - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - - - - create-javadocs - - - [1,) - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - - - - create-sources - - - [1,) - - - - - org.apache.maven.plugins - maven-source-plugin - - - - - - - diff --git a/xsltcbrazil/src/main/java/samples/CompiledBrazil/README.brazil b/xsltcbrazil/src/main/java/samples/CompiledBrazil/README.brazil deleted file mode 100644 index 0dcab658d..000000000 --- a/xsltcbrazil/src/main/java/samples/CompiledBrazil/README.brazil +++ /dev/null @@ -1,108 +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, 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 \ - -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: - - -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 - - diff --git a/xsltcbrazil/src/main/java/samples/CompiledBrazil/TransformHandler.java b/xsltcbrazil/src/main/java/samples/CompiledBrazil/TransformHandler.java deleted file mode 100644 index f594455d1..000000000 --- a/xsltcbrazil/src/main/java/samples/CompiledBrazil/TransformHandler.java +++ /dev/null @@ -1,155 +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 samples.CompiledBrazil; - -import java.io.IOException; -import java.io.PrintWriter; -import java.io.StringWriter; - -import java.util.StringTokenizer; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.TransformerException; -import javax.xml.transform.ErrorListener; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import sunlabs.brazil.server.Handler; -import sunlabs.brazil.server.Request; -import sunlabs.brazil.server.Server; - -/** - * This Brazil handler demonstrates how XSL transformations can be made - * available as a web service without using a full web server. This class - * implements the Handler interface from the Brazil project, see: - * http://www.sun.com/research/brazil/ - * - * Note that the XSLTC transformation engine is invoked through the JAXP - * interface, using the XSLTC "use-classpath" attribute. The - * "use-from-classpath" attribute specifies to the XSLTC TransformerFactory - * that a precompiled version of the stylesheet (translet) may be available, - * and that should be used in preference to recompiling the stylesheet. - * @author Morten Jorgensen - */ -public class TransformHandler implements Handler { - - private TransformerFactory m_tf = null; - - // These two are used while parsing the parameters in the URL - private final String PARAM_TRANSLET = "translet="; - private final String PARAM_DOCUMENT = "document="; - private final String PARAM_STATS = "stats="; - - // All output goes here: - private PrintWriter m_out = null; - - /** - * Dump an error message to output - */ - public void errorMessage(String message, Exception e) { - if (m_out == null) { - return; - } - m_out.println("

    XSL transformation error

    "+message); - m_out.println("
    Exception:
    "+e.toString()); - } - - public void errorMessage(String message) { - if (m_out == null) return; - m_out.println("

    XSL transformation error

    "+message); - } - - /** - * This method is run when the Brazil proxy is loaded - */ - public boolean init(Server server, String prefix) { - return true; - } - - /** - * This method is run for every HTTP request sent to the proxy - */ - public boolean respond(Request request) throws IOException { - - // Initialise the output buffer - final StringWriter sout = new StringWriter(); - m_out = new PrintWriter(sout); - - // These two hold the parameters from the URL 'translet' and 'document' - String transletName = null; - String document = null; - String stats = null; - - // Get the parameters from the URL - final StringTokenizer params = new StringTokenizer(request.query,"&"); - while (params.hasMoreElements()) { - final String param = params.nextToken(); - if (param.startsWith(PARAM_TRANSLET)) { - transletName = param.substring(PARAM_TRANSLET.length()); - } - else if (param.startsWith(PARAM_DOCUMENT)) { - document = param.substring(PARAM_DOCUMENT.length()); - } - else if (param.startsWith(PARAM_STATS)) { - stats = param.substring(PARAM_STATS.length()); - } - } - - try { - // Make sure that both parameters were specified - if ((transletName == null) || (document == null)) { - errorMessage("Parameters translet and/or "+ - "document not specified."); - } - else { - if (m_tf == null) { - m_tf = TransformerFactory.newInstance(); - try { - m_tf.setAttribute("use-classpath", Boolean.TRUE); - } catch (IllegalArgumentException iae) { - System.err.println( - "Could not set XSLTC-specific TransformerFactory " - + "attributes. Transformation failed."); - } - } - Transformer t = - m_tf.newTransformer(new StreamSource(transletName)); - - // Do the actual transformation - final long start = System.currentTimeMillis(); - t.transform(new StreamSource(document), - new StreamResult(m_out)); - final long done = System.currentTimeMillis() - start; - m_out.println(""); - } - } - catch (Exception e) { - errorMessage("Internal error.",e); - } - - // Pass the transformation output as the HTTP response - request.sendResponse(sout.toString()); - return true; - } - - -} diff --git a/xsltcejb/pom.xml b/xsltcejb/pom.xml deleted file mode 100644 index 7744ff4f0..000000000 --- a/xsltcejb/pom.xml +++ /dev/null @@ -1,129 +0,0 @@ - - - 4.0.0 - - xalan-j - xalan - 2.7.3 - - - xsltcejb - Apache Xalan-Java XSLTC EJB sample - - http://www.example.com - - - UTF-8 - 1.8 - 1.8 - - - - - xalan - serializer - - - xalan - xalan - - - - xalan - ${xalan.taglet.artifactId} - provided - - - - - javax.servlet - servlet-api - 2.5 - provided - - - - - javax.ejb - ejb-api - 3.0 - provided - - - - - xerces - xercesImpl - 2.12.2 - provided - - - - - dev.aspectj - sunlabs.brazil - 2.3.1 - - - - - org.jboss.spec.javax.rmi - jboss-rmi-api_1.0_spec - 1.0.6.Final - - - - - - - - - org.apache.maven.plugins - maven-dependency-plugin - - - - - - - create-javadocs - - - [1,) - - - - - org.apache.maven.plugins - maven-javadoc-plugin - - - - - - create-sources - - - [1,) - - - - - org.apache.maven.plugins - maven-source-plugin - - - - - - - diff --git a/xsltcejb/src/main/java/samples/CompiledEJB/README.ejb b/xsltcejb/src/main/java/samples/CompiledEJB/README.ejb deleted file mode 100644 index 532d0a26b..000000000 --- a/xsltcejb/src/main/java/samples/CompiledEJB/README.ejb +++ /dev/null @@ -1,113 +0,0 @@ -============================================================ -CONTENTS OF THIS DOCUMENT: - - o) HOW TO PROVIDE XSL TRANSFORMATIONS AS A WEB SERVICE - o) HOW TO INVOKE TRANSLETS FROM AN ENTERPRISE JAVA BEAN - o) TIPS FOR RUNNING THE SAMPLE ON JBOSS-3.0.4_TOMCAT-4.1.12 - ------------------------------------------------------------- -HOW TO PROVIDE XSL TRANSFORMATIONS AS A WEB SERVICE - -With XSLTC, XSL transformations can be run from within a -an Enterprise Java Bean (EJB) and exported through a servlet. -This sample code demonstrates how that can be implemented. - -The CompiledServlet and CompiledBrazil sample code -demonstrate other approaches to providing XSL transformations -as a web service. - ------------------------------------------------------------- -HOW TO INVOKE TRANSLETS FROM AN ENTERPRISE JAVA BEAN - - o) Create an EJB that implements SessionBean and has a - single transform() entry point: - - public class TransformBean implements SessionBean { - public String transform(String document, String transletName) { - // instanciate translet - // build internal DOM - // run transformation - : - : - } - : - : - } - - o) Create this EJB's remote interface (this is the interface - your servlet will use to call the bean's entry point): - - public interface TransformRemote extends EJBObject { - public String transform(String document, String transletName) - throws RemoteException; - } - - o) Create the EJB's home interface, which your servlet - will use to instantiate the remote interface: - - public interface TransformHome extends EJBHome { - TransformRemote create() - throws CreateException, RemoteException; - } - - o) Create a servlet that uses the EJB's home interface to - create a remote interface to the EJB, and then calls - the EJB's transform() method through that remote - interface: - - public class TransformServlet extends HttpServlet { - - public void init(ServletConfig config) { - // look up the EJB's home interface using JNDI - } - - public void doGet (HttpServletRequest request, - HttpServletResponse response) - throws ServletException, IOException { - // create the remote interface - // pass the parameters from teh request to the EJB - // display results passed back from EJB - } - } - - o) Set up your J2EE_CLASSPATH to include JAXP and the XSLTC - runtime jars. - - - o) Compile your XSL stylesheets and place them either in - your J2EE_CLASSPATH or wrap them in your EJB jar. - Make sure that the XSLTC TransformerFactory will be used - by either setting the system property - "javax.xml.transform.TransformerFactory" with the value - "org.apache.xalan.xsltc.trax.TransformerFactoryImpl", or - by making a file with the name - "META-INF/services/javax.xml.transform.TransformerFactory" - containing the single line - - org.apache.xalan.xsltc.trax.TransformerFactoryImpl - - available on your J2EE_CLASSPATH. - - - o) Deploy your EJB - - o) Call the servlet with the necessary parameters (at least - an URI to the source XML document and the name of the - translet class). - ------------------------------------------------------------- -TIPS FOR RUNNING THE SAMPLE ON JBOSS-3.0.4_TOMCAT-4.1.12 - - o) Copy the bundled xalan.jar (a version containing XSLTC) - to %Jboss_Home%/server/default/lib directory. - - o) Put the translet .class file in the same directory as - the EJB classes. - - o) Set the value of the "translet" parameter to the name - of the translet .class - - o) Set the value of the "document" parameter to a valid xml - URI ------------------------------------------------------------- -END OF README diff --git a/xsltcejb/src/main/java/samples/CompiledEJB/TransformBean.java b/xsltcejb/src/main/java/samples/CompiledEJB/TransformBean.java deleted file mode 100644 index 8e33a94f4..000000000 --- a/xsltcejb/src/main/java/samples/CompiledEJB/TransformBean.java +++ /dev/null @@ -1,118 +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 samples.CompiledEJB; - -import java.io.PrintWriter; -import java.io.StringWriter; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.ErrorListener; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import javax.ejb.SessionBean; -import javax.ejb.SessionContext; - -/** - * @author Morten Jorgensen - */ -public class TransformBean implements SessionBean { - - private SessionContext m_context = null; - - private final static String nullErrorMsg = - "

    XSL transformation error

    "+ - "

    'null' parameters sent to the XSL transformation bean's "+ - "transform(String document, String translet) method.

    "; - - private static final String NAMESPACE_FEATURE = - "http://xml.org/sax/features/namespaces"; - - /** - * Generates HTML from a basic error message and an exception - */ - private void errorMsg(PrintWriter out, Exception e, String msg) { - out.println("

    Error

    "); - out.println("

    "+msg+"


    "); - out.println(e.toString()); - } - - /** - * Main bean entry point - */ - public String transform(String document, String transletName) { - - // Initialise the output stream - final StringWriter sout = new StringWriter(); - final PrintWriter out = new PrintWriter(sout); - - try { - if ((document == null) || (transletName == null)) { - out.println(nullErrorMsg); - } - else { - TransformerFactory tf = TransformerFactory.newInstance(); - try { - tf.setAttribute("use-classpath", Boolean.TRUE); - } catch (IllegalArgumentException iae) { - System.err.println( - "Could not set XSLTC-specific TransformerFactory " - + "attributes. Transformation failed."); - } - - Transformer t = - tf.newTransformer(new StreamSource(transletName)); - - // Do the actual transformation - final long start = System.currentTimeMillis(); - t.transform(new StreamSource(document), - new StreamResult(out)); - final long done = System.currentTimeMillis() - start; - out.println(""); - } - } - - catch (Exception e) { - errorMsg(out, e, "Impossible state reached."); - } - - // Now close up the sink, and return the HTML output in the - // StringWrite object as a string. - out.close(); - return sout.toString(); - } - - /** - * - */ - public void setSessionContext(SessionContext context) { - m_context = context; - } - - // General EJB entry points - public void ejbCreate() { } - public void ejbRemove() { } - public void ejbActivate() { } - public void ejbPassivate() { } - public void ejbLoad() { } - public void ejbStore() { } -} diff --git a/xsltcejb/src/main/java/samples/CompiledEJB/TransformHome.java b/xsltcejb/src/main/java/samples/CompiledEJB/TransformHome.java deleted file mode 100644 index 71ae04d1c..000000000 --- a/xsltcejb/src/main/java/samples/CompiledEJB/TransformHome.java +++ /dev/null @@ -1,35 +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 samples.CompiledEJB; - - -import java.rmi.RemoteException; - -import javax.ejb.CreateException; -import javax.ejb.EJBHome; - -/** - * XSL transformation bean home interface - * @author Morten Jorgensen - */ -public interface TransformHome extends EJBHome { - TransformRemote create() throws CreateException, RemoteException; -} diff --git a/xsltcejb/src/main/java/samples/CompiledEJB/TransformRemote.java b/xsltcejb/src/main/java/samples/CompiledEJB/TransformRemote.java deleted file mode 100644 index 8682c5913..000000000 --- a/xsltcejb/src/main/java/samples/CompiledEJB/TransformRemote.java +++ /dev/null @@ -1,35 +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 samples.CompiledEJB; - - -import java.rmi.RemoteException; - -import javax.ejb.EJBObject; - -/** - * XSL transformation bean remote interface - * @author Morten Jorgensen - */ -public interface TransformRemote extends EJBObject { - public String transform(String document, String transletName) - throws RemoteException; -} diff --git a/xsltcejb/src/main/java/samples/CompiledEJB/TransformServlet.java b/xsltcejb/src/main/java/samples/CompiledEJB/TransformServlet.java deleted file mode 100644 index 619034975..000000000 --- a/xsltcejb/src/main/java/samples/CompiledEJB/TransformServlet.java +++ /dev/null @@ -1,92 +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 samples.CompiledEJB; - - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.naming.InitialContext; -import javax.rmi.PortableRemoteObject; - -import javax.servlet.ServletConfig; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -/** - * @author Morten Jorgensen - */ -public class TransformServlet extends HttpServlet { - - // Error message used when the XSL transformation bean cannot be created - private final static String createErrorMsg = - "

    XSL transformation bean error

    "+ - "

    An XSL transformation bean could not be created.

    "; - - // Transformer - "more than meets the eye". - private TransformHome transformer; - - /** - * Servlet initializer - look up the bean's home interface - */ - public void init(ServletConfig config) - throws ServletException{ - try{ - InitialContext context = new InitialContext(); - Object transformRef = context.lookup("transform"); - transformer = - (TransformHome)PortableRemoteObject.narrow(transformRef, - TransformHome.class); - } catch (Exception NamingException) { - NamingException.printStackTrace(); - } - } - - /** - * Handles "GET" HTTP requests - ie. runs the actual transformation - */ - public void doGet (HttpServletRequest request, - HttpServletResponse response) - throws ServletException, IOException { - - String document = request.getParameter("document"); - String translet = request.getParameter("translet"); - - response.setContentType("text/html"); - - PrintWriter out = response.getWriter(); - try{ - // Get the insult from the bean - TransformRemote xslt = transformer.create(); - String result = xslt.transform(document, translet); - out.println(result); - } catch(Exception CreateException){ - out.println(createErrorMsg); - } - out.close(); - } - - public void destroy() { - System.out.println("Destroy"); - } -} diff --git a/xsltcejb/src/main/java/samples/CompiledEJB/bottom_frame.html b/xsltcejb/src/main/java/samples/CompiledEJB/bottom_frame.html deleted file mode 100644 index 3f93e07e2..000000000 --- a/xsltcejb/src/main/java/samples/CompiledEJB/bottom_frame.html +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - diff --git a/xsltcejb/src/main/java/samples/CompiledEJB/index.html b/xsltcejb/src/main/java/samples/CompiledEJB/index.html deleted file mode 100644 index 48736984b..000000000 --- a/xsltcejb/src/main/java/samples/CompiledEJB/index.html +++ /dev/null @@ -1,31 +0,0 @@ - - - XML Technology Center - - - - - - - - - - - - diff --git a/xsltcejb/src/main/java/samples/CompiledEJB/top_frame.html b/xsltcejb/src/main/java/samples/CompiledEJB/top_frame.html deleted file mode 100644 index 541b1dbcf..000000000 --- a/xsltcejb/src/main/java/samples/CompiledEJB/top_frame.html +++ /dev/null @@ -1,122 +0,0 @@ - - - - - - - - - -

    Server-side XSL transformations

    - - - -
    - - - - - - - - - - - - - - -
    - Source document: - - -
    - Transformation: - - -
    - Method: - - - -
    -
    - - - - diff --git a/xsltcejb/src/site/xhtml/CompiledEJB/bottom_frame.xhtml b/xsltcejb/src/site/xhtml/CompiledEJB/bottom_frame.xhtml deleted file mode 100644 index 3fdbdf42f..000000000 --- a/xsltcejb/src/site/xhtml/CompiledEJB/bottom_frame.xhtml +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - diff --git a/xsltcejb/src/site/xhtml/CompiledEJB/index.xhtml b/xsltcejb/src/site/xhtml/CompiledEJB/index.xhtml deleted file mode 100644 index a8f2d8a77..000000000 --- a/xsltcejb/src/site/xhtml/CompiledEJB/index.xhtml +++ /dev/null @@ -1,27 +0,0 @@ - - - XML Technology Center - - - - - - -</html> - diff --git a/xsltcejb/src/site/xhtml/CompiledEJB/top_frame.xhtml b/xsltcejb/src/site/xhtml/CompiledEJB/top_frame.xhtml deleted file mode 100644 index b83e7277c..000000000 --- a/xsltcejb/src/site/xhtml/CompiledEJB/top_frame.xhtml +++ /dev/null @@ -1,122 +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. ---> -<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 deleted file mode 100644 index 37fea4e74..000000000 --- a/xsltcservlet/pom.xml +++ /dev/null @@ -1,130 +0,0 @@ -<?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/xsltcservlet/src/main/java/samples/CompiledServlet/CompileServlet.java b/xsltcservlet/src/main/java/samples/CompiledServlet/CompileServlet.java deleted file mode 100644 index 55b76b0ab..000000000 --- a/xsltcservlet/src/main/java/samples/CompiledServlet/CompileServlet.java +++ /dev/null @@ -1,78 +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 samples.CompiledServlet; - - -import java.io.IOException; -import java.io.PrintWriter; - -import java.net.URL; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import org.apache.xalan.xsltc.compiler.XSLTC; - -/** - * @author Morten Jorgensen - * @author Jacek Ambroziak - */ -public class CompileServlet extends HttpServlet { - - /** - * Main servlet entry point. The servlet reads a stylesheet from the - * URI specified by the "sheet" parameter. The compiled Java class - * ends up in the CWD of the web server (a better solution would be - * to have an environment variable point to a translet directory). - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - String stylesheetName = request.getParameter("sheet"); - - out.println("<html><head>"); - out.println("<title>Servlet Stylesheet Compilation</title>"); - out.println("</head><body>"); - - if (stylesheetName == null) { - out.println("<h1>Compilation error</h1>"); - out.println("The parameter <b><tt>sheet</tt></b> "+ - "must be specified"); - } - else { - XSLTC xsltc = new XSLTC(); - - xsltc.init(); - xsltc.compile(new URL(stylesheetName)); - out.println("<h1>Compilation successful</h1>"); - out.println("The stylesheet was compiled into the translet "+ - "class "+xsltc.getClassName() + " and is now "+ - "available for transformations on this server."); - } - out.println("</body></html>"); - } -} diff --git a/xsltcservlet/src/main/java/samples/CompiledServlet/README.servlet b/xsltcservlet/src/main/java/samples/CompiledServlet/README.servlet deleted file mode 100644 index b3c3c5f6c..000000000 --- a/xsltcservlet/src/main/java/samples/CompiledServlet/README.servlet +++ /dev/null @@ -1,66 +0,0 @@ -======================================================================= -CONTENTS OF THIS DOCUMENT: - - o) HOW TO PROVIDE XSL TRANSFORMATIONS AS A WEB SERVICE - o) HOW TO INVOKE TRANSLETS FROM A SERVLET - o) TIPS FOR RUNNING THE SAMPLE ON TOMCAT - ------------------------------------------------------------------------ -HOW TO PROVIDE XSL TRANSFORMATIONS AS A WEB SERVICE - -With XSLTC, XSL transformations can be run from within a servlet. -This sample code demonstrates how that can be implemented. - -The CompiledEJB and CompiledBrazil sample code demonstrate other -aproaches to providing XSL transformations as a web service. - ------------------------------------------------------------------------ -HOW TO INVOKE TRANSLETS FROM A SERVLET - -The CompiledServlet directory contains the example source code: - - TransformServlet.java - -This file contains a minimal implementation of an XSL transformation -servlet. When you deploy your servlet, make sure that the XSLTC -TransformerFactory will be used by either setting the system property -"javax.xml.transform.TransformerFactory" with the value -"org.apache.xalan.xsltc.trax.TransformerFactoryImpl", or by making a -file with the name "META-INF/services/javax.xml.transform.TransformerFactory" -containing the single line - - org.apache.xalan.xsltc.trax.TransformerFactoryImpl - -available on your CLASSPATH. - ------------------------------------------------------------------------ -TIPS FOR RUNNING THE SAMPLE ON TOMCAT - -When compiling the java files supplied with the sample, you need to -add xalan.jar, xml-apis.jar, xercesImpl.jar and servlet.jar -(in %Tomcat_Home%/common/lib) to the classpath - -o Copy the latest xalan.jar to %Tomcat_Home%/common/endorsed - -o Create a JAR file containing your translet classes and a file - named META-INF/services/javax.xml.transform.TransformerFactory in - your JAR file that contains the following line: - - org.apache.xalan.xsltc.trax.TransformerFactoryImpl - -o Copy the JAR file, xalan.jar, xercesImpl.jar and xml-apis.jar to your - Web_application_context/WEB-INF/lib - -o Make sure that the value of the "class" parameter is the same as - the name of the translet .class or a valid xsl URI - -o Make sure that the value of the "source" parameter is a valid - xml URI - -o Make sure that the value of the "sheet" parameter is a valid - xsl URI - -o The translet .class generated by CompiledServlet will be placed - under %Tomcat_Home%/bin/ ------------------------------------------------------------------------ -END OF README diff --git a/xsltcservlet/src/main/java/samples/CompiledServlet/TransformationServlet.java b/xsltcservlet/src/main/java/samples/CompiledServlet/TransformationServlet.java deleted file mode 100644 index e1e8ef280..000000000 --- a/xsltcservlet/src/main/java/samples/CompiledServlet/TransformationServlet.java +++ /dev/null @@ -1,100 +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 samples.CompiledServlet; - -import java.io.IOException; -import java.io.PrintWriter; - -import javax.servlet.ServletException; -import javax.servlet.http.HttpServlet; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; - -import javax.xml.transform.Transformer; -import javax.xml.transform.TransformerFactory; -import javax.xml.transform.TransformerException; -import javax.xml.transform.stream.StreamResult; -import javax.xml.transform.stream.StreamSource; - -import org.xml.sax.SAXException; - -/** - * This servlet demonstrates how XSL transformations can be made available as - * a web service. See the CompileServlet for an example on how stylesheets - * can be pre-compiled before this servlet is invoked. - * - * Note that the XSLTC transformation engine is invoked through the JAXP - * interface, using the XSLTC "use-classpath" attribute. The - * "use-classpath" attribute specifies to the XSLTC TransformerFactory - * that a precompiled version of the stylesheet (translet) may be available, - * and that that should be used in preference to recompiling the stylesheet. - * @author Morten Jorgensen - * @author Jacek Ambroziak - */ -public final class TransformationServlet extends HttpServlet { - - /** - * Main servlet entry point - */ - public void doGet(HttpServletRequest request, - HttpServletResponse response) - throws IOException, ServletException { - - // Initialise the output writer - response.setContentType("text/html"); - PrintWriter out = response.getWriter(); - - // Get the two paramters "class" and "source". - String transletName = request.getParameter("class"); - String documentURI = request.getParameter("source"); - - try { - if ((transletName == null) || (documentURI == null)) { - out.println("<h1>XSL transformation error</h1>"); - out.println("The parameters <b><tt>class</tt></b> and " + - "<b><tt>source</tt></b> must be specified"); - } - else { - TransformerFactory tf = TransformerFactory.newInstance(); - try { - tf.setAttribute("use-classpath", Boolean.TRUE); - } catch (IllegalArgumentException iae) { - System.err.println( - "Could not set XSLTC-specific TransformerFactory " - + "attributes. Transformation failed."); - } - Transformer t = - tf.newTransformer(new StreamSource(transletName)); - - // Start the transformation - final long start = System.currentTimeMillis(); - t.transform(new StreamSource(documentURI), - new StreamResult(out)); - final long done = System.currentTimeMillis() - start; - out.println("<!-- transformed by XSLTC in "+done+"msecs -->"); - } - } - catch (Exception e) { - out.println("<h1>Error</h1>"); - out.println(e.toString()); - } - } -}