0

I have a MusicXML-File, beginning with

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE score-partwise PUBLIC "-//Recordare//DTD MusicXML 2.0
partwise//EN" "http://www.musicxml.org/dtds/partwise.dtd">

The file was generated with museScore and seems to be valid XML. Opening this file in MS VS pro 2013 I get nine errors, among others: "Fehler bei WebPermission-Anforderung für Umleitungs-URI."

    <accidental>sharp</accidental>
    <stem>up</stem>
    <beam number="1">continue</beam>            <---here (line 128)
    </note>
  <note default-x="265.48" default-y="-65.00" dynamics="92.22">
    <pitch>
      <step>G</step>
      <alter>1</alter>
      <octave>3</octave>
      </pitch>
    <duration>8</duration>
    <voice>1</voice>
    <type>eighth</type>                         <---here
    <accidental>sharp</accidental>
    <stem>up</stem>
    <beam number="1">continue</beam>
    </note>
  <note default-x="303.52" default-y="-60.00" dynamics="84.44">
    <pitch>
      <step>A</step>
      <alter>1</alter>
      <octave>3</octave>                        <--- and here (line 147)
      </pitch>
    <duration>8</duration>

whereas previous occurences did not bother the compiler.

I have no cue what is the underlying cause for this behavior?

1 Answers1

1

These errors refer actually to the lines in partwise.dtd (thumbs down for VS) and mean that VS failed to access included modules (.mod) due to security policy issues (different zones, etc.).

If you don't want to spend your precious time setting up security stuff, just set up your validation environment to work locally:

  1. Disable the option: Visual Studio > Menu Tools > Options > Text Editor > XML > Miscellaneous > "Automatically download DTDs and schemas".

  2. Download MusicXML Schema (XSD) and extract the whole content to a folder.

  3. Edit the schema, e.g. musicxml.xsd, to import only from local files:

    <xs:import (...) schemaLocation="xlink.xsd"/>
    <xs:import (...) schemaLocation="xml.xsd"/>
    
    (In this case, both dependencies will be already available in current folder.)
  4. Open your XML file in VS and add the used schema to its properties (details in this answer).

Hint: If you get warnings about attributes being already declared, go to related file, then XML Menu > Schemas and mark double references as not to be used.

Community
  • 1
  • 1
alex.dev
  • 451
  • 1
  • 3
  • 11