Example of Calling the document() Function

Suppose you have the following XML document:

<?xml version="1.0" encoding="UTF-8"?> 
               
<books> 
               

              
<bookstore>bookstore1:bookstore1.xml</bookstore> 
                   
<bookstore>bookstore2:bookstore2.xml</bookstore> 
                   
<bookstore>bookstore3:bookstore3.xml</bookstore>
                   

                
</books>

The following query returns the bookstore elements:

/books/bookstore
               

            

Now suppose you pass this query to the document() function as follows:

document(/books/bookstore)
               

            

This query returns the root nodes of bookstore1.xml, bookstore2.xml, and bookstore3.xml.

Validating X12 Documents with XML Schemas

Either before or after transforming X12 EDI content, generated XML Schemas will make sure that we have all of the necessary components, our codes are all according to the standard codelists, and every little delimiter is in the right place.

Text File to XML

Stylus Studio provides several easy-to-use document wizards that allow you to quickly convert text files to XML. Create XML from text and EDI, create XML Schema from EDIFACT, and more!

Java Code Generation

The Stylus Studio Java Codce Generator lets you generate deployable Java code for XQuery and XSLT at the push of a button!

DTD vs. Schema

Stylus Studio provides tools for working with both W3C XML Schema and DTD's - this tutorial explains what the differences are between the two, providing a technical comparison of DTD vs Schema.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member