[ priki @ 15.01.2008. 11:14 ] @
ako sam dobro procitao forum i internet
resenje za moj problem je da dodam namespace
samo sto ne mogu dodati dva namespace-a

ispravite me ako gresim (a mislim da gre[im)

ovako, treba mi ovakav izgled fajla
(ovo je samo početak, ostalo je sredjeno)

Code:

<Id1 storno="false" xmlns="http://nekaadresa.com/obrasci/sid11/v11-0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://nekaadresa.com/obrasci/sid11/v11-0 id1-obrazac_1_0.xsd"> 
........


problem je što posle atributa mogu da postavim samo jedan namespace
ne znam kako da postavim ostale


ako pokušam s ovim:

Code:

<xsl:attribute name="xsi:schemaLocation">
<xsl:text>http://nekaadresa.com/obrasci/sid11/v11-0 id1-obrazac_1_0.xsd</xsl:text>
</xsl:attribute>


XMLpadPro ne dozvoljava debug, kao "ne može parsirati"


srdjan
[ mmix @ 15.01.2008. 13:30 ] @
Ne znam sto ti ne bi proslo, sledeci fragment je generisao donji xml:

Code:

?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <xsl:output method="xml" indent="yes"/>

    <xsl:template match="*">
        <Id1>
        <xsl:attribute name="xsi:schemaLocation">
            <xsl:text>http://nekaadresa.com/obrasci/sid11/v11-0 id1-obrazac_1_0.xsd</xsl:text>
        </xsl:attribute>
        </Id1>
    </xsl:template>
</xsl:stylesheet>


izlaz:

<?xml version="1.0" encoding="utf-8"?>
<Id1 xsi:schemaLocation="http://nekaadresa.com/obrasci/sid11/v11-0 id1-obrazac_1_0.xsd"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" />




U principu uopste ne moras da se smaras sa <xsl:element> i <xsl:attribute> ako ih ne generises dinamicki, mogu i direktno da se upisu i dobices isti izlaz:

Code:

<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
                xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <xsl:output method="xml" indent="yes"/>

    <xsl:template match="*">
        <Id1 xsi:schemaLocation="http://nekaadresa.com/obrasci/sid11/v11-0 id1-obrazac_1_0.xsd"/>
    </xsl:template>
</xsl:stylesheet>


Koju ti tacno gresku daje XmlPad?

[ priki @ 16.01.2008. 14:28 ] @
grešku, pa ovo:

***
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
--------------------------------------------------------------------------------
The operation completed successfully. Error processing resource 'wmh:D:\test\testIt\3FL.xsl'. Line 4, Position 104
" xsi:schemaLocation="http://nekaadresa-porezna.com/obrasci/id1/v11-0 id11-obrazac_1_0.xsd">
***

a code je ovo
Code:

      <xsl:attribute name="xsi:schemaLocation">
        <xsl:text>http://nekaadresa-porezna.com/obrasci/id1/v11-0 id11-obrazac_1_0.xsd</xsl:text>
      </xsl:attribute>


jako interesantno je da neke stvari u XmlPad-u prodju dok MS XML ne prodju
recimo ovo je slučaj gde je kod MS XML-a prošlo dok je XmlPad digao grešku
bilo je još toga, uglavnom oko promenjivih i nekih if varijatni

mislim da je sad sve ok, prošao je validaciju u nekom njihovom programu
videćemo šta kaže feed back !

hvala za pomoć