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

[Notepad++ Plugin] Validation fails with XML comments #89

Open
TheYorkshireDev opened this issue Apr 16, 2018 · 9 comments
Open

[Notepad++ Plugin] Validation fails with XML comments #89

TheYorkshireDev opened this issue Apr 16, 2018 · 9 comments

Comments

@TheYorkshireDev
Copy link

I have been using the excellent Notepad++ FHIR plugin you provide which includes validation of FHIR messages. I have noticed though that validation fails when you have a comment in an XML message.

I am aware that the JSON spec does not allow comments, but XML does allow for comments and since the FHIR can be written in XML I believe that the validation from the plugin should ignore XML comments.


Below is a a couple of messages to demonstrate the issue above.

XML FHIR message WITHOUT a comment that PASSES validation:

<?xml version="1.0" encoding="UTF-8"?>
<Bundle xmlns="http://hl7.org/fhir">
  <id value="urn:uuid:77831928-2a35-4c08-9496-8232323bf48c"/>
  <type value="message"/>
  <entry>
    <fullUrl value="urn:uuid:6080d4a7-5e05-45dc-96d5-f75329564d1f"/>
    <resource>
      <MessageHeader>
        <id value="644e1dd7-2a7f-18fb-b8ed-ed78c3f92c2b"/>
        <event>
          <system value="http://hl7.org/fhir/message-events"/> 
          <code value="admin-notify"/>
        </event>
        <receiver>
          <reference value="Organization/2"/>
        </receiver>
        <sender> 
          <reference value="Organization/1"/> 
        </sender>
        <timestamp value="2012-01-04T09:10:14Z"/>
        <source>
          <endpoint value="llp:10.11.12.13:5432"/>
        </source>
      </MessageHeader>
    </resource>
  </entry>
</Bundle>

XML FHIR message WITH a comment that FAILS validation:

<?xml version="1.0" encoding="UTF-8"?>
<Bundle xmlns="http://hl7.org/fhir">
  <id value="urn:uuid:77831928-2a35-4c08-9496-8232323bf48c"/>
  <type value="message"/>
  <entry>
    <fullUrl value="urn:uuid:6080d4a7-5e05-45dc-96d5-f75329564d1f"/>
    <resource>
      <MessageHeader>
        <id value="644e1dd7-2a7f-18fb-b8ed-ed78c3f92c2b"/>
        <!-- A small comment that fails validation -->
        <event>
          <system value="http://hl7.org/fhir/message-events"/> 
          <code value="admin-notify"/>
        </event>
        <receiver>
          <reference value="Organization/2"/>
        </receiver>
        <sender> 
          <reference value="Organization/1"/> 
        </sender>
        <timestamp value="2012-01-04T09:10:14Z"/>
        <source>
          <endpoint value="llp:10.11.12.13:5432"/>
        </source>
      </MessageHeader>
    </resource>
  </entry>
</Bundle>

Validation Output:

Severity Location Details Diagnostics Type
error MessageHeader Text should not be present at line 8 col 7   structure
@grahamegrieve
Copy link
Collaborator

This works ok for me - what version are you using?

@TheYorkshireDev
Copy link
Author

@grahamegrieve I am running the following version

Plugin Version: 1.0.28
FHIR Version: 3.0.1

@grahamegrieve
Copy link
Collaborator

well, that's not it. a screen shot?

@TheYorkshireDev
Copy link
Author

@grahamegrieve Attached is a screenshot of the fhir message and the output of validation.

image

If it is any use I am running Windows 10 Pro x64, and my Notepad++ version is v7.5.6 (32-bit)

@grahamegrieve
Copy link
Collaborator

grahamegrieve commented Apr 19, 2018 via email

@TheYorkshireDev
Copy link
Author

@grahamegrieve I have been validating the message using the Validation Resource button on the FHIR toolbox (4th button in).

image

Is there another way or a way which only validates locally?

@grahamegrieve
Copy link
Collaborator

grahamegrieve commented Apr 20, 2018 via email

@TheYorkshireDev
Copy link
Author

@grahamegrieve did you ever make any further progress on this?

@grahamegrieve
Copy link
Collaborator

grahamegrieve commented May 11, 2018 via email

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