Table 4-1. Simple path expressions
Example 4-1. Prefixed name tests
Input document (prod_ns.xml)
<prod:product xmlns:prod="http://datypic.com/prod"> <prod:number>563</prod:number> <prod:name language="en">Floppy Sun Hat</prod:name></prod:product>
Query
declare namespace prod = "http://datypic.com/prod";<prod:prodList>{ doc("prod_ns.xml")/prod:product/prod:number}</prod:prodList>
Results
<prod:prodList xmlns:prod="http://datypic.com/prod"> <prod:number>563</prod:number></prod:prodList>
Table 4-4. Unabbreviated and abbreviated syntax examples
Table 4-5. More complex steps (examples start with doc("catalog.xml")/catalog/
)
Table 4-6. Predicates (examples start with doc("catalog.xml")/catalog/
)
Table 4-7. Position in predicates (examples start with doc("catalog.xml")/catalog/
)