Sponsored Content
Operating Systems HP-UX Need help for xslt transformation using Shell script Post 302397023 by srinu19 on Saturday 20th of February 2010 12:12:50 PM
Old 02-20-2010
Need help for xslt transformation using Shell script

Hi

I have one input xml file
Code:
<param name="EXTR_COL" valueDesc="AUTHD_RFLL" value="rx.AUTHD_RFLL" />

There is a mapping parameters in Database.

if EXTR_COL is present in input XML then it is mapped to fieldlist.

so the o/p XML looks like
Code:
     <fieldlist>
    <datasource name="Oracle database" value="">
      <schemaname value="schema">
        <table value="tablename" dbobjtype="table">
          <field value="AUTHD_RFLL" calcid="0" dbobjtype="field" datatype="varchar2" datasize="9" precision="0" not_null="true">

I want to know how we can do this transformation.

Last edited by Scott; 02-21-2010 at 10:42 AM.. Reason: Please use code tags
 

5 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

file name transformation

I've got a multitude of text data files that carry exactly the same kind of data. Unfortunately some of them have a different filename format some are: 'category'_'month'-'year'_act.txt an example being: daf_Apr-1961_act.txt and some are: 'category'_ 'year'-'month'_act.txt an... (16 Replies)
Discussion started by: vrms
16 Replies

2. Shell Programming and Scripting

shell call xalan to transform xml with xslt, but can not find root node

hi experts: i am using xslt to transform xml in shell. But can not find root node of source xml, if i remove the naming space definition in source xml, it works fine. So our the question is how to let xslt know the naming space of srouce xml file? Thanks for your kindly help in... (0 Replies)
Discussion started by: summer_cherry
0 Replies

3. Shell Programming and Scripting

xslt transformation through Unix

Hi .. I have one input XML and I want to convert into another XML using parameter mapping through Database through Unix shell script. But I dont have idea how to do that. And how can I create xsl sheet if mapping is through database tables. Please help me on this. (1 Reply)
Discussion started by: srinu19
1 Replies

4. UNIX for Advanced & Expert Users

Need help in xslt transformation

Hi I have one input xml file <param name="EXTR_COL" valueDesc="AUTHD_RFLL" value="rx.AUTHD_RFLL" /> There is a mapping parameters in Database. if EXTR_COL is present in input XML then it is mapped to fieldlist. so the o/p XML looks like <fieldlist> <datasource... (1 Reply)
Discussion started by: srinu19
1 Replies

5. Shell Programming and Scripting

Data transformation

I do have an input text file of the following format with 1000's of lines input file: 3386(11:11,Ani:0,Bri:1,ch:1,Jwe:0,Jor:0,LP:0,Lo:0,NS:1,al:1,bo:0,boy:0,bru:0,sh:0,cor:1,dum:0,ery:0,mac:0,mic:0)... (3 Replies)
Discussion started by: Kanja
3 Replies
XML::DOM::ValParser(3)					User Contributed Perl Documentation				    XML::DOM::ValParser(3)

NAME
XML::DOM::ValParser - an XML::DOM::Parser that validates at parse time SYNOPSIS
use XML::DOM::ValParser; my %expat_options = (KeepCDATA => 1, Handlers => [ Unparsed => &my_Unparsed_handler ]); my $parser = new XML::DOM::ValParser (%expat_options); eval { local $XML::Checker::FAIL = &my_fail; my $doc = $parser->parsefile ("fail.xml"); ... XML::DOM::Document was created sucessfully ... }; if ($@) { # Either XML::Parser (expat) threw an exception or my_fail() died. ... your error handling code here ... # Note that the XML::DOM::Document is automatically disposed off and # will be garbage collected } # Throws an exception (with die) when an error is encountered, this # will stop the parsing process. # Don't die if a warning or info message is encountered, just print a message. sub my_fail { my $code = shift; die XML::Checker::error_string ($code, @_) if $code < 200; XML::Checker::print_error ($code, @_); } DESCRIPTION
Use XML::DOM::ValParser wherever you would use XML::DOM::Parser and your XML will be checked using XML::Checker at parse time. See XML::DOM for details on XML::DOM::Parser options. See XML::Checker for details on setting the fail handler (my_fail.) The following handlers are currently supported, just like XML::DOM::Parser: Init, Final, Char, Start, End, Default, Doctype, CdataStart, CdataEnd, XMLDecl, Entity, Notation, Proc, Default, Comment, Attlist, Element, Unparsed. XML
::DOM::ValParser XML::DOM::ValParser extends from XML::Checker::Parser. It creates an XML::Checker object and routes all event handlers through the checker, before processing the events to create the XML::DOM::Document. Just like XML::Checker::Parser, the checker object can be retrieved with the getChecker() method and can be reused later on (provided that the DOCTYPE section of the XML::DOM::Document did not change in the mean time.) You can control which errors are fatal (and therefore should stop creation of the XML::DOM::Document) by filtering the appropriate error codes in the global $XML::Checker::FAIL handler (see "ERROR_HANDLING" in XML::Checker) and calling die or croak appropriately. Just like XML::Checker::Parser, XML::DOM::ValParser supports the SkipExternalDTD and SkipInsignifWS options. See XML::Checker::Parser for details. AUTHOR
Send bug reports, hints, tips, suggestions to Enno Derksen at <enno@att.com>. SEE ALSO
XML::DOM, XML::Checker ("SEE_ALSO" in XML::Checker) perl v5.8.0 2000-01-31 XML::DOM::ValParser(3)
All times are GMT -4. The time now is 09:20 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy