Jump to content

Recommended Posts

Posted

Hello,

I have a query regarding the regex flavor specified in the XML Schema: 'simpleTypes.xsd'

<xs:simpleType name="portName">
  <xs:annotation>
    <xs:documentation>A type for a port name string, allows letters, digits, dash, colon, underscore and period</xs:documentation>
  </xs:annotation>
  <xs:restriction base="xs:string">
    <xs:whiteSpace value="collapse"/>
    <xs:pattern value="\i[\p{L}\p{N}\.\-:_]*"/>  <!-- Which regex flavour is being used here for specification? -->
  </xs:restriction>
</xs:simpleType>

Can anyone elaborate on the XML schema specification specifically the attribute for the element pattern and attribute: value?

This regex pattern is available in IP-XACT 2014, and IP-XACT 2022 simpleTypes.xsd.

 

Regards,

Ameya Vikram Singh

  • 2 weeks later...
Posted

Hello @kock,

While reviewing the reference shared by you:

https://www.w3.org/TR/xmlschema-2/#dt-regex

Found another reference, and it seems the regular expression syntax used has been deprecated by the standard body:

https://www.w3.org/TR/2000/WD-xml-2e-20000814#NT-Letter

image.thumb.png.518ae9cac5475405b053033c60ab1e4f.png

Which has been updated to follow the EBNF notation.

As per the section 6 mentioned here:

https://www.w3.org/TR/xml/

or

https://www.w3.org/TR/xml/#sec-notation

It seems the newer revisions of IP-XACT specifications have not been updated to reflect the same as per the base XML specifications.

Regards,

Ameya

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...