xsl-list
[Top] [All Lists]

Re: [xsl] Recursive Processor to find Type of complex type for WSDL file

2007-03-14 07:57:11
As you mentioned,The XPath would only fetch only string and int types
and I have to find the What are elements invloved for Address and
their datatype and PHone and stuff.
I am struggling to loop thorugh this kind of combination.
Where I need to pass Address as key and find all the data type for the same
Thanks,
Senthil

On 3/14/07, Abel Braaksma <abel(_dot_)online(_at_)xs4all(_dot_)nl> wrote:
Senthilkumaravelan K wrote:
> <element name="firstName" type="xsd:string"/>
>  <element name="lastName" type="xsd:string"/>
>  <element name="address1" type="tns2:Address"/>
>
> <snip />
>
>    <element name="areaCode" type="xsd:int"/>
>
> <snip />
>
> The objective is to get all the type data for all the elements till it
> is string or int.

In that case, you can simply do something along the line of selecting:

//xs:element[(_at_)type = 'xsd:string' or @type = 'xsd:int']

where 'xs' is bound to the namespace of XML Schema.

It will get you all elements of type 'xsd:string' of of type 'xsd:int'.

If with 'recursive' in your OP you meant that you somehow need to follow
and/or output the parents (or data from them), you can wrap some
modified copy template around this.

-- Abel


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--