You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@jakarta.apache.org by Niall Pemberton <ni...@gmail.com> on 2006/06/15 13:35:31 UTC

[site] regenerating the jakarta site

I just ran the ant task to regenerate the Jakarta site, but it
generated changes to much more than the two pages I had modified -
inserting an extra space before the tag close. Looks like its
reversing the following change:

http://svn.apache.org/viewvc?view=rev&revision=410923

Any ideas?

Niall

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: [site] regenerating the jakarta site

Posted by sebb <se...@gmail.com>.
On 15/06/06, Roland Weber <ht...@dubioso.net> wrote:
> Hi Sebastian,
>
> > What I found originally was that there was a difference between the
> > output produced by 1.4 and 1.5, in that 1.4 adds an extra space before
> > the terminating "/>". I'm not sure that it does this for every tag, so
> > the only way I could see to make sure that the output was the same for
> > both was to remove the extra spaces.
> >
> > It seemed unnecessary to strip the spaces for 1.5, so I made it
> > conditional.
> > Later I discovered that some VMs other than Sun added the spaces, so I
> > changed the check to look for Sun 1.5 only.
> >
> > Seems like you have found that the replace needs to be done always.
> >
> > The alternative would have been to insist that everyone used the same
> > JVM and vendor to generate the output ...
> >
> > There is another difference between JVMs - tags with multiple
> > attributes are ordered differently when converted to XHTML. This was
> > handled by only allowing a single attribute per XML tag, and using
> > <xsl:attribute ...> for the others. There's a task which checks the
> > XSL files to enforce this.
>
> I admit it's a long shot, but this sounds like a lot of effort with the
> intention to make "diff" work on XHTML files. Is there no "xmldiff"
> tool that knows how to ignore whitspace within tags and the order of
> attributes? Or is there another reason why these things should remain
> constant though XML (and therefore XHTML) considers them dont-cares?

The "diff" is being done by SVN - not sure how easy it is to change
that for every user of the Jakarta SVN ...

Sebastian

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: [site] regenerating the jakarta site

Posted by Roland Weber <ht...@dubioso.net>.
Hi Sebastian,

> What I found originally was that there was a difference between the
> output produced by 1.4 and 1.5, in that 1.4 adds an extra space before
> the terminating "/>". I'm not sure that it does this for every tag, so
> the only way I could see to make sure that the output was the same for
> both was to remove the extra spaces.
> 
> It seemed unnecessary to strip the spaces for 1.5, so I made it
> conditional.
> Later I discovered that some VMs other than Sun added the spaces, so I
> changed the check to look for Sun 1.5 only.
> 
> Seems like you have found that the replace needs to be done always.
> 
> The alternative would have been to insist that everyone used the same
> JVM and vendor to generate the output ...
> 
> There is another difference between JVMs - tags with multiple
> attributes are ordered differently when converted to XHTML. This was
> handled by only allowing a single attribute per XML tag, and using
> <xsl:attribute ...> for the others. There's a task which checks the
> XSL files to enforce this.

I admit it's a long shot, but this sounds like a lot of effort with the
intention to make "diff" work on XHTML files. Is there no "xmldiff"
tool that knows how to ignore whitspace within tags and the order of
attributes? Or is there another reason why these things should remain
constant though XML (and therefore XHTML) considers them dont-cares?

cheers,
  Roland

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: [site] regenerating the jakarta site

Posted by Niall Pemberton <ni...@gmail.com>.
On 6/15/06, sebb <se...@gmail.com> wrote:
> On 15/06/06, Niall Pemberton <ni...@gmail.com> wrote:
> > On 6/15/06, sebb <se...@gmail.com> wrote:
> > > On 15/06/06, Niall Pemberton <ni...@gmail.com> wrote:
> > > > On 6/15/06, sebb <se...@gmail.com> wrote:
> > > > > Were there any errors reported by the Ant build?
> > > > >
> > > > > Some while ago I added a task to strip off the extra spaces. Did this
> > > > > complete successfully?
> > > > >
> > > > > The last time there were space differences, there was an error that
> > > > > stopped the replace working, but it had not been noticed (there's
> > > > > quite a lot of output generated).
> > > > >
> > > > > Or perhaps it did not run - it depends on the Java version, as I did
> > > > > not want to run it if it was not necessary. You could try fixing the
> > > > > file to always run the replace.
> > > >
> > > > That was it - I ran it originally using JDK 1.5.0_06 and the replace
> > >
> > > Which vendor/OS?
> >
> > Sun/W2K
> >
> > > > only runs for JDK 1.4 - when I switch to JDK 1.4 or change the
> > > > build.xml to run it for any JDK version then it only generates changes
> > > > for what I expected.
> > > >
> > > > Was there a reason this was targeted only at JDK 1.4? Also I don't
> > > > understand why its doing this replace anyway - doesn't the space make
> > > > it valid XHTML?
> > > >
> > >
> > > The space does not affect validity.
> > >
> > > What I found originally was that there was a difference between the
> > > output produced by 1.4 and 1.5, in that 1.4 adds an extra space before
> > > the terminating "/>". I'm not sure that it does this for every tag, so
> > > the only way I could see to make sure that the output was the same for
> > > both was to remove the extra spaces.
> > >
> > > It seemed unnecessary to strip the spaces for 1.5, so I made it conditional.
> > > Later I discovered that some VMs other than Sun added the spaces, so I
> > > changed the check to look for Sun 1.5 only.
> > >
> > > Seems like you have found that the replace needs to be done always.
> >
> > Yup, looks that way for it to be consistent. You want to do it or shall I?
>
> If you don't mind...

