Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8585117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T21:58:53+00:00 2026-06-11T21:58:53+00:00

Here’s the thing… I have a query: for $item in doc(order.xml)//item $name:= doc(catalog.xml)//product[number =

  • 0

Here’s the thing… I have a query:

for $item in doc("order.xml")//item 
$name:= doc("catalog.xml")//product[number = $item/@num]/name 
return <item num="{$item/@num" (: a1 :)
    name="{$name}"             (: a2 :)
    quan="{$item/@quantity}"/> (: a3 :)

…. No commas, right? Later, it says “If the comma after firstresult were not there, it would be a syntax error because there would be two separate expressions in the query body,” about a different query:

declare boundary-space preserve;
declare namespace prod = "http://datypic.com/prod";
declare variable $catalog := doc("catalog.xml")//catalog;

<firstResult>{count($catalog/product)}</firstResult>               (: b1 :)
<prod:secondResult>{$catalog/product/number}</prod:secondResult>   (: b2 :)

Where is the line drawn between “separate queries” (b1 and b2) and “separate parts of the same query” (a1, a2, and a3)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T21:58:54+00:00Added an answer on June 11, 2026 at 9:58 pm

    hmm its just that…

    (a1, a2, a3) is a single element node, but spanned on multiple lines (thats allowed!)

    on the other hand (b1, b2) are two separate element nodes, and to make a sequence ya need to put a comma

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here are the tables I have: Table A which has entries with item and
Here is the issue I am having: I have a large query that needs
Here is the Javascript I currently have <script type=text/javascript> $(function() { $('.slideshow').hover( function() {
here is my configuration: http://domain.com (obviously fictitious name...) hosted on a server running Apache
Here's my problem I have this javascript if (exchRate != ) { function roundthecon()
Here is what I want to do. Use this HTML line and have the
Here is the problem that I am trying to solve. I have two folders
Here's the basic setup: I have a thin bar at the top of a
Here is my persistence.xml : <?xml version=1.0 encoding=UTF-8?> <persistence xmlns=http://java.sun.com/xml/ns/persistence xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance xsi:schemaLocation=http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd version=1.0>
Here is my problem : I have a post controller with the action create.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.