Metadata Generation

Ian Young ian at iay.org.uk
Tue Sep 23 09:53:40 EDT 2014


On 23 Sep 2014, at 08:58, Rod Widdowson <rdw at steadingsoftware.com> wrote:

> given that the long term aim is to be able to drop entire
> sections would XPATH be a better bet?

I'm guessing you mean XSLT?

> If so, and if someone out there has the cycles, could they put together a
> simple example?  I'd appreciate it - I am feeling very much under the gun
> for the installer and I really do not want now to be the time I finally have
> to learn xpath.

If you're using XSLT, you're always transforming some sort of XML input document using a transform written in XSLT. You can provide parameters to that transform, but the mechanism for that depends on the driver application you're using to run the process. Are you thinking in terms of providing your own driver, or (say) using the one that comes with Xalan?

As a rough example of one way to use XSLT, take a look at this:

	https://github.com/ukf/ukf-meta/blob/master/mdx/uk/import.xsl

You can see that a lot of this is the actual XML you want to produce, so it's a template and transform combined in some ways.

The more traditional templating approach can be seen in something like this:

	https://github.com/ukf/ukf-meta/blob/master/mdx/uk/final_tweak.xsl

In that one, you're processing an existing metadata file and tweaking it according to parameters provided to you.

If you can come up with a template and some ideas of what parameters you want to inject, I could come up with a transform. I think the real trick is how you drive the process; that might require some external code.

	-- Ian



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5943 bytes
Desc: not available
Url : http://shibboleth.net/pipermail/dev/attachments/20140923/15d2bc3a/attachment.bin 


More information about the dev mailing list