XML Indexing - Getting Started With A Proof of Concept

Previous topic - Next topic

Ed_Arnold

Text summaries of the APPL, AG, and FOLDER:



#zOS #ODF

Ed_Arnold

#1
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.

#zOS #ODF

Ed_Arnold

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

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

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

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

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.
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Webinars:  https://CMOD.Training/
IBM CMOD Professional Services: https://CMOD.cloud

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Ed_Arnold

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


jsquizz

#CMOD #DB2 #AFP2PDF #TSM #AIX #RHEL #AWS #AZURE #GCP #EVERYTHING

cwoliveira

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

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

niteskum

New to XML indexer and  XML concept!! .
How to create cd_catalog.xslt file?  I have XML file and odxmlidx.xsd with me. Any tool to create Xslt?