You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Brolin Empey <br...@brolin.be> on 2009/05/14 19:27:12 UTC
Simple include files?
Here is my situation: I have 2 CPU module product pages. Both pages
include a features table. One row of this table is duplicated on both
pages. I want to move the duplicated row into an include file. Is it
possible to use an include file that does not have to be a complete
document? I think this requires not validating the include file.
For example, here is one CPU module product page:
<table>
<!-- unique rows -->
<include href="duplicated_row.xml"/>
</table>
I want *duplicated_row.xml* to contain only the table row (*tr* element),
not a containing *table*, *body*, and *document*.
Is this possible?
Re: XInclude preprocessor - new thread for old topic
Posted by David Crossley <cr...@apache.org>.
David Crossley wrote:
>
> Still need to get XInclude processing done a bit earlier
> in the sitemaps.
That is done now. See r781260.
-David
Re: XInclude preprocessor - new thread for old topic
Posted by David Crossley <cr...@apache.org>.
Brian M Dube wrote:
> David Crossley wrote:
> > Brian M Dube wrote:
> > > >
> > > > FOR-1172 - enable validation of the internal xml
> > > >
> > > > FOR-1173 - add demonstration of using xml source documents
> > > > without declaring a DTD
> > >
> > > This looks good. Is the idea to replace the Ant target with pipeline
> > > validation?
> >
> > I don't know. I like the fact that the intermediate xml
> > is not validated, because one can cram all sorts of
> > non-xdoc elements into the pipeline. e.g. try doing
> > localhost:8888/samples-b/embedded_html.validation.xml
> >
> > Perhaps we could find a way to exclude certain documents from
> > validation (or from the final report).
> >
> > I wonder how such validation could operate.
> >
> > When we do 'forrest site' it provides Cocoon a "start-uri"
> > to commence from. Cocoon appends any other new URIs that it
> > finds during its crawl. It generates the *.html files, etc.
> >
> > Perhaps we can also get it to generate a "*.validation.xml"
> > for each URI too. Then after Cocoon finishes, an Ant target
> > might post-process all such files and summarise them into
> > one large report. Then tidy up to remove all those files,
> > because we don't want them to be deployed as part of the site.
> >
> > Do you have some ideas?
>
> I don't, yet. I'm looking through Cocoon 3 right now; maybe something
> there will align nicely with this approach.
I have come up with a technique using our existing setup,
that i am very pleased with. Will try to finish it soon.
Glad to hear that you are investigating other solutions.
-David
Re: XInclude preprocessor - new thread for old topic
Posted by Brian M Dube <bd...@apache.org>.
On Wed, Jun 03, 2009 at 05:49:57PM +1000, David Crossley wrote:
> Brian M Dube wrote:
> > >
> > > FOR-1172 - enable validation of the internal xml
> > >
> > > FOR-1173 - add demonstration of using xml source documents
> > > without declaring a DTD
> >
> > This looks good. Is the idea to replace the Ant target with pipeline
> > validation?
>
> I don't know. I like the fact that the intermediate xml
> is not validated, because one can cram all sorts of
> non-xdoc elements into the pipeline. e.g. try doing
> localhost:8888/samples-b/embedded_html.validation.xml
>
> Perhaps we could find a way to exclude certain documents from
> validation (or from the final report).
>
> I wonder how such validation could operate.
>
> When we do 'forrest site' it provides Cocoon a "start-uri"
> to commence from. Cocoon appends any other new URIs that it
> finds during its crawl. It generates the *.html files, etc.
>
> Perhaps we can also get it to generate a "*.validation.xml"
> for each URI too. Then after Cocoon finishes, an Ant target
> might post-process all such files and summarise them into
> one large report. Then tidy up to remove all those files,
> because we don't want them to be deployed as part of the site.
>
> Do you have some ideas?
I don't, yet. I'm looking through Cocoon 3 right now; maybe something
there will align nicely with this approach.
Brian
Re: XInclude preprocessor - new thread for old topic
Posted by David Crossley <cr...@apache.org>.
Brian M Dube wrote:
> >
> > FOR-1172 - enable validation of the internal xml
> >
> > FOR-1173 - add demonstration of using xml source documents
> > without declaring a DTD
>
> This looks good. Is the idea to replace the Ant target with pipeline
> validation?
I don't know. I like the fact that the intermediate xml
is not validated, because one can cram all sorts of
non-xdoc elements into the pipeline. e.g. try doing
localhost:8888/samples-b/embedded_html.validation.xml
Perhaps we could find a way to exclude certain documents from
validation (or from the final report).
I wonder how such validation could operate.
When we do 'forrest site' it provides Cocoon a "start-uri"
to commence from. Cocoon appends any other new URIs that it
finds during its crawl. It generates the *.html files, etc.
Perhaps we can also get it to generate a "*.validation.xml"
for each URI too. Then after Cocoon finishes, an Ant target
might post-process all such files and summarise them into
one large report. Then tidy up to remove all those files,
because we don't want them to be deployed as part of the site.
Do you have some ideas?
-David
Re: XInclude preprocessor - new thread for old topic
Posted by Brian M Dube <bd...@apache.org>.
On Tue, Jun 02, 2009 at 01:30:26AM +1000, David Crossley wrote:
> David Crossley wrote:
> > Brian M Dube wrote:
> > >
> > > There will always be one more place in the DTD to add this
> > > support.
> >
> > Yes, that worried me too when the initial XInclude
> > was added to the DTD.
> > http://issues.apache.org/jira/browse/FOR-1032
> >
> > > I found a very old discussion [1] about processing XInclude
> > > before validation. This makes a lot of sense and the solution would
> > > still be useful after a move to XHTML2. Does anyone remember any
> > > efforts to add a preprocessor? and the outcome?
> > >
> > > [1] http://marc.info/?l=forrest-dev&m=104124992407064&w=2
> > Subject: [RT] Entities in XML docs
> >
> > As usual there were other things that needed to be in place first.
> >
> > One of those was the ability to do validation in the
> > Cocoon pipelines. At the moment we do xml validation
> > using Ant before the Forrest/Cocoon engine starts.
> >
> > Using Cocoon Validation Transformers
> > http://forrest.apache.org/howto-dev.html#debug-validation
> >
> > Also Jing and Trang have a new lease of life.
> > http://code.google.com/p/jing-trang/
> >
> > How is tool support these days for "RELAX NG"?
> >
> > I note that George of oxygenxml.com is contributing
> > to the Jing-Trang project.
>
> In the past i had tried to get some of this working.
> After your message, i resurrected that and managed to
> get a bit further. See:
>
> FOR-1172 - enable validation of the internal xml
>
> FOR-1173 - add demonstration of using xml source documents
> without declaring a DTD
This looks good. Is the idea to replace the Ant target with pipeline
validation?
Brian
> While rummaging around i also found a relevant old issue:
> FOR-101 - Move to RelaxNG (with auto generated DTDs for editors)
>
> Still need to get XInclude processing done a bit earlier
> in the sitemaps.
>
> -David
Re: XInclude preprocessor - new thread for old topic
Posted by David Crossley <cr...@apache.org>.
David Crossley wrote:
> Brian M Dube wrote:
> >
> > There will always be one more place in the DTD to add this
> > support.
>
> Yes, that worried me too when the initial XInclude
> was added to the DTD.
> http://issues.apache.org/jira/browse/FOR-1032
>
> > I found a very old discussion [1] about processing XInclude
> > before validation. This makes a lot of sense and the solution would
> > still be useful after a move to XHTML2. Does anyone remember any
> > efforts to add a preprocessor? and the outcome?
> >
> > [1] http://marc.info/?l=forrest-dev&m=104124992407064&w=2
> Subject: [RT] Entities in XML docs
>
> As usual there were other things that needed to be in place first.
>
> One of those was the ability to do validation in the
> Cocoon pipelines. At the moment we do xml validation
> using Ant before the Forrest/Cocoon engine starts.
>
> Using Cocoon Validation Transformers
> http://forrest.apache.org/howto-dev.html#debug-validation
>
> Also Jing and Trang have a new lease of life.
> http://code.google.com/p/jing-trang/
>
> How is tool support these days for "RELAX NG"?
>
> I note that George of oxygenxml.com is contributing
> to the Jing-Trang project.
In the past i had tried to get some of this working.
After your message, i resurrected that and managed to
get a bit further. See:
FOR-1172 - enable validation of the internal xml
FOR-1173 - add demonstration of using xml source documents
without declaring a DTD
While rummaging around i also found a relevant old issue:
FOR-101 - Move to RelaxNG (with auto generated DTDs for editors)
Still need to get XInclude processing done a bit earlier
in the sitemaps.
-David
Re: XInclude preprocessor - new thread for old topic
Posted by David Crossley <cr...@apache.org>.
Brian M Dube wrote:
>
> There will always be one more place in the DTD to add this
> support.
Yes, that worried me too when the initial XInclude
was added to the DTD.
http://issues.apache.org/jira/browse/FOR-1032
> I found a very old discussion [1] about processing XInclude
> before validation. This makes a lot of sense and the solution would
> still be useful after a move to XHTML2. Does anyone remember any
> efforts to add a preprocessor? and the outcome?
>
> [1] http://marc.info/?l=forrest-dev&m=104124992407064&w=2
Subject: [RT] Entities in XML docs
As usual there were other things that needed to be in place first.
One of those was the ability to do validation in the
Cocoon pipelines. At the moment we do xml validation
using Ant before the Forrest/Cocoon engine starts.
Using Cocoon Validation Transformers
http://forrest.apache.org/howto-dev.html#debug-validation
Also Jing and Trang have a new lease of life.
http://code.google.com/p/jing-trang/
How is tool support these days for "RELAX NG"?
I note that George of oxygenxml.com is contributing
to the Jing-Trang project.
-David
XInclude preprocessor - new thread for old topic (was Re: Simple
include files?)
Posted by Brian M Dube <bd...@apache.org>.
On Wed, May 20, 2009 at 10:08:33PM +1000, Gavin wrote:
>
>
> > -----Original Message-----
> > From: Gavin [mailto:gavin@16degrees.com.au]
> > Sent: Tuesday, 19 May 2009 8:32 PM
> > To: dev@forrest.apache.org
> > Subject: RE: Simple include files?
> >
> >
> >
> > > -----Original Message-----
> > > From: Brolin Empey [mailto:brolin@brolin.be]
> > > Sent: Saturday, 16 May 2009 10:41 AM
> > > To: dev@forrest.apache.org
> > > Subject: Re: Simple include files?
> > >
>
> <snip>
>
> >
> > > Can someone please change
> > > the XDocs DTDs so I can use <xi:include/> as a child of a <table>
> > > (after the optional <caption>)?
> >
> > Yes, I agree, I'll do this tomorrow against our v13 and v20 if no
> > objections
> > come in. I did look to see if using xpointer with xinclude would solve
> > your
> > problem, but it does not.
> >
>
> Forget I mentioned v13, it doesnt exist in that version.
>
> I've applied it to v20 and added an example of it to our seed-sample
> (fresh-site).
There will always be one more place in the DTD to add this
support. I found a very old discussion [1] about processing XInclude
before validation. This makes a lot of sense and the solution would
still be useful after a move to XHTML2. Does anyone remember any
efforts to add a preprocessor? and the outcome?
[1] http://marc.info/?l=forrest-dev&m=104124992407064&w=2
Re: Simple include files?
Posted by Brolin Empey <br...@brolin.be>.
2009/5/20 Gavin <ga...@16degrees.com.au>
> Forget I mentioned v13, it doesn’t exist in that version.
>
> I've applied it to v20 and added an example of it to our seed-sample
> (fresh-site).
Thanks! It works after I updated my working copy of Forrest.
RE: Simple include files?
Posted by Gavin <ga...@16degrees.com.au>.
> -----Original Message-----
> From: Gavin [mailto:gavin@16degrees.com.au]
> Sent: Tuesday, 19 May 2009 8:32 PM
> To: dev@forrest.apache.org
> Subject: RE: Simple include files?
>
>
>
> > -----Original Message-----
> > From: Brolin Empey [mailto:brolin@brolin.be]
> > Sent: Saturday, 16 May 2009 10:41 AM
> > To: dev@forrest.apache.org
> > Subject: Re: Simple include files?
> >
<snip>
>
> > Can someone please change
> > the XDocs DTDs so I can use <xi:include/> as a child of a <table>
> > (after the optional <caption>)?
>
> Yes, I agree, I'll do this tomorrow against our v13 and v20 if no
> objections
> come in. I did look to see if using xpointer with xinclude would solve
> your
> problem, but it does not.
>
Forget I mentioned v13, it doesnt exist in that version.
I've applied it to v20 and added an example of it to our seed-sample
(fresh-site).
See the issue FOR-1169 on our Jira for details
Apologies Brolin, I notice I spelt your surname wrong, I'll correct it.
HTH
Gav...
Re: Simple include files?
Posted by David Crossley <cr...@apache.org>.
Gavin wrote:
> Brolin Empey wrote:
> >
> >? Can someone please change
> > the XDocs DTDs so I can use <xi:include/> as a child of a <table>
> > (after the optional <caption>)?
>
> Yes, I agree, I'll do this tomorrow against our v13 and v20 if no objections
> come in. I did look to see if using xpointer with xinclude would solve your
> problem, but it does not.
For completeness of the topic, it should be mentioned here
that there are other techniques:
* XML entities
e.g. see the "Symbols Project" ability in a example site:
forrest-seed/samples-b/xml-entities.html
Use a similar technique to include a chunk of text.
* Using Cocoon sitemap aggregation.
http://issues.apache.org/jira/browse/FOR-814
has an example and link to some past discussion.
Search the mail archives and docs and examples.
-David
RE: Simple include files?
Posted by Gavin <ga...@16degrees.com.au>.
> -----Original Message-----
> From: Brolin Empey [mailto:brolin@brolin.be]
> Sent: Saturday, 16 May 2009 10:41 AM
> To: dev@forrest.apache.org
> Subject: Re: Simple include files?
>
> 2009/5/15 Gavin <ga...@16degrees.com.au>
> >
> > Well, it makes it damn difficult for people to work out who is saying
> what, and makes replies
> >
> > difficult to be separated from the question, especially so for those
> reading the archives and
> >
> > not part of the conversation.
>
> I notice you are using Outlook. I have no trouble using Mozilla
> Thunderbird and Gmails Web interface to reply inline to HTML
> messages. Can you use Thunderbird instead of Outlook?
I tried Thunderbird years ago and never liked it, I'm willing to give it
another go and see what its like again. Hopefully it won't mind importing my
4GB outlook.pst file :)
>
> >
> > It is your preference, mine is to not answer any more queries posted in
> html.
>
> OK, I will try to use only plain text when writing to this list. It
> is annoying, though, because I use Gmails Web interface, which
> remembers the last message format used (plain or rich text), so I have
> to keep switching because I use rich text with other contacts. That
> is why I wrote I will try to use only plain text when writing to this
> list: I may forget because Gmails Web interface does not appear to
> support configuring whether a recipient prefers plain or rich text.
> Thunderbird has that feature, but I use Gmails Web interface because
> I use this Gmail account on at least 2 desktop PCs. I do not use a
> portable PC.
Yeah, I use Gmail too, the ASF mail filtering system is another reason for
me not to use HTML as it increases SPAM score. Other users on some lists
also have problems posting with Gmail due to the headers it sends out. The
main reason however remains readability for other users and the archives,
which are - as I've grown to understand over the years, more and more
important as projects evolve.
>
> Anyway, can we please get back on track?
Absolutely :)
> Can someone please change
> the XDocs DTDs so I can use <xi:include/> as a child of a <table>
> (after the optional <caption>)?
Yes, I agree, I'll do this tomorrow against our v13 and v20 if no objections
come in. I did look to see if using xpointer with xinclude would solve your
problem, but it does not.
Gav...
Re: Simple include files?
Posted by Ross Gardler <rg...@apache.org>.
2009/5/16 Brolin Empey <br...@brolin.be>:
> 2009/5/15 Gavin <ga...@16degrees.com.au>
...
> Anyway, can we please get back on track? Can someone please change
> the XDocs DTDs so I can use <xi:include/> as a child of a <table>
> (after the optional <caption>)?
Provide a patch via our issue tracker and I'm sure someone will apply
it (not me, I don't have a current checkout of Forrest right now I'm
afraid).
Ross
--
Ross Gardler
OSS Watch - supporting open source in education and research
http://www.oss-watch.ac.uk
Re: Simple include files?
Posted by Brolin Empey <br...@brolin.be>.
2009/5/15 Gavin <ga...@16degrees.com.au>
>
> Well, it makes it damn difficult for people to work out who is saying what, and makes replies
>
> difficult to be separated from the question, especially so for those reading the archives and
>
> not part of the conversation.
I notice you are using Outlook. I have no trouble using Mozilla
Thunderbird and Gmail’s Web interface to reply inline to HTML
messages. Can you use Thunderbird instead of Outlook?
>
> It is your preference, mine is to not answer any more queries posted in html.
OK, I will try to use only plain text when writing to this list. It
is annoying, though, because I use Gmail’s Web interface, which
remembers the last message format used (plain or rich text), so I have
to keep switching because I use rich text with other contacts. That
is why I wrote I will try to use only plain text when writing to this
list: I may forget because Gmail’s Web interface does not appear to
support configuring whether a recipient prefers plain or rich text.
Thunderbird has that feature, but I use Gmail’s Web interface because
I use this Gmail account on at least 2 desktop PCs. I do not use a
portable PC.
Anyway, can we please get back on track? Can someone please change
the XDocs DTDs so I can use <xi:include/> as a child of a <table>
(after the optional <caption>)?
Re: Simple include files?
Posted by Ross Gardler <rg...@apache.org>.
2009/5/16 Gavin <ga...@16degrees.com.au>:
>
>
>
>
> ________________________________
>
> From: Brolin Empey [mailto:brolin@brolin.be]
> Sent: Saturday, 16 May 2009 9:40 AM
> To: dev@forrest.apache.org
> Subject: Re: Simple include files?
>
>
>
> 2009/5/14 Gavin <ga...@16degrees.com.au>
>
> P.S. - It makes it easier for replies to be inline if you post as plain text
> instead of html ;)
>
> What is so difficult about replying inline to an HTML message? I have no
> trouble doing so.
It depends on the clinet being used - some don't do it will (like MS Outlook)
However, more importantly, many mail archives don't play well with
HTML emails and they are are really nasty for those not able to use a
graphical email client (i.e. Pine over and SSH tunnel whilst traveling
or some text readers).
Then there is the issue of bloat in the document etc.
All in all it's an etiquette issue when it comes to mailing lists.
Ross
RE: Simple include files?
Posted by Gavin <ga...@16degrees.com.au>.
_____
From: Brolin Empey [mailto:brolin@brolin.be]
Sent: Saturday, 16 May 2009 9:40 AM
To: dev@forrest.apache.org
Subject: Re: Simple include files?
2009/5/14 Gavin <ga...@16degrees.com.au>
P.S. - It makes it easier for replies to be inline if you post as plain text
instead of html ;)
What is so difficult about replying inline to an HTML message? I have no
trouble doing so.
Well, it makes it damn difficult for people to work out who is saying what,
and makes replies
difficult to be separated from the question, especially so for those reading
the archives and
not part of the conversation.
It is your preference, mine is to not answer any more queries posted in
html.
Anyway, now I have another issue:
validate-xdocs:
/home/brolin/WEB/medallionsystem.com/forrest/branches/1_product_per_page/src
/documentation/content/xdocs/cpu-modules/SA2410.xml:128:14: The content of
element type "table" must match "(caption?,tr+)".
The XDocs DTDs need to be changed so I can use xi:include as a child of a
table (after the optional caption).
Re: Simple include files?
Posted by Brolin Empey <br...@brolin.be>.
2009/5/14 Gavin <ga...@16degrees.com.au>
> P.S. - It makes it easier for replies to be inline if you post as plain
> text
> instead of html ;)
What is so difficult about replying inline to an HTML message? I have no
trouble doing so.
Anyway, now I have another issue:
validate-xdocs:
/home/brolin/WEB/
medallionsystem.com/forrest/branches/1_product_per_page/src/documentation/content/xdocs/cpu-modules/SA2410.xml:128:14:
The content of element type "table" must match "(caption?,tr+)".
The XDocs DTDs need to be changed so I can use *xi:include* as a child of a
*table* (after the optional *caption*).
RE: Simple include files?
Posted by Gavin <ga...@16degrees.com.au>.
________________________________________
From: Brolin Empey [mailto:brolin@brolin.be]
Sent: Friday, 15 May 2009 3:27 AM
To: dev@forrest.apache.org
Subject: Simple include files?
Here is my situation: I have 2 CPU module product pages. Both pages
include a features table. One row of this table is duplicated on both
pages. I want to move the duplicated row into an include file. Is it
possible to use an include file that does not have to be a complete
document? I think this requires not validating the include file.
For example, here is one CPU module product page:
<table>
<!-- unique rows -->
<include href="duplicated_row.xml"/>
</table>
I want duplicated_row.xml to contain only the table row (tr element), not a
containing table, body, and document.
Is this possible?
-
Hi Brolin,
The 'forrest seed-sample' target shows a great example of using xinclude for
cases like this.
So you could have
<table>
<!-- unique rows -->
<xi:include href="cocoon://path/to/duplicated_row.xml"/>
</table>
The duplicated_row.xml then only need contain your <tr> element.
HTH
Gav...
P.S. - It makes it easier for replies to be inline if you post as plain text
instead of html ;)