A tiny piece of the puzzle

I think I’ve figured something out that’s been eluding me regarding the way that functions get called–I’m still a bit wobbly on the model/map lingo, but it just occurred to me how the different functions are organized and data passed between XQL and HTML files. The main VIEW-WORK.HTML file calls functions defined in APP.XQL, the primary point of entry. That app uses transformation functions defined in TEI2HTML.XQL–this is part of the separation of powers. There, we have a general TEI2:TEI2HTML function set up as a list of cases–if this element, do that. Then there are more refined functions called TEI2:HEADER and TEI2:BODY declared and implemented here using data passed from the main APP.XQL and the cases in TEI2HTML  I’m still rather foggy about the relationship between the TEI:TEI2HTML cases and the TEI2:HEADER &c results, in part because they use similar naming conventions and one can use information generated in another. I think. And then there’s APP:HEADER, too.

Tomorrow, I want to restructure my sample XML files to include, instead of just <text><body>…</body></text>, a more structured form: <text><front></front><body></body></text>. Then, I want to separate out the front matter (i.e., the subtitle of this document and any epigraph, &c.) from the main body and write functions that display them separately. I also want to figure out why the teiHeader material sometimes displays twice–the relationship between html generated by TEI2:TEI2HTML and by TEI2:HEADER is confusing to me, so I’m hoping that by using smaller functions that do specific things, rather than relying on a series of cases, I can more easily see what’s going on.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: