Re: XMP to XML translation?
Michael Hopwood wrote: > Hi all, > > > > I’m looking for a quick and simple method to transform XMP files into > well-formed XML, From a quick look at http://en.wikipedia.org/wiki/Extensible_Metadata_Platform, it looks like XMP is RDF/XML. (However, I can't tell if my quick look caused me to miss something saying that XMP might also be written out something other than RDF/XML.) If is always RDF/XML, then XMP already is well-formed XML. (Make sure you know what "well-formed" does, and doesn't, mean for XML.) It sounds like you really meant "valid" (against some schema or DTD). > possibly according to an extremely simplified schema > (i.e. effectively a root node and a list of allowed elements from > selected namespaces, all with cardinality 0-n). > > > > The use case here is to import XMP data into an XSLT engine I’m using, > but the existing software can’t handle the RDF/XML of the raw XMP. You probably want an RDF reader, not a general-purpose XML tool. When RDF is serialized into RDF/XML, there are lots of options (lots of variation in syntax that mean exactly the same thing, but have quite different XML structure). Unless you know for sure that only certain syntactic options will be used, you'd have to handle the multiple RDF/XML options, and that's not easy in XSLT (or at least not in a single-step transform). > Since the XMP is relatively flat, I thought there might be a standard or > at least well-known way to get this stuff into ... The standard way to get RDF/XML into memory is to use a real RDF/XML reader (as opposed to trying to do it with XSL). A real RDF/XML reader would already handle all those syntactic variations, and leave you with the same structures in memory regardless of which syntactic option was chosen when the RDF/XML was created. > a very simple XML form, > from whence it could be input into my XSLT engine (which auto-detects > the “schema” of the input data before creating an XSLT to transform it > and future uploads to a new schema). Then, you could probably use the RDF/XML reader tool to write out XML for input to your XSLT transform. Or you might be able to use the RDF/XML reader tool to write the data back out into RDF/XML, but using only known subset of the possible syntactic variations, so that your XSLT transform only has to handle those variations. Daniel
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format