Hi Manuranga,

Is it feasible to support something like below?
> [carbon.yaml]/transports/xyz/port = $sys->https.port
>

Internally, we convert yaml file to an xml file. Then we apply these new
configurations using XPath operations. XPath does not support
*/transports/xyz/port* syntax where *xyz* is the value of a sub element. So
it is not feasible.

Consider the following example.

transports:
  - transport:
      name: abc
      port: 8000
      secure: false
  - transport:
      name: xyz
      port: 9000
      secure: true

When we use *xyz* like you mentioned above, we'll have to go through all
child elements(name, port, secure) of both transports to find the value
*xyz* because we don't exactly know which child element contains this *xyz*
value.
But in the current format, it specifies that the *name *sub element should
contain the *xyz* value. So it is clearer as well.

Thanks,
Shan.

-- 
Shan Mahanama
Software Engineer, WSO2 Inc. http://wso2.com
<http://l.facebook.com/l.php?u=http%3A%2F%2Fwso2.com&h=gAQEswASa>
Email: [email protected]
Mobile: +94712000498
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to