On May 4, 2006, at 9:25 PM, David Crossley wrote:
Do your original documents validate against their own version of the document-v10.dtd?
The problem was that the <code> element had a <br/> inside. I removed the <br/> and it worked again. BTW, I also noticed that <tt> is not valid, so I replaced them with <code> (which I think is sufficiently similar).
BTW, i glanced at the differences between your version and Forrest's version of the document-v10 DTD and they seem identical (except now allow "figure" in "sections").
Thanks for checking.
The main point about that is that Forrest can then use the powerful SourceTypeAction (content aware pipelines) where it responds to the Public Identifier and then Forrest knows how to transform each different document type. http://forrest.apache.org/docs/dev/cap.html
Thanks for the link.
However if you don't have valid input docs then i suppose that you might lose some info. ---oOo--- I can see another solution for you. That SourceTypeAction can also respond to the <document> element and other features of the input instances such as namespaces. It is really powerful. Forrest does not use the "document-element" detection, so you could use it. Go back to your original document type declarations using the System Identifier. This will enable Forrest to use your local copies of the DTDs at xdocs/dtd/* (Only necessary if the DTDs are too different.) In main/webapp/forrest.xmap add another match and transformer handler. Forrest will not detect your documents with its existing sourcetype matches and will fall through to your new catchall. Here is the diff (trimmed a little) against today's trunk: =================================================================== --- forrest.xmap (revision 398540) +++ forrest.xmap (working copy) @@ -96,6 +96,9 @@ <sourcetype name="howto-v20"><document-declaration public-id="-//APACHE//DTD How-to V2.0//EN" /></sourcetype> + <sourcetype name="document-v10-clay"> + <document-element local-name="document" /> + </sourcetype> </map:action> @@ -122,6 +125,10 @@ <map:when test="document-v10"> <map:transform src="{lm:transform.docv10.docv11}" /> </map:when> + <map:when test="document-v10-clay"> + <map:transform src="{lm:transform.docv10.docv11}" /> + </map:when> + <map:when test="document-v20a"> <map:transform src="{lm:transform.docv20.docv12}" /> </map:when> =================================================================== That sourcetype name="document-v10-clay" gives you the ability to add additional transformers for particular elements that you might need transformed. Otherwise we could have just said sourcetype name="document-v10" and it would use the existing set of transformers shown just above yours.
I'll check into that.
Why "transform.docv10.docv11"? No problem: docv11 is essentially the same as docv13, some restrictions were relaxed and every element can have a @class attr.
Great! A good tip.
Yes. How are they done in your source doc? Perhaps you will need to edit your source documents to have @id on each section rather than anchor. -David
I'll play around with it... BTW, I ended up getting it working by going back to the `forrest seed` as you suggested[1].
I still need to decide how I'm going to proceed (It is currently building with v10.dtd files). I suspect I'll see about getting it working with the 'generated' XML files (accessible by clicking the xml link in the upper right corner of each page).
I do have a couple of -FIXME items, but they're for pages that are missing on the LIVE site... supportedElements.html[2] and supporteedProperties.html[3]
[1] http://people.apache.org/~clay/batik/ [2] http://xmlgraphics.apache.org/batik/supportedElements.html [3] http://xmlgraphics.apache.org/batik/supportedProperties.html Thank you again for all of your help! Web Maestro Clay [EMAIL PROTECTED] My religion is simple. My religion is kindness. -- HH Dalai Lama of Tibet
