[Openstack-docs] validate.py - images?

David Cramer david.cramer at rackspace.com
Wed Sep 11 16:59:29 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 09/11/2013 12:22 AM, Christian Berendt wrote:
> On 09/11/2013 09:16 AM, Andreas Jaeger wrote:
>> Christian, can't we remove the "href.endswith('.xml')" condition
>> completely?
> 
> That will not change the behaviour. At the moment we scan all XML
> files for "//xi:include" and if the href attribute contains a
> modified file the book is marked as modified and will be built.
> 
> To also build a book if a used graphic is modified we have to
> extend the scan of all XML files.

Just to confirm: your algorithm looks at a book file for xincluded
files, then recursively checks those files for xincludes etc. If any
files that are xincluded into the book or any that are dependencies of
the included files have changed, then you build and publish the book,
correct?

> Is imagedata the only element used to include images?

Yes, IIRC imagedata is the only element you have to worry about.

I don't see a reason to check the file extension. If something is
referred to either by the href or fileref attribute in a book xml file
or in its dependencies has changed, then you need to rebuild that book.

The only case that would remain is if you updated the version of the
clouddocs-maven-plugin that the docs are built with you might want to
force all of the docs to rebuild even if nothing has changed in the
source of the doc (i.e. if you modified the clouddocs-maven-plugin to
add "log a bug links" to ever page, you might want to rebuild all
docs, changed or not, to pick up the new feature).

Regards,
David
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBAgAGBQJSMKFxAAoJEMHeSXG7afUhPCoIAIMQgjWg7SsmzForRxzJ6Odz
WAoxfdBlp1giwZLIW/UJUnhPrq4D5I32wIZPteuyVDUK/1uUfuKIPe0clxzVgmzN
nGtjGkgTaJWHml2BgI8vLkRtH3Ue5+71taQkLqFL3X3pvlyOx4gLepz61Zw00A4p
cTbXSuddOa9q6l3yScV6jZNnEYrxBD5ZS6dDQ38StlDVcG02u9EIo293Zu7VvlbF
5U+go9a2UuJfTlicAQ8CioLoXT8nQY2LmfEXLhOZjGMa/u4pUy6djBSGeWvxQApx
JmDa/5xr5py722z+zfKgV+wfY1TvK/3Yenhk4riVsbJX2kmyc5K66Z8BI3nfNbo=
=FXuh
-----END PGP SIGNATURE-----



More information about the Openstack-docs mailing list