He's using eXist as the database. Reminds people that images and binaries are accessible from the database as well.
<Pizza Break - Thank You Anonymous Donor>
One of the coolest features: "You can store the XQueries themselves within the database."
GEEK OUT! He is using creation of characters for a D&D like game as the example....Chaotic Neutral Cleric for me!
Tip: declare function local:randchoose($ctermset as node()) as xs:string{
Defining the function as local allows you to keep that namespace private and have another namespace for the public output.
Tip:
Embed Xquery in XML by using the {} operator.
Tip: string{$character/gender}
Remember that XPath returns element() and attribute() (and others) not text, unless specifically requested. Could easily cause problems that aren't immediately clear in a browser.
conf.xml in eXist:
setup - serielizer, scheduler, automatic XSL generation, indentation, XSLT transformer, validation mode, Xquery modules section...optional modules (turn them on -uncomment them)
then run the build routine.
Tip: in eXist -
- util, and request modules are good to get to know.
- transform allows the use of XSLT on XML in the XQuery. So use XQuery to collect the data and XSLT to transform it...easier recursion.
- sql module allows you to get connections from just about anywhere with a URI
No comments:
Post a Comment