When a name references an element, such as a document, there is a link between the location where the name is mentioned and the document with that name. When the referencing name is altered, it may be of two reasons. - The location refers to the wrong element. The name is changed to a name that refers to the right element and the issue is resolved. The names of the elements need not to be changed.
- The name of the element is wrong. Now it may be that the referencing location refer to the correct element, in which case the reference name needs to be adjusted accordingly. Or the reference has the correct name, but the element with that name does not exist.
The projectdoc Toolbox provides two concepts to deal with the use cases of reason number 2. Section |
---|
| The Display Document Property Macro and its cousins are static links. They point to an element and in case the referenced elements is renamed, the reference is also altered. For instance a minutes document refers to a participant named Janc Doe. If someone identifies Janc as a misspelling of Jane, the reference in the minutes document still holds. Another example is the renaming of the concept of an Architecture Aspect to a Crosscutting Concern. The references are correct, but the name with which the element is referenced need to be changed. Static links may have a different label. If a Confluence link refers to a Confluence page, the label of the link and the title of the page match. The label may be different, for instance the label team members may reference a page with title Team Member. When the title is changed, the label will not, although the link still refers to the same page. |
Section |
---|
| The Name List Macro and its cousins are dynamic links. They define a property value and it is assumed that this value is correct. If there is an element that is identified by that name, a link is rendered. So the main aspect here is that a property name is associated with a value. The link is optional. Think of a dynamic link as the name of a variable in program code. If a software developer changes the name in one location, only the name at the given location is changed. If the developer wants to change the name of the variable in every location it is mentioned, then the refactoring tool "Rename a variable" is required. An example for the use of dynamic links is a risk severity of high, medium, and low. The property value for a document may be set to any one of these values. If the documentation architect decides that each of these values requires to be documented and all values should link to the document that defines its semantics, then these documents may be added at any time. Later these documents may be removed. The values for the property in each document are not altered by any of these actions. The power of dynamic links is that elements can be virtually referenced. A reference can be added, e.g. by a Static Document Link |
---|
document | PDAC:Template Author |
---|
| , without the need of the referenced document instance to actually exist. This is especially powerful if these values are defined in a central repository. |
Section |
---|
title | Artificial Properties related to Naming |
---|
| Since version 4.7 of the projectdoc Toolbox naming information is stored in form of artificial properties, named Static Document Link |
---|
document | projectdoc Metadata Property |
---|
| .This information is especially useful for refactoring tasks. To rename an element typically requires to locate all location where this name is currently used. Then the author can decide, which name references must also be altered. Here is a list of document properties that can be used to query for documents that define a given name. Display Table |
---|
doctype | document-property |
---|
select | Name, Short Description, Since| |
---|
where | $<Type>=[projectdoc Metadata Property Definition] |
---|
|
Here is a list of document properties that can be used to query for documents that use a given name by reference. Display Table |
---|
doctype | document-property |
---|
select | Name, Data Type|, Short Description, Since| |
---|
where | $<Type>=[projectdoc Metadata Property Reference] |
---|
|
|
Section |
---|
| Currently there are not many refactorings that are conducted automatically. A Confluence link, once the title of the referenced document is changed, will be automatically updated. In all other cases, changing the name of a property, the name of a macro parameter, or the identifier or tag of a text content currently users need to find and update all referencing locations manually. Here are some examples: Section |
---|
title | Changing a Property Name |
---|
| In case the name of a property in the Static Document Link |
---|
document | Document Properties Marker Macro |
---|
| is changed, users need to find all documents that refer to that name. The name may be uses in a Static Document Link |
---|
document | Display Document Property Macro |
---|
| , in the Select, Where, or Sort By parameter of a Static Document Link |
---|
document | Display Table Macro |
---|
| and many other locations.The artificial property Static Document Link |
---|
document | projectdoc Property Name References |
---|
| lists many of the locations that use a specific property. Caution Box |
---|
There may be locations that are not reflected by the artificial properties. For instance the use of property names in user macros or in REST clients. |
To query for documents using a given property name use the following constraint. Code Block |
---|
| $<projectdoc Property Name References>=[My old Property Name] |
Users need to open the documents in the result list of the query and adjust the property name accordingly. |
Section |
---|
title | Changing a matching Value |
---|
| In this example the Where parameter of a Static Document Link |
---|
document | Display Table Macro |
---|
| matches a property with a specified value. Code Block |
---|
language | text |
---|
title | Where Constraint |
---|
| $<Flags>=[Our old Value] |
The artificial property Static Document Link |
---|
document | projectdoc Property Control Value References |
---|
| lists the locations that use a specific value.To query for documents using a given value use the following constraint. Code Block |
---|
$<projectdoc Property Value References>=[Our old Value] |
Users need to open the documents in the result list of the query and adjust the property name accordingly. |
Section |
---|
title | Changing a Content Tag |
---|
| In case a tag of a Static Document Link |
---|
document | Content Marker Macro |
---|
| is altered, users need to find all documents from which this content is referred to. The Static Document Link |
---|
document | projectdoc Tags in Document Part References |
---|
| of each document with such a reference contains this tag. Code Block |
---|
| $<projectdoc Tags in Document Part Tag References>=[my-old-tag] |
Users need to open the documents in the result list of the query and adjust the tag name accordingly. |
Section |
---|
title | Changing a CSS Class |
---|
| Users may have a new CSS class to render some tables that are currently rendered with a generic class. Some of the tables that use this class should use the new class. To find the location where the generic table CSS class is used, use the following in your query. Code Block |
---|
| $<projectdoc CSS Class References>=[our-generic-table] |
Users need to open the documents in the result list of the query and adjust the CSS class name accordingly. |
|
Section |
---|
title | Tips working with Names |
---|
| Here are a couple of tips for users of the projectdoc Toolbox when working with names. Section |
---|
title | Refer to Self by Placeholder |
---|
| In case authors want to list documents that refer to the current document by some property should use the placeholder ${Name} . For instance there is a Risk Severity doctype that needs to list all documents with a property named Severity with that value. The value of the Where parameter of the Static Document Link |
---|
document | Display Table Macro |
---|
| would read: Code Block |
---|
| $<Doctype>=[change] AND $<Risk>=[${Name}] |
Some notes: - For convenience the doctype constraint is typically specified by the Doctype parameter.
- In case the property named Risk is changed to Risk Severity or the name of the doctype change is altered to change-request, then the
Static Document Link |
---|
document | PDAC:Documentation Architect |
---|
| needs to find all locations where the old names are used. - More information on defining queries is found in .
|
Section |
---|
title | Use Name References in Queries |
---|
| A Lucene search allows to specify the name of a property to match a given value. Code Block |
---|
language | text |
---|
title | Plain query with Lucene |
---|
| Risk=high |
To allow projectdoc to identify the left hand side of a constraint as a property name, it should be used like this: Code Block |
---|
language | text |
---|
title | Exact match query |
---|
| $<Risk>=[high] |
Code Block |
---|
language | text |
---|
title | Exact match list query |
---|
| $<Risk>~(high, medium) |
Only property names that are identified by $<...> or $[...] are recognized as property names. And only then are the values added to the artificial property named Static Document Link |
---|
document | projectdoc Property Names |
---|
| and can be found with queries. |
Section |
---|
title | Reference Document Name by Transclusion |
---|
| Transclusion macros allow to render the name of the document from which content is transcluded by the parameter Name as Heading.
Where the Static Document Link |
---|
document | Transclude Documents Macro |
---|
| has no alternative approach, the Static Document Link |
---|
document | Transclusion Macro |
---|
| may be wrapped inside a and add a title manually. By using the Name as Heading parameter the rendered title will always be in sync with the document name. |
Section |
---|
| When working with multiple spaces publishing may be tricky if the publishing tool does not support publishing multiple spaces at once. The projectdoc Toolbox allows to define delegate spaces for each space. The publishing spaces may define a coherent version of the spaces, while the publishing spaces define another delegate space. The names of the documents in the published and in the working space are the same. Only the space keys are different. In case a document with a dynamic link is copied, the link will automatically find the correct document identified by the name by looking up the space in which the document is stored. This approach requires that the names (in case of the which works on names) or title (in case of the Static Document Link |
---|
document | Dynamic Document Link Macro |
---|
| which works on titles) of the documents are unique. |
|
|