Comments (6)
Thanks for reporting this issue. If you would like to contribute a fix, please do so via a pull request. Otherwise, we will evaluate and prioritize the fix as appropriate.
from xliff2-object-model.
Upon further examination of the issue, this is by design. If you declare xml:space="preserve" then you will get the expected output. Perhaps you are expecting the default "processing mode" of the OM to be to preserve whitespace? In which case, this is not a bug but a design change.
from xliff2-object-model.
To clarify a bit more: this is the default behavior of the OM because it is based on .Net XmlReader/Writer which does not preserve by default.
from xliff2-object-model.
Looking more closely at the XML specification, I have to agree: default
means the reader does whatever it wants. I had read it as: "The reader can normalize or preserve". But it seems that complete deletion is valid too.
So it's not a bug.
But I would change this as a request for a change in behavior. While remove spaces on outer content is fine, it seems that completely removing spaces in elements that are content like <source>
and <target>
is probably unwise. I would expect to either normalize or preserve whitespace there.
I'll also post a not to answer your email in the XLIFF list.
from xliff2-object-model.
Thanks for reporting this issue. If you would like to contribute a fix, please do so via a pull request. Otherwise, we will evaluate and prioritize the design change request appropriately.
from xliff2-object-model.
Fixed with the following commits
b0dadfe
08178a6
from xliff2-object-model.
Related Issues (20)
- <mrk> and <sm> elements with type="generic" should have the "translate" attribute set explicitly HOT 2
- Validator rejects <mrk> tags without the "translate" attribute HOT 5
- <data> made of spaces only is not preserved. HOT 1
- The "priority" attribute of the <note> element is not properly validated HOT 2
- The character '/' in namespace URIs is not allowed by the serializer HOT 2
- Source with HTML content HOT 3
- ViewValidations method in sample code doesn't show the actual validation problem HOT 1
- Multiple Groups with the same Id should not be allowed HOT 2
- When 2 validation errors happen, exception should contain both errors HOT 1
- nuget package HOT 7
- xml:lang attribute should be allowed on some other elements than <source> and <target> HOT 5
- Enhancement request: Have option to open the file even if is not valid and return validation errors HOT 4
- Support for .Net Standard HOT 8
- CDataTag in Note HOT 1
- Unit has at least one <segment> or <ignorable> HOT 8
- Ongoing development? Next project iteration? HOT 2
- Custom namespace prefixes should be allowed for attributes from known namespaces
- This repo is missing important files
- Adding a Generic MarkedSpan element inside a Comment MarkedSpan element will change the type to "comment" HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.