Click here to Skip to main content
15,885,757 members
Articles / Web Development / CSS

Combres - WebForm & MVC Client-side Resource Combine Library

Rate me:
Please Sign up or sign in to vote.
4.50/5 (8 votes)
1 Nov 2009Apache13 min read 52.1K   3.1K   22  
A .NET library which enables minification, compression, combination, and caching of JavaScript and CSS resources for ASP.NET and ASP.NET MVC web applications. Simply put, it helps your applications rank better with YSlow and PageSpeed.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema id="combres" elementFormDefault="qualified" 
           xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <!-- combres -->
  <xs:element name="combres">
    <xs:complexType>
      <xs:sequence>
        <xs:element name="filters" type="filtersinfo" minOccurs="0" maxOccurs="1" />
        <xs:element name="resourceSets" type="resourcesetsinfo" minOccurs="1" maxOccurs="1" />
      </xs:sequence>
    </xs:complexType>
  </xs:element>

  <!-- filters -->
  <xs:complexType name="filtersinfo">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element name="filter" type="filterinfo" />
    </xs:sequence>
  </xs:complexType>
  
  <!-- filter -->
  <xs:complexType name="filterinfo">
    <xs:attribute name="type" type="xs:string" use="required" />
  </xs:complexType>
  
  <!-- resourceSets -->
  <xs:complexType name="resourcesetsinfo">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element name="resourceSet" type="resourcesetinfo" />
    </xs:sequence>
    <xs:attribute name="url" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:pattern value="~/.+"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
    <xs:attribute name="defaultDuration" type="xs:positiveInteger" />
    <xs:attribute name="defaultVersion" type="xs:string" />
    <xs:attribute name="defaultDebugEnabled" type="xs:boolean" />
  </xs:complexType>
  
  <!-- resourceSet -->
  <xs:complexType name="resourcesetinfo">
    <xs:sequence minOccurs="0" maxOccurs="unbounded">
      <xs:element name="resource" type="resourceinfo" />
    </xs:sequence>
    <xs:attribute name="name" type="xs:string" use="required" />
    <xs:attribute name="version" type="xs:string" />
    <xs:attribute name="duration" type="xs:positiveInteger" />
    <xs:attribute name="debugEnabled" type="xs:boolean" />
    <xs:attribute name="type" use="required">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="js"/>
          <xs:enumeration value="css"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>

  <!-- resource -->
  <xs:complexType name="resourceinfo">
    <xs:attribute name="path" type="xs:string" use="required"  />
    <xs:attribute name="mode">
      <xs:simpleType>
        <xs:restriction base="xs:string">
          <xs:enumeration value="Remote"/>
          <xs:enumeration value="LocalStatic"/>
          <xs:enumeration value="LocalDynamic"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:attribute>
  </xs:complexType>
</xs:schema>

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Apache License, Version 2.0


Written By
Chief Technology Officer KMS Technology
Vietnam Vietnam
You can visit Buu's blog at http://www.buunguyen.net/blog to read about his thoughts on software development.

Comments and Discussions