Re: [U2] xml mapping file question

2009-08-09 Thread Boydell, Stuart
Hi Norman,
Can I suggest a couple of modifications. You could use the fieldstore
function instead of converting to and from VMs. Using fieldstore will
run exponentially faster than the VM conversion method.
Also, if you want to keep the output pretty add the newline.

Eg
Equ NEWLINE to char(13):char(10) ;* adjust for your op.sys
STYLESHEET = '?xml-stylesheet type=text/xsl
href=http://...dcst.xsl;?'
XMLEXEC.STATUS = XMLEXECUTE(CMD,OPTIONS,XML.VAR,XSD.VAR)
IF NOT(XMLEXEC.STATUS) THEN 
FINAL.XML.DOCUMENT = FIELDSTORE(XML.VAR,'',3,0,STYLESHEET:'':NEWLINE)
etc

Cheers,
Stuart Boydell 

-Original Message-

  STATUS = XMLExecute(CMD,OPTIONS,XML.VAR,XSD.VAR)  ;* XML.VAR
holds the variable that we'll use to create a dynamic array (DA)
  PARSE = XML.VAR   ;* PARSE is now the DA

  PARSE = CONVERT('',@VM,PARSE);* Use CONVERT function to
convert all ending '' in each XML elemetn to Value Marks

  LOCATE '?' IN PARSE1,1 SETTING X ELSE  ;* dimension the DA and
