Replies: 1 comment 5 replies
-
|
Hi @jelovirt, As John indicated that our team's aim is to modify MetadataSerializerImpl in order to generate a unique metadata tag named "usecase". To accomplish this, it's essential for us to extend the DitaRenderer class. However, we're currently facing a roadblock because DitaRenderer doesn't have a default constructor, rendering it unextendable. Additionally, DitaRenderer incorporates a private subclass named MainNodeRenderer, which through its constructor, invokes further functionality (TopicRenderer) that we're interested in customizing. At this juncture, we're evaluating two potential options: One is to develop a custom class for DitaRenderer and an associated subclass to facilitate further function calls, but this isn't typically considered the best practice. Alternatively, we're contemplating asking for your help to change the MainNodeRenderer class and the DitaRenderer's constructor to public, allowing us to extend them. Here's the current sequence of operations for better understanding: Our proposed flow, if we proceed with our customizations, would be as follows: Given these circumstances, we would appreciate your advice. What do you think would be the best course of action for our situation? Is there an alternative solution you would suggest? |
Beta Was this translation helpful? Give feedback.

Uh oh!
There was an error while loading. Please reload this page.
-
Hi @jelovirt, You may not recall, but I previously asked if we could use the lwdita SchemaProvider mechanism to convert certain Yaml header properties to a specialized DITA metadata element. In our scenario, the name of the property/metadata element is “usecase”. At the time you said that you wouldn’t recommend it. Our IA group is doing major refactoring of content from a component-based approach toward user-centric information design, which requires a retraining of our writers to make their content use-case based. Our React-based HTML5 viewer will leverage this metadata along with a SubjectScheme2Json-based hierarchical taxonomy to inform our semantic search capabilities and chatbots. We’d like to reduce any conceptual speed-bumps and avoid using or , since it adds noise to the visual semantics. We’d greatly prefer to generate a metadata element which our specialized RNG/DTDs support.
In looking at the implementation details of how LwDITA is implemented, our intern, Raghav, pointed out that the MetadataSerializerImpl class is what’s used to convert the Yaml header properties to the corresponding DITA metadata element.
It appeared initially to us that we might be able to subclass MetadataSerializerImpl in our SchemaProvider plugin and modify some methods to customize the metadata conversion. However, in looking at the lwdita implementation more closely, it looks like there might be some private members in the class hierarchy that we wouldn’t be able to access.
My team is new at this level of Java development, so certain questions that someone like Radu could answer himself easily by a thorough examination of the lwdita implementation, leveraging his many years of Java development, is beyond the current grasp of our team.
We’re also aware of the whole “square peg in a round hole” impedance mismatch between Markdown and DITA and that we might hit some dead-ends as we go.
We’d appreciate knowing if we’re indeed heading toward a dead-end with this usecase metadata request from our IA team.
Beta Was this translation helpful? Give feedback.
All reactions