Trouble with placing xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" correct in the output xml file.
Questions about XML that are not covered by the other forums should go here.
Trouble with placing xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" correct in the output xml file.
I'm trying to place xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" statement here:
But it is placed at the end like this:
This is some of my xslt file:
Does anyone know how to get the output correct?
Code: Select all
<EG401.TRANSACTION [b]xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" [/b]xs:noNamespaceSchemaLocation="/aspect4/businessconnector/schemas/EGLDT/EG405.ACCOUNT.ACC.xsd" type="ABCSchema" time="120101" stock="0" runtype="*PROD" languages="95 97 07 91 00" id="DOCUMENT" group="7" docuniqueid="Q2024122040" date="20241220" company="735" >
Code: Select all
<EG401.TRANSACTION xs:noNamespaceSchemaLocation="/aspect4/businessconnector/schemas/EGLDT/EG405.ACCOUNT.ACC.xsd" type="ABCSchema" time="120101" stock="0" runtype="*PROD" languages="95 97 07 91 00" id="DOCUMENT" group="7" docuniqueid="Q2024122040" date="20241220" company="735" [b]xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"[/b]>
Code: Select all
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance">
<xsl:output method="xml" version="1.0" encoding="utf-8" indent="yes" omit-xml-declaration="no" xmlns:xs="http://www.w3.org/2001/XMLSchema-instance"/>
<!--
2024.10.08 Lars Carlsson - Initial version
General rule for templates: select on xml-names from tpl_fields.xml.
-->
<xsl:variable name="belop-11v2">#0.00</xsl:variable>
<xsl:decimal-format name="belop" decimal-separator="."/>
<xsl:template match="/">
<xsl:text> </xsl:text>
<EG401.TRANSACTION>
<xsl:attribute name="xs:noNamespaceSchemaLocation">/aspect4/businessconnector/schemas/EGLDT/EG405.ACCOUNT.ACC.xsd</xsl:attribute>
<xsl:attribute name="type">ABCSchema</xsl:attribute>
<xsl:attribute name="time">120101</xsl:attribute>
<xsl:attribute name="stock">0</xsl:attribute>
<xsl:attribute name="runtype">*PROD</xsl:attribute>
<xsl:attribute name="languages">95 97 07 91 00</xsl:attribute>
<xsl:attribute name="id">DOCUMENT</xsl:attribute>
<xsl:attribute name="group">7</xsl:attribute>
<xsl:attribute name="docuniqueid">Q<xsl:value-of select="//transaction/bilagsdato"/><xsl:value-of select="//transaction/runnr"/></xsl:attribute>
<xsl:attribute name="date"><xsl:value-of select="//transaction/bilagsdato"/></xsl:attribute>
<xsl:attribute name="company"><xsl:value-of select="//transaction/firmaid"/></xsl:attribute>
<xsl:text> </xsl:text>
-
- Posts: 102
- Joined: Tue Aug 19, 2014 12:04 pm
Re: Trouble with placing xmlns:xs="http://www.w3.org/2001/XMLSchema-instance" correct in the output xml file.
Post by Martin Honnen »
Attributes order does not matter so why do you think you need or want that particular attribute as the first one?
I don't think XSLT ensures/allows a certain attribute serialization order.
I don't think XSLT ensures/allows a certain attribute serialization order.
Return to “General XML Questions”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service