OK, done.

> > Niall
> >
> > P.S. Thx for the help on this - just trying to add an announcement :-)
> >
>
> No problem...

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: [site] regenerating the jakarta site

Posted by sebb <se...@gmail.com>.
On 15/06/06, Niall Pemberton <ni...@gmail.com> wrote:
> On 6/15/06, sebb <se...@gmail.com> wrote:
> > On 15/06/06, Niall Pemberton <ni...@gmail.com> wrote:
> > > On 6/15/06, sebb <se...@gmail.com> wrote:
> > > > Were there any errors reported by the Ant build?
> > > >
> > > > Some while ago I added a task to strip off the extra spaces. Did this
> > > > complete successfully?
> > > >
> > > > The last time there were space differences, there was an error that
> > > > stopped the replace working, but it had not been noticed (there's
> > > > quite a lot of output generated).
> > > >
> > > > Or perhaps it did not run - it depends on the Java version, as I did
> > > > not want to run it if it was not necessary. You could try fixing the
> > > > file to always run the replace.
> > >
> > > That was it - I ran it originally using JDK 1.5.0_06 and the replace
> >
> > Which vendor/OS?
>
> Sun/W2K
>
> > > only runs for JDK 1.4 - when I switch to JDK 1.4 or change the
> > > build.xml to run it for any JDK version then it only generates changes
> > > for what I expected.
> > >
> > > Was there a reason this was targeted only at JDK 1.4? Also I don't
> > > understand why its doing this replace anyway - doesn't the space make
> > > it valid XHTML?
> > >
> >
> > The space does not affect validity.
> >
> > What I found originally was that there was a difference between the
> > output produced by 1.4 and 1.5, in that 1.4 adds an extra space before
> > the terminating "/>". I'm not sure that it does this for every tag, so
> > the only way I could see to make sure that the output was the same for
> > both was to remove the extra spaces.
> >
> > It seemed unnecessary to strip the spaces for 1.5, so I made it conditional.
> > Later I discovered that some VMs other than Sun added the spaces, so I
> > changed the check to look for Sun 1.5 only.
> >
> > Seems like you have found that the replace needs to be done always.
>
> Yup, looks that way for it to be consistent. You want to do it or shall I?

If you don't mind...

> Niall
>
> P.S. Thx for the help on this - just trying to add an announcement :-)
>

No problem...

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: [site] regenerating the jakarta site

Posted by Niall Pemberton <ni...@gmail.com>.
On 6/15/06, sebb <se...@gmail.com> wrote:
> On 15/06/06, Niall Pemberton <ni...@gmail.com> wrote:
> > On 6/15/06, sebb <se...@gmail.com> wrote:
> > > Were there any errors reported by the Ant build?
> > >
> > > Some while ago I added a task to strip off the extra spaces. Did this
> > > complete successfully?
> > >
> > > The last time there were space differences, there was an error that
> > > stopped the replace working, but it had not been noticed (there's
> > > quite a lot of output generated).
> > >
> > > Or perhaps it did not run - it depends on the Java version, as I did
> > > not want to run it if it was not necessary. You could try fixing the
> > > file to always run the replace.
> >
> > That was it - I ran it originally using JDK 1.5.0_06 and the replace
>
> Which vendor/OS?

Sun/W2K

> > only runs for JDK 1.4 - when I switch to JDK 1.4 or change the
> > build.xml to run it for any JDK version then it only generates changes
> > for what I expected.
> >
> > Was there a reason this was targeted only at JDK 1.4? Also I don't
> > understand why its doing this replace anyway - doesn't the space make
> > it valid XHTML?
> >
>
> The space does not affect validity.
>
> What I found originally was that there was a difference between the
> output produced by 1.4 and 1.5, in that 1.4 adds an extra space before
> the terminating "/>". I'm not sure that it does this for every tag, so
> the only way I could see to make sure that the output was the same for
> both was to remove the extra spaces.
>
> It seemed unnecessary to strip the spaces for 1.5, so I made it conditional.
> Later I discovered that some VMs other than Sun added the spaces, so I
> changed the check to look for Sun 1.5 only.
>
> Seems like you have found that the replace needs to be done always.

