Template:Workflow: Difference between revisions
From MaRDI portal
Line 78: | Line 78: | ||
BIND(STR(?definingStatement) AS ?plainStatement) | BIND(STR(?definingStatement) AS ?plainStatement) | ||
# Clean up spaces around commas, making the format consistent | |||
BIND(REPLACE(?plainStatement, "\\s*,\\s*", ",") AS ?cleanedStatement) | |||
# Extract symbol and quantity label | |||
BIND(STRBEFORE(?cleanedStatement, ",") AS ?Symbol) | |||
BIND(STRAFTER(?cleanedStatement, ",") AS ?quantityLabel) | |||
} | } | ||
# Filter results to only show defining statements that match the current quantity label | |||
BIND(STR(?itemLabel) AS ?plainItemLabel) | |||
FILTER(?quantityLabel = ?plainItemLabel) | |||
} | } | ||
} | } |
Revision as of 19:54, 29 October 2024