Re: [Servingxml-help] [BULK] Re: params..
Brought to you by:
danielaparker
From: Daniel P. <dan...@sy...> - 2007-04-01 04:35:27
|
Generally, if an element can have parameters, it's mentioned in the element reference, although a few may be missed. I checked and it looks like sx:flatRecordType does not currently support parameters, unfortunately. I'll address that in the next release. Adding an attribute foo to sx:flatRecordType is as simple as adding a setFoo method in FlatRecordTypeFactoryAssembler, but then you'd have to keep passing it down through some other classes until you get it into a FlatRecordReaderImpl, and then modify the parameters to include it, before the readField methods are called. That's fairly intrusive, and I don't particularly recommend it for forward compatability reasons. -- Daniel ----- Original Message ----- From: "Sandhya" <sa...@la...> To: "Daniel Parker" <dan...@sy...> Sent: Saturday, March 31, 2007 5:11 PM Subject: RE: [BULK] Re: [Servingxml-help] params.. > Thanks for the answer Daniel. > > Can I use <sx:parameter> within sx:flatRecordType element. > OR > Can I add an extra attribute to sx:flatRecordType. I may have to change > servingxml's code for this. If you can guide me, I can really appreciate > it. > > If either of these is possible, how can I access its value within > writeRecord() method of RecordFilter. > > > <sx:flatRecordType name="country" maxlen="20"> > <sx:parameter > name="maxlen><sx:defaultvalue>20</sx:defaultValue></sx:parameter> > <sx:fieldDelimiter value=","/> > <sx:delimitedField name="code"/> > <sx:delimitedField name="name"/> > </sx:flatRecordType> > > I hate to ask this kind of silly questions. From the documentation, I am > unable to figure out this kind of information. > > > On Sat, Mar 31, 2007 at 12:10 PM, Daniel Parker wrote: > >> Name myParam = new QualifiedName("customparams"); >> String value = parameters.getString(myParam); >> >> ----- Original Message ----- From: "Sandhya" <sa...@la...> >> To: <ser...@li...> >> Sent: Friday, March 30, 2007 11:09 PM >> Subject: [Servingxml-help] params.. >> >> >>> Hi, I have a parameter in my sx:service tag. I want an xml string as a >>> param. >>> So I am using a CDATA section. I want access to this param in my >>> RecordFilter's writeRecord(..) method. How can I access this value >>> there. >>> >>> Or If I have to access this custom params just after the resource script >>> is parsed, how can I modify the consoleApp program to access this. >>> >>> <sx:parameter name="customparams"> >>> <sx:defaultValue> >>> <CDATA> >>> <customparams> >>> <param recordtype="TYPE1" maxlen="100"> >>> <param recordtype="TYPE2" maxlen="102"> >>> ... >>> </custormparams> >>> </CDATA> >>> </sx:defaultValue> >>> </sx:parameter> >>> >>> >>> Regards >>> Sandhya >>> >>> >>> >>> ------------------------------------------------------------------------- >>> Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to share >>> your >>> opinions on IT & business topics through brief surveys-and earn cash >>> >>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >>> _______________________________________________ >>> Servingxml-help mailing list >>> Ser...@li... >>> https://lists.sourceforge.net/lists/listinfo/servingxml-help >>> >> >> > > > -- > Sent using Laszlo Mail. Try it yourself. > http://www.laszlomail.com > |