You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Simon Pepping <sp...@leverkruid.eu> on 2006/07/16 21:40:22 UTC

Re: svn commit: r422509 - /xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd

On Sun, Jul 16, 2006 at 07:31:52PM -0000, spepping@apache.org wrote:
> Author: spepping
> Date: Sun Jul 16 12:31:52 2006
> New Revision: 422509
> 
> URL: http://svn.apache.org/viewvc?rev=422509&view=rev
> Log:
> A W3C schema for FOP user configuration files
> 
> Added:
>     xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd   (with props)

Once too often I lost time due to a slightly wrong configuration
file. FOP tries to find the elements it knows about; it does not give
feedback on elements that it does not know about. This schema should
help users discover which of their elements FOP does not
recognize. Probably the content of some elements can be constrained
further. Please, do so if you see such an element. If this schema is a
good idea, I will document it on the configuration page of the web
site.

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

Re: svn commit: r422509 - /xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Yeah, looks like a bug in XMLSpy. In Eclipse this validates just fine
when I follow your suggestion. However, there's no error message if the
file violates the schema and the schema is specified as a plain file
name instead of as an URI. Another nit is that you can't validate a file
if you open it from a external folder. You only get to validate the file
if you have it in a tree inside Eclipse. :-(

Thanks!

On 18.07.2006 20:56:17 Simon Pepping wrote:
> On Mon, Jul 17, 2006 at 10:48:55PM +0200, Jeremias Maerki wrote:
> > The attached file fails to validate with the XSD as found in the repo.
> > But then, it's probably just one more of these cases that software does
> > not really want to just work. Probably just a bug in my editor.
> 
> Apparently. On my system it validates nicely. I use xerces, or I use
> Eclipse Web Tools Platform. Would it help if you change the path in
> the noNamespaceSchemaLocation attribute to a URI?


Jeremias Maerki


Re: svn commit: r422509 - /xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd

Posted by Simon Pepping <sp...@leverkruid.eu>.
On Mon, Jul 17, 2006 at 10:48:55PM +0200, Jeremias Maerki wrote:
> The attached file fails to validate with the XSD as found in the repo.
> But then, it's probably just one more of these cases that software does
> not really want to just work. Probably just a bug in my editor.

Apparently. On my system it validates nicely. I use xerces, or I use
Eclipse Web Tools Platform. Would it help if you change the path in
the noNamespaceSchemaLocation attribute to a URI?

Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

Re: svn commit: r422509 - /xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
The attached file fails to validate with the XSD as found in the repo.
But then, it's probably just one more of these cases that software does
not really want to just work. Probably just a bug in my editor.

On 17.07.2006 21:22:13 Simon Pepping wrote:
> On Mon, Jul 17, 2006 at 10:32:30AM +0200, Jeremias Maerki wrote:
> > Hmm, XML Schema might not be a suitable enough means to map our
> > configuration schema. I've just tried to make my main debug config file
> > validate with your schema. I've had to extend it a bit but still ended
> > up having a validation error I did not quite understand. It kept asking
> > for the "fonts" or "xml-handler" elements although they are both
> > optional. I've never done much XML Schema and never liked it much. I
> > don't know much about RelaxNG either, but I repeatedly hear that it's
> > more flexible. I know that you can define several variants of the same
> > element by chosing the type using an attribute (renderer with mime
> > attribute). I don't know if that can be done in XML Schema. Shrug.
> 
> I think XML Schema is the usual schema language for this sort of
> files. I would have been happy to use Relax-NG, but it is less
> popular, and the number of validators is smaller. In fact, Relax-NG
> allows one to express that filterList is only valid with the mime
> attribute value "application/pdf", etc.
> 
> In my version fonts is optional. xml-handler does not occur. What does
> your config file contain?


Jeremias Maerki

Re: svn commit: r422509 - /xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd

Posted by Simon Pepping <sp...@leverkruid.eu>.
On Mon, Jul 17, 2006 at 10:32:30AM +0200, Jeremias Maerki wrote:
> Hmm, XML Schema might not be a suitable enough means to map our
> configuration schema. I've just tried to make my main debug config file
> validate with your schema. I've had to extend it a bit but still ended
> up having a validation error I did not quite understand. It kept asking
> for the "fonts" or "xml-handler" elements although they are both
> optional. I've never done much XML Schema and never liked it much. I
> don't know much about RelaxNG either, but I repeatedly hear that it's
> more flexible. I know that you can define several variants of the same
> element by chosing the type using an attribute (renderer with mime
> attribute). I don't know if that can be done in XML Schema. Shrug.

I think XML Schema is the usual schema language for this sort of
files. I would have been happy to use Relax-NG, but it is less
popular, and the number of validators is smaller. In fact, Relax-NG
allows one to express that filterList is only valid with the mime
attribute value "application/pdf", etc.

In my version fonts is optional. xml-handler does not occur. What does
your config file contain?

Regards, Simon

-- 
Simon Pepping
home page: http://www.leverkruid.eu

Re: svn commit: r422509 - /xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
Hmm, XML Schema might not be a suitable enough means to map our
configuration schema. I've just tried to make my main debug config file
validate with your schema. I've had to extend it a bit but still ended
up having a validation error I did not quite understand. It kept asking
for the "fonts" or "xml-handler" elements although they are both
optional. I've never done much XML Schema and never liked it much. I
don't know much about RelaxNG either, but I repeatedly hear that it's
more flexible. I know that you can define several variants of the same
element by chosing the type using an attribute (renderer with mime
attribute). I don't know if that can be done in XML Schema. Shrug.

I can upload my changes but due to the fact that they don't work for me
makes me hesitant to upload them.

On 16.07.2006 21:40:22 Simon Pepping wrote:
> On Sun, Jul 16, 2006 at 07:31:52PM -0000, spepping@apache.org wrote:
> > Author: spepping
> > Date: Sun Jul 16 12:31:52 2006
> > New Revision: 422509
> > 
> > URL: http://svn.apache.org/viewvc?rev=422509&view=rev
> > Log:
> > A W3C schema for FOP user configuration files
> > 
> > Added:
> >     xmlgraphics/fop/trunk/src/foschema/fop-configuration.xsd   (with props)
> 
> Once too often I lost time due to a slightly wrong configuration
> file. FOP tries to find the elements it knows about; it does not give
> feedback on elements that it does not know about. This schema should
> help users discover which of their elements FOP does not
> recognize. Probably the content of some elements can be constrained
> further. Please, do so if you see such an element. If this schema is a
> good idea, I will document it on the configuration page of the web
> site.


Jeremias Maerki