Jump to content

kam

Members
  • Content Count

    11
  • Joined

  • Last visited

Posts posted by kam

  1. duh :) lol I really need to read better.
    It is offline, I dont connect to the web at all, so I cannot use Ajax.
    function Button1_EventClick() {	This = Button1;EditBox1.Text	="Done";var oShell = new ActiveXObject("Shell.Application");var commandtoRun = "perl.bat";// Invoke the execute method.oShell.ShellExecute(commandtoRun, "", "", "open", "1");

    This is the code I am using.this perl.bat contains command to run perlscript.I have arguments to be passed to the perlscript also.

  2. Hi All,I am using Altova Authentic, there i should create a macro, for executing perl script.I created a form, in the onclick event.I want to execute the perlscript with parameters that are got dynamically from textbaxes in the form.Is it possible?As of now I am using ShellExecute API and calling a .bat file containing the perl script. But I am not able to pass parameters dynamically.Can anybody help me with this.Thank You in advance

  3. I don't see any empty "xmlns" in the output. Not with SAXON 8.9.0.3 at least. What processor are you using?Considering the fact that you use an XSLT 2.0 stylesheet, you'll need SAXON, or at least AltovaXML.Here's the output I get after adding the missing $acronym variable with a value of "BU":
    <?xml version='1.0' ?><ApplicationsDescription xmlns="urn:alcatel:upp-adl:2005-06">  <SimpleApplicationDescription>	<Acronym>BU</Acronym>	<Attribute>	  <Type>		<ct:Name xmlns:ct="http://3gpp/gup/ns/common/common-types"/>		<ct:File xmlns:ct="http://3gpp/gup/ns/common/common-types"/>	  </Type>	</Attribute>  </SimpleApplicationDescription></ApplicationsDescription>

    Seems perfectly fine to me. Because you use a namespace prefix that was never declared at the top level, the declaration is automatically added on that element to ensure the output is well formed. If you want, you could remove the prefix from the <xsl:element name="ct:Name"> and <xsl:element name="ct:File"> elements, but then those elements will be in the "urn:alcatel:upp-adl:2005-06" namespace, instead of the "http://3gpp/gup/ns/common/common-types" namespace.By the way, your stylesheet degrades very weird when used with XSLT 1.0 processor (MSXML 6.0 in my case):

    <?xml version="1.0" encoding="UTF-8"?><ApplicationsDescription xmlns="urn:alcatel:upp-adl:2005-06"><SimpleApplicationDescription><Acronym>BU</Acronym>

    I think it's because of the exists() function. It's XSLT 2.0 only. In XSLT 1.0 (and in XSLT 2.0!) you can test if a node exists by just specifiying the path to it (i.e. what you have as exists()'s argument).

    Thank You.I think the problem is with the processor I am using.I am not using Altova xmlspy, instead Authentic, which is creating this problem
  4. I am providing the code as below.SOurce

    <ApplicationDescMetaSchema xsi:noNamespaceSchemaLocation="applicationdescmetaschema.xsd" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">	<ApplicationDescriptions>			<SimpleApplicationDescription>			<SimpleApplicationDesc>				<Acronym>BU</Acronym>							<Attribute>					<Name>as</Name>				</Attribute>			</SimpleApplicationDesc>		</SimpleApplicationDescription>	</ApplicationDescriptions><ApplicationDescriptions>				<Attribute>			<Attributes>				<TypeName>asd</TypeName>				<TypeFile>asas</TypeFile>			</Attributes>		</Attribute>	</ApplicationDescriptions></ApplicationDescMetaSchema>

    xslt

    <xsl:stylesheet version="2.0" xmlns="urn:alcatel:upp-adl:2005-06" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ifc="http://3gpp/gup/ns/dataelement/IFC" xmlns:ct="http://3gpp/gup/ns/common/common-types" xmlns:amt="http://3gpp/gup/ns/common/application-model-types"><xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" name="xml"/>   <xsl:template match="/">   <xsl:element name="ApplicationsDescription">	  <xsl:element name="SimpleApplicationDescription">		 <xsl:element name="Acronym">	<xsl:value-of select="/ApplicationDescMetaSchema/ApplicationDescriptions/SimpleApplicationDescription/SimpleApplicationDesc[Acronym=$acronym]/Acronym"/>		 </xsl:element>		 <xsl:if test="exists(/ApplicationDescMetaSchema/ApplicationDescriptions/SimpleApplicationDescription/SimpleApplicationDesc[Acronym=$acronym]/Attribute)">	<xsl:for-each select="/ApplicationDescMetaSchema/ApplicationDescriptions/SimpleApplicationDescription/SimpleApplicationDesc[Acronym=$acronym]/Attribute">		<xsl:variable name="attribute" select="Name"/>		<xsl:element name="Attribute">										 <xsl:element name="Type">						   <xsl:element name="ct:Name">					  <xsl:value-of select="/ApplicationDescMetaSchema/ApplicationDescriptions/Attribute/Attributes[Name=$attribute]/TypeName"/>				</xsl:element>				<xsl:element name="ct:File">					   <xsl:value-of select="/ApplicationDescMetaSchema/ApplicationDescriptions/Attribute/Attributes[Name=$attribute]/TypeFile"/>							</xsl:element>				 </xsl:element>							  </xsl:element>				</xsl:for-each>			</xsl:if>		  </xsl:element>		 </xsl:element></xsl:template></xsl:stylesheet>

    These are the code, can you tell me what can be done to remove that xmlns, because of this I am not able to use the xml generatedThank You

  5. We have two schema say C_PrimaryInformation.xsd and C_SecondaryInformation.xsd. The namespaces for these files are defined as http://3gpp/ns/comp/C_PrimaryInformation and http://3gpp/ns/comp/C_SecondarInformation with prefixes as ns1 and ns2 respecively. We have an another schema file, C_Information.xsd, with the namespace http://3gpp/ns/comp/C_PrimaryInformation/C_Information with the namespace prefix as ns12. Component NameSpace_Prefix Target NameSpace ========= ================ ================ C_PrimaryInformation.xsd ns1 http://3gpp/ns/comp/C_PrimaryInformation C_SecondaryInformation.xsd ns2 http://3gpp/ns/comp/C_SecondarInformation C_BriefInformation.xsd ns12 http://3gpp/ns/comp/C_PrimaryInformation/C_Information Here C_PrimaryInformation.xsd and C_SecondaryInformation.xsd are two root components and C_BriefInformation.xsd is a sub-component. We need to define C_BriefInformation.xsd as a sub-component of these two root components. If I need to make C_BriefInformation.xsd as a sub-component of these two root components, then can the target namespace for this can be deifned as below. http://3gpp/ns/comp/C_PrimaryInformation/C_Information and http://3gpp/ns/comp/C_SecondaryInformation/C_Information Is it possible to design a schema like this?

  6. As I said, remove the xsi attributes. The whole xsi namespace. It's causing validation of the XSLT file by using a schema that's not meant for it.XSLT 2.0 allows you to insert those namespaces only in the output by the means of xsl:namespace or xsl:namespace-alias.
    Ya... It is working fine Thanks a Lot
  7. Errr... it's not valid according to what? Does the stylesheet work at all?If it does, but it doesn't validate according to the attached schema, it might be like that if the schema is suppose to validate the output rather then the input, and it is XSLT intput you're trying to validate.If you want to validate the output instead of the input, XSLT 2.0 allows you to do that by adding
    The File is not Valid.The element Declaration was not found for root element 'xsl:stylesheet'

    Because of this I am not able to do XSL transformation from Authentic..........So I want to know, whether any changes must be done to the namespaces in StyleSheet node

  8. That's because XPath is namespace aware even when you might think it's not.You need to specify the namespace in the XSLT file itself if you want to get it working, like so:
    <xsl:stylesheet version="2.0"  xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:p="urn:alcatel:up-mapping:2005-05" xmlns:dt="urn:al:dst-v2" xmlns:rules="urn:al:dst-v2" xmlns:tps="urn:al:up-services-types:2005-05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:al:up-mapping:2005-05 ..\..\..\Generic\MappingDefinition\UP-Profile-Mapping-v50.xsd">

  9. Hi,I am using XSLT to transform one xml to another xml.It works fine for source XML without namespaces in its root tag.But for an XML with namespaces like this, the XSLT doesnt work.<MappingDefinitions xmlns="urn:al:up-mapping:2005-05" xmlns:dt="urn:al:dst-v2" xmlns:rules="urn:al:dst-v2" xmlns:tps="urn:al:upp-services-types:2005-05" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:al:up-mapping:2005-05 ..\..\..\Generic\MappingDefinition\UP-Profile-Mapping-v50.xsd">Can anyone help me out

×
×
  • Create New...