[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: I need to make sure that all namespace declaration
Hi Ken
I've not heard of a processor moving a required namespace declaration "up" the result tree. Once an element in the result tree is constructed, the adding of children nodes to the element wouldn't typically change the completed parent element. But you are missing showing us the declaration at the top and the namespaces in the stylesheet document element ... are you declaring the "xmlns:in" namespace there? Your output indicates to me that an ancestor of the xforms:model element in your stylesheet has the invoice namespace. That is assuming the xforms:model comes from a literal result element in your stylesheet. The template that controls outputting the xforms model element <xsl:template name="xformsgeneration"> <xforms:model id="{$docElemlocalName}"> <xforms:instance id="Instance_1"> <xsl:copy-of select="self::*"/> </xforms:instance> <xforms:bind id="Binding0" required="true()"></xforms:bind> <xsl:apply-templates mode="buildform"> <xsl:with-param name="inpath" select="'\\\'"/> <xsl:with-param name="id" select="1"/> </xsl:apply-templates> <xsl:call-template name="createdocument"> <xsl:with-param name="docname" select="$docElemlocalName"/> </xsl:call-template> </xforms:model> </xsl:template> The tree being copied by the copy-of select self::* is like this: <in:Invoice xmlns:style="urn:oasis:names:tc:opendocument:xmlns:style:1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-2" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-2" xmlns:in="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:te="urn:oasis:names:tc:opendocument:xmlns:text:1.0" xmlns:tb="urn:oasis:names:tc:opendocument:xmlns:table:1.0" xmlns:draw="urn:oasis:names:tc:opendocument:xmlns:drawing:1.0" xmlns:fo="urn:oasis:names:tc:opendocument:xmlns:xsl-fo-compatible:1.0" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:meta="urn:oasis:names:tc:opendocument:xmlns:meta:1.0" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0" xmlns:svg="urn:oasis:names:tc:opendocument:xmlns:svg-compatible:1.0" xmlns:chart="urn:oasis:names:tc:opendocument:xmlns:chart:1.0" xmlns:dr3d="urn:oasis:names:tc:opendocument:xmlns:dr3d:1.0" xmlns:math="http://www.w3.org/1998/Math/MathML" xmlns:form="urn:oasis:names:tc:opendocument:xmlns:form:1.0" xmlns:script="urn:oasis:names:tc:opendocument:xmlns:script:1.0" xmlns:ooo="http://openoffice.org/2004/office" xmlns:ooow="http://openoffice.org/2004/writer" xmlns:oooc="http://openoffice.org/2004/calc" xmlns:dom="http://www.w3.org/2001/xml-events" xmlns:xforms="http://www.w3.org/2002/xforms" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ext="urn:oasis:names:specification:ubl:schema:xsd:CommonExtensionComponents-2" xmlns:xe="http://rep.oio.dk/tools/xformsExtension" what comes out of this template is= <xforms:model id="Invoice" xmlns:n="nodesetvariables" xmlns:in="urn:oasis:names:specification:ubl:schema:xsd:Invoice-2" xmlns:number="urn:oasis:names:tc:opendocument:xmlns:datastyle:1.0"> <xforms:instance id="Instance_1"> <in:Invoice> <ext:UBLExtensions .... this makes me very sad.... >So how should I best accomplish this, should I exclude namespace at >the top of my stylesheet, thus forcing the processor to put it back in >elsewhere (doesn't actually seem to work because hey I need to control >exactly where my namespace gets put. nothing else will do. )
maybe but I'm betting this is still gonna cause the problem somewhere.
will also try this. Cheers, Bryan Rasmussen
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|