You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Jeff Turner <je...@apache.org> on 2003/10/29 11:10:10 UTC

Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

On Mon, Oct 27, 2003 at 07:09:10PM +1100, David Crossley wrote:
...
> This Forrest ability to provide a link to the xml source is something
> that recently appeared in Forrest. I am am still not sure if it is a
> good thing. I wonder what its purpose is. What do people expect to do
> with the raw xml?

Not sure.  Nicola? :)

> Also we used to just have a basic System Identifier that was just
> the DTD filename. e.g. "document-v12.dtd". Why did we change it to
> be a full URL?

Because it made people think that there *ought* to be a DTD at
../document-v12.dtd, and that either their XML or their DTDs were wrongly
placed.  The POI people even copied the DTDs there, under this
assumption.

.. and the REAL reason was :) that I want to edit XML in IDEA, which has
excellent XML support (auto-complete, etc).  IDEA maps system ids to
physical locations, so I needed a well-defined system id.


--Jeff

> 
> --David
> 
> 

Re: Linking to XML

Posted by David Crossley <cr...@indexgeo.com.au>.
Nicola Ken Barozzi wrote:
> David Crossley wrote:
> ...
> >>I won't remove the possibility of having the 
> >>link on the page, as that skinconf section shows the other possible 
> >>output formats. I will instead write a small description of what it may 
> >>be used for.
> > 
> > I would like to talk more about this link thing. We seem to
> > be encouraging bad practise.
> 
> Look, I wanted to remove it but don't want to make it too hard for 
> others to use this feature. It's off by default and I put in a discaimer 
> on the default skinconf. Besides, I've never seen any site use it, so 
> AFAIK nobody activated it on pullic sites, hence it's not a liability.

I have seen some, cannot remember where. So it is being abused.

> In any case, I'm fine with either, as I don't use it and don't 
> personally see the need for it. Do what you think best, it's ok for me. :-)

This issue is far bigger than than a link on the HTML page.
I will keep quiet for now and we will see if anybody else
is bothered.

--David



Re: Linking to XML

Posted by Nicola Ken Barozzi <ni...@apache.org>.
David Crossley wrote:
...
>>I won't remove the possibility of having the 
>>link on the page, as that skinconf section shows the other possible 
>>output formats. I will instead write a small description of what it may 
>>be used for.
> 
> I would like to talk more about this link thing. We seem to
> be encouraging bad practise.

Look, I wanted to remove it but don't want to make it too hard for 
others to use this feature. It's off by default and I put in a discaimer 
on the default skinconf. Besides, I've never seen any site use it, so 
AFAIK nobody activated it on pullic sites, hence it's not a liability.

In any case, I'm fine with either, as I don't use it and don't 
personally see the need for it. Do what you think best, it's ok for me. :-)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



Re: Linking to XML

Posted by David Crossley <cr...@indexgeo.com.au>.
Nicola Ken Barozzi wrote:
> Ross Gardler wrote:
> > Nicola Ken Barozzi wrote:
> >> Jeff Turner wrote:
> > 
> >> ATM, practically I have no use of it. Furthermore nobody has ever used 
> >> it AFAIK so IMO we can safely remove this "feature".
> >>
> >> Instead we could put a "source" link, ie a link to the document 
> >> source, but we'll think of it if/when we'll really need it this time ;-)
> >>
> >> So, I'll remove the XML link on the pages: anyone against?
> > 
> > Ahhh.. so you were talking about the actually link icon on the page. Not 
> > relevent to my prototype, I just need to get the raw XML which is 
> > retrieved via an XInclude in my remote apps.
> 
> Ok, but since you are relying on it, it's actually a feature that is 
> used. Should it be part of our contract? Why not?

That link is one source of the problem. It encourages people to expose
the xml without realising the consequences. That may be still good in
certain situations, but that is up to the developer.

I still cannot understand why someone would want to click on a link
to a raw xml file and view it with their web browser.

So my opinion is to not provide them with that rope.

