xsl-list
[Top] [All Lists]

RE: [xsl] missing xsi: before schemaLocation in the result xml file.

2006-10-12 17:48:16

Abel Braaksma [mailto:abel(_dot_)online(_at_)xs4all(_dot_)nl] wrote:

If your processor somehow allowed this syntax, then this is the moment 
to reveal what processor you are using and what version and with what 
parameters you call your processor. I modified your sample to match
the 
boot-object etc, and when run with Saxon 8.8, it clearly shows the
'xsi' 
prefix on the schemaLocation. 


I am using Saxon 8.8 processor also. After I set the 
xpath-default-namespace in the root, I still have the same problem.

Here is the new xslt file.
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0 "
xpath-default-namespace="http://directv.com/bitstreams/blueprint";
xmlns="http://directv.com/bitstreams/blueprint";
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
xmlns:xs="http://www.w3.org/2001/XMLSchema";
xmlns:xdt="http://www.w3.org/2005/xpath-datatypes";
exclude-result-prefixes="xs xdt">

<xsl:import href="copy.xslt" />

<xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes"/>
<xsl:template match="boot_object">
   <advanced_boot_object>
        <xsl:copy-of select="@*"/>
        <xsl:apply-templates/>
        <xsl:apply-templates select="boot_object_header"/>      
   </advanced_boot_object>
</xsl:template>
        
<xsl:template match="boot_object_header">
   <advanced_boot_object_header>
         <object_type>153</object_type>
         <xsl:apply-templates select="node()[not(self::object_type)]" />
         </advanced_boot_object_header>
</xsl:template>
</xsl:stylesheet>
            
Actually I found even I don't give
xpath-default-namespace="http://directv.com/bitstreams/blueprint"; in the
root, I still have the same result.


To make sure my Java program run the right XSLT processor, I provided a
service called javax.xml.transform.TransformerFactory which defines
net.sf.saxon.TransformerFactoryImpl under project\META-INF\services
folder.


Thanks,
Jessica

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--