Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

The root element is not declared

Aperta
#495 1 commento 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
32/100
Tipo di issue
Bug
Chiarezza
Da chiarire
Stato di attività
Tranquilla
Stack tecnologico
xml
Ambito
desktop, tooling

Direzione di ricerca

Riprodurre il report in XML Notepad usando l’esempio XML/XSD inline e il FirstTry.xsd separato selezionato tramite View / Schema. L’issue non indica alcun file di implementazione, test o singola modifica prevista; chiarire se l’obiettivo è l’associazione dello schema, la gestione degli schemi inline, la localizzazione o la generazione di XSD prima di definire i criteri di completamento.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Hello everybody,
I introduced xmlNotepad and the resulting file contains this:

<?xml version="1.0"?>
<root>
  <Prepare time="15d" />
  <Develop time="1y" />
  <Promote />
</root>

Everything works OK, but the status bar tells me that the root element is not declared.

So I created a file FirstTry.xsd, with this contents:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <xs:element name="root"/>
</xs:schema>

As soon as this file was selected in View / Schema, the mention disappeared, so problem solved, but is it admitted to put the schema in the xml file, as done for instance in the basket.xml sample?

<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
 <xs:element name="root"/>
</xs:schema>
<root>
  <Prepare time="15j" />
  <Develop time="1y" />
  <Promote />
</root>

Anyway xmlNotepad stops to claim for undeclared element only once the xsd file is selected in View / Schema.

Well, once done, with this sample we learn that the basket element cannot contain text, perhaps that is another topic.

By the way, I notice that by default this error span in the status bar is the only element in the user interface that appears in French. Perhaps because .Net is installed in French?

Perhaps I should open another thread for this: it would be very handy that the tool be able to generate an xsd file.

Did I make a mistake? The code is much easier to read if the line-feeds are executed. By default the "Code" button of the forum generates a tick before and one after, I then tripled the ticks manually to respect the line-feeds. Oh, and I notice the triple tick at the end has to be on a separate line, otherwise the following paragraphs appear on one line each, which is not necessarily the most readable. And same for the triple tick at the beginning, otherwise the first line of code is lost.

Lingua principale
C#
Stelle
1.2k
Fork
240
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Preparare l'ambiente

Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di microsoft/XmlNotepad

Tutte le issue di microsoft/XmlNotepad

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.