> Since you are using it, ...

My reading of Ross' comment is that he is *not* using it and is rather
using the sitemap to deliver xml output.

> I won't remove the possibility of having the 
> link on the page, as that skinconf section shows the other possible 
> output formats. I will instead write a small description of what it may 
> be used for.

I would like to talk more about this link thing. We seem to
be encouraging bad practise.

--David



Re: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Ross Gardler wrote:

> Nicola Ken Barozzi wrote:
> 
>> Jeff Turner wrote:
> 
>> ATM, practically I have no use of it. Furthermore nobody has ever used 
>> it AFAIK so IMO we can safely remove this "feature".
>>
>> Instead we could put a "source" link, ie a link to the document 
>> source, but we'll think of it if/when we'll really need it this time ;-)
>>
>> So, I'll remove the XML link on the pages: anyone against?
> 
> Ahhh.. so you were talking about the actually link icon on the page. Not 
> relevent to my prototype, I just need to get the raw XML which is 
> retrieved via an XInclude in my remote apps.

Ok, but since you are relying on it, it's actually a feature that is 
used. Should it be part of our contract? Why not?

Since you are using it, I won't remove the possibility of having the 
link on the page, as that skinconf section shows the other possible 
output formats. I will instead write a small description of what it may 
be used for.

You also talked about syndicating content... which makes mne think that 
in the future having an RSS feed that tracks the changes to a page or to 
the site would be cool, but let's keep it for later.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



Re: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by Ross Gardler <rg...@wkwyw.net>.
Nicola Ken Barozzi wrote:
> Jeff Turner wrote:

> 
> ATM, practically I have no use of it. Furthermore nobody has ever used 
> it AFAIK so IMO we can safely remove this "feature".
> 
> Instead we could put a "source" link, ie a link to the document source, 
> but we'll think of it if/when we'll really need it this time ;-)
> 
> So, I'll remove the XML link on the pages: anyone against?

Ahhh.. so you were talking about the actually link icon on the page. Not 
relevent to my prototype, I just need to get the raw XML which is 
retrieved via an XInclude in my remote apps.

Ross



Re: Linking to XML

Posted by David Crossley <cr...@indexgeo.com.au>.
Nicola Ken Barozzi wrote:
> Juan Jose Pablos wrote:
> > Nicola Ken Barozzi wrote:
> > 
> >> ATM, practically I have no use of it. Furthermore nobody has ever used 
> >> it AFAIK so IMO we can safely remove this "feature".
> >>
> >> Instead we could put a "source" link, ie a link to the document 
> >> source, but we'll think of it if/when we'll really need it this time ;-)
> >>
> >> So, I'll remove the XML link on the pages: anyone against?
> > 
> > You can call a "forrest validate-site" and I think that relay on that link.
> 
> I am talking about removing the possibility of having that link on the 
> page, not to change the internal sitemap.
>
> In any case, validate-site AFAIK does not invoke Cocoon and searches 
> only for files that are xml in the origin, so it's not an issue in any case.

I think that what Juan is referring to, is that if you switch the
link on, then it will generate the final stage before the site2html
transformer as xml. The validate-site can then operate on the output.

The link needs to be present to make the sitemap match for each page's
xml version. There must be a better way to do that, probably the
upgraded Cocoon CLI will help here.

There is an additional issue here. To get the validate-site to work
i gather than Cheche needed to add doctype declarations to the output
xml (r1.114 of sitemap.xmap). IIRC, we did not bother with that before,
because we were treating it as internal xml. An unfortunate side-effect
is that we have now exposed the DTDs.

Yet again this points to the need of better validation techniques
ala Relax NG. Then we do not need to add such DTD declarations.
Oh, does anyone know if 'make time' is a cross-platform command :-)

--David



Re: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Juan Jose Pablos wrote:

