Sequence does not match type document()

Hi all,
I am having a problem with building a query - maybe one of you can point out my mistake!
First of all I have a sequence of nodes in the variable '$__mpqfEngineVar_13' which are built in a FLWOR using the following construct:
<engine:document ID='{'NoID'}' recordNumber='{0.0}' Rank='{0.0}' Score='{$__mpqfEngineVar_8}'>{$__mpqfEngineVar_1}</engine:document>
I am trying to filter out those which have a specific value in a descendant node (actually present inside the tree $__mpqfEngineVar_1 from above):
$__mpqfEngineVar_15 := ($__mpqfEngineVar_13[/mpeg7:FamilyName = $__mpqfEngineVar_14])
However I get the following error message:
Sequence does not match type document() - found item of type element({urn:dimis:mpqfQueryEngine:schema:2009}document, {http://www.w3.org/2001/XMLSchema}untyped)
If I use the following relative path instead (which is not an option since the path is user define) it actually works (notice the '*')....
*//mpeg7:FamilyName
Any ideas what I am doing wrong? Honestly I can't really see the semantic difference..
Thanks for your help,
Alex

Hi Alex,
The expression "//mpeg7:FamilyName" is an abbreviated XQuery step that expands to this:
root() treat as document-node()/descendant-or-self::node()/mpeg7:FamilyNameThis shows you why you're getting an error about the root node not being a document node.
I expect that the expression you really want is ".//mpeg7:FamilyName" - the "." prefix makes it a relative path rather than an absolute path.
John

Similar Messages

  • Error: Sequence does not match type xs:string

    I am using BDB XML 2.5.16 to store and query my XML  documents in Java. The documents are IMDB xml documents containing actors information
    obtained from INEX website https://inex.mmci.uni-saarland.de/login.jsp.  One of  the document I stored in the database is the following
        <?xml version="1.0" encoding="UTF-8"?>
         <persons>
          <person>
              <name>jason angeles
              </name>
              <filmography>
                 <act>
                    <movie>
                       <title>prison planet 3 the revenge 1998
                        </title>
                      <year>1998
                      </year>
                     <character>evil ninja
                      </character>
                   </movie>
                 </act>
              </filmography>
             </person>
             </persons>
    I want to  search using XQuery  for filmography element whose title element contains ANY of the following keywords ('planet', 'revenge', '1998'). Below is the query I used
                  // declaring function functx:contains-any-of
                String qryRk = "declare namespace functx = 'http://www.functx.com'; " 
                      + "declare function functx:contains-any-of "
                     + "( $arg as xs:string?" + " , "  + " $searchStrings as xs:string* )  as xs:boolean { "
                     + "some $searchString in $searchStrings "
                    +  " satisfies contains($arg,$searchString)} ; ";
                 String myQuery101 = qryRk + "for $entity in collection('simpleExampleData2.dbxml')//filmography "
                      + "where functx:contains-any-of ( $entity/act/movie/title ,  ('planet', 'revenge', '1998'))"
                      + "return $entity";
    When I  execute the query  i  expect to get at least get the following element as mu output
                           Document : person_31000.xml:
                        <filmography>
                               <act>
                                     <movie>
                                     <title>prison planet 3 the revenge 1998
                                    </title>
                                    <year>1998
                                    </year>
                                   <character>evil ninja
                                   </character>
                                  </movie>
                               </act>
                             </filmography>
    However instead of the above element i got the  following Error
                                 Exception in thread "main" com.sleepycat.dbxml.XmlException: Error: Sequence does not match type xs:string? - the sequence contains more than one item [err:XPTY0004], <query>:1:343, errcode =               
                                  QUERY_EVALUATION_ERROR
                                      at com.sleepycat.dbxml.dbxml_javaJNI.XmlManager_query__SWIG_0(Native Method)
                                      at com.sleepycat.dbxml.XmlManager.query(XmlManager.java:544)
                                     at com.sleepycat.dbxml.XmlManager.query(XmlManager.java:320)
                                     at xmlirsystemstruxplus.XQueryEngine.queryEngine(XQueryEngine.java:269)
                                     at xmlirsystemstruxplus.XMLIRSystemStruXplus.main(XMLIRSystemStruXplus.java:109)
                                     Java Result: 1
        Note that i used  contains-any-of() function because the contains () function does not work with  'planet revenge 1998' string may be because the keywords do not appear in the order they appear in the element content.
       Please  can any body help me to find out  (1) why i have the  above error ? and solution  (2)  why  the condition contains  ( $entity/act/movie/title ,  'planet revenge 1998') is not working ? how do i use contains() function w.r.t this
    Thank you in advance
    Message was edited by: RokoA 19/01/2015  by RokoA

    Using the shell dbxml in both 2.5 and 6.0 I created a container and put the document example you gave into it.  Then I executed the following query:
    [code]
    declare namespace functx = 'http://www.functx.com';
    declare function functx:contains-any-of ( $arg as xs:string?, $searchStrings as xs:string* )  as xs:boolean {
    some $searchString in $searchStrings
    satisfies contains($arg,$searchString)
    for $entity in collection('simpleExampleData2.dbxml')//filmography
    where functx:contains-any-of ( $entity/act/movie/title ,  ('planet', 'revenge', '1998'))
    return $entity
    [/code]
    And got the results you expected instead of an error.
    Since you are using the Java API it is possible the problem is in how you configured and executed the query, instead of in the query itself.  If you could post an example program or code section that produces the error, then I can continue you help you with this.
    Lauren Foutz

  • ERROR ITMS-9000: "File given does not match type JPEG ... Image is likely corrupt

    Hi ALl,
    On compliing my book  get these errors with ITunes producer...I've resaved the files out with photoshop and they seems fine?
    Package Summary:
    1 package(s) were not uploaded because they had problems:
              /Users/Umran/Music/iTunes Producer/Playlists/9780957408654.itmsp - Error Messages:
                        Apple's web service operation was not successful
                        Unable to authenticate the package: 9780957408654.itmsp
                        ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues: ; Error=com.apple.jingle.leghorn.fileformat.ValidationError@1cf629f[userString=An unknown error occured while parsing. Image is likely corrupt.  Exception message: null]" at Book (MZItmspBookPackage)
                        ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues: ; Error=com.apple.jingle.leghorn.fileformat.ValidationError@1801285[userString=We reached the end of the file before we expected. Image is likely corrupt]" at Book (MZItmspBookPackage)
                        ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues: ; Error=com.apple.jingle.leghorn.fileformat.ValidationError@1e056e9[userString=We reached the end of the file before we expected. Image is likely corrupt]" at Book (MZItmspBookPackage)
                        ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues: ; Error=com.apple.jingle.leghorn.fileformat.ValidationError@11d58e0[userString=We reached the end of the file before we expected. Image is likely corrupt]" at Book (MZItmspBookPackage)
                        ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues: ; Error=com.apple.jingle.leghorn.fileformat.ValidationError@127c00e[userString=We reached the end of the file before we expected. Image is likely corrupt]" at Book (MZItmspBookPackage)
                        ERROR ITMS-5107: "VirtualLandscapesTheModernEra20002012.epub: Fixed-layout books must supply a text or bodymatter starting location in the guide." at Book (MZItmspBookPackage)
    Any advice??? Hope someone can help!

    iBookstore Publisher Support send me a fast response email which included some helpful info:
    Please make sure that all image files inside the ePub end with one of the following: ".tif", ".jpg", or ".png" and that the file itself matches the file extension type. To check if the image file matches the file extension type, please right click on the image then select "Get Info". Once the info tab appears, please make sure that the file extension type of the image file matches the "Kind" found under "General".
    For further information regarding embedded images, please refer to the iBookstore Asset Guide, which is available for download in the Deliver Your Content module in iTunes Connect.
    And they INCLUDED THE TRANSPORTER LOG (!), the log generated by iTunes Producer as it tries to upload a book. We were able to search for the Validation Error # within the log and find out which image Producer was trying to upload when it encountered an error. Turns out the problem was a corrupted screenshot jpeg.
    Grateful!

  • ERROR ITMS-9000 "File given does not match type JPEG....

    I'm trying to upload our iBook. I first did an export outside of publish, then did publish and reloaded everything under the .itmsp file publish created. About 10 minutes into the upload, I received a message that read:
    1 Apple's web service operation was not successful.
    2 Unable to authenticate the package ISBN#...:itmsp
    3: ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues:
    Error=com.apple.jingle.leghorn.fileformat.ValidationError@387eb9b2[userString=Th is file does not start with a start of image marker.] at Book (MZitmspBookPackage)
    4 ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues:
    Error=com.apple.jingle.leghorn.fileformat.ValidationError@6bad662[userString=Thi s file does not start with a start of image marker.] at Book (MZitmspBookPackage)
    5 ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues:
    Error=com.apple.jingle.leghorn.fileformat.ValidationError@450fcee3[userString=Th is file does not start with a start of image marker.] at Book (MZitmspBookPackage)
    6 ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues:
    Error=com.apple.jingle.leghorn.fileformat.ValidationError@69c736ea[userString=Th is file does not start with a start of image marker.] at Book (MZitmspBookPackage)
    7 ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues:
    Error=com.apple.jingle.leghorn.fileformat.ValidationError@15e672e7[userString=Th is file does not start with a start of image marker.] at Book (MZitmspBookPackage)
    8 ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues:
    Error=com.apple.jingle.leghorn.fileformat.ValidationError@4c812a6ec[userString=T his file does not start with a start of image marker.] at Book (MZitmspBookPackage)
    9ERROR ITMS-9000: "File given does not match type JPEG Image because of these validation issues:
    Error=com.apple.jingle.leghorn.fileformat.ValidationError@54180fd6[userString=Th is file does not start with a start of image marker.] at Book (MZitmspBookPackage)
    Any suggestions would be greatly appreciated.

    I had done screen shots on the iPad and then emailed them to my Mac. I then worked to cut the black bar off the top, but some how Photoshop wasn't saving them correctly. I couldn't even reopen them in PS. So, I downloaded them again, went back in, saved them as .jpegs and then reuploaded.  That solved it.  It was quite bizarre. 
    Now trying to get the description listing right in the iBookstore.
    I wrote the piece out, I thought in TextEdit.  Then pasted it into the box in iTunesProducer. When I was getting the error message above, it also was saying that there's a 4,000-character limit. So, I copied it into Pages and did a character count and saw 3,887.  I still had to cut about 500 chactacters out.  Support responded and said I was still very close to the limit, so I don't know what it was they were counting. My Pages counter said it was close to 3,300....
    My problem now is that they have bullet points on lines with no text now.  They've fixed it from how it was first diplaying.  So, I'm trying to get that cleaned up.  It's their fault, but it looks like me, the publisher, is the one who is clueless......
    Here's the link to our iBook!
    http://itunes.apple.com/us/book/2012-science-prophecy-ancient/id555557425?mt=11

  • Output Does Not MATCH Word Document

    Everything is fine till it reaches page 76 (of my 388 page document) and the phrase: District of Columbia.
    The original document does not wrap District of Columbia, but the PDF file does.
    I am using the PDF printer.
    The problem is that District of Columbia is a bookmark linked to the table of contents. I see that during creation of the PDF file, Word goes into a mode that shows hidden text in bookmarks, etc. This makes the phase District of Columbia even longer than it normally is.
    A work around I am considering is choosing an oversized page for printing, but the names are criptic and I'll have to look up each to find out which would work. I'm very stuck. I have three other programs that can make a PDF out of the document in just minutes, but the links/bookmarks don't work at all.
    Creation using Acrobat (v XI) takes six hours. There are that many bookmarks in the document.
    Any suggestions?

    My guess is that you are looking at the DOC file with a laser printer or any other printer attached in the print menu. WORD reflows documents to be consistent with the attached printer. You are probably lucky that you made it through 75 pages before there was a problem. The 6 hours is also unreasonably long for the processing of 388 pages, unless everyone might have been a graphic. But even then, that is a huge amount of time.
    You are probably using PDF Maker (create PDF menu), but you should still attach the Adobe PDF printer and go through the document before printing or using PDF Maker. Also, go through the preferences in the create PDF menu to select only those things needed. Tags are good for recreating the DOC file (but it is better to not get rid of the DOC file in the first place). The other use for tags is accessibility -- that is often needed, but you might want to try turning it off to see the results.
    So, bottom line is to attach the Adobe PDF printer in the print menu and then go through the DOC file to check for the format you are concerned about and see if that duplicates what you are currently getting on p. 76. If it is the same, then you are seeing a standard process by WORD.

  • The sequence does not match with the original clip

    What I have learned about how to effectively match the sequence with original clip is by dragging the imported clip into the new item button, or right click the clip and click on "New Sequence from Clip" button. I did it exactly, however, like you can see in the image I attached, there is a black space under the clip on the sequence and the general quality of video and audio are worse than the original. Why is this happening? Please help.

    Is this what you are asking about?

  • Need help with SQL for selecting ID where the sequence does not match..

    I have the following dilemma:
    Database contains IDs as follows:
    Incident#, Case#, & Part Sequence#
    example
    Record 1
    Incident_Number = 123456
    Case_Number = 1
    Part_sequence = 1
    Record 2
    Incident_Number = 123456
    Case_Number = 1
    Part_sequence = 2
    Sometimes the user will delete (let's say) Record 2 after creating a new Record 3
    So now the sequencing goes as follows:
    Record 1
    Incident_Number = 123456
    Case_Number = 1
    Part_sequence = 1
    Record 2
    Incident_Number = 123456
    Case_Number = 1
    Part_sequence = 3
    Now there will no longer be a Part_Sequence 2
    Need a SQL to select all records where the maximum part sequence > than the count of Incident_number||'-'||Case_number
    I tried the following:
    select a.incident_number||'-'||a.case_number||'-'||a.part_sequence
    from chsuser.a_compl_summary a
    where a.entry_date >= '01-may-2011'
    and max(a.part_sequence) > count(distinct a.incident_number||'-'||a.case_number)I end up getting a ORA-00934: group function is not allowed here (highlighting on the Max(a.part_sequence) portion.
    Any suggestions/hints
    Thanks

    select  incident_number || '-' || case_number || '-' || part_sequence
      from  (
             select  incident_number,
                     case_number,
                     part_sequence,
                     max(part_sequence) over(partition by incident_number,case_number) max_seq,
                     count(*) over(partition by incident_number,case_number) cnt
               from  chsuser.a_compl_summary
               where entry_date >= DATE '2011-05-01'
      where cnt != max_seq
    /SY.

  • Exported nested sequence does not match previews

    I'm currently working on a project in which I've setup my main source video edits in to one master sequence. I have then nested this master sequence in to further sequences to be exported as highlight clips. When previewing the highlight clips within Premiere's work area and within the export tool all appears correct. Once the media file is exported however (no matter my codec choices) - the audio is correctly in sync with my edit but the video is massively out of sync. In fact what appears to be happening is that the video track is reset to the start of the parent master sequence. Now all of my nested highlight sequences export their video from the start of the master sequence. Any suggestions on how to address this would be greatly appreciated.
    Many thanks

    I'm not sure I fully understand the issue.  Perhaps some screen shots?

  • Primary layout does not match word document

    I named an RH project with a name the programmer cannot use.
    I tried to rename the project. 2 days later, I am in a mess. I
    bring up RH Explorer and click on its word document icon. I change
    information in the word document, compile and look at the 'View
    Primary Layout'. The document showing in the layout is not the
    document I just edited. How do I get the correct word document to
    be compiled and appear in the primary layout screen? Note: this
    happened after I lost RH and had to reinstall. See other
    posting.

    My guess is that you are looking at the DOC file with a laser printer or any other printer attached in the print menu. WORD reflows documents to be consistent with the attached printer. You are probably lucky that you made it through 75 pages before there was a problem. The 6 hours is also unreasonably long for the processing of 388 pages, unless everyone might have been a graphic. But even then, that is a huge amount of time.
    You are probably using PDF Maker (create PDF menu), but you should still attach the Adobe PDF printer and go through the document before printing or using PDF Maker. Also, go through the preferences in the create PDF menu to select only those things needed. Tags are good for recreating the DOC file (but it is better to not get rid of the DOC file in the first place). The other use for tags is accessibility -- that is often needed, but you might want to try turning it off to see the results.
    So, bottom line is to attach the Adobe PDF printer in the print menu and then go through the DOC file to check for the format you are concerned about and see if that duplicates what you are currently getting on p. 76. If it is the same, then you are seeing a standard process by WORD.

  • Error ITMS-9000 "File given does not match type: PNG image"

    Has anyone been able to solve this problem. All my images are PNG format. I am not sure if there is a problem with the cover or the body. This error was produced in iTunes Producer. Appreciate any help.
    Thanks. K

    My iTunes Producer is also churning out an error message:
    ERROR ITMS-9000: "Image color space 'CMYK' is not supported in image file '_cover.jpg'" at Book (MZItms
    How do i go about this?
    Thanks!
    alab

  • Archive sequence number from standby does not match primary

    I have two unix servers configured, one as primary and one as standby, both in 11.2.0.2. When I run the verification scripts, I noticed that my standby's archive log sequence does not match the primary.
    From standby:
    select database_role, open_mode from v$database; Result: PHYSICAL STANDBY, MOUNTED
    select max(sequence#) from v$archived_log; Result is null
    archive log list;Database log mode Archive Mode
    Automatic archival Enabled
    Archive destination /arch/standby
    Oldest online log sequence 0
    Next log sequence to archive 0
    Current log sequence 0

    Hello;
    I don't think you have Data Guard working.
    select max(sequence#) from v$archived_log; This should return a number.
    Do an alter system switch logfile; on the primary, I'm thinking the new log never makes it to your standby.
    Once you have this working consider running something like this from your Primary:
    SELECT name as STANDBY, SEQUENCE#, applied, completion_time from v$archived_log WHERE DEST_ID = 2 AND NEXT_TIME > SYSDATE -1;
    select max(sequence#) from v$archived_log where NEXT_TIME > sysdate -1;
    You can change the first query to include both the Primary and the Standby.
    Best Regards
    mseberg

  • Account currency does not match document currency

    Hi,
    We are using SAP Business ONE 2005 A PL 50.  After having created an invoice in USD for an export customer, the payment is made in the local currency amount. When trying to do the incoming payment in the local currency we get Sap error message 173-66 " ACCOUNT CURRENCY DOES NOT MATCH THE DOCUMENT CURRENCY". Is there a way we can do the incoming payment in local currency?
    Thanks,
    Monil

    Hiii Monilshah
    Please check this link for your settings
    https://websmp101.sap-ag.de/~form/sapnet?_FRAME=CONTAINER&_OBJECT=011000358700000610242007E
    thanks
    Rizz

  • Output map: Document Type does not match any of the given schemas

    On a send port, we have a map that uses a custom xslt. We were hoping to somehow design the map so the output was essentially a generic xs:any schema.  But unless we ad a reference from our map assembly to the assembly that holds the actual schema for
    the message pertaining to the map out put we get an error:
    The Messaging Engine failed while executing the outbound map for the message going to the destination URL "C:\BizTalk\Test\%MessageID%.xml"
    with the Message Type http://test#testmessage. Details:"Document type "outputtest#outputtestmessage" does not match any of the given schemas.
    Is there a way to avoid having to have the reference? 

    Hi ,
    In BizTalk messages are distinct from each other based on the message type . In your case http://test#testmessage (Namespace#RootNode)
    Now coming to your case have you verified whether you have a schema type matching the response is deployed with the solution. The easy way is to look into specific BizTalk application schema node .
    If not ,What you can do is to create a new schema for output having "TestMessage" as record and any element inside it. After that apply a mass copy
    funtiod from source t destination(in your case any type schema created).
    Thanks
    Abhishek

  • The document type does not match any of the given schemas. batching

    I am aggregating messages(batching) in Orchestation by calling pipeline. I have send pipeline where I have standard assemble component and custom pipeline in encode to assign some values .
    When I test it I get following error There was a failure executing the send pipeline: "Zones._870.Pipeline.Send870Pipeline, Zones.870, Version=1.0.0.0, Culture=neutral, PublicKeyToken=51b3a99d8425ff5a" Source: "ZonesAssignGUID" Send
    Port: "SendToAX870" URI: "C:\File_Out\Ingram\870\%MessageID%.xml" Reason: The document type "http://schemas.microsoft.com/dynamics/2011/01/documents/Message#Envelope" does not match any of the given schemas.  
    Can somebody help me how to resolve this issue? 

    Yes this is configured schema as envelope schema. This one is deployed in biztalk . I tried whatever suggest below query and return one record. Not sure but looks like error message misguiding here.
    select * from BT_DocumentSpec where msgtype like '%http://schemas.microsoft.com/dynamics/2011/01/documents/Message#Envelope%'

  • The document type does not match any of the given schemas

    Hi,
    I have created an envelope schema.To precisely process inbound envelope documents,in the xml disassembler component i have used the Documentspec and envelopespec properties.
    in the properties i have the the schema name,Assemblyname
    but i have got the error like The document type does not match any of the given schemas.
    I have verified the schemas have deployed properly.
    can you help me on this?

    Hi Sujith,
    As pointed out by Johns lot's of thing can cause this. You have to analyze lot of things, but this kind of error indicates that the message type that you are debatching is not deployed. For Example :
    If you are debatching on Order than Order schema should be deployed in the admin console.
    One more point that you need not to specifiy Documentspec and envelopespec properties until and unless there are multiple schema's of same message type deployed in different assembly. The dissasembler component will automaticaly disassemble the messages
    just looking after the body XPATH.
    Regards,
    Rahul Madaan

Maybe you are looking for