Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
  1. #1
    New to the CF scene
    Join Date
    Jul 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Where is the formatting for my XML.Config files coming from?

    I'm learning XML/XSL and am working on an existing site. (Which is on an internal server). The XML was written and I am trying to change the layout in a few places. When I look at the config files, I see references to XSL and xsl:template match="/" with different template names mentioned such as: "<xsl:apply-templates select="/root/Products/Product" />"

    From what Ive learned, you can have a separate XSL file act as a stylesheet, include XSL styling in the XML file among other methods. I am trying to figure out where all the styling info for table sizing/ positioning, font styles etc are coming from. This is an ASPDotNetStoreFront created xml package.

    Heres a small selection of the package code. Any direction on this would be appreciated. Thanks

    Code:
      <query name="Products" rowElementName="Product">
            <sql>
                <![CDATA[
                    exec dbo.aspdnsf_ProductInfo @ProductID, @CustomerLevelID, 0, 0, @affiliateID
                ]]>
            </sql>
            <queryparam paramname="@ProductID"       paramtype="request" requestparamname="ProductID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
            <queryparam paramname="@CustomerLevelID" paramtype="runtime" requestparamname="CustomerLevelID" sqlDataType="int" defvalue="0"  validationpattern="" />
            <queryparam paramname="@affiliateID"     paramtype="system"  requestparamname="AffiliateID"     sqlDataType="int" defvalue="0"  validationpattern="" />
        </query>
      
        <query name="AttributeNames" rowElementName="AttributeName">
            <sql>
                <![CDATA[
                    SELECT Items as 'Name'
                    FROM dbo.Split((SELECT AttributeNames FROM Product with (nolock) WHERE ProductID = @ProductID),'|')
                ]]>
            </sql>
            <queryparam paramname="@ProductID"       paramtype="request" requestparamname="ProductID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
        </query>
    
        <query name="AttributeValues" rowElementName="AttributeValue">
            <sql>
                <![CDATA[
                    SELECT Items as 'Value'
                    FROM dbo.Split((SELECT AttributeValues FROM Product with (nolock) WHERE ProductID = @ProductID),'|')
                ]]>
            </sql>
            <queryparam paramname="@ProductID"       paramtype="request" requestparamname="ProductID"       sqlDataType="int" defvalue="0"  validationpattern="^\d{1,10}$" />
        </query>
      
        <PackageTransform>
    
            <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:aspdnsf="urn:aspdnsf" exclude-result-prefixes="aspdnsf">
                <xsl:output method="html" omit-xml-declaration="yes" />
    
                <xsl:param name="LocaleSetting" select="/root/Runtime/LocaleSetting" />
                <xsl:param name="WebConfigLocaleSetting" select="/root/Runtime/WebConfigLocaleSetting" />
                <xsl:param name="XmlPackageName" select="/root/System/XmlPackageName" />
    
                <xsl:param name="SecID">
                    <xsl:choose>
                        <xsl:when test="count(/root/QueryString/sectionid) &gt; 0">
                            <xsl:value-of select="/root/QueryString/sectionid" />
                        </xsl:when>
                        <xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
    
                <xsl:param name="CatID">
                    <xsl:choose>
                        <xsl:when test="count(/root/QueryString/categoryid) &gt; 0">
                            <xsl:value-of select="/root/QueryString/categoryid" />
                        </xsl:when>
                        <xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
    
                <xsl:param name="ManID">
                    <xsl:choose>
                        <xsl:when test="count(/root/QueryString/manufacturerid) &gt; 0">
                            <xsl:value-of select="/root/QueryString/manufacturerid" />
                        </xsl:when>
                        <xsl:otherwise>0</xsl:otherwise>
                    </xsl:choose>
                </xsl:param>
              
              
                <xsl:param name="pManufacturerName" select="aspdnsf:GetManufacturerName(/root/Products/Product[1]/ProductID)"/>
    
                <xsl:template match="/">
                    <xsl:comment>Copyright 1995-2009 AspDotNetStorefront.com</xsl:comment>
                    <xsl:choose>
                        <xsl:when test="count(root/Products/Product) &gt; 1">
                            <xsl:for-each select="/root/Products/Product[1]">
                                <xsl:call-template name="MultiVariant"/>
                            </xsl:for-each>
                        </xsl:when>
                        <xsl:otherwise>
                            <xsl:apply-templates select="/root/Products/Product" />
                        </xsl:otherwise>
                    </xsl:choose>
                </xsl:template>
    Last edited by neo95hl; 07-10-2012 at 12:19 AM. Reason: email settings


 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •