You are viewing a plain text version of this content. The canonical link for it is here.
Posted to docs@httpd.apache.org by David Shane Holden <dp...@yahoo.com> on 2002/07/28 05:25:38 UTC

manual/style/build.xml

Here's basically a new build file for the docs.  I had to change a few
things to get it to work on win2k with the latest version of ant and
xalan-j, and before I knew it I had changed the entire file.

The two problems I had right off the bat where:

* ant error saying mapper task wasn't allowed within style task.
* ant error about the character encoding.

My solutions where:

* remove mapper completely.
     It wouldnt work with it period.
* separate the english and japanese builds into separate targets.
     At least this way I could build just the english files.

The targets I ended up with where:

     clean            Removes all HTML
     en-clean         Removes English HTML
     en-docs          Generate English HTML
     en-validate      Validate English XML
     ja.jis-clean     Removes Japanese HTML
     ja.jis-docs      Generate Japanese HTML
     ja.jis-validate  Validate Japanese XML
     validate         Validate all XML
     xslt             Generate all HTML

The clean targets were only for testing.

Shane


Re: manual/style/build.xml

Posted by Yoshiki Hayashi <yo...@xemacs.org>.
Joshua Slive <jo...@slive.ca> writes:

> Yoshiki, if you're reading this, could you ping the Ant people again about
> getting that change into their code.

Thanks for reminder.  I searched bugzilla database and to my
surprise I couldn't find my earlier enhancement request.  I
remember I did try to input to bugzilla but I cannot find
auto-reply nor bug number on my disk.  Probably I did some
silly mistake and the request was lost. :-(

I recreated patch for Ant 1.5 and confirmed my request is
really submitted this time.  The bug number is 11249.

-- 
Yoshiki Hayashi

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: manual/style/build.xml

Posted by Yoshiki Hayashi <yo...@xemacs.org>.
Yoshiki Hayashi <yo...@xemacs.org> writes:

> > I just tried with the custom jars and I still get the same error.  I'm 
> > wondering if it's an issue with Windows.  I actually get two different 
> > errors when I validate and when I transform.  The validate error is
> 
> The cause of the error is the same.  Your Java runtime does
> not understand iso-2022-jp encoding.  0x1b is ESC in
> US-ASCII and it is the first byte of notorious iso 2022
> escape sequence.  Sorry, I once saw this error in my
> environment but I cannot remember how I fixed the problem.

It turns out that validate always fails on my environment,
too.  I again modified Ant and it is now it's working.  The
bug number in bugzilla database is 11279.

I also remembered how I fix the error in transformation.
When I was using jar files installed on my Debian system, I
saw the same error as in your previous mail.  I don't think
I encountered that error with jar files in
httpd-docs-lib.tar.gz.  One possibility is that classpath is
not set up correctly in your environment.  Does it help if
you specify -classpath in your command line argument?

-- 
Yoshiki Hayashi

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: manual/style/build.xml

Posted by Yoshiki Hayashi <yo...@xemacs.org>.
David Shane Holden <dp...@yahoo.com> writes:

> Looks like if we rename the files to file.xml-ja.jis and transform it, Xalan 
> will spit out the correct file extension and we wouldn't need to use 
> customized jars.

> > Looks like if we rename the files to file.xml-ja.jis and transform it, 
> 
> Correction.... file.xml-ja.jis should be file.xml-ja

Sorry, I'm -1 on this approach.  Naming files that way is
just working around the limitation of Ant.  I'd rather want
to enhance Ant or use other tool which can convert
file.xml.ja to file.html.ja.jis.  Also, Apache HTTP server
won't recognize xml-ja as Content-type: text/xml,
Content-language: ja.

> I just tried with the custom jars and I still get the same error.  I'm 
> wondering if it's an issue with Windows.  I actually get two different 
> errors when I validate and when I transform.  The validate error is

The cause of the error is the same.  Your Java runtime does
not understand iso-2022-jp encoding.  0x1b is ESC in
US-ASCII and it is the first byte of notorious iso 2022
escape sequence.  Sorry, I once saw this error in my
environment but I cannot remember how I fixed the problem.

I'm using this:
% java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build Blackdown-1.3.1-FCS)
Java HotSpot(TM) Client VM (build Blackdown-1.3.1-FCS, mixed mode)

