Repository navigation
Conversation
- extensions.xml: XML declaration first, values escaped, no placeholder schema location; documents.xml and component ids escaped (XML.escape). - bcf.version: empty Version element, as the schema requires. - .bcfv: 3.0 Color wraps its components in <Components>; AspectRatio only in 3.0, after FieldOfView / ViewToWorldScale; AuthoringToolId as a child element. - Exceptions use exceptionComponents (they repeated the selection, hiding the selected elements in other viewers). - Viewpoint files are named by guid; a title with "/" made nested folders. - Import reads 3.0 <Color><Components> as well as 2.1 <Color><Component>.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #825.
utils/xml.ts:XML.escape(the same helper as in fix(ids): decode XML entities on load and escape values on export #818, so the two merge cleanly).extensions.xml: XML declaration first, values escaped, placeholder schema location removed.documents.xml:FilenameandDescriptionescaped.bcf.version: empty<Version .../>..bcfv: 3.0<Color>wraps its components in<Components>(2.1 unchanged);AspectRatiowritten only for 3.0, afterFieldOfView/ViewToWorldScale;AuthoringToolIdas a child element; ids escaped.<Exceptions>usesexceptionComponentsinstead of repeating the selection.<guid>.bcfv, and the markup references the same name.<Color><Components>as well as 2.1<Color><Component>.Clipping planes in
.bcfv, thetoJSONsnapshot encoding and 2.1 extensions are left for separate changes (listed in the issue).Test
New
src/openbim/BCFTopics/bcf-export.test.tsexports a topic with&and<in its type, label and document, a viewpoint titledLevel 2/Northwith a selection, an exception and a colour, for both 2.1 and 3.0. It checks that every XML file is well-formed (fast-xml-parser'sXMLValidator), the extensions file starts with the declaration, values are escaped, the viewpoint file is<guid>.bcfvat the topic root and matches the markup, the 3.0 and 2.1 colour and camera layouts, and thatload()reads back the same colouring, selection and exceptions.packages/corevitest run64 of 64;tsc --noEmitand eslint on the changed files report the same as main.bcf.version,extensions.xml,documents.xml,markup.bcf,.bcfv) all validate withxmllint --schemaagainst BCF-XMLrelease_3_0/Schemas, and the 2.1markup.bcf,.bcfvandbcf.versionagainstrelease_2_1/Schemas.The
includeSelectionTag: truepath (AuthoringToolId) needs a loaded model, so it is covered by reading the schema, not by the test.What is the purpose of this pull request?
Before submitting the PR, please make sure you do the following:
feat(examples): add hello-world example).fixes #123).