XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Francisco MonteiroSubject: Pure XPath 1.0 solution
Author: Francisco Monteiro
Date: 16 Sep 2004 02:37 AM
I have the following xml file
<root>
<labelLink.....>
<loc xlink:type="locator" xlink:href="MovementsAnalysis.xsd#ci_FurnitureFixtures" xlink:label="ci_FurnitureFixtures" />
<labelArc xlink:type="arc" xlink:arcrole="http://www.xbrl.org/2003/arcrole/concept-label" xlink:from="ci_FurnitureFixtures" xlink:to="ci_FurnitureFixtures_lbl" />
<label xlink:type="resource" xlink:role="http://www.xbrl.org/2003/role/periodEndLabel" xlink:label="ci_FurnitureFixtures_lbl" xml:lang="en">Furniture and Fixtures, Ending Balance</label>
<label xlink:type="resource" xlink:role="http://www.xbrl.org/2003/role/periodStartLabel" xlink:label="ci_FurnitureFixtures_lbl" xml:lang="en">Furniture and Fixtures, Beginning Balance</label>
<label xlink:type="resource" xlink:role="http://www.xbrl.org/2003/role/label" xlink:label="ci_FurnitureFixtures_lbl" xml:lang="en">Furniture and Fixtures</label>

......
</labelLink>
</root>

I would know the element name in this example it would be ci:FurnitureFixtures and the xlink:role in label element

I normally would use xsl:key however using XForms the solution only allows me XPath 1.0, I could do it via XForms extensions but client does not want this solution. I am trying to use location paths but am getting stuck with the syntax, also when working with documents which are namespaced the intellisense does not prompt me correctly with QName rather just the element local-name, this is a pain.

To add to all the XLink complications if the arcRole is concept-label the value is the the value of xlink:to or vice-versa

The goal is to get the value of label. So the location step is
loc->labelArc->Label using predicates and all

Any help please.


Postnext
(Deleted User) Subject: Re: Pure XPath 1.0 solution
Author: (Deleted User)
Date: 16 Sep 2004 07:01 AM
Hi Francisco,

At 02.39 16/09/2004 -0400, stylus-studio-tech Listmanager wrote:
>From: "Francisco Monteiro"
>
>I would know the element name in this example it would be
>ci:FurnitureFixtures and the xlink:role in label element
>
>I normally would use xsl:key however using XForms the solution only allows
>me XPath 1.0, I could do it via XForms extensions but client does not want
>this solution. I am trying to use location paths but am getting stuck
>with the syntax, also when working with documents which are namespaced the
>intellisense does not prompt me correctly with QName rather just the
>element local-name, this is a pain.

Which version of Stylus are you using? If it's before 5.3 bl179i, could you
try to upgrade to the latest version? If you are already using a recent
version, I would like you to submit the fragment of XML (and a bitmap of
the Sense:X window) that shows this behavior.

>To add to all the XLink complications if the arcRole is concept-label the
>value is the the value of xlink:to or vice-versa
>
>The goal is to get the value of label. So the location step is
>loc->labelArc->Label using predicates and all

I am not sure I completely understood what you need: however, this query
should give you the text of all the labels for the 'ci_FurnitureFixtures'
resources

//label[@xlink:label=//labelArc[@xlink:arcrole='http://www.xbrl.org/2003/arcrole/concept-label'
and @xlink:from='ci_FurnitureFixtures']/@xlink:to or
@xlink:label=//labelArc[@xlink:arcrole!='http://www.xbrl.org/2003/arcrole/concept-label'
and @xlink:to='ci_FurnitureFixtures']/@xlink:from]/text()

Hope this helps,
Alberto


Postnext
Francisco MonteiroSubject: Re: Pure XPath 1.0 solution
Author: Francisco Monteiro
Date: 16 Sep 2004 12:50 PM
Originally Posted: 16 Sep 2004 12:49 PM
Thanks Alberto,<br> <br> The file in question are huge using // (/descendant-or-self::node()/) <br> is not a viable option<br> Can you provide me with an axes solution if possible.<br> <br> I am using 5.3 build 179g and will try and upgrade when I have the <br> permission. MY admin is a <br> full time dictator, talk about Stalin or others try work with him<br> <br> Kind Regards<br> Francisco

Posttop
(Deleted User) Subject: Re: Pure XPath 1.0 solution
Author: (Deleted User)
Date: 18 Sep 2004 01:20 PM
Hi Francisco,

At 12.52 16/09/2004 -0400, stylus-studio-tech Listmanager wrote:
>Thanks Alberto,
>
>The file in question are huge using // (/descendant-or-self::node()/)
>is not a viable option
>Can you provide me with an axes solution if possible.

If you know that all the nodes you are interested in are all direct
children of the same "labelLink" element, you can use "../labelArc" instead
of "//labelArc".

Alberto


 
Topic Page 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.