find the first ? in the DA
 ;* Insert the new XML stylesheet element into the DA
 PARSE = INSERT(PARSE,1,2,0,'?xml-stylesheet type=text/xsl
href=http://cicnet.celestecorp.com/cms/xml/xslt/cilstdcst.xsl;?')
  END
  PARSE = CONVERT(@VM,'',PARSE) ;* convert the VM's back to ''

 
**
This email message and any files transmitted with it are confidential and 
intended solely for the use of addressed recipient(s). If you have received 
this communication in error, please reply to this e-mail to notify the sender 
of its incorrect delivery and then delete it and your reply.  It is your 
responsibility to check this email and any attachments for viruses and defects 
before opening or sending them on. Spotless collects information about you to 
provide and market our services. For information about use, disclosure and 
access, see our privacy policy at http://www.spotless.com.au 
Please consider our environment before printing this email. 
** 


___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question [AD]

2009-08-09 Thread Tony G
 From: David Jordan
 Hi Norm 
 Have you found any tools to help generate the excel 
 stylesheets other than manual coding.

Have a look at code sample and documentation for NebulaXLite:
  remove.pleaseNebula-RnD.com/products/xlite.htm
I wrote NebulaXLite specifically because people keep asking the
same questions in forums about creating spreadsheets.  With
NebulaXLite, all of your code is in BASIC, you can keep it
cross-DBMS and cross-OS capable, and you don't need to mess with
XML or programming languages that you don't know.

If you don't get it you may wonder why you'd want it.  But once
you get it you may kick yourself for not trying it sooner.

In response to the specific question: NebulaXLite includes a code
generator:  You feed in XML from an existing spreadsheet, and you
get out BASIC code which contains definitions of all of the
styles using dynamic arrays and well-defined element names.  You
can then copy and modify the styles like any other BASIC code,
and use them to generate other spreadsheets.

NebulaXLite is completely free for developers and only $200 for
any end-user server running production reports.  There are no
support or maintenance fees.  Fixes, assistance, and periodic
enhancements are completely free.  It's really that simple.

Thanks for your time.

Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
remove.pleaseNebula-RnD.com/blog
Visit PickWiki.com!  Contribute!

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-09 Thread Norman Bauer
Thanks for the suggestion Stuart.

On 8/9/09, Boydell, Stuart stuart.boyd...@spotless.com.au wrote:
 Hi Norman,
 Can I suggest a couple of modifications. You could use the fieldstore
 function instead of converting to and from VMs. Using fieldstore will
 run exponentially faster than the VM conversion method.
 Also, if you want to keep the output pretty add the newline.

 Eg
 Equ NEWLINE to char(13):char(10) ;* adjust for your op.sys
 STYLESHEET = '?xml-stylesheet type=text/xsl
 href=http://...dcst.xsl;?'
 XMLEXEC.STATUS = XMLEXECUTE(CMD,OPTIONS,XML.VAR,XSD.VAR)
 IF NOT(XMLEXEC.STATUS) THEN
 FINAL.XML.DOCUMENT = FIELDSTORE(XML.VAR,'',3,0,STYLESHEET:'':NEWLINE)
 etc

 Cheers,
 Stuart Boydell

 -Original Message-

   STATUS = XMLExecute(CMD,OPTIONS,XML.VAR,XSD.VAR)  ;* XML.VAR
 holds the variable that we'll use to create a dynamic array (DA)
   PARSE = XML.VAR   ;* PARSE is now the DA

   PARSE = CONVERT('',@VM,PARSE);* Use CONVERT function to
 convert all ending '' in each XML elemetn to Value Marks

   LOCATE '?' IN PARSE1,1 SETTING X ELSE  ;* dimension the DA and
 find the first ? in the DA
  ;* Insert the new XML stylesheet element into the DA
  PARSE = INSERT(PARSE,1,2,0,'?xml-stylesheet type=text/xsl
 href=http://cicnet.celestecorp.com/cms/xml/xslt/cilstdcst.xsl;?')
   END
   PARSE = CONVERT(@VM,'',PARSE) ;* convert the VM's back to ''


 **
 This email message and any files transmitted with it are confidential and
 intended solely for the use of addressed recipient(s). If you have received
 this communication in error, please reply to this e-mail to notify the
 sender of its incorrect delivery and then delete it and your reply.  It is
 your responsibility to check this email and any attachments for viruses and
 defects before opening or sending them on. Spotless collects information
 about you to provide and market our services. For information about use,
 disclosure and access, see our privacy policy at http://www.spotless.com.au
 Please consider our environment before printing this email.
 **


 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users


-- 
Sent from my mobile device
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-08 Thread David Jordan
Hi Norm

Have you found any tools to help generate the excel stylesheets other than 
manual coding.

Regards

David Jordan

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-08 Thread Steve Romanow
I'm sorry if i dont get this in context, have not kept up with the thread.  

As far as creating excel docs from U2, sth I found that works well is the 
python xlwt library.  

-Original Message-
From: David Jordan da...@dacono.com.au
Sent: Saturday, August 08, 2009 6:43 PM
To: U2 Users List u2-users@listserver.u2ug.org
Subject: Re: [U2] xml mapping file question

Hi Norm

Have you found any tools to help generate the excel stylesheets other than 
manual coding.

Regards

David Jordan

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-08 Thread Norman Bauer
Dave,

If you have Excel 2007 all you have to do is open an XML file in Excel
and it shows up sorted and ready to filter. Cool stuff. I needed the
XML stylesheet so that I could display the report in a browser and
have it sorted easily and consistently.

Steve - Have you been able to get python to connect to UV/UD? MAn if I
could get Django to hook up to it that would save me so much work. I'm
googling on xlwt as I type this. =)

On Sat, Aug 8, 2009 at 8:07 PM, Steve Romanowslestak...@gmail.com wrote:
 I'm sorry if i dont get this in context, have not kept up with the thread.

 As far as creating excel docs from U2, sth I found that works well is the 
 python xlwt library.

 -Original Message-
 From: David Jordan da...@dacono.com.au
 Sent: Saturday, August 08, 2009 6:43 PM
 To: U2 Users List u2-users@listserver.u2ug.org
 Subject: Re: [U2] xml mapping file question

 Hi Norm

 Have you found any tools to help generate the excel stylesheets other than 
 manual coding.

 Regards

 David Jordan

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-08 Thread Norman Bauer
Wow xlwt is schaweet! Thanks for the mention on that. Yet another
amazing thing that Python can do. Are you listening IBM? Drop the Java
crap in favor of Python.

On Sat, Aug 8, 2009 at 8:07 PM, Steve Romanowslestak...@gmail.com wrote:
 I'm sorry if i dont get this in context, have not kept up with the thread.

 As far as creating excel docs from U2, sth I found that works well is the 
 python xlwt library.

 -Original Message-
 From: David Jordan da...@dacono.com.au
 Sent: Saturday, August 08, 2009 6:43 PM
 To: U2 Users List u2-users@listserver.u2ug.org
 Subject: Re: [U2] xml mapping file question

 Hi Norm

 Have you found any tools to help generate the excel stylesheets other than 
 manual coding.

 Regards

 David Jordan

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-08 Thread Steve Romanow
No direct connection, just csv to native xls on my aix server.

-Original Message-
From: Norman Bauer normanba...@gmail.com
Sent: Saturday, August 08, 2009 8:30 PM
To: U2 Users List u2-users@listserver.u2ug.org
Subject: Re: [U2] xml mapping file question

Wow xlwt is schaweet! Thanks for the mention on that. Yet another
amazing thing that Python can do. Are you listening IBM? Drop the Java
crap in favor of Python.

On Sat, Aug 8, 2009 at 8:07 PM, Steve Romanowslestak...@gmail.com wrote:
 I'm sorry if i dont get this in context, have not kept up with the thread
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-07 Thread Norman Bauer
So here is how I did it.

To recap. I wanted to include the xsl-stylesheet in the xml document
that is produced by XMLExecute(). Below is the code that produced the
desired result.


  PROGRAM STDCSTXML
  $OPTIONS INFORMATION
  $INCLUDE UNIVERSE.INCLUDE XML.H


  ;* CMD is the paragraph that we want to run
  ;* OPTIONS are the paramters that you would normally pass to TOXML
  CMD = SORT STOCKFILE WITH QTY GT 0 DESC UM STATDESC QTY STD.CST
TOTAL TOTCST
  OPTIONS = ELEMENTS
  STATUS = XMLExecute(CMD,OPTIONS,XML.VAR,XSD.VAR)  ;* XML.VAR
holds the variable that we'll use to create a dynamic array (DA)
  PARSE = XML.VAR   ;* PARSE is now the DA

  PARSE = CONVERT('',@VM,PARSE);* Use CONVERT function to
convert all ending '' in each XML elemetn to Value Marks

  LOCATE '?' IN PARSE1,1 SETTING X ELSE  ;* dimension the DA and
find the first ? in the DA
 ;* Insert the new XML stylesheet element into the DA
 PARSE = INSERT(PARSE,1,2,0,'?xml-stylesheet type=text/xsl
href=http://cicnet.celestecorp.com/cms/xml/xslt/cilstdcst.xsl;?')
  END
  PARSE = CONVERT(@VM,'',PARSE) ;* convert the VM's back to ''
  OPEN '','XMLREPORTS' TO FILE THEN ;* Open the folder and write to it.
 WRITE PARSE TO FILE, 'stdcst.xml'
  END
   END  ;*Rinse, repeat, =)



I'll also add that I created the file called XMLREPORTS as a Type 19,
then edited the voc record for XMLREPORTS to actually point to a
shared folder on our Intranet web server.

This works flawlessly for me and I hope that it may also help someone
else in the future. Oh and management loves it and is now wanting to
do this for a lot of general purpose reports.

Enjoy,
Norm
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-07 Thread Jo Lester

Thank you for posting your solution. I mainly do XML from within a program too.
 
 Date: Fri, 7 Aug 2009 13:36:45 -0400
 From: normanba...@gmail.com
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] xml mapping file question
 
 So here is how I did it.
 
 To recap. I wanted to include the xsl-stylesheet in the xml document
 that is produced by XMLExecute(). Below is the code that produced the
 desired result.
 
 
 PROGRAM STDCSTXML
 $OPTIONS INFORMATION
 $INCLUDE UNIVERSE.INCLUDE XML.H
 
 
 ;* CMD is the paragraph that we want to run
 ;* OPTIONS are the paramters that you would normally pass to TOXML
 CMD = SORT STOCKFILE WITH QTY GT 0 DESC UM STATDESC QTY STD.CST
 TOTAL TOTCST
 OPTIONS = ELEMENTS
 STATUS = XMLExecute(CMD,OPTIONS,XML.VAR,XSD.VAR) ;* XML.VAR
 holds the variable that we'll use to create a dynamic array (DA)
 PARSE = XML.VAR ;* PARSE is now the DA
 
 PARSE = CONVERT('',@VM,PARSE) ;* Use CONVERT function to
 convert all ending '' in each XML elemetn to Value Marks
 
 LOCATE '?' IN PARSE1,1 SETTING X ELSE ;* dimension the DA and
 find the first ? in the DA
 ;* Insert the new XML stylesheet element into the DA
 PARSE = INSERT(PARSE,1,2,0,'?xml-stylesheet type=text/xsl
 href=http://cicnet.celestecorp.com/cms/xml/xslt/cilstdcst.xsl;?')
 END
 PARSE = CONVERT(@VM,'',PARSE) ;* convert the VM's back to ''
 OPEN '','XMLREPORTS' TO FILE THEN ;* Open the folder and write to it.
 WRITE PARSE TO FILE, 'stdcst.xml'
 END
 END ;*Rinse, repeat, =)
 
 
 
 I'll also add that I created the file called XMLREPORTS as a Type 19,
 then edited the voc record for XMLREPORTS to actually point to a
 shared folder on our Intranet web server.
 
 This works flawlessly for me and I hope that it may also help someone
 else in the future. Oh and management loves it and is now wanting to
 do this for a lot of general purpose reports.
 
 Enjoy,
 Norm
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

