Yes, it is legal, provided the documentation is made available for adaption and distribution under the same framework.
If it isn't, any entity using the Apache 2.0 License for software will be inclined to use a similar license with similar freedoms for downstream recipients for its documentation (i.e. GFDL or Creative Commons BY-SA) - but it is worth checking out.
Provided the documentation is made available under the Apache 2.0 License, the section "How to apply the Apache License to your work" at the bottom this page tell you how to comply.
Also read the section "Redistribution" higher up on the page. It tells you what to retain to satisfy the copyright and attribution requirements of the work you are building upon.