Yup, looks that way for it to be consistent. You want to do it or shall I?

Niall

P.S. Thx for the help on this - just trying to add an announcement :-)

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: [site] regenerating the jakarta site

Posted by sebb <se...@gmail.com>.
On 15/06/06, Niall Pemberton <ni...@gmail.com> wrote:
> On 6/15/06, sebb <se...@gmail.com> wrote:
> > Were there any errors reported by the Ant build?
> >
> > Some while ago I added a task to strip off the extra spaces. Did this
> > complete successfully?
> >
> > The last time there were space differences, there was an error that
> > stopped the replace working, but it had not been noticed (there's
> > quite a lot of output generated).
> >
> > Or perhaps it did not run - it depends on the Java version, as I did
> > not want to run it if it was not necessary. You could try fixing the
> > file to always run the replace.
>
> That was it - I ran it originally using JDK 1.5.0_06 and the replace

Which vendor/OS?

> only runs for JDK 1.4 - when I switch to JDK 1.4 or change the
> build.xml to run it for any JDK version then it only generates changes
> for what I expected.
>
> Was there a reason this was targeted only at JDK 1.4? Also I don't
> understand why its doing this replace anyway - doesn't the space make
> it valid XHTML?
>

The space does not affect validity.

What I found originally was that there was a difference between the
output produced by 1.4 and 1.5, in that 1.4 adds an extra space before
the terminating "/>". I'm not sure that it does this for every tag, so
the only way I could see to make sure that the output was the same for
both was to remove the extra spaces.

It seemed unnecessary to strip the spaces for 1.5, so I made it conditional.
Later I discovered that some VMs other than Sun added the spaces, so I
changed the check to look for Sun 1.5 only.

Seems like you have found that the replace needs to be done always.

The alternative would have been to insist that everyone used the same
JVM and vendor to generate the output ...

There is another difference between JVMs - tags with multiple
attributes are ordered differently when converted to XHTML. This was
handled by only allowing a single attribute per XML tag, and using
<xsl:attribute ...> for the others. There's a task which checks the
XSL files to enforce this.

Sebastian

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: [site] regenerating the jakarta site

Posted by Niall Pemberton <ni...@gmail.com>.
On 6/15/06, sebb <se...@gmail.com> wrote:
> Were there any errors reported by the Ant build?
>
> Some while ago I added a task to strip off the extra spaces. Did this
> complete successfully?
>
> The last time there were space differences, there was an error that
> stopped the replace working, but it had not been noticed (there's
> quite a lot of output generated).
>
> Or perhaps it did not run - it depends on the Java version, as I did
> not want to run it if it was not necessary. You could try fixing the
> file to always run the replace.

That was it - I ran it originally using JDK 1.5.0_06 and the replace
only runs for JDK 1.4 - when I switch to JDK 1.4 or change the
build.xml to run it for any JDK version then it only generates changes
for what I expected.

Was there a reason this was targeted only at JDK 1.4? Also I don't
understand why its doing this replace anyway - doesn't the space make
it valid XHTML?

Niall

> Sebastian
> On 15/06/06, Niall Pemberton <ni...@gmail.com> wrote:
> > I just ran the ant task to regenerate the Jakarta site, but it
> > generated changes to much more than the two pages I had modified -
> > inserting an extra space before the tag close. Looks like its
> > reversing the following change:
> >
> > http://svn.apache.org/viewvc?view=rev&revision=410923
> >
> > Any ideas?
> >
> > Niall
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: general-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org


Re: [site] regenerating the jakarta site

Posted by sebb <se...@gmail.com>.
Were there any errors reported by the Ant build?

Some while ago I added a task to strip off the extra spaces. Did this
complete successfully?

The last time there were space differences, there was an error that
stopped the replace working, but it had not been noticed (there's
quite a lot of output generated).

Or perhaps it did not run - it depends on the Java version, as I did
not want to run it if it was not necessary. You could try fixing the
file to always run the replace.

Sebastian
On 15/06/06, Niall Pemberton <ni...@gmail.com> wrote:
> I just ran the ant task to regenerate the Jakarta site, but it
> generated changes to much more than the two pages I had modified -
> inserting an extra space before the tag close. Looks like its
> reversing the following change:
>
> http://svn.apache.org/viewvc?view=rev&revision=410923
>
> Any ideas?
>
> Niall
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: general-help@jakarta.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: general-unsubscribe@jakarta.apache.org
For additional commands, e-mail: general-help@jakarta.apache.org