XQuery/System Properties

System Properties edit

You can get a system property by using the util:system-property() function

  util:system-property('vendor')
let $content :=
<div class="content">
   <h4>System Properties</h4>

   <div class="row col-md-7">
   <table class="table table-striped table-bordered table-hover table-condensed ">
        <thead>
           <tr>
              <th>Property</th>
              <th>Value</th>
           </tr>
        </thead>
        <tbody>
        {for $property in ('vendor', 'vendor-url', 'product-name', 'product-version', 'product-build', 'file.separator')
           return
               <tr>
                <td>{$property}</td>
                <td>{util:system-property($property)}</td>
              </tr>
        }
        </tbody>
   </table>
   
   <h4>Java Properties</h4>

   <table class="table table-striped table-bordered table-hover table-condensed ">
        <thead>
           <tr>
              <th>Property</th>
              <th>Value</th>
           </tr>
        </thead>
        <tbody>
        {for $property in ('file.separator', 'java.home', 'java.vendor', 'java.vendor.url', 'java.version',
        'line.separator', 'os.arch', 'os.name', 'os.version', 'path.separator', 'user.dir', 'user.home',
        'user.name')
           return
               <tr>
                <td>{$property}</td>
                <td>{util:system-property($property)}</td>
              </tr>
        }
        </tbody>
   </table>
</div>

See Also edit

XQuery/Environment Variables