Skip to content

Enhancing ActionData#221

Open
TuThoThai wants to merge 6 commits into
v2.3-wipfrom
sx_cr_actiondata_enhancement
Open

Enhancing ActionData#221
TuThoThai wants to merge 6 commits into
v2.3-wipfrom
sx_cr_actiondata_enhancement

Conversation

@TuThoThai

Copy link
Copy Markdown
Collaborator
  • Change in Prompt to embed MIME content type
  • Addition of Url with a specific type to embed MIME content type and language
  • All served with an example

This PR is to be discussed and merged before PR #210 that adds PublishToAudioAction. To include Url in ActionData addresses @skinkie comment

- Change in `Prompt` to embed MIME content type
- Addition of `Url` with a specific type to embed MIME content type and language
- All served with an example
@TuThoThai TuThoThai added SX For everything SIRI-SX Needs CEN documentation Update These require CEN documentation update to match XSD & examples labels May 18, 2026
@TuThoThai TuThoThai added this to the v2.3 milestone May 18, 2026
@skinkie

skinkie commented May 18, 2026

Copy link
Copy Markdown
Contributor

I would prefer that the Prompt itself is not changed in function. Hence if an organisation wants to do something with predefined markup that is fine, they can use Url text/html or application/xhtml+xml or maybe even something like image/svg+xml but lets keep the sane default just plain text.

@TuThoThai

Copy link
Copy Markdown
Collaborator Author

Since Url points to a different resource, regardeless of its type, I thought it would be nice to allow people to have a bit more choices in the format for text content in Prompt while taking advantage of adding the content-type attribute.

@thbar thbar left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I did a first round mostly on "details". I will mull over the general design & see if I can comment more on the overall structure (need more time).

@@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- edited with XMLSpy v2025 (x64) (https://www.altova.com) by Tu-Tho Thai (Private) -->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- edited with XMLSpy v2025 (x64) (https://www.altova.com) by Tu-Tho Thai (Private) -->

Presumably we want this removed?

@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) Copyright 2005-2012 CEN SIRI -->
<Siri xmlns="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:d2="http://datex2.eu/schema/2_0RC1/2_0" version="2.0" xsi:schemaLocation="http://www.siri.org.uk/siri ../../xsd/siri.xsd">

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The example uses things only found in the upcoming v2.3.0, so presumably this should be (?):

Suggested change
<Siri xmlns="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:d2="http://datex2.eu/schema/2_0RC1/2_0" version="2.0" xsi:schemaLocation="http://www.siri.org.uk/siri ../../xsd/siri.xsd">
<Siri xmlns="http://www.siri.org.uk/siri" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:d2="http://datex2.eu/schema/2_0RC1/2_0" version="2.3.0" xsi:schemaLocation="http://www.siri.org.uk/siri ../../xsd/siri.xsd">

@@ -0,0 +1,131 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- (C) Copyright 2005-2012 CEN SIRI -->

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<!-- (C) Copyright 2005-2012 CEN SIRI -->
<!-- (C) Copyright 2005-2026 CEN SIRI -->

Comment thread xsd/siri_utility/siri_types.xsd Outdated
</xsd:annotation>
<xsd:simpleContent>
<xsd:extension base="NaturalLanguageStringStructure">
<xsd:attribute name="content-type" type="xsd:string" default="text/plain" use="optional">

@thbar thbar May 18, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe having an attribute cased like content-type (instead of camelCase contentType) is not common in this codebase ; also it feels off in XML in general. Although it maps a HTTP header with that exact name, I would probably go camelCase:

Suggested change
<xsd:attribute name="content-type" type="xsd:string" default="text/plain" use="optional">
<xsd:attribute name="type" type="xsd:string" default="text/plain" use="optional">

(and adapt accordingly elsewhere)

@TuThoThai

Copy link
Copy Markdown
Collaborator Author

During the SIRI-SX meeting of 19 may 2026, the assessment was that the PR is not yet ready for review. Discussed changes / paints points are to be addressed.
Moving back this PR to draft to work on it and make it ready for review on 12 June 2026

@TuThoThai
TuThoThai marked this pull request as draft May 19, 2026 13:34
TuThoThai and others added 2 commits July 15, 2026 19:34
- Adding the element Url in ActionDataStructure
- Adding the attribute contentType for both Prompt and Url elements
- Defining the enumeration related to contentType
@TuThoThai
TuThoThai marked this pull request as ready for review July 15, 2026 17:34
@TuThoThai

Copy link
Copy Markdown
Collaborator Author

Based on feedback from the meeting of 19 May 2026, I made the following changes in the PR:

  • keeping the addition of the element Url in ActionDataStructure
  • adding the attribute contentType in both Prompt and Url
  • making the attribute contentType into an enumeration with a very limited list of allowed MIME types

…ndurl.xml

delete faulty example from previous try
@TuThoThai
TuThoThai requested a review from thbar July 16, 2026 06:56
- Addition of URL in ActionData
- Change of Prompt to include the type of content being shared directly, using an enumeration to limit of options
- Addition of annotation to clarify the use

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we really going to write this here?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, could be removed but we need to discuss what to do with all of the comments on the top of each XSD

@TuThoThai TuThoThai left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per discussion with @haeckerbaer, @skinkie and @thbar on 16 July 2026

</xsd:attribute>
<xsd:attribute ref="xml:lang" use="optional">
<xsd:annotation>
<xsd:documentation>If the content of the resource is in a single language, specifies which one.</xsd:documentation>

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should encore that only one combination of contentType and xml:lang is allowed

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

Labels

Needs CEN documentation Update These require CEN documentation update to match XSD & examples SX For everything SIRI-SX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants