This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: Access to RowsetSchema attribute
- To: xsl-list at lists dot mulberrytech dot com
- Subject: Re: [xsl] Access to RowsetSchema attribute
- From: Gurnandan Kaur <teclioness at yahoo dot co dot uk>
- Date: Tue, 23 Oct 2001 15:09:04 +0100 (BST)
- Reply-To: xsl-list at lists dot mulberrytech dot com
Hi Jeni,
Thanks for your prompt response. I have seen your name
across so many of XSL articles and have visited your
website too, but never thought u would be giving me a
solution to my problem someday.
Thanks again
Gurnandan
--- Jeni Tennison <jeni@jenitennison.com> wrote: > Hi
Gurnandan,
>
> > Using the following xml fragment, I need to get
> the value of
> > rs:dbtype attribute, assuming that the current
> context is positioned
> > at the attribute z:row/@c1. How do I do it?
>
> Presumably you want to know the data type of the c1
> attribute? To get
> that you need the value of the rs:dbtype attribute:
>
> @rs:dbtype
>
> on the s:datatype element:
>
> s:datatype/@rs:dbtype
>
> under the s:AttributeType element whose name
> attribute is 'c1':
>
> s:AttributeType[@name =
> 'c1']/s:datatype/@rs:dbtype
>
> within the s:ElementType within the s:Schema within
> the 'xml' [sic]
> document element:
>
> /xml/s:Schema/s:ElementType
> /s:AttributeType[@name =
> 'c1']/s:datatype/@rs:dbtype
>
> If you don't know the name of the attribute that you
> want to find the
> data type for, then you can use the name() function
> on the current
> attribute to get it, which would make the path:
>
> /xml/s:Schema/s:ElementType
> /s:AttributeType[@name =
> name(current())]/s:datatype/@rs:dbtype
>
> If there are lots of s:ElementType elements within
> the s:Schema, then
> you want to choose the one whose name attribute is
> the same as the
> name of the parent of the current attribute node:
>
> /xml/s:Schema/s:ElementType[@name =
> name(current()/..)]
> /s:AttributeType[@name =
> name(current())]/s:datatype/@rs:dbtype
>
> If you're doing this a lot, you might want to set up
> a key so that you
> can quick access to the relevant s:AttributeType
> element.
>
> I hope that's the kind of thing you were after,
>
> Jeni
>
> ---
> Jeni Tennison
> http://www.jenitennison.com/
>
>
> XSL-List info and archive:
> http://www.mulberrytech.com/xsl/xsl-list
>
=====
Cheers!!
Gurnandan
____________________________________________________________
Nokia Game is on again.
Go to http://uk.yahoo.com/nokiagame/ and join the new
all media adventure before November 3rd.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list