> Nicola Ken Barozzi wrote:
> 
>> ATM, practically I have no use of it. Furthermore nobody has ever used 
>> it AFAIK so IMO we can safely remove this "feature".
>>
>> Instead we could put a "source" link, ie a link to the document 
>> source, but we'll think of it if/when we'll really need it this time ;-)
>>
>> So, I'll remove the XML link on the pages: anyone against?
> 
> You can call a "forrest validate-site" and I think that relay on that link.

I am talking about removing the possibility of having that link on the 
page, not to change the internal sitemap.

In any case, validate-site AFAIK does not invoke Cocoon and searches 
only for files that are xml in the origin, so it's not an issue in any case.

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



Re: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by Juan Jose Pablos <ch...@che-che.com>.
Nicola Ken Barozzi wrote:
> 
> ATM, practically I have no use of it. Furthermore nobody has ever used 
> it AFAIK so IMO we can safely remove this "feature".
> 
> Instead we could put a "source" link, ie a link to the document source, 
> but we'll think of it if/when we'll really need it this time ;-)
> 
> So, I'll remove the XML link on the pages: anyone against?
> 

You can call a "forrest validate-site" and I think that relay on that link.

Cheers,
cheche


Re: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Jeff Turner wrote:

> On Mon, Oct 27, 2003 at 07:09:10PM +1100, David Crossley wrote:
> ...
> 
>>This Forrest ability to provide a link to the xml source is something
>>that recently appeared in Forrest. I am am still not sure if it is a
>>good thing. I wonder what its purpose is. What do people expect to do
>>with the raw xml?
> 
> Not sure.  Nicola? :)

Initially it was there to show the capabilities of Forrest, and make 
users see how a page is rendered in XML. It also makes it possible to 
reskin the page and reuse the content on other sites, but probably it's 
more a liability than a feature.

ATM, practically I have no use of it. Furthermore nobody has ever used 
it AFAIK so IMO we can safely remove this "feature".

Instead we could put a "source" link, ie a link to the document source, 
but we'll think of it if/when we'll really need it this time ;-)

So, I'll remove the XML link on the pages: anyone against?

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------



RE: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by Johan Kok <jk...@messianic.dyndns.org>.
Ross Gardler wrote:

> I don't know why Nicola uses it, but I (theoreticlly, since the
> application is a prototype trying to get a sale) use it to
> "syndicate"
> content. Some of my pages change on every few seconds (sensor
> readings
> from plant machinery). This information is made available in
> a tabulated
> list for the plant engineers. But it is also retrieved by an
> application
> at head office that presents the information in graphical form.
>
> I could have both pages on the same server, but it is more
> efficient (in
> terms of bandwidth) to have the data pages on site (up to 250 sites
> around the UK) and the reporting engine at the central
> offices (around
> 20 across the UK, with one "head office" needing access to
> all 250 sites).
>
Very nice usage, I use cocoon to achieve the same (with XML output) with a
combination of remote servers reading the "web-site" XML "pages",
transforming these to various forms of output on the remote sites and
feeding such remote servers with the regularly used xml data.

Admittedly, never thought of using Forrest for the same -- a very nice idea,
less hassle to configure.

Regards
Johan Kok


Re: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by Ross Gardler <rg...@wkwyw.net>.
Jeff Turner wrote:
> On Mon, Oct 27, 2003 at 07:09:10PM +1100, David Crossley wrote:
> ...
> 
>>This Forrest ability to provide a link to the xml source is something
>>that recently appeared in Forrest. I am am still not sure if it is a
>>good thing. I wonder what its purpose is. What do people expect to do
>>with the raw xml?
> 
> 
> Not sure.  Nicola? :)
> 
> 

I don't know why Nicola uses it, but I (theoreticlly, since the 
application is a prototype trying to get a sale) use it to "syndicate" 
content. Some of my pages change on every few seconds (sensor readings 
from plant machinery). This information is made available in a tabulated 
list for the plant engineers. But it is also retrieved by an application 
at head office that presents the information in graphical form.

I could have both pages on the same server, but it is more efficient (in 
terms of bandwidth) to have the data pages on site (up to 250 sites 
around the UK) and the reporting engine at the central offices (around 
20 across the UK, with one "head office" needing access to all 250 sites).

