Jump to content

IPXact parameter with empty/no value


Khushi

Recommended Posts

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

Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...