mpdot/doc/Check_DITA_xml_link_validity.txt
author Michel Szarindar <Michel.Szarindar@Nokia.com>
Fri, 23 Apr 2010 20:45:58 +0100
changeset 2 932c358ece3e
permissions -rw-r--r--
Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
     1
License
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
     2
=======
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
     3
Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved.
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
     4
This component and the accompanying materials are made available under the terms of the License 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
     5
"Eclipse Public License v1.0" which accompanies this distribution, 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
     6
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html".
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
     7
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
     8
Introduction
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
     9
============
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    10
Use the Linkcheck utility to check link validity in DITA xml files. 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    11
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    12
There are many ways in which a link can be broken in DITA, using the linkchecker will not only tell you how many links are 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    13
broken but also how they are broken.
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    14
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    15
For example:
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    16
* the integrity of ids is checked
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    17
* files are checked to see if they are orphaned 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    18
* checks for cyclic references in maps
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    19
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    20
Prerequisites
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    21
=============
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    22
Run the linkcheck utility on DITA content that is ready to be built by the DITA Open Toolkit. This is content that has been 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    23
created by Orb. See the Orb README.txt document for instructions if you haven't already done so. 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    24
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    25
Running the linkcheck utility
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    26
=============================
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    27
For basic content analysis pass the path to your content to the linkchecker. For example:
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    28
python linkchecker.py C:\epoc32\release\doxygen\dita
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    29
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    30
This gives this analysis:
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    31
CMD: linkcheck.py C:\epoc32\release\doxygen\dita
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    32
2010-03-10 14:25:19,194 INFO     DitaFileSet starting to read...
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    33
2010-03-10 14:26:16,569 INFO     DitaFileSet.finalise() start...
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    34
2010-03-10 14:26:18,023 INFO     DitaFileSet.finalise() done.
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    35
================================ Statistics ===============================
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    36
                Maps:         12 [     0.000 M]
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    37
            Non-maps:       1800 [     0.002 M]
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    38
               Files:       1812 [     0.002 M]
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    39
               Bytes:   31891999 [    30.415 M]
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    40
                 IDs:      23208 [     0.022 M]
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    41
                Refs:      13928 [     0.013 M]
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    42
           Read time:     57.385 (s)
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    43
       Analysis time:      1.447 (s)
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    44
===========================================================================
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    45
============================== Error Summary ==============================
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    46
Code      Count Error
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    47
----      ----- -----
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    48
 401         63 Multiple id="..."
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    49
 410        349 Can not resolve reference to file "..."
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    50
 411         32 Can resolve reference to file "..." but not to fragment "..."
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    51
 414          1 topicref element with format="ditamap" does not match target root element "..."
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    52
 418       3828 Unknown referencing element "..." does not match target root element "..."
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    53
 419       2133 Unknown referencing element "..." does not match target element"..." for id="..."
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    54
 505         75 Duplicate id="..." in files: ...
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    55
 600       1311 Topic id="..." is not referenced by any map
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    56
 700         11 More than one top level map exists: ...
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    57
===========================================================================
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    58
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    59
Options
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    60
=======
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    61
The errors messages above can be expanded by using the command --file=specific. This will give all errors with the "..." filled 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    62
in for each error found. This may return a lot of information, so use --errors with a space seperated list of the codes to report 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    63
on. For example: 
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    64
python linkcheck.py --errors=700 --file=specific C:\epoc32\release\doxygen\dita
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    65
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    66
Returns the generic analysis table above plus this specific list:
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    67
Specific problems:
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    68
More than one top level map exists: C:/epoc32/release/doxygen/dita/GUID-1CDC3FD9-BD7B-3790-9856-607D01F59FE4.ditamap
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    69
More than one top level map exists: C:/epoc32/release/doxygen/dita/GUID-2F2463E0-6C84-3FAB-8B60-57E57315FDEB.ditamap
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    70
More than one top level map exists: C:/epoc32/release/doxygen/dita/GUID-445218BA-A6BF-334B-9337-5DCBD993AEB3.ditamap
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    71
...
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    72
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    73
More options
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    74
============
932c358ece3e Orb version 0.1.9. Fixes Bug 1965, Bug 2401
Michel Szarindar <Michel.Szarindar@Nokia.com>
parents:
diff changeset
    75
Use --help to see all options and -? to show all the tests that are performed and their codes.