Re: New system property: p:platform?

> I think the idea is that you might write things like this:
> 
> <p:when test="p:system-property('p:vendor') = 'Acme Systems'
>               and p:system-property('p:platform') = 'Java'">
>   ... use some step you know is defined on the Java platform ...
> </p:when>
> <p:when test="p:system-property('p:vendor') = 'Acme Systems'
>               and p:system-property('p:platform') = '.NET'">
>   ... use some step you know is defined on the M$ platform ...
> </p:when>


If checking the platform is just that, I'm ok with it. My concern was 
the comment "It could also show OS, available RAM and CPU and other 
cheesy stuff." It looks too much like parsing HTTP's User Agent strings.

If we have a property that can convey more than one information item 
*and* the exact way this information has to be provided isn't specified 
by XProc, we'll get close to the UA string syndrome.

Furthermore, even if XProc defines the exact string format for 
p:platform, I think we don't want to parse p:platform strings in order 
to detect some feature/information. Therefore, the solution would be 
something like having different system properties for each feature 
(p:platform, p:cpu, p:os, p:ram, ...), which I think, IMHO, is out of 
scope for XProc.


Rui

Received on Tuesday, 3 July 2007 12:27:15 UTC