xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
- From: "Michael Kay" <mike AT saxonica.com>
- To: "'New, Cecil (GE Infra, US)'" <cecil.new AT ge.com>, "'xom-interest'" <xom-interest AT lists.ibiblio.org>
- Subject: Re: [XOM-interest] ID Anchors??
- Date: Fri, 2 Feb 2007 20:16:04 -0000
XSLT and XPath questions are best asked on the xsl-list at
www.mulberrytech.com.
Define a key
<xsl:key name="fk" match="AccessForm" use="@id"/>
Then when PartRevision is the context node, you can get the role using
key('fk',substring(@accessRefs,2))/@role
Michael Kay
http://www.saxonica.com/
> -----Original Message-----
> From: xom-interest-bounces AT lists.ibiblio.org
> [mailto:xom-interest-bounces AT lists.ibiblio.org] On Behalf Of
> New, Cecil (GE Infra, US)
> Sent: 02 February 2007 16:35
> To: xom-interest
> Subject: [XOM-interest] ID Anchors??
>
> This is probably not the right forum for this question,
> please feel free to re-direct me... really a transform question.
>
> Below is some XML that uses a style that is proving a
> challenge to query. I'd like to use xslt/xpath to keep it
> simple. It has attributes of elements that point to other
> releated elements located elsewhere. I have been reading to
> see if this construct is handled by xpath but haven't found
> it yet. It resembles an HTML anchor.
>
> In this example, the accessRefs attriubte contains "#id10"
> which is the id attriubte of the <AccessForm> element below
> it. So I want to produce a report showing Widget,
> last_mod_date, and role. It has me stumped so far.
>
> Thanks for any advice!
>
> <PartRevision id="id8" name="Widget" accessRefs="#id10" >
> <Description>FIREWALL, LWR - MACH</Description>
> <Attributes id="id9">
> <Attribute value="2005-11-23T00:26:50"
> title="last_mod_date">
> </Attribute>
> <Attribute value="R9GFVbN6wG0GuA"
> name="object_id">
> </Attribute>
> <Attribute value="ABC"
> name="owner">
> </Attribute>
> </Attributes>
>
> <!-- lots of stuff omitted -->
>
> <AccessForm id="id10"
> role="public"
> formRef="#id528">
> </AccessForm>
> </PartRevision>
> Cecil New
> GE Infrastructure
> Engineering Tools Center of Excellence
> Principal Technologist
>
> T 513 552 2604
> D *892 2604
> E Cecil.New AT ge.com
> www.ge.com/aviation
>
> 1 Neumann Way, MD T207
> Cincinnati, Ohio 45215, U.S.A.
> General Electric Company
>
>
> _______________________________________________
> XOM-interest mailing list
> XOM-interest AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/xom-interest
-
[XOM-interest] ID Anchors??,
New, Cecil (GE Infra, US), 02/02/2007
- Re: [XOM-interest] ID Anchors??, Elliotte Harold, 02/02/2007
- Re: [XOM-interest] ID Anchors??, Michael Kay, 02/02/2007
Archive powered by MHonArc 2.6.24.