Ross



Re: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by David Crossley <cr...@indexgeo.com.au>.
Jeff Turner wrote:
> David Crossley wrote:
<snip/>
> 
> > I wonder if we should put an index.html at /dtd/ to point them
> > to proper mechanisms.
> 
> If it's not a DTD I don't think we should put it there.. guess what kind
> of error messages an XML parser gives when interpreting HTML as DTD ;)

Sorry, i should explain myself better.

People who do not understand will go looking there for the DTDs.
We could add an index.html page to explain why there are no DTDs.
The actual URLs for the *.dtd would still get a 404 error.

I will not do that and instead add to our FAQ.

--David


Re: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by Jeff Turner <je...@apache.org>.
On Thu, Oct 30, 2003 at 06:08:26PM +1100, David Crossley wrote:
> Jeff Turner wrote:
> > David Crossley wrote:
> > ...
> > > Also we used to just have a basic System Identifier that was just
> > > the DTD filename. e.g. "document-v12.dtd". Why did we change it to
> > > be a full URL?
> > 
> > Because it made people think that there *ought* to be a DTD at
> > ../document-v12.dtd, and that either their XML or their DTDs were wrongly
> > placed.  The POI people even copied the DTDs there, under this
> > assumption.
> 
> Eeek. Okay, that is a good reason. This then shows that our
> documentation is not too good if they miss the core entity resolver.

I think it just shows that people don't read docs, which is
understandable (I don't either).  For people who care to look, we have a
quite adequate description of our catalog use:

http://xml.apache.org/forrest/validation.html#Validating+new+XML+types

For people who don't care to look, Forrest should "just work".

> I will try to add another FAQ to our docs.
> 
> Now we will have shifted the problem. They will now think
> that there *ought* to be the DTDs and stuff at that URL.

It absolves the user of the responsibility for a perceived problem, which
is good enough for me :)

> I wonder if we should put an index.html at /dtd/ to point them
> to proper mechanisms.

If it's not a DTD I don't think we should put it there.. guess what kind
of error messages an XML parser gives when interpreting HTML as DTD ;)

> > .. and the REAL reason was :) that I want to edit XML in IDEA, which has
> > excellent XML support (auto-complete, etc).  IDEA maps system ids to
> > physical locations, so I needed a well-defined system id.
> 
> Well not too "excellent XML support" if it doesn't utilise the
> explicitly well-defined Public Identifiers too.

True (it doesn't have any catalog support), but in XML the sysId is
mandatory (if a doctype is present), whereas the pubId isn't.


--Jeff

> Okay, that is two good reasons.
> 
> --David
> 

Re: Linking to XML (Re: http://apache.org/forrest/dtd/document-v12.dtd)

Posted by David Crossley <cr...@indexgeo.com.au>.
Jeff Turner wrote:
> David Crossley wrote:
> ...
> > Also we used to just have a basic System Identifier that was just
> > the DTD filename. e.g. "document-v12.dtd". Why did we change it to
> > be a full URL?
> 
> Because it made people think that there *ought* to be a DTD at
> ../document-v12.dtd, and that either their XML or their DTDs were wrongly
> placed.  The POI people even copied the DTDs there, under this
> assumption.

Eeek. Okay, that is a good reason. This then shows that our
documentation is not too good if they miss the core entity resolver.
I will try to add another FAQ to our docs.

Now we will have shifted the problem. They will now think
that there *ought* to be the DTDs and stuff at that URL.

I wonder if we should put an index.html at /dtd/ to point them
to proper mechanisms.

> .. and the REAL reason was :) that I want to edit XML in IDEA, which has
> excellent XML support (auto-complete, etc).  IDEA maps system ids to
> physical locations, so I needed a well-defined system id.

Well not too "excellent XML support" if it doesn't utilise
the explicitly well-defined Public Identifiers too.

Okay, that is two good reasons.

--David