You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Mark Eggers <it...@yahoo.com> on 2005/04/15 01:17:43 UTC
Howto V 2.0 transform
After being away from using Forrest for a while, I decided to give it
another shot.
I am working on creating a large How To site, and hence my interest in
the How To DTD.
I noticed that the FAQ section of the How To V 2.0 DTD wasn't getting
translated using the seeded site.
I did some digging around in $FORREST_HOME/main/webapp and
$FORREST_HOME/main/webapp/resources/stylesheets
I made a slight modification of forrest.xmap, and added a new stylesheet
in $FORREST_HOME/main/webapp/resources/stylesheets
This fixes the FAQ section of the How To V 2.0 DTD, but it's still a bit
ugly. In particular it doesn't copy over all the attributes, and the ID
generation for the TOC is not nice (being taken from the question or
faqsection title).
If people are interested I can submit it to JIRA for comment and review.
I'm primarily a systems person, so I have no idea about how well this
solution really works.
--
Mark Eggers <it...@yahoo.com>
Re: Howto V 2.0 transform
Posted by David Crossley <cr...@apache.org>.
Mark Eggers wrote:
> After being away from using Forrest for a while, I decided to give it
> another shot.
>
> I am working on creating a large How To site, and hence my interest in
> the How To DTD.
>
> I noticed that the FAQ section of the How To V 2.0 DTD wasn't getting
> translated using the seeded site.
>
> I did some digging around in $FORREST_HOME/main/webapp and
> $FORREST_HOME/main/webapp/resources/stylesheets
>
> I made a slight modification of forrest.xmap, and added a new stylesheet
> in $FORREST_HOME/main/webapp/resources/stylesheets
>
> This fixes the FAQ section of the How To V 2.0 DTD, but it's still a bit
> ugly. In particular it doesn't copy over all the attributes, and the ID
> generation for the TOC is not nice (being taken from the question or
> faqsection title).
>
> If people are interested I can submit it to JIRA for comment and review.
>
> I'm primarily a systems person, so I have no idea about how well this
> solution really works.
Yes please. I just tried one of our own howtos with <faqs>
and can see what you mean.
--David
Re: Howto V 2.0 transform
Posted by David Crossley <cr...@apache.org>.
Mark Eggers wrote:
> David Crossley wrote:
>
> > > I'll try svn diff for my next submission (making faqs v2.0 consistent
> > > with document v2.0 and howto v2.0 I think).
> >
> > Hmm, i am not clear what you mean by that.
>
> I noticed that there are only head definitions for howto and document
> DTDs. When authoring other documents, you can't put some of the
> information in. After looking at the other DTDs, I don't know if it
> would be valuable to add the head elements in or not.
>
> > That is correct. These stylesheets need to be able
> > to cope with both formats. Your changes did.
>
> Actually, I think in my copy I broke v 1.x How To compatibility. At
> least with my sample document the questions and answers were not
> translated correctly. That's why I left the original stylesheet.
Todays trunk works for me. In SVN we have howto/howto-howto.xml
which uses <faqs> ... this doc was DTD v1.3 but now
i upgraded it to to be DTD v2.0 ... and both versions
work in my local test.
If you still see problems, then please add a test document
to a Jira Issue.
> > The basic thing to bear in mind is that all formats
> > (i.e. v*.* of faq, changes, document) get transformed
> > into the internal format. At the momemnt this is document-v1
>
> I see that. I've been trying to get the meta element from v 2.0 DTDs to
> make it into the final rendition. Right now if you add a meta tag to a
> v 2.0 how to or document xml file you will get non-validating html from
> the pelt skin. Even if you don't include a meta tag, you get an empty
> <meta></meta> element in the output and the html no longer validates.
>
> Hopefully I can get that figured out.
That would be a great relief. It has been on my todo
list for the imminent 0.7 release. The empty <meta-data/>
element would mean we need to change our compliance.html page.
--David
Re: Howto V 2.0 transform
Posted by Mark Eggers <it...@yahoo.com>.
On Sat, 2005-04-16 at 09:53 +1000, David Crossley wrote:
> > I'll try svn diff for my next submission (making faqs v2.0 consistent
> > with document v2.0 and howto v2.0 I think).
>
> Hmm, i am not clear what you mean by that.
I noticed that there are only head definitions for howto and document
DTDs. When authoring other documents, you can't put some of the
information in. After looking at the other DTDs, I don't know if it
would be valuable to add the head elements in or not.
> That is correct. These stylesheets need to be able
> to cope with both formats. Your changes did.
Actually, I think in my copy I broke v 1.x How To compatibility. At
least with my sample document the questions and answers were not
translated correctly. That's why I left the original stylesheet.
> The basic thing to bear in mind is that all formats
> (i.e. v*.* of faq, changes, document) get transformed
> into the internal format. At the momemnt this is document-v1
I see that. I've been trying to get the meta element from v 2.0 DTDs to
make it into the final rendition. Right now if you add a meta tag to a
v 2.0 how to or document xml file you will get non-validating html from
the pelt skin. Even if you don't include a meta tag, you get an empty
<meta></meta> element in the output and the html no longer validates.
Hopefully I can get that figured out.
--
Mark Eggers <it...@yahoo.com>
Re: Howto V 2.0 transform
Posted by David Crossley <cr...@apache.org>.
Mark Eggers wrote:
> David Crossley wrote:
>
> > Hey, that was a clever way to demonstrate a fix,
> > to tweak the sitemap to call a copy of the xsl.
>
> Thanks, I was just following the pattern that's being used.
>
> > However, if you are using svn, then you could just change
> > the actual file and send the 'svn diff'.
>
> I've just started using svn extensively. Right now most of my big
> projects are in CVS, and I keep configuration files in RCS.
>
> I'll try svn diff for my next submission (making faqs v2.0 consistent
> with document v2.0 and howto v2.0 I think).
Hmm, i am not clear what you mean by that.
> At any rate, after looking at forrest.xmap, it appears that the same
> howto2document.xsl is used to transform all howto vxy DTD documents.
> Since there were changes on going from V1.3 to V2.0, I didn't want to
> disturb any additional translations.
That is correct. These stylesheets need to be able
to cope with both formats. Your changes did.
Don't be tricked by some of the filenames in there.
Many of the stylesheets are from old versions of Forrest.
The basic thing to bear in mind is that all formats
(i.e. v*.* of faq, changes, document) get transformed
into the internal format. At the momemnt this is document-v1
> I picked a name that seemed to follow the pattern for other translations
> in $FORREST_HOME/main/webapp/resources/stylesheets and went from there.
That is the point of my comments. You didn't need to duplicate
the xsl file.
--David
Re: Howto V 2.0 transform
Posted by Mark Eggers <it...@yahoo.com>.
On Fri, 2005-04-15 at 15:18 +1000, David Crossley wrote:
> Hey, that was a clever way to demonstrate a fix,
> to tweak the sitemap to call a copy of the xsl.
Thanks, I was just following the pattern that's being used.
> However, if you are using svn, then you could just change
> the actual file and send the 'svn diff'.
I've just started using svn extensively. Right now most of my big
projects are in CVS, and I keep configuration files in RCS.
I'll try svn diff for my next submission (making faqs v2.0 consistent
with document v2.0 and howto v2.0 I think).
At any rate, after looking at forrest.xmap, it appears that the same
howto2document.xsl is used to transform all howto vxy DTD documents.
Since there were changes on going from V1.3 to V2.0, I didn't want to
disturb any additional translations.
I picked a name that seemed to follow the pattern for other translations
in $FORREST_HOME/main/webapp/resources/stylesheets and went from there.
--
Mark Eggers <it...@yahoo.com>
Re: Howto V 2.0 transform
Posted by David Crossley <cr...@apache.org>.
Mark Eggers wrote:
> After being away from using Forrest for a while, I decided to give it
> another shot.
>
> I am working on creating a large How To site, and hence my interest in
> the How To DTD.
>
> I noticed that the FAQ section of the How To V 2.0 DTD wasn't getting
> translated using the seeded site.
>
> I did some digging around in $FORREST_HOME/main/webapp and
> $FORREST_HOME/main/webapp/resources/stylesheets
>
> I made a slight modification of forrest.xmap, and added a new stylesheet
> in $FORREST_HOME/main/webapp/resources/stylesheets
Hey, that was a clever way to demonstrate a fix,
to tweak the sitemap to call a copy of the xsl.
However, if you are using svn, then you could just change
the actual file and send the 'svn diff'.
> This fixes the FAQ section of the How To V 2.0 DTD, but it's still a bit
> ugly. In particular it doesn't copy over all the attributes, and the ID
> generation for the TOC is not nice (being taken from the question or
> faqsection title).
>
> If people are interested I can submit it to JIRA for comment and review.
I looked at your stuff at FOR-479 and decided to
just commit it. Now everyone can review and help.
> I'm primarily a systems person, so I have no idea about how well this
> solution really works.
I don't profess to know either. I tested it on our
Forrest How-To docs and it works, so it is committed.
--David