-
Notifications
You must be signed in to change notification settings - Fork 10
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
Document structure parsing as a separate component #2
Comments
- The new name is a better match after the redesign. - Some minor refactoring of tarsqi module. Related to issues: #2 https://github.com/tarsqi/ttk/milestones/DocModel%20redesign
The elements list and its TarsqiDocParagraph members are still in place. All other changes were made. The question is whether it is a good idea to have the elements list and the doc_element tag as a tag in the ttk output that wraps around other ttk tags. This may not be resolved till I play with importing data in the ttk format. |
Having played with the ttk format a bit I am now convinced that having the element list is a bad idea. There are some messy dependencies between TagRepositories on TarsqiDocElements that should not be there and that prove hard to debug. So TarsqiDocElement will be retired. This is a bit involved and includes:
|
Document structure was treated differently from other information by having hard-wired the elements array with TarsqiDocElements. - Eliminated elements arrays, TarsqiDocElement and TarsqiDocParagraph - added convenience methods to get the docelement tags - updated all components to work with the new design Related to issue #2
Done in 1a9ffc3 |
Simple document structure is now done in docmodel.parsers, and simple document structure is built in into the TarsqiDocument class by having the elements variable with its list of TarsqiDocElements, in addition, the output ttk format groups everything by document element.
It is probably better to use separate components for document structure where these components would be sensitive to the --source option and maybe the --genre option as well. This would probably involve doing away with TarsqiDocElement and putting the TagRepositories directly into the TarsqiDocument. Document structure would then be added as its own set of tags.
This would make the docmodel code cleaner and delegate structure to its own component.
The text was updated successfully, but these errors were encountered: