Here is a stab at it, perhaps it will help:
If you want this:
output: from-zone, to-zone, policy, state, index, sequence number
And you get the command output like this:
var $command-rpc = <command> "show security policies";
var $policies = jcs:invoke( $command-rpc );
Then I think you could output it in your desired format by using these location paths, but you might need to tweak these a little since I'm not too familiar with this output:
for-each( $policies/security-context/policies/policy-information ) {
var $source-zone =../../context-information/source-zone-name;
var $destination-zone =../../context-information/destination-zone-name;
expr jcs:output( $source-zone, "," , $destination-zone, "," , policy-name, "," , policy-state, "," , policy-identifier, "," , policy-sequence-number );
}
I based that on my reading of "show security policies | display xml". Let me know if that gives you what you want or not.