NeoPhoto Template files are written in the NeoPhoto Template markup language. This language conforms to the XML specification. In order to create or edit NeoTemplate files you need to learn a bit about XML languages.
XML stands for “Extensible Markup Language”. Here at DTLink Software we are great fans of XML languages. These types of languages are very convenient for describing structured information such as photo albums. They make many programming tasks that we face much easier. Unfortunately the acronym XML is often misused. People say there is this language called “XML”. That is inaccurate. XML is an acronym that describes a class of languages that all follow the same general guidelines. By analogy, you might say “Porsche” follows the general guidelines for “sports car”. Porsche is a sports car. The NeoPhoto Template language follows the general rules for XML languages. NeoTemplate is an XML language. XML is not language; it's a word used to describe a language.
XML languages all look alot like HTML. They consist of tags in angle brackets. One big difference between HTML and XML Languages is that in XML each open tag has to have a corresponding close tag. So for instance, in an XML language you couldn't have an <p> tag without a corresponding </p> tag. As a result HTML is /not/ an XML language. It does not follow XML's rules.
Another big difference between HTML and languages that follow the XML specification is that the XML rules are strictly enforced. As is the case in HTML, tags in XML languages can have attributes. HTML tends to be forgiving if you don't enclose the value of attributes in double quotes. XML languages are not forgiving at all. Every attribute value has to be enclosed in double quotes. For instance, <input type=hidden> works in HTML, but if this were a tag in an XML language it would generate an error because the “hidden” attribute value is not in double quotes.
Some basic XML terminology that we'll be using later on to describe parts of our template files:
open tag: a word enclosed in angle brackets. For instance <IndexPage> is an open tag.
close tag: a word enclosed in angle brackets but starting with a “/”. </IndexPage> is a close tag.
attribute: a 'name=”value”' pair used inside an open tag. For instance in <IndexPage MaxRows=”3”> MaxRows is an attribute with an attribute value of 3.
parent tag: the tag that encloses or wraps another tag. For instance in the example <A><B></B></A> A is a parent of B because A wraps around B.
child tag: the tag enclosed by another tag. In the example in 4 above, B would be a child of A.
text data: (also called CDATA) text that's present between an open tag and a close tag. This text may not contain any angle brackets. For instance in the case of <snack> apple </snack>, apple would be the text data under the <snack> tag.