Unicorn XML Toolkit
Version 1.00.00

Namespace Xslt
Class CExtensionContentType

class CExtensionContentType: public CInterface {
public:
    CExtensionContentType(bool bOrdered=false);
    ~CExtensionContentType();
public:
    void AddElementType(
        const CString &strNamespaceUri,
        const CString &strLocalName,
        int nType,
        bool bRequired=false,
        bool bUnique=false);
    bool IsOrdered();
    int GetElementTypeCount();
    CString GetNamespaceUri(int nIndex);
    CString GetLocalName(int nIndex);
    int GetElementType(int nIndex);
    bool IsElementRequired(int nIndex);
    bool IsElementUnique(int nIndex);
    int FindElementType(
        const CString &strNamespaceUri,
        const CString &strLocalName);
    int FindDefaultType();
    };

The specification of the allowed content of XSLT extension elements.

Since:
1.00.00
Version:
1.00.00
Author:
Alexey Gokhberg
Constructor/Destructor Summary
CExtensionContentType (bool bOrdered=false);
����������Constructs the extension content type.
~CExtensionContentType ();
����������Destroys the extension content type.

Function Summary
void AddElementType (const CString &strNamespaceUri, const CString &strLocalName, int nType, bool bRequired=false, bool bUnique=false);
����������Adds specification of a child element to this extension element type.
bool IsOrdered ();
����������Tests, whether the order of children elements specified by this extension element type is fixed.
int GetElementTypeCount ();
����������Returns the number of children element specifications in this extension element type.
CString GetNamespaceUri (int nIndex);
����������Returns the child element namespace URI specified at the given index in this extension element type.
CString GetLocalName (int nIndex);
����������Returns the child element local name specified at the given index in this extension element type.
int GetElementType (int nIndex);
����������Returns the content type code assigned to the child element specified at the given index in this extension element type.
bool IsElementRequired (int nIndex);
����������Tests whether the child element specified at the given index in this extension element type is required.
bool IsElementUnique (int nIndex);
����������Tests whether at most one occurence of the child element specified at the given index in this extension element type is allowed.
int FindElementType (const CString &strNamespaceUri, const CString &strLocalName);
����������Returns the content type code specified for a child element with the given namespace URI and local name.
int FindDefaultType ();
����������Returns the default content type code (that is, one associated with the "*" value for namespace URI).

Constructor/Destructor Detail

CExtensionContentType

CExtensionContentType(bool bOrdered=false);

Constructs the extension content type.

Parameters:
bOrdered - indicates whether the order of children elements specified by this extension content type is fixed

~CExtensionContentType

~CExtensionContentType();

Destroys the extension content type.

Function Detail

AddElementType

void AddElementType(
    const CString &strNamespaceUri,
    const CString &strLocalName,
    int nType,
    bool bRequired=false,
    bool bUnique=false);

Adds specification of a child element to this extension element type.

The namespace URI and the local name parameters may be set to "*" to indicate that any value is allowed. However, if the local name is set to "*" , then the namespace URI must be set to "*" as well.

Parameters:
strNamespaceUri - the namespace URI of the child element
strLocalName - the local name of the child element
nType - the content type code
bRequired - indicates whether the specified child element is required
bUnique - indicates whether at most one occurence of the specified child element is allowed

IsOrdered

bool IsOrdered();

Tests, whether the order of children elements specified by this extension element type is fixed.

Returns:
true , if the order of children elements specified by this extension element type is fixed; false otherwise

GetElementTypeCount

int GetElementTypeCount();

Returns the number of children element specifications in this extension element type.

Returns:
the number of children element specifications in this extension element type

GetNamespaceUri

CString GetNamespaceUri(int nIndex);

Returns the child element namespace URI specified at the given index in this extension element type.

Parameters:
nIndex - the index (zero-based)
Returns:
the child element namespace URI specified at the given index in this extension element type

GetLocalName

CString GetLocalName(int nIndex);

Returns the child element local name specified at the given index in this extension element type.

Parameters:
nIndex - the index (zero-based)
Returns:
the child element local name specified at the given index in this extension element type

GetElementType

int GetElementType(int nIndex);

Returns the content type code assigned to the child element specified at the given index in this extension element type.

Parameters:
nIndex - the index (zero-based)
Returns:
the content type code assigned to the child element specified at the given index in this extension element type

IsElementRequired

bool IsElementRequired(int nIndex);

Tests whether the child element specified at the given index in this extension element type is required.

Parameters:
nIndex - the index (zero-based)
Returns:
true if the child element specified at the given index in this extension element type is required; false otherwise

IsElementUnique

bool IsElementUnique(int nIndex);

Tests whether at most one occurence of the child element specified at the given index in this extension element type is allowed.

Parameters:
nIndex - the index (zero-based)
Returns:
true if at most one occurence of the child element specified at the given index in this extension element type is allowed; false otherwise

FindElementType

int FindElementType(
    const CString &strNamespaceUri,
    const CString &strLocalName);

Returns the content type code specified for a child element with the given namespace URI and local name.

The content type for the closest matching namespace URI and local name is returned (that is, explicit values have higher priority than "*" wildcards).

Parameters:
strNamespaceUri - the child element namespace URI
strLocalName - the child element local name
Returns:
the content type code specified for a child element with the given namespace URI and local name in this extension content type, or -1 if none was found

FindDefaultType

int FindDefaultType();

Returns the default content type code (that is, one associated with the "*" value for namespace URI).

Returns:
the default content type code for this extension content type, or -1 if there is no default content type

Unicorn XML Toolkit
Version 1.00.00


This document was created using Unicorn DOC++.

Copyright 1999-2001 Unicorn Enterprises SA.
All Rights Reserved.