Re: [Servingxml-help] [BULK] Re: params..
Brought to you by:
danielaparker
|
From: Daniel P. <dan...@sy...> - 2007-04-03 03:26:38
|
Try the following:
<sx:parameter name="record_structure">
<sx:serialize>
<sx:xsltSerializer>
<sx:outputProperty name="omit-xml-declaration" value="yes"/>
</sx:xsltSerializer>
<sx:transform>
<sx:document>
<param recordtype="TYPE1" maxlen="100"/>
</sx:document>
</sx:transform>
</sx:serialize>
</sx:parameter>
The sx:document element accepts in-place content, and you should be able to
serialize it into a string value, useable in the parameter definition.
Note that without the "omit-xml-declaration" output property set to "yes",
you'll get a <?xml version="1.0" encoding="utf-8"?> in the parameter value.
Daniel
----- Original Message -----
From: "Sandhya" <sa...@la...>
To: "Daniel Parker" <dan...@sy...>
Sent: Monday, April 02, 2007 9:53 AM
Subject: RE: [BULK] Re: [Servingxml-help] params..
> Tried this. It works for simple string params. paramters.getString() is
> returns empty string for XML string params in CDATA sections.
>
> The following doesnot work:
>
> <sx:parameter name="record_structure">
> <![CDATA[<param recordtype="TYPE1" maxlen="100">]]>
> </sx:parameter>
>
> <sx:parameter name="record_structure">
> <sx:defaultValue><![CDATA[<param recordtype="TYPE1"
> maxlen="100">]]></sx:defaultValue>
> </sx:parameter>
>
>
> 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
>>>
>>
>>
>
>
> undefined
>
|