Walking in the spirit doesn't transgress the 10 because doing so fulfills the righteousness demanded by the 10 since the spirit only does God's will. God is not interested in us following letters; he wants us to do righteousness, and righteousness can be accomplished without following the letter.
For example, if someone follows Christ's words to not hate, then he will not murder. A person can be completely ignorant of the 5th commandment and still fulfill the righteousness demanded by it.
Another example is the 4th commandment. The righteousness demanded by it is to know that God is sanctifying us.
Speak thou also unto the children of Israel, saying, Verily my sabbaths ye shall keep: for it is a sign between me and you throughout your generations; that ye may know that I am the LORD that doth sanctify you. Exodus 31:13
Moreover also I gave them my sabbaths, to be a sign between me and them, that they might know that I am the LORD that sanctify them. Ezekiel 20:12
We can be completely ignorant of the 4th commandment and still fulfill the righteousness demanded by it because we have the indwelling holy spirit as a sign that God is sanctifying us, and through faith cease from works of the flesh.
Israel ceasing from physical work on the sabbaths in order to know that God was sanctifying them (rather than their own works) was a shadow pointing to the reality of our ceasing from works of the flesh in order to know through the spirit that God is sanctifying us (instead of our own works doing so).