Skip to content

are 'fine-grained' examples for transforms possible? #73

Open

Description

@NielsHoffmann

I'm working on a XSLT2 / saxonche custom transformer (https://github.com/Geonovum-labs/bblocks-xslt2-transform-plugin) to test, demonstrate and showcase the differences between the XSLT1 / libxml built in transformer and a XSLT2/3 capable transformer required for the more complex transformation logic in the iso19139 to dcat transforms.

I created two building blocks in our new demo registry:

So I have to xml based transformers and in the examples tab both xslt's show up for both examples, but the xslt is specific for a specific example.
I cannot figure out how to define that only 1 xslt should be used for the first example and the other xslt should be used for the second example.

I also know that the second example in the xslt-example block is supposed to fail (because it uses xslt2 functions that are not supported by libxml) how can I flag that this is an expected result? (like the require-fail: true flag for json/shacl examples)

Activity

  1. NielsHoffmann commented on Jun 30, 2026

    @NielsHoffmann
    Author

    Also for the xslt transforms. Is there a way to express whether the output is intended to be valid XML or valid RDF/XML?
    I now created a custom validator for rdf/xml (https://github.com/Geonovum-labs/bblocks-rdfxml-validator-plugin)
    It seems to do the job for rdf/xml, but now also fails for xml that is valid xml and not intended to be valid rdf/xml.

  2. rob-metalinkage commented on Jul 12, 2026

    @rob-metalinkage
    Collaborator

    it looks like it is correctly expressing rdf+xml - the validation failure references:
    bbplugin_rdfxml_validator.RdfXmlValidator

    so maybe you need to split these into two separate example building blocks. Putting more conditional logic in place can become a combinatorial problem - over to @avillar to advise

  3. rob-metalinkage commented on Jul 12, 2026

    @rob-metalinkage
    Collaborator

    and to test a failure we use tests/*-fail.* naming pattern. - but such tests don't show up in the UI browser - perhaps articulate your desired behaviour here - should we have a flag in examples for showing all tests? At the moment we do have a validation report as a separate page, however we do have transforms reporting failures inline - please feel free to consider a better UX

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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions