OSB & xquery: when use text() or data(...)

Hi all,
I'm a beginner on xquery and I'm wondering when use text() or data(...).
For example I've this simple xml document:
<book>
<author>A</author>
<year>2010</year>
<price currency="CHF" >100.123</price>
</book>
for retrieving attribute value I have to use data(/book/price/@currency)
but for for retrieving tag value I've two possibilities:/book/price/text() or data(/book/price)
Are those two expressions the same ? Or ones is evaluated faster than the others ?

Text() - always returns the String.
data() - accepts a sequence of items and returns their typed values (return type is xs:anyAtomicType). Calling this function is often unnecessary because the typed value of a node is extracted automatically (in a process known as atomization) for many XQueryXPath 2.0 expressions, including comparisons, arithmetic operations and function calls. The most common use case for the fn:data function is in XQuery element constructors.
Regards,
Anuj

Similar Messages

  • [svn] 4019: Fix RTE when using text as a mask

    Revision: 4019
    Author: [email protected]
    Date: 2008-11-04 16:32:57 -0800 (Tue, 04 Nov 2008)
    Log Message:
    Fix RTE when using text as a mask
    SDK-17893 - TextGraphic inside of a mask causes RTE
    When the mask is added, we weren't yet creating the displayObject which the TextGraphic class relies upon. The solution is to call validateProperties on the mask before calling validateSize.
    In addition, the mask wasn't getting applied to the Group because we weren't setting an internal flag.
    QE Notes: Test masking on both Graphic elements and Group.
    Doc Notes: We need to note that if you use TextGraphic as a mask, you must set maskType = "alpha"
    Bugs: SDK-17893
    Reviewer: Glenn
    Ticket Links:
    http://bugs.adobe.com/jira/browse/SDK-17893
    http://bugs.adobe.com/jira/browse/SDK-17893
    Modified Paths:
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/components/baseClasses/Gro upBase.as
    flex/sdk/branches/gumbo_alpha/frameworks/projects/flex4/src/mx/graphics/graphicsClasses/G raphicElement.as

    Does Illustrator do the same
    thing? If not, you will have to join/add the paths
    for each letter before exporting as an SVG file.
    Sometimes Illustrator groups paths rather than
    creating a single composite path, so you may have to
    mess with it a bit. Hope that helps.
    In Illustrator you can make a compound path with all the letters selected, or use the pathfinder (one of the coolest things in the latest versions)
    When orginally outlines, text is grouped together, and each letter is it's own compound path.
    (for those of you wondering, a compound path can have a cutout or more than one path. I've used it for a few upcoming themes and templates, and it works very, very well.)
    I should mention that editing a compound path with a cutout section will remove the cutout section. Can't stress that enough.

  • Is there any way to use embedded commands in text to create pauses when using text to speech in iOS 5? You can do it in OS X by typing [[slnc 2000]] to get a two-second pause.

    Is there any way to use embedded commands in text to create pauses when using text to speech in iOS 5? You can do it in OS X by typing [[slnc 2000]] to get a two-second pause.

    Thanks for the reply Russ.
    Yes, I've considered adding titles and/or generators in the FCPX storyline, but this creates a need to render the entire timeline. As I'm juggling library locations and hard drive spaces I just didn't want to add a new render that will occupy a lot of space. It's also a bit of visual clultter for me, so my goal is to find the best workflow for adding this stuff on or after export.

  • Photoshop CS4 "Program Error" when using Text tool

    Hello. I was having problems with Photoshop displaying a "Program Error" every so often, so I deleted the preference file and all seemed good. But after deleting the preference file for my Photoshop CS4 and re-launching Photoshop, the text tool causes Photoshop to display a Program Error when using the tool. It never did this before. Should I reinstall Photoshop? I am using a Powermac G5 running 10.5.8. I have already tried repairing the disk permissions.
    Thanks

    Thats kinda what I thought too, but the problem started happening randomly. It started when we were trying to use photomerge with large photos. The program just started giving the program errors. I still think it may be a font problem, but without going through my 2000+ fonts and disabling them one by one, how can I resolve this issue?
    Thanks

  • Text "disappears" when using text box tool

    We are running Adobe Acrobat Standard vers. 7.0.9 inside Thomson Corporation's GoFileRoom vers. 6.0. When using the text box tool to add comments to a pdf, the text within the text box "takes on" the color of the background of the box, making it seem that the text has disappeared. The only way to see the text is to edit the text box and change the font color OR to view the contents of the text box in the Comments section. How do I resolve this? Would appreciate any help.

    I am having the same problem. Both with text boxes and text in the actual document. Do you think it is GoFileRoom related? I never made the connection but I wouldn't be surprised. It seems worse when different versions of Adobe are used. Some have ver 7 and other ver 8 but we are all using GFR.
    Have you had any help?

  • Error when using LOV on date-field (qms0012F)

    We are using QMS0012F.fmb (Headstart Template Package 6.5) to
    launch all our reports. However, when a date-parameter is
    defined as the last field in this form and when you select a
    date using the LOV (windows-calendar), an error appears: 'FRM-
    41051, you cannot create records here'. Therefore, when
    possible, we defined the date-parameters as the first one in
    row. In a couple of reports this is practically not possible,
    simply because the date-field is the only one which has to be
    filled. Is there a property to adjust or another solution to
    solve this?
    By the way: happy new year!

    The Designer library ofgcall65 contains a package calendar, which contains a procedure close_calendar.
    This procedure does a NEXT_ITEM (to implement an AUTO_SKIP) as its last action.
    You will need to correct the problem with a customization to that library.
    Regards,
    Lauri

  • More than 1 line of text when using text generator from file?

    hi
    have 8 line blocks of text to show onscreen.
    would like to use text generatorn>from file
    all they seem to print is one line.
    is there a work around?
    have trhied soft returns and paragraphs on saved text file.
    no change.
    anyonre know how to get 2 or more lines of text?
    thanks in addvance!

    Select the File generator layer and in the Inspector, select the Layout pane and in Layout controls, set the Layout Method to Paragraph.  Narrow your margins and the text will "flow" into multiple lines.
    You can also keyframe the paragraph layout position. [Probably more info than you want here.]
    That said, you can only display *one line* at a time per File Generator. (If you're up to date with Motion [v5.1.2], you can use more than one File generator.) The generator does not accept any other characters for returns other than newline and carriage return.
    I've never tried it, but thinking about it, you can set Tab stops in the Paragraph layout (double click in the layout rectangle and a ruler should appear over the top -- right click on the ruler to set tabs). If you go back into the original text file and where you need to break lines into two or more, setting a left tab stop in the layout very near the end of a line might force the tabbed text into the next line (did I make that clear enough??)

  • Error Message when using text messaging?

    I just got my iphone yesterday.
    I had the AT&T store transfer my contacts from my Balckberry over to the phone.
    Now, when I text certain people I get this error message:
    1121611611
    *Error Invalid Number. Please re-send using a valid 10-digit mobile number or valid short code.*
    This doesn't happen with every number, but it is frustrating me.
    Help?

    Hi 4revolution,
    This article: http://support.apple.com/kb/TS1291 provides more information about the message.
    Try editing the contact for the person you are sending the SMS too, as shown in the article above. If the issue persists try deleting the conversation with that contact. Just tap SMS> Messages in the top left(if you are viewing a conversation)>slide your finger from left to right across the contact name> tap delete.
    -Jason

  • Error when using filter on date column in interactive report

    Hi,
    I'm getting the following error when using the filter on a date column. None of the criteria in the filter list work. All give me the same error but when I use the filter on a column feature (in the search bar) and use ">" and "<" those work.
    Can someone please help me????
    " Settledate is in the last 2 years
    ORA-30175: invalid type given for an argument ORA-02063: preceding line from MAINDATA "

    I have a similar problem . I have an interactive report based on resultset stored in a collection; since all the columns of a collection are of string datatype, I convert the columns to appropriate datatypes before its returned to the user; everything works as desired except when I try to filter on a data column , I get a ORA-01858: a non-numeric character was found where a numeric was expected .
    I turned on debug mode and am copying the output here , column c009 which is aliased to 'C' is the one that I am trying to apply the filter on
    select
    ROWID as apxws_row_pk,
    "C001",
    "C002",
    "C003",
    "C004",
    "C005",
    "C006",
    "C007",
    "C008",
    "CHECKOUTTIMESTAMP",
    "C010",
    "C011",
    "TO_NUMBER(C012)",
    "TO_NUMBER(C013)",
    "TO_NUMBER(C014)",
    "C015",
    "C016",
    "C017",
    "TO_NUMBER(C018)",
    "C",
    count(*) over () as apxws_row_cnt
    from (
    select * from (
    Select c001,c002,c003,c004,c005,c006,c007,c008,to_date(c009,'dd-MON-yy HH24.MI') checkouttimestamp,
    cast(to_date(c009,'dd-MON-yy HH24.MI') as timestamp) c,
    --TO_TIMESTAMP(c009,'dd-MON-yy HH24.MI') c1 ,
    trunc(to_date(c009,'dd-MON-yy HH24.MI')) checkoutdate,
    c010,c011,to_number(c012),to_number(c013), to_number(c014),c015,c016,c017,to_number(c018) from apex_collections where collection_name = 'IR_BOOKSALES'
    ) r
    where ("C" between systimestamp - ((1/24) :APXWS_EXPR_1) and systimestamp)*
    ) r where rownum <= to_number(:APXWS_MAX_ROW_CNT)
    order by ROWID
    0.04: IR binding: ":APXWS_EXPR_1"="APXWS_EXPR_1" value="1"
    0.04: IR binding: ":APXWS_MAX_ROW_CNT"="APXWS_MAX_ROW_CNT" value="2000"
    ORA-01858: a non-numeric character was found where a numeric was expected
    I have tried to convert c009 to date, timestamp and timestamp with time zone datatypes ; they all return the same error ,but all 3 datatypes work fine with systimestamp when I run them in sqlplus. Any help would be appreciated.

  • Preview glitch when searching for words on page and when using text tools to write comments/notes on .pdf slides, why?

    When using Preview to access my class notes as .pdf files, I have encountered extremely frustrating glitches when trying to search for specific words or phrases within the .pdf files and when trying to use 'text tools' to write notes on the .pdf slides.  Preview did not behave in this manor with Mountain Lion OS.  This seems to correlate with my recent upgrade to Mavericks OS.
    When using the search function you should be able to type in any number of letters or words and press enter to continually cycle through the highlighted findings that match what you have typed in.  Instead it now, typically, stops tracking what I type in after about 3-4 letters and the yellow highlight turns grey.  Once it does this if you try to press enter to cycle through what it has found it no longer cycles.  It never did this in Mountain Lion using the very same .pdf files I had previously used in the old OS, and it does this despite there being multiple matches for what I am searching.
    When clicking 'show edit tool bar' button and then 'text tools' button to be able to free text notes on the .pdf file I have to exit out of the 'text tools' mode to be able to advance to the next page.  This is extremely inconveneint and, again, Preview did not do this in Mountain Lion.
    These are my two major complaints about Preview that I have discovered so far in my short time using it with the new Mavericks OS.
    Any help would be very much appreciated.

    I have this issue too and was pleased to find this thread.  Did either of you find the source of the problem or how to fix it? 
    I've tried using Wondershare PDF Editor as well and wondered that had messed some settings up.  Have either of you used that? 
    If so, how would I revert to a clean version of Preview?
    Hope we can get this sorted. 

  • Enter Key Not Working When Using Text Tool

    For some reason, my enter key has stopped working when using the text tool.  Instead of making a soft return to a new line, it simply commits the type. What is going on here?
    I'm using a desktop and CS3.

    there are 2 enter keys in key board
    if u enter main key board enter, sentence will go to next line
    In case u enter the key  available in  rightside of the key board , in the cluster of numericals, the type tool is committed.

  • When using text edit, the font as it appears on the screen is ok, but when I print, it is much smaller on the paper than the chosen font size. How do I correct this?

    When using TextEdit, the font as it appears on the screen is ok, but after printing, the font is much smaller on the paper than the chosen size. (in this case 14)
    How do I correct this?

    Hi Corel
    Thank you for your reply
    However I need the lower case version for some sites and the upper case version for the site in question? To make matters worse this site does not allow you to change your log on name unless it is in the form of an e-mail address
    So what I need is Kostas for this site and kostas saved for other sites and allow me to choose which one I want to use
    How do I do this please
    I have no bother with this on Win Internet Explorer but I like Firefox
    Mind it may be as simple as deleting The appropriate entry and resetting with Kostas instead of kostas?
    But I would appreciate knowing the correct solution from an expert

  • In OSB , xquery issue with large volume data

    Hi ,
    I am facing one problem in xquery transformation in OSB.
    There is one xquery transformation where I am comparing all the records and if there are similar records i am clubbing them under same first node.
    Here i am reading the input file from the ftp process. This is perfectly working for the small size input data. When there is large input data then also its working , but its taking huge amount of time and the file is moving to error directory and i see the duplicate records created for the same input data. I am not seeing anything in the error log or normal log related to this file.
    How to check what is exactly causing the issue here,  why it is moving to error directory and why i am getting duplicate data for large input( approx 1GB).
    My Xquery is something like below.
    <InputParameters>
                    for $choice in $inputParameters1/choice              
                     let $withSamePrimaryID := ($inputParameters1/choice[PRIMARYID eq $choice/PRIMARYID])                
                     let $withSamePrimaryID8 := ($inputParameters1/choice[FIRSTNAME eq $choice/FIRSTNAME])
                     return
                      <choice>
                     if(data($withSamePrimaryID[1]/ClaimID) = data($withSamePrimaryID8[1]/ClaimID)) then
                     let $claimID:= $withSamePrimaryID[1]/ClaimID
                     return
                     <ClaimID>{$claimID}</ClaimID>                
                     else
                     <ClaimID>{ data($choice/ClaimID) }</ClaimID>

    HI ,
    I understand your use case is
    a) read the file ( from ftp location.. txt file hopefully)
    b) process the file ( your x query .. although will not get into details)
    c) what to do with the file ( send it backend system via Business Service?)
    Also noted the files with large size take long time to be processed . This depends on the memory/heap assigned to your JVM.
    Can say that is expected behaviour.
    the other point of file being moved to error dir etc - this could be the error handler doing the job ( if you one)
    if no error handlers - look at the timeout and error condition scenarios on your service.
    HTH

  • Need to Set Current Row when Using Built-in Data Control Delete Operation?

    I have an af:table bound to a ViewObject (VO) collection (no Entity Object) - within each row, I include a column that contains a 'Remove' command button so the user can remove the row. I add the command button by dragging/dropping the built-in delete operation from the VO on the Data Control Palette. When I use this as is (no changes), the Remove button always deletes the first row in the collection, not the selected row. Do I need to add code to set the current row, and if so can someone please provide an example and specify where I need to add? thanks.
    ------ .jspx af:table with command button to remove each row ------
    <af:table value="#{bindings.ListView1.collectionModel}" var="row"
    rows="#{bindings.ListView1.rangeSize}"
    first="#{bindings.ListView1.rangeStart}"
    // note: I don't have any code added for selectedRow or makeCurrent - assuming this is built-in?
    selectionState="#{bindings.ListView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.ListView1.collectionModel.makeCurrent}">
    <af:column>
    <af:commandButton actionListener="#{bindings.Delete.execute}"
    text="Remove"
    disabled="#{!bindings.Delete.enabled}"/>
    </af:column>
    ---------- corresponding pagedef file ------------
    <bindings>.....
    <action id="Delete" IterBinding="ListView1Iterator"
    InstanceName="SrchDataControl.ListView1"
    DataControl="SrchDataControl" RequiresUpdateModel="false"
    Action="30"/>
    </bindings>
    Note: I also tried solution posted on following thread, but again, only first row is deleted, not the selected row?: Delete and Commit
    Message was edited by:
    javaX

    I just want to delete (or remove) it from the VO. Data for this VO is not on the database.
    The function is doing what I want it to do (delete from the VO), its just always deleting the first row, versus the selected row. I select the command button next on a column next to an item further down in the list and it deletes the first row. The problem is setting the selected row to be removed - I thought setting the current row would be taken care of by the SelectListener?
    selectionState="#{bindings.MyIspListView1.collectionModel.selectedRow}"
    selectionListener="#{bindings.MyIspListView1.collectionModel.makeCurrent}"

  • Problem when using a different data element in Employee Tab Contact Info

    Hello,
    My version: Nakisa OrgChart 4.1
    I created a data element whose fields I wanted to show in the Position details (in the Employee Profile panel, which use the default Static layout 'Employee Tabs'). I am trying to display some contact info, and I used the Employee Tab Contact Info section within Employee Tabs to do it. Somehow the fields captions do not show once I do that (see picture attached). I tried using the 'Employee Tab Data Sheet' section to display the same information, and it works fine.
    Any thoughts what could cause this behavior? All the fields captions have values that were configured in the data element.
    Thanks
    M.E.

    Sorry, just re-reading from the start, you are saying this is purely dependent on the type of section you select. Right?
    With "Employee Tab Contact Info", you say it doesn't show; Have you tried using Field/Value Section (Multiple)?
    Also, when it doesn't work, what <presentation> is referenced in your custom section within "OrgUnitPositionEmployeeDetail.xml" (in \.delta\AppResources\detailconfiguration)?
    Stephen

Maybe you are looking for

  • Photo gallery page from iWeb '08 doesn't work for Mac OS X 10.3.9 user?

    I have recently published a photo gallery page with comments on using iWeb '08 (latest update). Displays fine for me and apparently a lot of other mixed-platform users. But one user is saying that his eMac with Mac OS X 10.3.9 and the Safari of the d

  • Error opening business rule from AAS

    Hi, I'm unable to open business rules from AAS console associated with one of the Planning/ Essbase application. This particular planning application is also not showing up when I try to "select outline" for the business rule. The business rules for

  • IChat AV keeps logging me out of AIM

    iChat AV has been really buggy for me. Almost immediately after I launch it, I am logged out of AIM. I've tried using a different port on iChat, but that hasn't worked. I've also listed all of the appropriate ports under the Sharing pane of System Pr

  • Remove or change photo in email header

    How do I remove or change my photo located in the email header? Doesn't seem to being the preferences dialogue?

  • How to restore info.plist on my bootcamp.app ?

    After following this instruction https://discussions.apple.com/message/17365855#17365855 I accidentaly overwrite my info.plist and now bootcamp couldn't started. how can I restore my info.plist again?