[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Apache needs help

  • From: Rick Jelliffe <rjelliffe@allette.com.au>
  • To: Michael Kay <mike@saxonica.com>
  • Date: Tue, 8 May 2018 19:27:39 +1000

Re:  Apache needs help
Yes, but No. 

The underlying root cause was XSD 1.0 was simply not up to the job.  It keys typing off the element name, which makes it useless for the large class of documents that require generic schemas (where the type is determined by something else as well as the element name.)   Having been sold that it is all whizbang, adoptors in that situation then find it is no more expressive than DTDs, as far as this kind of structure is concerned.

The design flaw in this is actually in their plugin system, I think. It should have a validation function that allows the XML branches to be validated by the relevant plugin. Or to supply the schema fragment for the plugin, which would be assembled into the effective schema dynamically to support the validation.

I don't think the idea of the XSD is wrong, at all. Having a schema is good.  But someone could fruitfully go through it and the code and add more specific elements to the XSD, instead of the generic ones. They added one specific Appender in this regard recently (for Console).

Ok, so I put up a little post that might be a good start for anyone wanting to look at this:
    http://schematron.com/2018/05/sorting-out-log4j-2-0s-strict-schemas/
as a half day project or whatever.

Regards
Rick



On Tue, May 8, 2018 at 6:19 PM, Michael Kay <mike@saxonica.com> wrote:
There are, I suspect, two underlying "root causes" here.

The first problem is that when XML is peripheral to a project, for example when it's only used for configuration files, the people doing the XML part often make a complete mess of it, because they think they can do XML without learning about it first.

The second problem is that open source projects frequently suffer from inadequate quality control at the design stage, or have inadequate review of what contributors and contributions they accept.

Before getting involved in helping a project like this with its XML skills, I would want to know that it has the right processes and attitudes in place to deliver a quality product.

Michael Kay
Saxonica


On 8 May 2018, at 06:03, Rick Jelliffe <rjelliffe@a...> wrote:

Do those of us who want to keep XML a viable technology (i.e. one that works when need it, rather than needing to be fixed when we need it) need to pay more attention to things like Apache? 

Yet again I am having the experience of Apache that they really messed up their XML when they moved to XSD.  (It is so bad, I think they need support. In particular, a positive one, where perhaps members of this list could send in fixes for their schemas etc.)

My current issue is that the schema for the XML Configuration for Apache Log4J 2.0 is hopelessly incomplete.   (When they moved from 1 to 2 they abandoned DTDs, with any thing goes mentality, so they now support YAML, JSON, Properties and ad hoc XML. Of course, it is too complicated, unless you are building the code and have it in your debugger to trace what config options you actually need. So they had to retrofit an XSD after all, which mean having a different "strict" XML format. So five formats, and it looks in up to seven different locations. So wrong.

In fact, it is just a mode, where in strict mode you must use Type element instead of type attribute and, if you pass it a schema, it will validate.  (You can see this at https://github.com/apache/logging-log4j2/blob/master/log4j-core/src/main/java/org/apache/logging/log4j/core/config/xml/XmlConfiguration.java  line 324 ) The problem being that their provided schema is incomplete. 

I will check it out and update here if I get anywhere with it.

Regards
Rick




[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.