# Best of...

Published articles for Best of....

This is one page of public article previews, not the complete archive. Follow Next page to continue. Summaries are not the original full articles.

## A Failed XML-Based DSL Design Using a Large Regular Expression

DevFeed: [A Failed XML-Based DSL Design Using a Large Regular Expression](<https://devfeed.tech/articles/best-of-classic-wtf-a-dumbain-specific-language-28506.md>)

Original publisher: [Read original article](<https://thedailywtf.com/articles/classic-wtf-a-dumbain-specific-language>)

Author: Remy Porter

Published: 2026-09-07T06:30:00Z

Content type: opinion

Language: en

Sources: [The Daily WTF](<https://devfeed.tech/sources/the-daily-wtf.md>)

Topics: [XML](<https://devfeed.tech/topics/xml.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>), [bug](<https://devfeed.tech/topics/bug.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [best-of](<https://devfeed.tech/tags/best-of.md>), [bug](<https://devfeed.tech/tags/bug.md>), [code](<https://devfeed.tech/tags/code.md>), [documentation](<https://devfeed.tech/tags/documentation.md>), [domain-specific-languages](<https://devfeed.tech/tags/domain-specific-languages.md>), [dsls](<https://devfeed.tech/tags/dsls.md>), [regex](<https://devfeed.tech/tags/regex.md>), [xml](<https://devfeed.tech/tags/xml.md>)

### AI overview

The article revisits a failed attempt to build a domain-specific language with XML schemas and a 1,310-character regular expression. It describes a bug in the expression and criticizes the resulting design as an unsuccessful effort to save labor.

### Source excerpt

It's a holiday here in the US, a celebration of labor, so we're reaching back through the archives for a story about an attempt to be labor saving that was not successful. Original. --Remy I've had to write a few domain-specific-languages in the past. As per Remy's Law of Requirements Gathering, it's been mostly because the users needed an Excel-like formula language. The danger of DSLs, of course, is that they're often YAGNI in the extreme, or at least a sign that you don't really understand your problem. XML, coupled with schemas, is a tool for building data-focused DSLs. If you have some complex structure, you can convert each of its features into an XML attribute. For example, if you had a grammar that looked something like this: The Source specification obeys the following syntax source = ( Feature1+Feature2+... ":" ) ? steps Feature1 = "local" | "global" Feature2 ="real" | "virtual" | "ComponentType.all" Feature3 ="self" | "ancestors" | "descendants" | "Hierarchy.all" Feature4 = "first" | "last" | "DayAllocation.all" If features are specified, the order of features as given above has strictly to be followed. steps = oneOrMoreNameSteps | zeroOrMoreNameSteps | componentSteps oneOrMoreNameSteps = nameStep ( "." nameStep ) * zeroOrMoreNameSteps = ( nameStep "." ) * nameStep = "#" name name is a string of characters from "A"-"Z", "a"-"z", "0"-"9", "-" and "_". No umlauts allowed, one character is minimum. componentSteps is a list of valid values, see below. Valid 'componentSteps' are: - GlobalValue - Product - Product.Brand - Product.Accommodation - Product.Accommodation.SellingAccom - Product.Accommodation.SellingAccom.Board - Product.Accommodation.SellingAccom.Unit - Product.Accommodation.SellingAccom.Unit.SellingUnit - Product.OnewayFlight - Product.OnewayFlight.BookingClass - Product.ReturnFlight - Product.ReturnFlight.BookingClass - Product.ReturnFlight.Inbound - Product.ReturnFlight.Outbound - Product.Addon - Product.Addon.Service - Product.Addon.ServiceFeatu