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

Add a Description of Dublin Core Outputs for XHTML Based on DITA XML Inputs #125

Closed
KeithIXIASOFT opened this issue Dec 12, 2016 · 9 comments
Labels
stale No recent activity. May be closed soon.

Comments

@KeithIXIASOFT
Copy link

KeithIXIASOFT commented Dec 12, 2016

When someone outputs default XHTML from DITA content, DITA metadata is converted to its Dublin Core equivalents. This information is not currently covered in the DITA-OT documentation.

After doing some research as to how this works, I have determined which DITA tags produce their equivalent Dublin Core outputs in XHTML. The attached PowerPoint slides
DITA-OT and Dublin Core.pptx describes the relationship between DITA and the Dublin Core it outputs that I have discovered.

I'd recommend the following topic breakdown to cover things off:

  • What is Dublin Core?
  • Dublin Core Expression in XHTML Output (from the DITA-OT)
  • DITA Metadata and Dublin Core Expressed by the DITA-OT

I would be happy to help, and I would also consider writing draft topics on this subject to contribute to the DITA-OT docs.

@robander
Copy link
Member

There's one note of caution I'd have here. I don't think we have any other spot in the documentation where we explicitly document the mapping of a DITA element to a specific HTML style or element. There's good reason for that - the renderings are not absolute (not part of the spec), commonly overridden, and might change from release to release.

Having our documentation contain a list of specific mappings seems to provide a stronger-than-warranted guarantee that the mappings are A) correct, and B) set in stone.

@KeithIXIASOFT
Copy link
Author

I take your point. Perhaps a more generalized addition that talks about what Dublin Core is and describing only the outputs that are available without explicitly tying them back to specific DITA tags?

@robander
Copy link
Member

One possible approach - we could update the X/HTML topics to state that for these transform types, DITA metadata elements are currently rendered as Dublin Core metadata. If we need a whole topic devoted to it, we could instead make a "DITA Metadata" topic under the "DITA specification support" section.

Either way - I don't think we should go in depth describing Dublin Core itself, but should instead link to dublincore.org for reference (maybe to http://dublincore.org/metadata-basics/ or some other high level overview page). After all, we're not experts on that initiative, and shouldn't try to describe a subject that will always be better described on their own site.

So - to grossly paraphrase, something like "When possible we convert DITA metadata to Dublin Core. It's a global initiative for encoding metadata, learn about it [here]. We currently do all of this for all of our HTML and XHTML based transform types."

@KeithIXIASOFT
Copy link
Author

That seems like a sensible approach. I think that a statement along those lines definitely needs to be in the DITA-OT docs somewhere.

I will likely come up with a separate blog post that describes things in more detail from my research, if that's okay with you. It would be, of course, unofficial.

@robander
Copy link
Member

I have no problem with a blog post on the subject. It shouldn't actually require that much research - the mappings aren't intentionally hidden, and should all be found in
plugins/org.dita.xhtml/xsl/xslhtml/get-meta.xsl

You can search for "DC." to locate any spot in there where we generate Dublin Core values. For most of those - probably not all, but definitely most - it will be clear from the XSLT context how the mapping is created. For example, one of the first you'll find in the file is this:

<xsl:template match="*[contains(@class,' topic/source ')]/@href" mode="gen-metadata">
  <meta name="DC.Source" content="{normalize-space(.)}"/>
  <xsl:value-of select="$newline"/>
</xsl:template>

This is generating the DC.Source metadata value, based off of *[contains(@class,' topic/source ')]/@href -- that is, based off of the @href attribute on the element with topic/source in the class value. In other words, <source href="this-maps-to-DC.source">.

@KeithIXIASOFT
Copy link
Author

Very cool! I had not gone digging in the DITA-OT code, but now that you describe it is obvious that I should've looked there.

Is it worth mentioning where the DC output values are stored in the DITA-OT docs, or is that something that could also conceivably change over time/releases?

@robander
Copy link
Member

I wouldn't mention that file in the docs - while it's possible we would even switch from Dublin Core to some other representation at some point, it's much more likely that mappings will move to a new file or that the file will be moved / renamed. Generally speaking, I'd expect any documentation of a specific XSL file name or location to get out of sync before long.

@KeithIXIASOFT
Copy link
Author

That's a fair point. Given that I am hoping to bring you some optional Schema.org mapping of metadata values at some point in the future (fingers-crossed) this makes sense.

@stale
Copy link

stale bot commented Feb 6, 2019

This issue has been automatically marked as stale because it has not been updated recently. It will be closed soon if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale No recent activity. May be closed soon. label Feb 6, 2019
@stale stale bot closed this as completed Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale No recent activity. May be closed soon.
Projects
None yet
Development

No branches or pull requests

2 participants