Khushi Posted September 20, 2021 Report Share Posted September 20, 2021 Hello How I can specify a parameter in IP-Xact 2014 with default value is empty (e.g. empty string). If I just omit the value like <ipxact:value></ipxact:value> or <ipxact:value/>, the schema validation fails xml code : <ipxact:parameter parameterId="param1id"> <ipxact:name>param1</ipxact:name> <ipxact:value></ipxact:value> </ipxact:parameter> xmllint -noout -schema schema/1685-2014/index.xsd test.xml test.xml:146: element value: Schemas validity error : Element '{http://www.accellera.org/XMLSchema/IPXACT/1685-2014}value': [facet 'minLength'] The value has a length of '0'; this underruns the allowed minimum length of '1'. test.xml:146: element value: Schemas validity error : Element '{http://www.accellera.org/XMLSchema/IPXACT/1685-2014}value': '' is not a valid value of the atomic type '{http://www.accellera.org/XMLSchema/IPXACT/1685-2014}simpleBaseExpression'. test.xml fails to validate Thank you Khushi Quote Link to comment Share on other sites More sharing options...
kock Posted September 21, 2021 Report Share Posted September 21, 2021 Hi Kushi, IP-XACT does not allow that. Parameters always need to have a default value. Best regards, Erwin Quote Link to comment Share on other sites More sharing options...
Khushi Posted September 21, 2021 Author Report Share Posted September 21, 2021 Thank you Erwin We have a use case where we have a string parameter at component level with a default value "" (empty string) which can be overwritten per instance in the design. This is why I am looking for something like <ipxact:value></ipxact:value> or <ipxact:value/> Is there a way to express this ? Thank you Khushi Quote Link to comment Share on other sites More sharing options...
kock Posted September 22, 2021 Report Share Posted September 22, 2021 Hi Kushi, Yes, you can express it like this: <ipxact:parameters> <ipxact:parameter parameterId="myparamID" ipxact:resolve="user"> <ipxact:name>myparam</ipxact:name> <ipxact:value>""</ipxact:value> </ipxact:parameter> </ipxact:parameters> The value "" denotes an empty string. The value of the value element is an expression. An empty expression is not allowed. If you want to put a constant string then you have to quote it. You can override it in a design instance by referencing the parameterId attribute value. Best regards, Erwin Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.