So I will be giving this a try tonight or over the weekend... However, I wanted to ask a couple of more questions: (just to start people thinking...)
1. I would ultimately like to have a solution that requires only modifications to my website data, not changes to the Forrest XSL Files. Therefore, can we design/architect a change that can be contributed back to Forrest. 2. Most users would want tracking, but they may not want the "Google" proprietary tracking, Therefore, is it possible to design it to accept a "CDATA" as aposed to a "PCDATA" thus allowing Arbitrary code in the website data. 3. Is it possible to update the DTD Docs with optional fields. I Kinda like the validation. Bryce On Fri, Sep 24, 2010 at 10:43 AM, Steve Wolke <smwo...@geistig.com> wrote: > Bryce, > > > > You can turn off validation of the skinconfig.xml in the forrest.properties > file like the following > > > > ############## > > # validation properties > > > > # This set of properties determine if validation is performed > > # Values are inherited unless overridden. > > # e.g. if forrest.validate=false then all others are false unless set to > true. > > forrest.validate=true > > #forrest.validate.xdocs=${forrest.validate} > > forrest.validate.skinconf=false > > #forrest.validate.sitemap=${forrest.validate} > > #forrest.validate.stylesheets=${forrest.validate} > > #forrest.validate.skins=${forrest.validate} > > #forrest.validate.skins.stylesheets=${forrest.validate.skins} > > > > > > > > Then to get your property you can just call > > > > <xsl:value-of select='//skinconfig/project-tracking'/> > > > > > > > > > > *From:* u912boilerma...@gmail.com [mailto:u912boilerma...@gmail.com] *On > Behalf Of *Bryce Alcock > *Sent:* Friday, September 24, 2010 1:30 AM > > *To:* user@forrest.apache.org > *Subject:* Re: Tracking Codes and Java Script > > > > Ok so far so so... > > I have added the Tracking JavaScript to the site-to-xhtml.xsl file. And > that seems to be working fine. > > I have added the variable to my skinconfig.xml file in the project > directory, And finally I have been looking > > at how to pull the variable out of the skinconfig.xml and use it in the > site-to-xhtml.xsl as a variable. > > > > > > However, when I go to build the site I get the following Error: > > > > validate-skinconf: > > /home/bryce/repos/brycealcock/ > brycealcock.com/src/documentation/skinconf.xml:64:21: Element type > "project-tracking" must be declared. > > /home/bryce/repos/brycealcock/ > brycealcock.com/src/documentation/skinconf.xml:438:14: The content of > element type "skinconfig" must match > "(search?,disable-print-link?,disable-pdf-link?,disable-pod-link?,disable-txt-link?,disable-xml-link?,disable-external-link-image?,disable-compliance-links?,obfuscate-mail-links?,obfuscate-mail-value?,disable-font-script?,project-name?,project-description?,project-url?,project-logo,group-name?,group-description?,group-url?,group-logo?,host-url?,host-logo?,favicon-url?,disable-copyright-footer?,year?,vendor?,copyright-link?,trail?,toc?,headings?,feedback?,motd?,extra-css?,colors?,pdf?,credits?)". > > > > BUILD FAILED > > > > > > So it is obviously getting validated against a DTD or something, and does > not like the fact that I added the > > <project-tracking>PCDATA</project-tracking> > > > > So I need more help. > > > > Bryce > > > > > > On Tue, Sep 21, 2010 at 7:49 AM, Steve Wolke <swo...@roughbros.com> wrote: > > Bryce, > > > > I think this will work. > > > > You could add the google analytics code in the <xsl:template > match="site"/> of the common skin file ‘site-to-xhtml.xsl’ in the directory > ‘main\webapp\skins\common\xslt\html’ with a variable for the tracking site > ID hat will come from the skinconfig.xml file. Then put your tracking site > ID in the skinconfig.xml file on some new created element and modify the > ‘skinconf.xsl’ in the directory ‘main\webapp\skins\common’ to make sure that > you handle defaults properly. > > > > Steve > > > > > > *From:* Bryce Alcock [mailto:u912boilerma...@gmail.com] > *Sent:* Monday, September 20, 2010 3:01 PM > *To:* user@forrest.apache.org > *Subject:* Tracking Codes and Java Script > > > > > > I was wondering if there was a simple and systematic way to configure a > tracking code into Forrest, for every page. > > > > So for a concrete example I would like to add a > > Google Analytics tracking code to the bottom of each page. > > > > Currently I am having to do this by modifying files in the Forrest > directories. > > (This works file with the exception that I have 2 forrest project and I > have to keep remembering to change these files...) > > > > I would like to just be able to specify a tracking code and style or > possibly an html/javascript segment, > > in a Config file such as site.xml or something like that. > > > > > > Bryce > > >