jelovirt / org.lwdita

LwDITA parser for DITA-OT
http://lwdita.org/
Apache License 2.0
25 stars 19 forks source link

`{.example}` header attribute does not work. #178

Open darrenn-jackson opened 1 year ago

darrenn-jackson commented 1 year ago

The draft spec currently says that you can label a Level-2 header as an <example> element by applying a Pandoc-style header attribute: {.example}. This does not get converted into a DITA/LwDITA <example> though:

<section id="example-example"><title>Example {.example}</title>

Tested with DITA-OT 4.0.2 and version 5.1.0 of the plugin.

jelovirt commented 1 year ago

Problem with implementing this is that the LwDITA spec uses attribute lists only for the example section and only for the single class value example. That mean if the MDITA document contains

## Title {.other}

This needs to be parsed as

<section>
  <title>Title {.other}</title>
</section>

Adding support for one magic token is more difficult than just supporting attribute lists everywhere and ignoring everything except .example.

Ping @fwegmann

fwegmann commented 1 year ago

True. Thanks for alerting me, Jarno. This particular usage for the example component has been added already in July 2020, even before my membership. I checked old minutes and could not find a discussion on attribute lists, not in general, and not regarding example in particular. I'll bring this to the table for the next SC meeting. I agree it's not helpful to have it defined on exactly one component only.

kirkilj commented 1 year ago

Hi @fwegmann, sorry we haven't touched base since Rotterdam. Nokia plans to use attribute lists everywhere we possibly can to improve semantic interoperability between Markdown and DITA. We're creating a collection of vs-code snippets with attribute lists that are available to R&D Markdown authors.

We're also developing our own Markdown schema providers using the new extension mechanism Jarno added to the lwdita plugin so we the option to override or complement the default behavior to control which Markdown constructs get converted to which DITA elements and attributes.

I have it on my todo list to watch the recording of your CIDM webinar this week.

kirkilj commented 1 year ago

I guess I missed the invite to the last OASIS LwDITA mtg on Aug 21st. Apologies. Last month, we did successfully implement our first schema-driven LwDITA extension to convert a specific YAML metadata name "usecase" into our DITA <usecase> topicmeta element, specialized from <category>. So now that we have a working example that builds in our VS-Code local environment as well as our Jenkins OT pipeline, we will look at attribute list issues next.

raducoravu commented 1 year ago

@kirkilj congratulations, we skipped August for the DITA OT meetup, we will start the meetup again this Thursday, @robander sent the invites.

markgif commented 9 months ago

@jelovirt In the Lightweight DITA meeting on Nov 13, we decided to remove the Pandoc-style heading attribute {.example}. We plan to look at this again in the future, but it is gone for now. If someone needs something like the example element in Lightweight DITA, they can use a section. Thanks!

markgif commented 9 months ago

@kirkilj Your activities with Markdown are extremely interesting and we would love to have you at another LwDITA meeting to discuss them. Same for your attribute activities. Also, I did not know there was an extension mechanism in the lwdita plugin and I'm checking it out.

jelovirt commented 1 month ago

The LwDITA draft still has {.example}, so keeping this open.