> [xmlvalidate]
> manual/mod/mod_auth.xml.ja:8:15: An invalid XML character (Unicode: 0x1b) 
> was found in the element content of the document.
> 
> and the transformation error is
> 
> [style] Processing manual\mod\mod_auth.xml.ja to
>          manual\mod\mod_auth.xml.html.ja.jis
> [style] Loading stylesheet manual\style\manual.ja.xsl
> [style] Warning: encoding "iso-2022-jp" not supported, using UTF-8
> [style] : Fatal Error! org.xml.sax.SAXParseException:
>          The encoding "iso-2022-jp" is not supported.
>          Cause: org.xml.sax.SAXParseException:
>          The encoding "iso-2022-jp" is not supported.
> [style] Failed to process manual\mod\mod_auth.xml.ja

-- 
Yoshiki Hayashi

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: manual/style/build.xml

Posted by David Shane Holden <dp...@yahoo.com>.
> Looks like if we rename the files to file.xml-ja.jis and transform it, 

Correction.... file.xml-ja.jis should be file.xml-ja

Shane


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


httpd-docs-lib.tar.gz updated

Posted by Yoshiki Hayashi <yo...@xemacs.org>.
Joshua Slive <jo...@slive.ca> writes:

> On 29 Jul 2002, Yoshiki Hayashi wrote:
> > I don't think we have problem using Ant 1.5 instead of 1.4.1
> > so if your improved build.xml requires 1.5, let's replace
> > jars in httpd-docs-lib.tar.gz.
> 
> Yoshiki, please feel free to go ahead and modify httpd-docs-lib.tar.gz, or
> if you'd like me to do it, let me know.

I updated httpd-docs-lib.tar.gz.  Everyone using old version
please grab it from
http://httpd.apache.org/dev/dist/httpd-docs-lib.tar.gz
again.

-- 
Yoshiki Hayashi

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: manual/style/build.xml

Posted by Joshua Slive <jo...@slive.ca>.
On 29 Jul 2002, Yoshiki Hayashi wrote:
> I don't think we have problem using Ant 1.5 instead of 1.4.1
> so if your improved build.xml requires 1.5, let's replace
> jars in httpd-docs-lib.tar.gz.

Yoshiki, please feel free to go ahead and modify httpd-docs-lib.tar.gz, or
if you'd like me to do it, let me know.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: manual/style/build.xml

Posted by Yoshiki Hayashi <yo...@xemacs.org>.
David Shane Holden <dp...@yahoo.com> writes:

> I should also mention xmlvalidate isn't available in the custom jar file ...

If you need new features in Ant 1.5, I've just uploaded
modified Ant 1.5 to
http://httpd.apache.org/dev/dist/jakarta-ant-1.5-modified-jar.tar.gz

With this, you won't need to change the name of Japanese
files.  That will probably make your patch smaller and
easier to review.

I don't think we have problem using Ant 1.5 instead of 1.4.1
so if your improved build.xml requires 1.5, let's replace
jars in httpd-docs-lib.tar.gz.

-- 
Yoshiki Hayashi

---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: manual/style/build.xml

Posted by Joshua Slive <jo...@slive.ca>.
On Sun, 28 Jul 2002, David Shane Holden wrote:

> I should also mention xmlvalidate isn't available in the custom jar file ...

I think it is great that people are considering ways to improve the build
process.  But let me add some history here.

We tried to change the build process before a few months ago, and it took
Yoshiki and I significant hair pulling to get it back to a point where it
worked again.  So I don't want to see any changes that will leave us worse
than we are now.  To make sure that doesn't happen, I'm not going to
commit any changes to the build system unless:

A. They are checked and approved by Yoshiki or someone else familiar with
the Japanese translation; or

B. They don't change in any way the handling of Japanese; they only touch
english.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: manual/style/build.xml