_
Express your personality in color! Preview and select themes for Hotmail®. 
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-05 Thread Jo Lester

Do you mean something like this? 

?xml version=1.0 encoding=ISO-8859-1?
?xml-stylesheet type=text/xsl href=simple.xsl?

 

 

The above was borrowed (reprinted w/o permission) from 
http://www.w3schools.com/XML/xml_xsl.asp

 

or do you mean attaching a particular style to a particular element, by adding 
an attribute?

 

 


 
 Date: Wed, 5 Aug 2009 14:45:47 -0400
 From: normanba...@gmail.com
 To: u2-users@listserver.u2ug.org
 Subject: [U2] xml mapping file question
 
 Hello all,
 
 Is there a way to insert stylesheet information in the mapping file?
 For instance:
 
 U2
 root=name
 treat-as=element
 stylesheet=some.xsl
 /
 
 It would save me a lot of work and a huge headache if I could get that
 information in the mapping file.
 
 Thanks,
 
 Norm
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

_
Express your personality in color! Preview and select themes for Hotmail®. 
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-05 Thread Norman Bauer
That is exactly what I mean Jo.

If I were to do:

SORT VOC TOXML XMLMAPPING some_file.map TO some-xml-file

then in some-xml-file I would expect to see

?xml version=1.0 encoding=ISO-8859-1?
?xml-stylesheet type=text/xsl href=simple.xsl?
ROOT

