Skip to content

Conversation

@1CMedicine
Copy link

  1. path with backslash in schemaLocation of xsd:import is valid path.
    for example
    <xs:import namespace="urn:hl7-org:v3" schemaLocation="coreschemas\datatypes-base.xsd"/>

  2. xsd which was imported should be compiled with the same values of options as main xsd

1) path with backslash in  schemaLocation of <xsd:import> is valid path.
2) xsd wich was imported should be compiled with the same value of options as main xsd
options.setDocumentSourceName(absoluteURL);
options.setCompileNoAnnotations(state.noAnn());
options.setCompileNoPvrRule(state.noPvr());
options.setCompileNoPvrRule(state.noUpa());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why these unrelated changes?

@1CMedicine
Copy link
Author

1CMedicine commented Dec 4, 2025

These changes are for "2. xsd which was imported should be compiled with the same values of options as main xsd".

When I compile xsd with "setCompileNoAnnotations=true" and xsd contains xs:import directive when imported xsd will compile with default value of setCompileNoAnnotations.

I've attached archive with schemas. Main scheme is CDA.xsd with imports. In coreschemas/voc.xsd there is an annotation where someone put xs:complexType. I guess it was mistake. Without directive setCompileNoAnnotations=true I get a compilation error. But scheme is valid and to prevent the compilation error it is necessary to set setCompileNoAnnotations=true not only for main file CDA.xsd and for coreschemas/voc.xsd too.

For setCompileNoPvrRule and setCompileNoPvrRule the same situation but not in this example.

@pjfanning
Copy link
Member

I'm not taking a zip file from someone that I don't know. Please create a GitHub repo with the raw files.

@1CMedicine
Copy link
Author

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

Successfully merging this pull request may close these issues.

2 participants