android / android/project-replicator
xml parser skips files with DOCTYPE entries
- Lingua principale
- Kotlin
- Stelle
- 136
- Fork
- 40
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
```
> Task :my-module:gatherModuleInfo
e: Invalid xml file my-module/src/main/res/values/strings.xml
line 4; column 10: DOCTYPE is disallowed when the feature "http://apache.org/xml/features/disallow-doctype-decl" set to true.
]>
```
Then later we can refer to these standard entity names in the strings:
```
One last thing…
```
In this case, we prefer to use `…` here, because it is more meaningful for translators, and it is more grammatically correct. I.e., using `…` vs `...`. It also translates differently for some languages - for example, some languages prefer a different type of ellipsis, like the midline (`⋯`) or vertical ellipsis (`⋮`).
Inlining the unicode character can often be difficult for people reading the file to understand that it is a unicode character rather than its similar non-unicode counterpart (i.e., `'` apostrophe vs `’` right-single quotation or rsquo), which is why we use the `&#<>;` notation. And inlining that notation into the string, someone reading the file won't understand what that number represents unless they look it up.
So the workaround is using the named XML entity: it gives us the exact unicode representation, with a meaningful name, without compromising the character width which can have an impact on some older editors that aren't well equipped to handle multi-byte unicode characters.
Guida per i contributori
Apri la guida per i contributori
Direzione di ricerca
Inizia dal codice alla base del task :my-module:gatherModuleInfo e dal parsing di my-module/src/main/res/values/strings.xml. Verifica come il parser XML gestisce il DOCTYPE segnalato e aggiungi una copertura per entità denominate come …. Il lavoro è completato quando il file viene analizzato invece di essere ignorato e le entità denominate rimangono utilizzabili nelle stringhe.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- android, kotlin
- Ambito
- build-system
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 35/100