Transfer the Indigo Substrate list to SQL-Database

sander
Advanced member
Posts: 302
Joined: Wed Oct 01, 2014 8:58 am
Location: Den Bosch

Re: Transfer the Indigo Substrate list to SQL-Database

Post by sander »

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:jdf="http://www.CIP4.org/JDFSchema_1_1">
<xsl:template match="jdf:JMF">

<xsl:for-each select="/jdf:JMF/jdf:Response/jdf:ResourceInfo/jdf:Media">
<xsl:value-of select="@DescriptiveName[position()]"/><xsl:text>&#10;</xsl:text>
</xsl:for-each>

</xsl:template>
</xsl:stylesheet>
I bet the namespace thing is a little messy, haven't done that much research about it. Anyway, this one is working!
lombert
Member
Posts: 167
Joined: Fri Feb 04, 2011 2:31 pm
Location: Sweden

Re: Transfer the Indigo Substrate list to SQL-Database

Post by lombert »

Thanks again. It works!

Have checking xsl-page on the web to try to learn more about this. You can do a lot with it.

Tried to find a way to split the xml instead of the list that I get now. I got it to split in all part, but with wrong content. :oops: :geek:
Between jobs!
lombert
Member
Posts: 167
Joined: Fri Feb 04, 2011 2:31 pm
Location: Sweden

Re: Transfer the Indigo Substrate list to SQL-Database

Post by lombert »

So, now it is done. From Indigo to SQL. Thanks to 'cstevens' and 'sander'.

Image

Picks up a xml from both Indigos. Deletes the old DB. Make single xml-files for all substrates and insert them into two DB tables, one for each Indigo.

Image

Then is the question, how do I get a sorted list in the Switch Client?

Image
Between jobs!
User avatar
gabrielp
Advanced member
Posts: 645
Joined: Fri Aug 08, 2014 4:31 pm
Location: Boston
Contact:

Re: Transfer the Indigo Substrate list to SQL-Database

Post by gabrielp »

Wow, that is really cool. How did you customize the drop down options? Does the database module give you some ability to run queries from the Switch Client? Would like to hear more about how that is done.
Free Switch scripts: open-automation @ GitHub
Free Switch apps: open-automation @ Enfocus appstore

Want to hire me? I'm looking for my next gig. Contact me on LinkedIn or via email.
sander
Advanced member
Posts: 302
Joined: Wed Oct 01, 2014 8:58 am
Location: Den Bosch

Re: Transfer the Indigo Substrate list to SQL-Database

Post by sander »

Add "order by DescriptiveName desc" to your sql query? ;)

Indeed you can do run queries from within Switch Client, if you do have the database module.
lombert
Member
Posts: 167
Joined: Fri Feb 04, 2011 2:31 pm
Location: Sweden

Re: Transfer the Indigo Substrate list to SQL-Database

Post by lombert »

sander wrote:Add "order by DescriptiveName desc" to your sql query? ;)
Once again you go the easy way! ;)

Image

Image

Image

Big thanks! Again! :)
Between jobs!
lombert
Member
Posts: 167
Joined: Fri Feb 04, 2011 2:31 pm
Location: Sweden

Re: Transfer the Indigo Substrate list to SQL-Database

Post by lombert »

gabrielp wrote:Wow, that is really cool. How did you customize the drop down options? Does the database module give you some ability to run queries from the Switch Client? Would like to hear more about how that is done.
Yes, if you have DB module then you get to choose the DB in the Dropdown-list;

Image
Between jobs!
lombert
Member
Posts: 167
Joined: Fri Feb 04, 2011 2:31 pm
Location: Sweden

Re: Transfer the Indigo Substrate list to SQL-Database

Post by lombert »

cstevens wrote:A more automated method to handle this would be through JMF queries. On the HP Production Pro product page I uploaded a simple flow that sends various JMF queries and captures the response as metadata using the XML Pickup element. You can find it here under the title "Send JMF Query and capture response as Metadata"
When the script runs, and the Indigo is power off, I get a stript-xml without the media. I can understand why that happends, but wondering if it is possible to get the script not send out a new xml if the Indigo is down?
Between jobs!
cstevens
Member
Posts: 105
Joined: Tue Feb 12, 2013 8:42 pm

Re: Transfer the Indigo Substrate list to SQL-Database

Post by cstevens »

You could filter based on file size. If the response that comes back is less than a certain size you could delete it, if not send it through.

The other (more complicated) method I could think of is to first send a JMF Status query to check on the press. If the status is one of the down states then don't make the query. You'd need to modify the script to handle multiple queries I think.
Post Reply