Metadata Revisited

I'm still circling around this idea of metadata and I need to do more research on it. Is there a PHP library or something which can provide a persistent layer of an XML document object? I think its possible to use something like memcached to serialize php data objects, but I'm not sure if that's the right solution here.

XSL to the rescue?

Maybe I should create some XSL templates which could simply transform metadata into a more cohesive object on a regular basis. That would simplify the webGUI templates to deal with HTML components, and separate the key-value pair object relationship mapping to the metadata templates. Yes I like that idea better.

To be more specific, metadata models are currently described in XML files. It doesn't make sense to use SQL to map key-value pairs, its too complicated. So I'll setup one SQL statement to fetch the data, another to fetch the metadata, then use an XSL transformation to "zip" the two together and build a cohesive object for the user to manipulate. Then hopefully it will be just as simple to unzip the data and the metadata in a standard manner to prepare a SQL statement to store the data, or even transition it to another state.

The one problem with this idea so far is that I'm not sure how to get nexista to accomplish this, I've really only used xsl within nexista to output over http. Actually I could do something similar to how the account groups are handled (using curl to fetch an XML document internally over http), but in that case I've only worked the output or zipping together of the data, not unzipping it for inserting into a database. Hmmm.

Complexity Creep Alert!

UPDATE October 29, 2007: I've done some work on this today and I'm running into the fact that invoices are regular entries with extra metadata and getting confused. I'm using xslt to build a new invoice-specific element, using the metadata, and finding that I might be simply making things a lot more complicated for myself. I'm good at that! :-)

Anyway, I'm not sure if I should add the entries and entry_amount fields to the invoice metadata definition, or if I should use XSL to merge the two together. On the one hand, I don't want to recreate what's already been done in the entry model, but I also don't want to have a super complicated XSL file. Know what I mean? More to come soon....

Compromise

Well for now I'm just going to design for practical purpose, rather than eternal bliss. I'm going to add one custom crafted node to the invoice xml output, the invoice amount. This will be lifted from the entry amounts table, as the amount entered into the accounts receivable account.

The Authority

By the way, I did a quick search on XBRL invoices and came up with this.

By on October 27, 2007 5:31 PM

Categories: