{"id":35435181,"url":"https://github.com/perez987/xsl-transform","last_synced_at":"2026-02-03T19:02:55.490Z","repository":{"id":331369884,"uuid":"1126360457","full_name":"perez987/XSL-Transform","owner":"perez987","description":"SwiftUI macOS application that performs XSL transformations on XML files to produce formatted HTML output","archived":false,"fork":false,"pushed_at":"2026-01-22T21:09:52.000Z","size":4363,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-23T13:51:59.662Z","etag":null,"topics":["html","swiftui","xml","xsl","xsl-transform"],"latest_commit_sha":null,"homepage":"","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perez987.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-01T18:37:15.000Z","updated_at":"2026-01-22T21:09:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/perez987/XSL-Transform","commit_stats":null,"previous_names":["perez987/xsl-transform"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/perez987/XSL-Transform","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perez987%2FXSL-Transform","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perez987%2FXSL-Transform/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perez987%2FXSL-Transform/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perez987%2FXSL-Transform/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perez987","download_url":"https://codeload.github.com/perez987/XSL-Transform/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perez987%2FXSL-Transform/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29054049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-03T15:43:47.601Z","status":"ssl_error","status_checked_at":"2026-02-03T15:43:46.709Z","response_time":96,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["html","swiftui","xml","xsl","xsl-transform"],"created_at":"2026-01-02T22:22:01.981Z","updated_at":"2026-02-03T19:02:55.484Z","avatar_url":"https://github.com/perez987.png","language":"HTML","funding_links":[],"categories":[],"sub_categories":[],"readme":"# XSL Transform - SwiftUI macOS Application\n\nA SwiftUI application for macOS that converts XML documents to HTML using XSL transformations.\n\n![AppIcon](Images/Screenshot-dark.png)\n\n## Features\n\n- Simple localization system (English and Spanish)\n- Select XML source files\n- Select XSL stylesheet files\n- Choose output location for HTML files (Desktop by default)\n- One-click transformation\n- Includes sample files (`Empresas.xml` and `Empresas.xsl`)\n- Automatically opens the generated HTML in your default browser (optional)\n\n## Requirements\n\n- macOS 14.0 (Sonoma) or later\n- Xcode 15.0 or later\n\n## Project structure\n\n```bash\nXSL-transform\n├── XSLTransform.xcodeproj            # Xcode project file\n└── XSLTransform                      # Application directory\n    ├── XSLTransformApp.swift         # Main app entry point\n    ├── Info.plist                    # App configuration\n    ├── Views                         # SwiftUI views\n    │   └── ContentView.swift\t      # Main user interface\n    ├── Model                         # Business logic\n    │   └── XSLTransformer.swift      # XSL transformation logic\n    └── Resources                     # Resource files\n        ├── Empresas.xml\t          # Sample XML data\n        └── Empresas.xsl\t          # Sample XSL stylesheet\n        ├── en.lproj\t              # English localization\n        └── es.lproj\t              # Spanish localization\n```\n\n## How to Build and Run\n\n### Get the Code\n\nClone the repository:\n\n```bash\ngit clone https://github.com/perez987/XSL-Transform.git\ncd XSL-Transform\n```\n\n### Using Xcode\n\n1. Open the project with Xcode\n2. Select your Mac as the run destination\n3. Press `Cmd+R` to build and run the app\n\n### Building from Command Line\n\n1. Open Terminal\n2. Navigate to the project directory\n3. Build the project:\n \n   ```bash\n   swift build -c release\n   ```\n4. Run the application:\n \n   ```bash\n   .build/release/XSLTransform\n   ```\n   \n## Sample Files\n\nThe application includes two sample files from the original project:\n\n### `Empresas.xml`\n\nAn XML file containing contact information for 25 companies, including:\n\n- Company ID\n- Company name\n- Two phone numbers per company\n\n### `Empresas.xsl`\n\nAn XSL stylesheet that:\n\n- Formats the XML data as an HTML table\n- Sorts companies alphabetically by name\n- Applies styling (fonts, colors, borders)\n- Creates a professional-looking HTML document\n\n### Expected Output: `Empresas.html`\n\nThe transformation produces an HTML file displaying a formatted table with:\n\n- Header row with column titles (ID, Company Name, Phone 1, Phone 2)\n- Data rows for all 25 companies\n- Professional styling with Verdana font\n- Alternating row colors for better readability\n\n## Technical Implementation\n\nThe application uses:\n\n- **SwiftUI** for the user interface\n- **Foundation's XMLDocument** for XML/XSL processing\n- **NSOpenPanel** and **NSSavePanel** for file dialogs\n- **NSWorkspace** to open the generated HTML file\n\n## How XSL Transformation Works\n\nThe transformation process:\n\n1. Loads the XML document using `XMLDocument`\n2. Loads the XSL stylesheet \n3. Applies the transformation using `XMLDocument.object(byApplyingXSLT:arguments:)`\n4. Saves the resulting HTML to the specified output file\n5. Opens the HTML file in the default browser\n\n## Error Handling\n\nThe application provides error messages for:\n\n- Invalid or missing XML or XSL files\n- Transformation failures\n- File write errors\n\n## Accessibility\n\n- All controls have proper labels for screen readers\n- Keyboard navigation supported\n- High contrast mode compatible\n- Respects system font size settings\n\n## Troubleshooting\n\n### Application doesn't launch\n\n- Check macOS version (requires 13.0+)\n- Rebuild with: `swift build -c release`\n\n### Transformation fails\n\n- Verify XML file is well-formed\n- Verify XSL file is valid XSLT 1.0\n- Check file permissions\n\n## Manual creation of an Application Bundle\n\nTo manually create a standalone .app bundle:\n\n1. Build in release mode:\n\n2. \n   ```bash\n   swift build -c release\n   ```\n\n3. Create the app structure:\n\n4. \n   ```bash\n   mkdir -p XSLTransform.app/Contents/MacOS\n   mkdir -p XSLTransform.app/Contents/Resources\n   ```\n\n5. Copy the binary:\n\n6. \n   ```bash\n   cp .build/release/XSLTransform XSLTransform.app/Contents/MacOS/\n   ```\n\n7. Create Info.plist:\n\n   ```xml\n   \u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n   \u003c!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\"\u003e\n   \u003cplist version=\"1.0\"\u003e\n   \u003cdict\u003e\n       \u003ckey\u003eCFBundleExecutable\u003c/key\u003e\n       \u003cstring\u003eXSLTransform\u003c/string\u003e\n       \u003ckey\u003eCFBundleIdentifier\u003c/key\u003e\n       \u003cstring\u003ecom.example.xsltransform\u003c/string\u003e\n       \u003ckey\u003eCFBundleName\u003c/key\u003e\n       \u003cstring\u003eXSL Transform\u003c/string\u003e\n       \u003ckey\u003eCFBundlePackageType\u003c/key\u003e\n       \u003cstring\u003eAPPL\u003c/string\u003e\n       \u003ckey\u003eCFBundleShortVersionString\u003c/key\u003e\n       \u003cstring\u003e1.0\u003c/string\u003e\n       \u003ckey\u003eCFBundleVersion\u003c/key\u003e\n       \u003cstring\u003e1\u003c/string\u003e\n       \u003ckey\u003eLSMinimumSystemVersion\u003c/key\u003e\n       \u003cstring\u003e13.0\u003c/string\u003e\n   \u003c/dict\u003e\n   \u003c/plist\u003e\n   ```\n   \n   Save this as `XSLTransform.app/Contents/Info.plist`\n\n9. Double-click `XSLTransform.app` to launch\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperez987%2Fxsl-transform","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperez987%2Fxsl-transform","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperez987%2Fxsl-transform/lists"}