XQuery/系统属性
外观
< XQuery
您可以使用 util:system-property() 函数获取系统属性。
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>