Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
darrenn-jackson opened this issue Jun 8, 2023 · 8 comments · May be fixed by #179
Open

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

darrenn-jackson opened this issue Jun 8, 2023 · 8 comments · May be fixed by #179

Comments

@darrenn-jackson
Copy link

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 jelovirt linked a pull request Jun 10, 2023 that will close this issue
@jelovirt
Copy link
Owner

jelovirt commented Jul 1, 2023

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
Copy link

fwegmann commented Jul 1, 2023

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
Copy link

kirkilj commented Jul 1, 2023

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
Copy link

kirkilj commented Sep 1, 2023

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
Copy link
Collaborator

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

@markgif
Copy link

markgif commented Nov 14, 2023

@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
Copy link

markgif commented Nov 14, 2023

@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
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants