Page 2 of 2

Re: Transfer the Indigo Substrate list to SQL-Database

Posted: Wed Sep 07, 2016 5:11 pm
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!

Re: Transfer the Indigo Substrate list to SQL-Database

Posted: Wed Sep 07, 2016 10:29 pm
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:

Re: Transfer the Indigo Substrate list to SQL-Database

Posted: Fri Sep 09, 2016 9:15 am
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

Re: Transfer the Indigo Substrate list to SQL-Database

Posted: Fri Sep 09, 2016 6:41 pm
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.

Re: Transfer the Indigo Substrate list to SQL-Database

Posted: Fri Sep 09, 2016 7:25 pm
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.

Re: Transfer the Indigo Substrate list to SQL-Database

Posted: Fri Sep 09, 2016 10:03 pm
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! :)

Re: Transfer the Indigo Substrate list to SQL-Database

Posted: Fri Sep 09, 2016 10:08 pm
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

Re: Transfer the Indigo Substrate list to SQL-Database

Posted: Sat Sep 10, 2016 10:38 pm
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?

Re: Transfer the Indigo Substrate list to SQL-Database

Posted: Tue Sep 13, 2016 12:52 am
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.