Return-Path: Delivered-To: apmail-forrest-user-archive@www.apache.org Received: (qmail 68012 invoked from network); 5 May 2006 04:25:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 5 May 2006 04:25:52 -0000 Received: (qmail 29101 invoked by uid 500); 5 May 2006 04:25:51 -0000 Delivered-To: apmail-forrest-user-archive@forrest.apache.org Received: (qmail 29069 invoked by uid 500); 5 May 2006 04:25:50 -0000 Mailing-List: contact user-help@forrest.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: user@forrest.apache.org List-Id: Delivered-To: mailing list user@forrest.apache.org Received: (qmail 29060 invoked by uid 99); 5 May 2006 04:25:50 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 May 2006 21:25:50 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: neutral (asf.osuosl.org: local policy) Received: from [65.77.211.84] (HELO www2.kc.aoindustries.com) (65.77.211.84) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 May 2006 21:25:49 -0700 Received: from fo2.kc.aoindustries.com (www2.kc.aoindustries.com [65.77.211.84]) by www2.kc.aoindustries.com (8.13.1/8.13.1) with ESMTP id k454PQPY008496 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 4 May 2006 23:25:26 -0500 Received: from localhost (localhost [[UNIX: localhost]]) by fo2.kc.aoindustries.com (8.13.1/8.13.1/Submit) id k454PNrK008414 for user@forrest.apache.org; Thu, 4 May 2006 23:25:23 -0500 X-Authentication-Warning: fo2.kc.aoindustries.com: indexgeo set sender to crossley@apache.org using -f Date: Fri, 5 May 2006 14:25:15 +1000 From: David Crossley To: user@forrest.apache.org Subject: Re: Convert xdoc v10 to v20 Message-ID: <20060505042515.GB24573@igg.indexgeo.com.au> References: <4F23FA92-B387-4644-929B-EFCCCF5F14AE@gmail.com> <20060503015218.GD2100@igg.indexgeo.com.au> <83363872-7891-474F-8430-5BC706B620E5@gmail.com> <9621B561-921B-4D5B-ABD7-B04A6E52E5AF@gmail.com> <20060504061256.GH16193@igg.indexgeo.com.au> <8B11F120-3044-49CC-AC2C-549A8345941F@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8B11F120-3044-49CC-AC2C-549A8345941F@gmail.com> User-Agent: Mutt/1.4.2.1i X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Web Maestro Clay wrote: > David Crossley wrote: > >Web Maestro Clay wrote: > >>- had to replace with [code-FIXME] since it's not in document- > >>v10.dtd > > > >It is in our version of that old DTD. > > BTW, it's in my version of the DTD, but that still doesn't explain > why I needed to '-FIXME' it. I don't understand why. All I know is I > didn't get that error after I changed it from to [code-FIXME] Do your original documents validate against their own version of the document-v10.dtd? 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"). > >>- had to pepper a couple of other '-FIXME' items (faq.html, etc.) > >> > >>PROBLEMS > >>========== > >>1. Unfortunately it appears document-v13 files were *not* generated > >>in build/site.xml (it looks like it merely passed the document- > >>v10.xml versions across). It'd be great to get v13 files, so I can > >>move forward with better compatibility. > > > >Ah, drat. The proper document type declaration with > >a Public Identifier is probably needed. Try it as described > >below by adding one Batik xdoc to a fresh seed site > >and set its Public Identifier. > > >"document-v10.dtd"> 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 > >That will cause it to use Forrest's own DTDs. > >Try it in 'forrest run' or set the validation > >off in forrest.properties file. > > That worked! Cool! 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 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 @@ + + + @@ -122,6 +125,10 @@ + + + + =================================================================== 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. 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. > Unfortunately, it kept the > line so it looks like: > > >
System Requirements >

> Batik requires the following systems to be already > installed in your system: >

>
    >
  • Java Virtual Machine > A Java 1.3 or greater compatible virtual machine must be > present. >
  • >
>
> > IIUC, that needs to be changed to: > >
System Requirements >

> Batik requires the following systems to be already > installed in your system: >

>
    >
  • Java Virtual Machine > A Java 1.3 or greater compatible virtual machine must be > present. >
  • >
>
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