Author Topic: XML Indexing - Getting Started With A Proof of Concept  (Read 167 times)

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 675
    • View Profile
XML Indexing - Getting Started With A Proof of Concept
« on: October 10, 2017, 07:36:58 AM »
Text summaries of the APPL, AG, and FOLDER:



« Last Edit: October 10, 2017, 07:45:30 AM by Ed_Arnold »
#zOS #ODF

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 675
    • View Profile
Re: XML Indexing - Getting Started With A Proof of Concept
« Reply #1 on: October 10, 2017, 07:39:41 AM »
These next files are input to arsload and need to have the low level qualifier of "txt" removed.  I had to add "txt" so that they could be uploaded.

« Last Edit: October 10, 2017, 07:42:38 AM by Ed_Arnold »
#zOS #ODF

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 675
    • View Profile
Re: XML Indexing - Getting Started With A Proof of Concept
« Reply #2 on: October 10, 2017, 07:45:07 AM »
cd_catalog.css - this is the style sheet provided by the customer

cd_catalog.xml - this is the customer's source file, contains several records/elements they want archived

cd_catalog.xslt - this is the customer's file they wrote to put cd_catalog.xml into the ondemand XML indexer format

cd_catalog.in   - this is the OD XML indexer input file. see below for how this is produced

cd_catalog.in.res - this is the zipped resource (in this case cd_catalog.css)
#zOS #ODF

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 675
    • View Profile
Re: XML Indexing - Getting Started With A Proof of Concept
« Reply #3 on: October 10, 2017, 08:02:54 AM »
First thing we will do is verify that we can load our sample XML files.


To do that we need to point the file cd_catalog.in to odxmlidx.xsd so that it can find the declaration for element 'odidx'

On my system odxmlidx.xsd is noNamespaceSchemaLocation="/u/odv733/xml/xmlload/odxmlidx.xsd"

On Windows the location is noNamespaceSchemaLocation="c:\progra~1\ibm\ondemand\v10.1\xml\odxmlidx.xsd"

Save, of course.


At this point you can verify that arsload will correctly load the data with the following command:

arsload -g ELA-XML -h <hostname> -u <user> -p <password> -nvf cd_catalog.in


You should also be able to view this with the user client.
#zOS #ODF

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 675
    • View Profile
Notes for z/OS
« Reply #4 on: October 10, 2017, 08:10:15 AM »
To edit cd_catalog.in here's what I did:

1. rename it to cd_catalog.original.cs

2. iconv -f UTF-8 -t IBM-1047 cd_catalog.original.cs > cd_catalog.ebcdic.cs

3. oedit cd_catalog.ebcdic.cs, save

4. iconv -f IBM-1047 -t UTF-8 cd_catalog.ebcdic.cs > cd_catalog.cs
#zOS #ODF

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 675
    • View Profile
Re: XML Indexing - Getting Started With A Proof of Concept
« Reply #5 on: October 10, 2017, 08:48:34 AM »
This part I have not tried yet.  Will try to do this when I get some spare time:


The user has to write the transform to take their XML and put it into a format ready for the OD XML indexer. They then need to run a transform engine to create the input file. One possibility is to use Saxon [google it, available on the net] so the command is:

java -classpath d:\saxon\saxon9he.jar net.sf.saxon.Transform -s:cd_catalog.xml -xsl:cd_catalog.xslt -o:cd_catalog.in

This will process the users XML data into an OD XML indexer input file.

Then to make the resources ingested to OD the best way is to zip them up. To do that run the following command:

zip cd_catalog.in.res cd_catalog.css

This added the css file to the res file for the load. Note: All resources for XML AG's are just zip files and they have to be named the same as the input file with the '.res' extension.

At this point it's the same load command as used previously:

arsload -g <group> -h <hostname> -u <user> -p <password> -nvf xxxxxxx.in

This will load the file and you should see a message about  the resources being loaded. After loading you can view on of the documents loaded in either the windows client or through ICN. In both scenarios the resources (zip) file will be retrieved and unzipped so that when the browser views the data it will apply the CSS to style the content.

Ed
#zOS #ODF

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 1392
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: XML Indexing - Getting Started With A Proof of Concept
« Reply #6 on: October 11, 2017, 11:44:07 AM »
If you'd like to package all your files as a .zip, let me know and I'll see if I can enable the upload of .zips, or I'll find somewhere else to host it.

-JD.
#Install, #Educate, #Repair, #Upgrade, #Migrate, #Enhance, #Optimize.

Call:  +1-866-533-7742
Click:  http://JustinDerrick.com/
eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/

Interests:  #AIX6 #AIX7 #Linux #Multiplatforms #DB2v9 #DB2v10 #TSM #Tivoli #Performance #Security #Audits #Customizing #Availability #HA #DR #Training

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 675
    • View Profile
Re: XML Indexing - Getting Started With A Proof of Concept
« Reply #7 on: October 11, 2017, 12:26:55 PM »
Justin - in the big scheme of things, it's not that many files.

However, it would make life a lot easier for others if I created a local server for the AP, AG, and FOLDER and zipped that up.

I could add a .txt to the end of the zip file or if you want to add zip files to the authorized list that would be fine, too.

Ed
#zOS #ODF

Ed_Arnold

  • Hero Member
  • *****
  • Posts: 675
    • View Profile
#zOS #ODF

jsquizz

  • Full Member
  • ***
  • Posts: 164
    • View Profile
Re: XML Indexing - Getting Started With A Proof of Concept
« Reply #9 on: November 17, 2017, 01:42:35 PM »
I just got a chance to play with this. Cool stuff.
Jeff, Northeast PA

#AIX #CMOD #DB2 #TSM #XENOS #AFP2PDF #MIGRATION #TROUBLESHOOT

cwoliveira

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: XML Indexing - Getting Started With A Proof of Concept
« Reply #10 on: November 21, 2017, 09:18:04 AM »
Hi,

Can I include JS files in resources file to be processed by arsload and later be executed by XML Viewer on Content Navigator ?

The customer is asking to evaluate the capability of generate barcodes in XLST layout based on some document indexes.

So, I'm thinking on include a barcode javascript library as part of XML resources, and invoke the javascript functions after XML transformation, on regular HTML side. Finally, this should be presented using Content Navigator, via CMOD XML Viewer.

Thanks,
CW.

bkhoyt

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: XML Indexing - Getting Started With A Proof of Concept
« Reply #11 on: December 04, 2017, 02:17:17 PM »
Yes, JS files can be included in the resource file and then later processed by the browser. I would recommend building your own zip(res) file to used during loading. The XML viewer plugin with Navigator will extract the resource file and then tell the browser to display the XML document. This XML document therefore can have JS either in it or call out to referenced libraries.

Hope that helps.
Brian