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

New tool for detecting broken XML files #211

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Conversation

alfsb
Copy link
Member

@alfsb alfsb commented Dec 17, 2024

While working on non idempotency of manual builds, I found out there are broken XML files, so I included a tool to check this. And there are several broken, wrong encoded or otherwise auto generated files added in several languages:

  es
Broken XML file:
  Path:  /home/andre/phpdoc-test/es/reference/cmark/book.developer.xml [7,85]
  Error: Invalid URI: {PATH_TO_DOCBASE}/entities/ISO/xhtml1-lat1.ent

Broken XML file:
  Path:  /home/andre/phpdoc-test/es/reference/componere/book.developer.xml [7,85]
  Error: Invalid URI: {PATH_TO_DOCBASE}/entities/ISO/xhtml1-lat1.ent

  fr
Broken XML file:
  Path:  /home/andre/phpdoc-test/fr/chmonly/search.xml [108,14]
  Error: Opening and ending tag mismatch: entry line 105 and row

  it
Broken XML file:
  Path:  /home/andre/phpdoc-test/it/reference/dom/reference.xml [37,59]
  Error: Input is not proper UTF-8, indicate encoding !
Bytes: 0xF9 0x20 0x66 0x65

  ja
Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/chmonly/usingchm.xml [175,14]
  Error: Opening and ending tag mismatch: entry line 168 and row

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/entities.functions.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/entities.mysql_xdevapi.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.baseresult.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.client.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.collection.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.collectionadd.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.collectionfind.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.collectionmodify.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.collectionremove.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.columnresult.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.crudoperationbindable.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.crudoperationlimitable.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.crudoperationskippable.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.crudoperationsortable.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.databaseobject.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.docresult.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.executable.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.executionstatus.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.expression.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.result.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.rowresult.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.schema.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.schemaobject.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.session.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.sqlstatement.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.sqlstatementresult.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.statement.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.table.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.tabledelete.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.tableinsert.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.tableselect.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.tableupdate.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/ja/reference/mysql_xdevapi/mysql_xdevapi/entities.warning.xml [1,1]
  Error: Start tag expected, '<' not found

  pl
Broken XML file:
  Path:  /home/andre/phpdoc-test/pl/reference/dir/entities.directory.xml [1,1]
  Error: Start tag expected, '<' not found

Broken XML file:
  Path:  /home/andre/phpdoc-test/pl/reference/dir/entities.functions.xml [1,1]
  Error: Start tag expected, '<' not found

  zh
Broken XML file:
  Path:  /home/andre/phpdoc-test/zh/reference/fileinfo/entities.functions.xml [1,1]
  Error: Start tag expected, '<' not found

@alfsb alfsb requested a review from Girgias December 18, 2024 11:27
@alfsb
Copy link
Member Author

alfsb commented Dec 18, 2024

I'm thinking of calling into this script as the last step on configure.php. Note the all manual builds, beside these errors, so it's more of a QA issue (and I'm wary of adding another step that opens all files before first XML validation.

@alfsb
Copy link
Member Author

alfsb commented Dec 20, 2024

Pinging doc-ja people, as they will be most affected (there is no @ doc-ja ?).

@zonuexe @KentarouTakeda @mumumu , these file names that contains /entities. are to be removed, as they are old, auto-generated files.

@alfsb
Copy link
Member Author

alfsb commented Dec 21, 2024

TODO for myself: document and disable extra validation.

@alfsb
Copy link
Member Author

alfsb commented Dec 28, 2024

Reverted to strict testing. I plan to merge this in January, but not integrate in configure.php before renewing all other qaxml tools.

@alfsb
Copy link
Member Author

alfsb commented Dec 28, 2024

Also, this tool may be wrongly placed at/as scripts/translation/qaxml.php, and may be better placed at/as scripts/xml-broken.php or scripts/xml-valid.php. Suggestions?

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.

1 participant