yada yada yada

/ROOT

On Wed, Aug 5, 2009 at 4:05 PM, Jo Lesterjp.les...@hotmail.com wrote:

 Do you mean something like this?

 ?xml version=1.0 encoding=ISO-8859-1?
 ?xml-stylesheet type=text/xsl href=simple.xsl?





 The above was borrowed (reprinted w/o permission) from 
 http://www.w3schools.com/XML/xml_xsl.asp



 or do you mean attaching a particular style to a particular element, by 
 adding an attribute?







 Date: Wed, 5 Aug 2009 14:45:47 -0400
 From: normanba...@gmail.com
 To: u2-users@listserver.u2ug.org
 Subject: [U2] xml mapping file question

 Hello all,

 Is there a way to insert stylesheet information in the mapping file?
 For instance:

 U2
 root=name
 treat-as=element
 stylesheet=some.xsl
 /

 It would save me a lot of work and a huge headache if I could get that
 information in the mapping file.

 Thanks,

 Norm
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

 _
 Express your personality in color! Preview and select themes for Hotmail®.
 http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users


Re: [U2] xml mapping file question

2009-08-05 Thread Jo Lester

 
XDOMTransform
Syntax
XDOMTransform(domHandle, styleSheet, ssLocation, outDomHandle)

 

 
 
