What Is Regular Language for XML Next Generation (RELAX NG)?
RELAX NG is a language for describing the structure of XML documents. It's an expansion of TREX, which James Clark designed, and it's based on RELAX—a description of how to write common languages in XML. XML is a markup language, which indicates that it's used to describe data structure. For example, you can use it to describe the establishment of a book or an article. The idea behind RELAX NG is that you can use it to describe any XML document—including ones that don't have anything to do with books or articles! RELAX NG works pretty simply: You write down what your document contains (like paragraphs or tables) and then use those things as "tags" in the document itself. So if you want to say, "this paragraph has five sentences," then you'd put "5" inside a paragraph tag. If you're going to say, "this table has three rows," then you'd put "3" inside a table tag. RELAX NG is a language that allows you to define the grammar of an XML document. It's one of the many tools in your toolbox that you can use to help you write the perfect XML document. You see, RELAX NG isn't just for validating the syntax of an XML document; it also lets you define how an instance document should be structured. That way, when you want to create an instance of that document, you have to use RELAX NG to describe it and then use your tool of choice (like [tool name]) and voila! You've got a new instance. But wait! There's more! You can even take things further and describe multiple instances using one RELAX NG schema document! For example, say you have a library catalog system that needs to validate the structure of two kinds of books: fiction books and nonfiction books. With RELAX NG, you have to create two different schema documents and then validate each type of book separately against its schema document!
Related Terms by Software Development
Join Our Newsletter
Get weekly news, engaging articles, and career tips-all free!
By subscribing to our newsletter, you're cool with our terms and conditions and agree to our Privacy Policy.

