Name

p:os-info — The standard p:os-info step.

Synopsis

The p:os-info step returns information about the operating system on which the processor is running.

Output portPrimarySequenceContent types
result✔  application/xml 
Declaration
  |<p:declare-step xmlns:p="http://www.w3.org/ns/xproc" type="p:os-info">
  |   <p:output port="result" content-types="application/xml" primary="true"/>
  |</p:declare-step>
Implementation defined features

Description

The p:os-info step is a standard XProc 3.1 step. It is also described on XProcRef.org.

Extension attributes

cx:only-standard

If the cx:only-standard attribute is true, then only standard properties are returned. If it is not present, or has the value false, then all of the Java System properties are returned. Non-standard properties are returned in the cx: namespace.

If cx:only-standard is true, the result of p:os-info will be something like this:

 1 |<c:result xmlns:c="http://www.w3.org/ns/xproc-step"
   |          os-name="Mac OS X"
   |          user-home="/Users/someone"
   |          file-separator="/"
 5 |          user-name="someone"
   |          path-separator=":"
   |          os-version="15.7.3"
   |          cwd="/Volumes/Projects/xproc/xmlcalabash3/app"
   |          os-architecture="aarch64">
10 |   <c:environment name="EDITOR"
   |                  value="/opt/homebrew/Cellar/emacs-plus@31/31.0.50/bin/emacsclient"/>
   |   <c:environment name="EMACSCLIENT"
   |                  value="/opt/homebrew/Cellar/emacs-plus@31/31.0.50/bin/emacsclient"/>
   |   <c:environment name="HOME" value="/Users/someone"/>
15 |   <c:environment name="LANG" value="en_US.UTF-8"/>
   |   <c:environment name="TEXLIVE" value="/usr/local/texlive/2021"/>
   |   <c:environment name="HOMEBREW_CELLAR" value="/opt/homebrew/Cellar"/>
   |   <c:environment name="EMACS"
   |                  value="/opt/homebrew/Cellar/emacs-plus@31/31.0.50/Emacs.app/Contents/MacOS/Emacs"/>
20 |   <!-- ... etc ... -->
   |</c:result>

Without it, it will be something like this:

 1 |<c:result xmlns:c="http://www.w3.org/ns/xproc-step"
   |          xmlns:cx="http://xmlcalabash.com/ns/extensions"
   |          cwd="/Volumes/Projects/xproc/xmlcalabash3/app"
   |          file-separator="/"
 5 |          os-architecture="aarch64"
   |          os-name="Mac OS X"
   |          os-version="15.7.3"
   |          path-separator=":"
   |          user-home="/Users/someone"
10 |          user-name="someone"
   |          cx:apple-awt-application-name="Main"
   |          cx:file-encoding="UTF-8"
   |          cx:file-separator="/"
   |          cx:java-class-path="/Volumes/Projects/…"
15 |          cx:java-home="/Library/Java/JavaVirtualMachines/jdk-21.0.2.jdk/Contents/Home"
   |          cx:java-version-date="2024-01-16"
   |          cx:java-version="21.0.2"
   |          cx:java-vm-compressedOopsMode="Zero based"
   |          cx:stderr-encoding="UTF-8"
20 |          cx:stdout-encoding="UTF-8"
   |          cx:user-home="/Users/someone"
   |          cx:user-language="en"
   |          cx:user-name="someone"
   |          cx:user-timezone="Europe/London"
25 |          cx:user-variant=""
   |          cx:java-class-version="65.0">
   |   <!-- lots of additional attributes elided -->
   |   <c:environment name="EDITOR"
   |                  value="/opt/homebrew/Cellar/emacs-plus@31/31.0.50/bin/emacsclient"/>
30 |   <c:environment name="EMACSCLIENT"
   |                  value="/opt/homebrew/Cellar/emacs-plus@31/31.0.50/bin/emacsclient"/>
   |   <c:environment name="HOME" value="/Users/someone"/>
   |   <c:environment name="LANG" value="en_US.UTF-8"/>
   |   <c:environment name="TEXLIVE" value="/usr/local/texlive/2021"/>
35 |   <c:environment name="HOMEBREW_CELLAR" value="/opt/homebrew/Cellar"/>
   |   <c:environment name="EMACS"
   |                  value="/opt/homebrew/Cellar/emacs-plus@31/31.0.50/Emacs.app/Contents/MacOS/Emacs"/>
   |   <!-- ... etc ... -->
   |</c:result>

For consistency, periods in system property names are replaced by hyphens.