Description
The XDOMTransform function transforms input DOM structure using the style sheet 
specified by styleSheet to output DOM structure.7-34 C:\Program 
Files\Adobe\FrameMaker8\UniVerse 
 
 
Parameters





The following table describes each parameter of the syntax.XDOMTransform 
Parameters Parameter


Description


domHandle

Handle to the DOM structure. [IN]


styleSheet

Handle to the context [IN]


ssLocation

A flag to specify whether styleSheet contains style sheet itself, or is just 
the style sheet file name. Value values are:
„XML.FROM.FILE (default)
„XML.FROM.STRING
[IN]


outDomHandle

Handle to the resulting DOM structure. [OUT]
 

The above was borrowed (reprinted w/o permission) from section 7-34 of the 
Universe XML docs 

http://publibfp.boulder.ibm.com/epubs/pdf/22922360.pdf

 

I haven't tried it myself yet, sorry.


 
 Date: Wed, 5 Aug 2009 16:15:50 -0400
 From: normanba...@gmail.com
 To: u2-users@listserver.u2ug.org
 Subject: Re: [U2] xml mapping file question
 
 That is exactly what I mean Jo.
 
 If I were to do:
 
 SORT VOC TOXML XMLMAPPING some_file.map TO some-xml-file
 
 then in some-xml-file I would expect to see
 
 ?xml version=1.0 encoding=ISO-8859-1?
 ?xml-stylesheet type=text/xsl href=simple.xsl?
 ROOT
 
 yada yada yada
 
 /ROOT
 
 On Wed, Aug 5, 2009 at 4:05 PM, Jo Lesterjp.les...@hotmail.com wrote:
 
  Do you mean something like this?
 
  ?xml version=1.0 encoding=ISO-8859-1?
  ?xml-stylesheet type=text/xsl href=simple.xsl?
 
 
 
 
 
  The above was borrowed (reprinted w/o permission) from 
  http://www.w3schools.com/XML/xml_xsl.asp
 
 
 
  or do you mean attaching a particular style to a particular element, by 
  adding an attribute?
 
 
 
 
 
 
 
  Date: Wed, 5 Aug 2009 14:45:47 -0400
  From: normanba...@gmail.com
  To: u2-users@listserver.u2ug.org
  Subject: [U2] xml mapping file question
 
  Hello all,
 
  Is there a way to insert stylesheet information in the mapping file?
  For instance:
 
  U2
  root=name
  treat-as=element
  stylesheet=some.xsl
  /
 
  It would save me a lot of work and a huge headache if I could get that
  information in the mapping file.
 
  Thanks,
 
  Norm
  ___
  U2-Users mailing list
  U2-Users@listserver.u2ug.org
  http://listserver.u2ug.org/mailman/listinfo/u2-users
 
  _
  Express your personality in color! Preview and select themes for Hotmail®.
  http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009
  ___
  U2-Users mailing list
  U2-Users@listserver.u2ug.org
  http://listserver.u2ug.org/mailman/listinfo/u2-users
 
 ___
 U2-Users mailing list
 U2-Users@listserver.u2ug.org
 http://listserver.u2ug.org/mailman/listinfo/u2-users

_
Get free photo software from Windows Live
http://www.windowslive.com/online/photos?ocid=PID23393::T:WLMTAGL:ON:WL:en-US:SI_PH_software:082009
___
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users