Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Uniqueness of component names #17

Closed
kleihan opened this issue Jan 22, 2020 · 3 comments
Closed

Uniqueness of component names #17

kleihan opened this issue Jan 22, 2020 · 3 comments

Comments

@kleihan
Copy link
Member

kleihan commented Jan 22, 2020

Section 3.8.1.1 says "Like a field, a component or group has a numeric id attribute and a string name attribute. The schema enforces uniqueness of the id attribute among both types of components."

  1. Should it be "across" instead of "among", i.e. a component and a group cannot have the same id attribute?
  2. Why does the schema only enforce uniqueness of id and not also of name? in FIX we do not want the same name for two components, two groups or for a component and a group.

Section 3.8.1.1 further says "The scenario attribute of a component identifiers a use case; multiple components may have the same name, but the combination of name and scenario must be unique."

  1. Should it say "multiple scenarios" instead of "multiple components"?
    (4. I already caught the typo in "identifiers" and will correct it)
@donmendelson
Copy link
Member

Components and groups are now stored separately and have separate keys for uniqueness. (In the original design, components and groups were both stored together under <components>.)

In both cases, id+scenario must be unique and name+scenario must be unique.

Here's the schema declaration for components:

		<xs:key name="componentNameKey">
			<xs:selector xpath="fixr:component"/>
			<xs:field xpath="@name"/>
			<xs:field xpath="@scenario"/>
		</xs:key>
		<xs:key name="componentIdKey">
			<xs:selector xpath="fixr:component"/>
			<xs:field xpath="@id"/>
			<xs:field xpath="@scenario"/>
		</xs:key>

@kleihan
Copy link
Member Author

kleihan commented Jan 22, 2020

Ok, then the FIX standard will be more restrictive than Orchestra in general, should not be a problem.

SO the answer to #3 is yes, i.e. two components must not have the same name but two scenarios can? The latter is obvious as all elements have a scenario called "base".

@donmendelson
Copy link
Member

... all elements have a scenario called "base".

Not necessarily true. "base" is the default scenario name, but the author of an Orchestra file could choose to give every scenario an explicit name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants