xsl-to-sql-detail

Embed UTF-8 XSL content into the XSLPLANTILLA field of a Db2 INSERT.

Updated Mar 12, 2026
One-click install
npx skills add https://github.com/alexjcm/agent-skillset --skill xsl-to-sql-detail
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: xsl-to-sql-detail
Source: https://github.com/alexjcm/agent-skillset/tree/main/skills/tools/xsl-to-sql-detail
Command: npx skills add https://github.com/alexjcm/agent-skillset --skill xsl-to-sql-detail

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

Automates embedding UTF-8 XSL content into the XSLPLANTILLA field of the INSERT matching a given TEMPLATEID, enabling precise updates without manual editing of SQL.

Core Features & Use Cases

  • Overwrites the XSLPLANTILLA literal inside the INSERT matching a given TEMPLATEID, preserving surrounding SQL structure.
  • Validates UTF-8 XSL input and ensures the target INSERT exists and is unique.
  • Supports an optional backup of the original SQL file before applying changes.

Quick Start

Use embed_xsl.py with --xsl_file_path and --coddet to insert your XSL into the correct INSERT in sql/dml/02_SMXCORP_DETALLE_PLANTILLA.sql.

Frequently Asked Questions about xsl-to-sql-detail

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I embed XSL content into a Db2 SQL INSERT statement?

You can embed XSL content into a Db2 SQL INSERT statement by targeting a specific TEMPLATEID and overwriting the XSLPLANTILLA field, which preserves the surrounding SQL structure without requiring manual script editing.

Can I update a specific SQL INSERT record using a template ID without affecting other rows?

Yes, you can update a specific SQL INSERT record by matching a unique TEMPLATEID, ensuring the script validates that the target INSERT exists and is unique before replacing the XSL literal in the XSLPLANTILLA field.

What is the best way to automate inserting UTF-8 XSL files into SQL scripts?

The best way to automate inserting UTF-8 XSL files into SQL scripts is using a script that validates the XSL input encoding, locates the correct INSERT by TEMPLATEID, and optionally creates a backup before writing the changes.

Does the XSL to SQL embedding process support creating backups before modifying the script?

Yes, the XSL to SQL embedding process supports an optional backup of the original SQL file before applying changes, ensuring you can safely restore the previous state if the XSLPLANTILLA field update encounters any issues.

What happens if the target INSERT pattern for the template ID is not found in the SQL file?

If the target INSERT pattern is not found in the SQL file, the embedding process validates the correct INSERT pattern and stops execution, preventing incorrect modifications to the SQL script when the TEMPLATEID does not match.

How do I validate UTF-8 encoding before embedding XSL into a SQL script?

You validate UTF-8 encoding before embedding XSL into a SQL script by checking the XSL file presence and its encoding format, ensuring the input meets the correct UTF-8 standard before updating the XSLPLANTILLA field.