Posted by David Shane Holden <dp...@yahoo.com>.
I should also mention xmlvalidate isn't available in the custom jar file ...

Shane


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: manual/style/build.xml

Posted by David Shane Holden <dp...@yahoo.com>.
I got all but the Japanese validation to work... it still errors about the
unicode but since I don't have the time I can't mess with it anymore, and
probably won't be able to until the middle of the week.

I was able to work around the file extensions by copying the .xml.ja files
to .xml-ja, transforming those, then deleting them.  I don't know if that
was proposed before or even acceptable, but it works for me without using
the custom jar.

I have a feeling the jar's are of an older version because I was getting
this error when I tried to use 'em, which didn't happen when I used the
latest ant ones.
manual\style\build.xml:25: The <patternset> data type doesn't support the
nested "patternset" element.

I attached what I have so if anybody's interested they can mess with it.

Shane




Re: manual/style/build.xml

Posted by David Shane Holden <dp...@yahoo.com>.
Joshua Slive wrote:
> This is necessary because Ant's notion of an "extension" doesn't map very
> well with ours.  I believe that with the buildfile you created, something
> like file.xml.ja.jis will get transformed into file.xml.ja.html.ja.jis or
> something like that.  Obviously, that's no good.

*sigh* ... just noticed that in the error below ...

Looks like if we rename the files to file.xml-ja.jis and transform it, Xalan 
will spit out the correct file extension and we wouldn't need to use 
customized jars.

> 
> I'm also not sure why you are getting an error with the Japanese.  I get a
> warning from Xalan, but it works fine anyway.  Could you try with our jar
> files and see if you can get things to work.

I just tried with the custom jars and I still get the same error.  I'm 
wondering if it's an issue with Windows.  I actually get two different 
errors when I validate and when I transform.  The validate error is

[xmlvalidate]
manual/mod/mod_auth.xml.ja:8:15: An invalid XML character (Unicode: 0x1b) 
was found in the element content of the document.

and the transformation error is

[style] Processing manual\mod\mod_auth.xml.ja to
         manual\mod\mod_auth.xml.html.ja.jis
[style] Loading stylesheet manual\style\manual.ja.xsl
[style] Warning: encoding "iso-2022-jp" not supported, using UTF-8
[style] : Fatal Error! org.xml.sax.SAXParseException:
         The encoding "iso-2022-jp" is not supported.
         Cause: org.xml.sax.SAXParseException:
         The encoding "iso-2022-jp" is not supported.
[style] Failed to process manual\mod\mod_auth.xml.ja

Shane



---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Re: manual/style/build.xml

Posted by Joshua Slive <jo...@slive.ca>.
On Sat, 27 Jul 2002, David Shane Holden wrote:

> Here's basically a new build file for the docs.  I had to change a few
> things to get it to work on win2k with the latest version of ant and
> xalan-j, and before I knew it I had changed the entire file.
>
> The two problems I had right off the bat where:
>
> * ant error saying mapper task wasn't allowed within style task.
> * ant error about the character encoding.
>
> My solutions where:
>
> * remove mapper completely.
>      It wouldnt work with it period.
> * separate the english and japanese builds into separate targets.
>      At least this way I could build just the english files.

Ahhh... Looks very cool.

The mapper target is a custom mod to Ant by Yoshiki, so in order to build
the docs you need to use our custom version of Ant available from
http://httpd.apache.org/docs-project/docsformat.html
Yoshiki, if you're reading this, could you ping the Ant people again about
getting that change into their code.

This is necessary because Ant's notion of an "extension" doesn't map very
well with ours.  I believe that with the buildfile you created, something
like file.xml.ja.jis will get transformed into file.xml.ja.html.ja.jis or
something like that.  Obviously, that's no good.

I'm also not sure why you are getting an error with the Japanese.  I get a
warning from Xalan, but it works fine anyway.  Could you try with our jar
files and see if you can get things to work.

Joshua.


---------------------------------------------------------------------
To unsubscribe, e-mail: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org