Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xml-dev] Schema, BNF and parsing

From: Bob Foster <bob@------.--->
To: Andrew Jeavons <apj@-------------.--->
Date: 3/5/2005 7:02:00 PM
Andrew Jeavons wrote:
>> From your description I'd guess that every verb/attribute combination
>> and interaction has been hardcoded.  If so, you might get the best
>> bang for your buck by "acquiring" (training/hiring) someone who can
>> help you re-write your existing XSLT.
> 
> Exactly. Which is totally brain dead. That's what set me on my search 
> for the BNF tool. Even with my minimal XSLT knowledge seeing the SAME code
> over and over again made me very worried.....
> 
> The XSLT was done by external contractors, soon to be ex-contractors now 
> if I can help it. I know that I can make a parser out of Bison and Flex 
> with a fifth or less code
> which will do far more than the XSLT does and be readable (well to me 
> anyway....)

That's what you think you know, but it isn't correct in general. BNF can 
only do a surface syntax scan; you'll have to escape to a programming 
language to do any sort of semantic check. XSLT is far more powerful. 
That's not saying that the contractors' stylesheet actually uses any of 
this power, but it's there.

Plus, you seem to be missing this major point: Before you can teach your 
BNF to parse your XML application language, you first have to teach it 
to parse XML. This is a much bigger PITA than you imagine. The virtue of 
using existing schema languages is that they already know how to deal 
with the ins and outs of XML syntax, so you write grammars and rules at 
a much higher level than BNF.

As a parser-aware person, you should find RELAX NG compact syntax easy 
to understand and able to express what you need. If there is something 
you can't say, you can add Schematron assertions to the same schema. I'd 
strongly recommend you check it out.

Bob Foster
http://xmlbuddy.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent