зеркало из https://github.com/mozilla/pjs.git
Reverted to having a cannonical namespace for schema and SOAP builtin types rather than maintaining two sets of each. For arrays with unspecified xsi:arrayType, the dimension is now 0.
This commit is contained in:
Родитель
623b290102
Коммит
2509a09679
|
@ -23,9 +23,8 @@
|
|||
|
||||
#include "nsSchemaPrivate.h"
|
||||
|
||||
nsSOAPArray::nsSOAPArray(const nsAReadableString& aTargetNamespace,
|
||||
nsISchemaType* aAnyType)
|
||||
: mTargetNamespace(aTargetNamespace), mAnyType(aAnyType)
|
||||
nsSOAPArray::nsSOAPArray(nsISchemaType* aAnyType)
|
||||
: mAnyType(aAnyType)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -43,7 +42,7 @@ NS_IMPL_ISUPPORTS3_CI(nsSOAPArray,
|
|||
NS_IMETHODIMP
|
||||
nsSOAPArray::GetTargetNamespace(nsAWritableString& aTargetNamespace)
|
||||
{
|
||||
aTargetNamespace.Assign(mTargetNamespace);
|
||||
aTargetNamespace.Assign(NS_LITERAL_STRING(NS_SOAP_1_2_ENCODING_NAMESPACE));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -185,12 +184,11 @@ NS_IMETHODIMP
|
|||
nsSOAPArray::GetArrayDimension(PRUint32* aDimension)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aDimension);
|
||||
*aDimension = 1;
|
||||
*aDimension = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsSOAPArrayType::nsSOAPArrayType(const nsAReadableString& aTargetNamespace)
|
||||
: mTargetNamespace(aTargetNamespace)
|
||||
nsSOAPArrayType::nsSOAPArrayType()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -209,7 +207,7 @@ NS_IMPL_ISUPPORTS4_CI(nsSOAPArrayType,
|
|||
NS_IMETHODIMP
|
||||
nsSOAPArrayType::GetTargetNamespace(nsAWritableString& aTargetNamespace)
|
||||
{
|
||||
aTargetNamespace.Assign(mTargetNamespace);
|
||||
aTargetNamespace.Assign(NS_LITERAL_STRING(NS_SOAP_1_2_ENCODING_NAMESPACE));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -292,7 +292,12 @@ nsSchemaComplexType::GetIsArray(PRBool* aIsArray)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsArray);
|
||||
|
||||
*aIsArray = (mArrayInfo != nsnull);
|
||||
nsCOMPtr<nsISchemaComplexType> complexBase = do_QueryInterface(mBaseType);
|
||||
if (complexBase) {
|
||||
return complexBase->GetIsArray(aIsArray);
|
||||
}
|
||||
|
||||
*aIsArray = PR_FALSE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -303,11 +308,16 @@ nsSchemaComplexType::GetArrayType(nsISchemaType** aArrayType)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aArrayType);
|
||||
|
||||
if (!mArrayInfo) {
|
||||
return NS_ERROR_FAILURE;
|
||||
*aArrayType = nsnull;
|
||||
if (mArrayInfo) {
|
||||
mArrayInfo->GetType(aArrayType);
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsISchemaComplexType> complexBase = do_QueryInterface(mBaseType);
|
||||
if (complexBase) {
|
||||
return complexBase->GetArrayType(aArrayType);
|
||||
}
|
||||
}
|
||||
|
||||
mArrayInfo->GetType(aArrayType);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -318,11 +328,16 @@ nsSchemaComplexType::GetArrayDimension(PRUint32* aDimension)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aDimension);
|
||||
|
||||
*aDimension = 0;
|
||||
if (!mArrayInfo) {
|
||||
return NS_ERROR_FAILURE;
|
||||
*aDimension = mArrayInfo->GetDimension();
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsISchemaComplexType> complexBase = do_QueryInterface(mBaseType);
|
||||
if (complexBase) {
|
||||
return complexBase->GetArrayDimension(aDimension);
|
||||
}
|
||||
}
|
||||
|
||||
*aDimension = mArrayInfo->GetDimension();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -311,7 +311,7 @@ public:
|
|||
LoadListener(nsSchemaLoader* aLoader,
|
||||
nsISchemaLoadListener* aListener,
|
||||
nsIXMLHttpRequest* aRequest);
|
||||
~LoadListener();
|
||||
virtual ~LoadListener();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOMEVENTLISTENER
|
||||
|
@ -487,9 +487,7 @@ nsBuiltinSchemaCollection::GetBuiltinType(const nsAReadableString& aName,
|
|||
nsISchemaType** aType)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsAutoString concat(aName);
|
||||
concat.Append(aNamespace);
|
||||
nsStringKey key(concat);
|
||||
nsStringKey key(aName);
|
||||
nsCOMPtr<nsISupports> sup = dont_AddRef(mBuiltinTypesHash.Get(&key));
|
||||
if (sup) {
|
||||
rv = CallQueryInterface(sup, aType);
|
||||
|
@ -637,8 +635,7 @@ nsBuiltinSchemaCollection::GetBuiltinType(const nsAReadableString& aName,
|
|||
return NS_ERROR_SCHEMA_UNKNOWN_TYPE;
|
||||
}
|
||||
|
||||
nsSchemaBuiltinType* builtin = new nsSchemaBuiltinType(typeVal,
|
||||
aNamespace);
|
||||
nsSchemaBuiltinType* builtin = new nsSchemaBuiltinType(typeVal);
|
||||
if (!builtin) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -658,9 +655,7 @@ nsBuiltinSchemaCollection::GetSOAPType(const nsAReadableString& aName,
|
|||
nsISchemaType** aType)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsAutoString concat(aNamespace);
|
||||
concat.Append(aName);
|
||||
nsStringKey key(concat);
|
||||
nsStringKey key(aName);
|
||||
nsCOMPtr<nsISupports> sup = dont_AddRef(mSOAPTypeHash.Get(&key));
|
||||
if (sup) {
|
||||
rv = CallQueryInterface(sup, aType);
|
||||
|
@ -675,7 +670,7 @@ nsBuiltinSchemaCollection::GetSOAPType(const nsAReadableString& aName,
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsSOAPArray* array = new nsSOAPArray(aNamespace, anyType);
|
||||
nsSOAPArray* array = new nsSOAPArray(anyType);
|
||||
if (!array) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -686,7 +681,7 @@ nsBuiltinSchemaCollection::GetSOAPType(const nsAReadableString& aName,
|
|||
NS_ADDREF(*aType);
|
||||
}
|
||||
else if (aName.Equals(NS_LITERAL_STRING("arrayType"))) {
|
||||
nsSOAPArrayType* arrayType = new nsSOAPArrayType(aNamespace);
|
||||
nsSOAPArrayType* arrayType = new nsSOAPArrayType();
|
||||
if (!arrayType) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -1475,7 +1470,6 @@ nsSchemaLoader::ProcessComplexTypeBody(nsSchema* aSchema,
|
|||
|
||||
*aContentModel = nsISchemaComplexType::CONTENT_MODEL_EMPTY;
|
||||
|
||||
nsCOMPtr<nsISchemaType> baseType;
|
||||
nsCOMPtr<nsISchemaModelGroup> modelGroup;
|
||||
|
||||
while (NS_SUCCEEDED(iterator.GetNextChild(getter_AddRefs(childElement),
|
||||
|
|
|
@ -100,8 +100,7 @@ protected:
|
|||
class nsSchemaBuiltinType : public nsISchemaBuiltinType
|
||||
{
|
||||
public:
|
||||
nsSchemaBuiltinType(PRUint16 aBuiltinType,
|
||||
const nsAReadableString& aName);
|
||||
nsSchemaBuiltinType(PRUint16 aBuiltinType);
|
||||
virtual ~nsSchemaBuiltinType();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -112,7 +111,6 @@ public:
|
|||
|
||||
protected:
|
||||
PRUint16 mBuiltinType;
|
||||
nsString mNamespace;
|
||||
};
|
||||
|
||||
class nsSchemaListType : public nsSchemaComponentBase,
|
||||
|
@ -213,6 +211,7 @@ public:
|
|||
|
||||
protected:
|
||||
nsString mName;
|
||||
PRPackedBool mAbstract;
|
||||
PRUint16 mContentModel;
|
||||
PRUint16 mDerivation;
|
||||
nsCOMPtr<nsISchemaType> mBaseType;
|
||||
|
@ -220,7 +219,6 @@ protected:
|
|||
nsCOMPtr<nsISchemaModelGroup> mModelGroup;
|
||||
nsSupportsArray mAttributes;
|
||||
nsSupportsHashtable mAttributesHash;
|
||||
PRPackedBool mAbstract;
|
||||
nsComplexTypeArrayInfo* mArrayInfo;
|
||||
};
|
||||
|
||||
|
@ -510,8 +508,7 @@ protected:
|
|||
class nsSOAPArray : public nsISchemaComplexType
|
||||
{
|
||||
public:
|
||||
nsSOAPArray(const nsAReadableString& aTargetNamespace,
|
||||
nsISchemaType* aAnyType);
|
||||
nsSOAPArray(nsISchemaType* aAnyType);
|
||||
virtual ~nsSOAPArray();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -520,14 +517,13 @@ public:
|
|||
NS_DECL_NSISCHEMACOMPLEXTYPE
|
||||
|
||||
protected:
|
||||
nsString mTargetNamespace;
|
||||
nsCOMPtr<nsISchemaType> mAnyType;
|
||||
};
|
||||
|
||||
class nsSOAPArrayType : public nsISchemaRestrictionType
|
||||
{
|
||||
public:
|
||||
nsSOAPArrayType(const nsAReadableString& aTargetNamespace);
|
||||
nsSOAPArrayType();
|
||||
virtual ~nsSOAPArrayType();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -535,9 +531,6 @@ public:
|
|||
NS_DECL_NSISCHEMATYPE
|
||||
NS_DECL_NSISCHEMASIMPLETYPE
|
||||
NS_DECL_NSISCHEMARESTRICTIONTYPE
|
||||
|
||||
protected:
|
||||
nsString mTargetNamespace;
|
||||
};
|
||||
|
||||
#define NS_SCHEMA_CID \
|
||||
|
|
|
@ -28,9 +28,8 @@
|
|||
// nsSchemaBuiltinType implementation
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
nsSchemaBuiltinType::nsSchemaBuiltinType(PRUint16 aBuiltinType,
|
||||
const nsAReadableString& aNamespace)
|
||||
: mBuiltinType(aBuiltinType), mNamespace(aNamespace)
|
||||
nsSchemaBuiltinType::nsSchemaBuiltinType(PRUint16 aBuiltinType)
|
||||
: mBuiltinType(aBuiltinType)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -49,7 +48,7 @@ NS_IMPL_ISUPPORTS4_CI(nsSchemaBuiltinType,
|
|||
NS_IMETHODIMP
|
||||
nsSchemaBuiltinType::GetTargetNamespace(nsAWritableString& aTargetNamespace)
|
||||
{
|
||||
aTargetNamespace.Assign(mNamespace);
|
||||
aTargetNamespace.Assign(NS_LITERAL_STRING(NS_SCHEMA_2001_NAMESPACE));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -23,9 +23,8 @@
|
|||
|
||||
#include "nsSchemaPrivate.h"
|
||||
|
||||
nsSOAPArray::nsSOAPArray(const nsAReadableString& aTargetNamespace,
|
||||
nsISchemaType* aAnyType)
|
||||
: mTargetNamespace(aTargetNamespace), mAnyType(aAnyType)
|
||||
nsSOAPArray::nsSOAPArray(nsISchemaType* aAnyType)
|
||||
: mAnyType(aAnyType)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -43,7 +42,7 @@ NS_IMPL_ISUPPORTS3_CI(nsSOAPArray,
|
|||
NS_IMETHODIMP
|
||||
nsSOAPArray::GetTargetNamespace(nsAWritableString& aTargetNamespace)
|
||||
{
|
||||
aTargetNamespace.Assign(mTargetNamespace);
|
||||
aTargetNamespace.Assign(NS_LITERAL_STRING(NS_SOAP_1_2_ENCODING_NAMESPACE));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
@ -185,12 +184,11 @@ NS_IMETHODIMP
|
|||
nsSOAPArray::GetArrayDimension(PRUint32* aDimension)
|
||||
{
|
||||
NS_ENSURE_ARG_POINTER(aDimension);
|
||||
*aDimension = 1;
|
||||
*aDimension = 0;
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
nsSOAPArrayType::nsSOAPArrayType(const nsAReadableString& aTargetNamespace)
|
||||
: mTargetNamespace(aTargetNamespace)
|
||||
nsSOAPArrayType::nsSOAPArrayType()
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -209,7 +207,7 @@ NS_IMPL_ISUPPORTS4_CI(nsSOAPArrayType,
|
|||
NS_IMETHODIMP
|
||||
nsSOAPArrayType::GetTargetNamespace(nsAWritableString& aTargetNamespace)
|
||||
{
|
||||
aTargetNamespace.Assign(mTargetNamespace);
|
||||
aTargetNamespace.Assign(NS_LITERAL_STRING(NS_SOAP_1_2_ENCODING_NAMESPACE));
|
||||
return NS_OK;
|
||||
}
|
||||
|
||||
|
|
|
@ -292,7 +292,12 @@ nsSchemaComplexType::GetIsArray(PRBool* aIsArray)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aIsArray);
|
||||
|
||||
*aIsArray = (mArrayInfo != nsnull);
|
||||
nsCOMPtr<nsISchemaComplexType> complexBase = do_QueryInterface(mBaseType);
|
||||
if (complexBase) {
|
||||
return complexBase->GetIsArray(aIsArray);
|
||||
}
|
||||
|
||||
*aIsArray = PR_FALSE;
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -303,11 +308,16 @@ nsSchemaComplexType::GetArrayType(nsISchemaType** aArrayType)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aArrayType);
|
||||
|
||||
if (!mArrayInfo) {
|
||||
return NS_ERROR_FAILURE;
|
||||
*aArrayType = nsnull;
|
||||
if (mArrayInfo) {
|
||||
mArrayInfo->GetType(aArrayType);
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsISchemaComplexType> complexBase = do_QueryInterface(mBaseType);
|
||||
if (complexBase) {
|
||||
return complexBase->GetArrayType(aArrayType);
|
||||
}
|
||||
}
|
||||
|
||||
mArrayInfo->GetType(aArrayType);
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
@ -318,11 +328,16 @@ nsSchemaComplexType::GetArrayDimension(PRUint32* aDimension)
|
|||
{
|
||||
NS_ENSURE_ARG_POINTER(aDimension);
|
||||
|
||||
*aDimension = 0;
|
||||
if (!mArrayInfo) {
|
||||
return NS_ERROR_FAILURE;
|
||||
*aDimension = mArrayInfo->GetDimension();
|
||||
}
|
||||
else {
|
||||
nsCOMPtr<nsISchemaComplexType> complexBase = do_QueryInterface(mBaseType);
|
||||
if (complexBase) {
|
||||
return complexBase->GetArrayDimension(aDimension);
|
||||
}
|
||||
}
|
||||
|
||||
*aDimension = mArrayInfo->GetDimension();
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
|
@ -311,7 +311,7 @@ public:
|
|||
LoadListener(nsSchemaLoader* aLoader,
|
||||
nsISchemaLoadListener* aListener,
|
||||
nsIXMLHttpRequest* aRequest);
|
||||
~LoadListener();
|
||||
virtual ~LoadListener();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
NS_DECL_NSIDOMEVENTLISTENER
|
||||
|
@ -487,9 +487,7 @@ nsBuiltinSchemaCollection::GetBuiltinType(const nsAReadableString& aName,
|
|||
nsISchemaType** aType)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsAutoString concat(aName);
|
||||
concat.Append(aNamespace);
|
||||
nsStringKey key(concat);
|
||||
nsStringKey key(aName);
|
||||
nsCOMPtr<nsISupports> sup = dont_AddRef(mBuiltinTypesHash.Get(&key));
|
||||
if (sup) {
|
||||
rv = CallQueryInterface(sup, aType);
|
||||
|
@ -637,8 +635,7 @@ nsBuiltinSchemaCollection::GetBuiltinType(const nsAReadableString& aName,
|
|||
return NS_ERROR_SCHEMA_UNKNOWN_TYPE;
|
||||
}
|
||||
|
||||
nsSchemaBuiltinType* builtin = new nsSchemaBuiltinType(typeVal,
|
||||
aNamespace);
|
||||
nsSchemaBuiltinType* builtin = new nsSchemaBuiltinType(typeVal);
|
||||
if (!builtin) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -658,9 +655,7 @@ nsBuiltinSchemaCollection::GetSOAPType(const nsAReadableString& aName,
|
|||
nsISchemaType** aType)
|
||||
{
|
||||
nsresult rv = NS_OK;
|
||||
nsAutoString concat(aNamespace);
|
||||
concat.Append(aName);
|
||||
nsStringKey key(concat);
|
||||
nsStringKey key(aName);
|
||||
nsCOMPtr<nsISupports> sup = dont_AddRef(mSOAPTypeHash.Get(&key));
|
||||
if (sup) {
|
||||
rv = CallQueryInterface(sup, aType);
|
||||
|
@ -675,7 +670,7 @@ nsBuiltinSchemaCollection::GetSOAPType(const nsAReadableString& aName,
|
|||
return rv;
|
||||
}
|
||||
|
||||
nsSOAPArray* array = new nsSOAPArray(aNamespace, anyType);
|
||||
nsSOAPArray* array = new nsSOAPArray(anyType);
|
||||
if (!array) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -686,7 +681,7 @@ nsBuiltinSchemaCollection::GetSOAPType(const nsAReadableString& aName,
|
|||
NS_ADDREF(*aType);
|
||||
}
|
||||
else if (aName.Equals(NS_LITERAL_STRING("arrayType"))) {
|
||||
nsSOAPArrayType* arrayType = new nsSOAPArrayType(aNamespace);
|
||||
nsSOAPArrayType* arrayType = new nsSOAPArrayType();
|
||||
if (!arrayType) {
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
}
|
||||
|
@ -1475,7 +1470,6 @@ nsSchemaLoader::ProcessComplexTypeBody(nsSchema* aSchema,
|
|||
|
||||
*aContentModel = nsISchemaComplexType::CONTENT_MODEL_EMPTY;
|
||||
|
||||
nsCOMPtr<nsISchemaType> baseType;
|
||||
nsCOMPtr<nsISchemaModelGroup> modelGroup;
|
||||
|
||||
while (NS_SUCCEEDED(iterator.GetNextChild(getter_AddRefs(childElement),
|
||||
|
|
|
@ -100,8 +100,7 @@ protected:
|
|||
class nsSchemaBuiltinType : public nsISchemaBuiltinType
|
||||
{
|
||||
public:
|
||||
nsSchemaBuiltinType(PRUint16 aBuiltinType,
|
||||
const nsAReadableString& aName);
|
||||
nsSchemaBuiltinType(PRUint16 aBuiltinType);
|
||||
virtual ~nsSchemaBuiltinType();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -112,7 +111,6 @@ public:
|
|||
|
||||
protected:
|
||||
PRUint16 mBuiltinType;
|
||||
nsString mNamespace;
|
||||
};
|
||||
|
||||
class nsSchemaListType : public nsSchemaComponentBase,
|
||||
|
@ -213,6 +211,7 @@ public:
|
|||
|
||||
protected:
|
||||
nsString mName;
|
||||
PRPackedBool mAbstract;
|
||||
PRUint16 mContentModel;
|
||||
PRUint16 mDerivation;
|
||||
nsCOMPtr<nsISchemaType> mBaseType;
|
||||
|
@ -220,7 +219,6 @@ protected:
|
|||
nsCOMPtr<nsISchemaModelGroup> mModelGroup;
|
||||
nsSupportsArray mAttributes;
|
||||
nsSupportsHashtable mAttributesHash;
|
||||
PRPackedBool mAbstract;
|
||||
nsComplexTypeArrayInfo* mArrayInfo;
|
||||
};
|
||||
|
||||
|
@ -510,8 +508,7 @@ protected:
|
|||
class nsSOAPArray : public nsISchemaComplexType
|
||||
{
|
||||
public:
|
||||
nsSOAPArray(const nsAReadableString& aTargetNamespace,
|
||||
nsISchemaType* aAnyType);
|
||||
nsSOAPArray(nsISchemaType* aAnyType);
|
||||
virtual ~nsSOAPArray();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -520,14 +517,13 @@ public:
|
|||
NS_DECL_NSISCHEMACOMPLEXTYPE
|
||||
|
||||
protected:
|
||||
nsString mTargetNamespace;
|
||||
nsCOMPtr<nsISchemaType> mAnyType;
|
||||
};
|
||||
|
||||
class nsSOAPArrayType : public nsISchemaRestrictionType
|
||||
{
|
||||
public:
|
||||
nsSOAPArrayType(const nsAReadableString& aTargetNamespace);
|
||||
nsSOAPArrayType();
|
||||
virtual ~nsSOAPArrayType();
|
||||
|
||||
NS_DECL_ISUPPORTS
|
||||
|
@ -535,9 +531,6 @@ public:
|
|||
NS_DECL_NSISCHEMATYPE
|
||||
NS_DECL_NSISCHEMASIMPLETYPE
|
||||
NS_DECL_NSISCHEMARESTRICTIONTYPE
|
||||
|
||||
protected:
|
||||
nsString mTargetNamespace;
|
||||
};
|
||||
|
||||
#define NS_SCHEMA_CID \
|
||||
|
|
|
@ -28,9 +28,8 @@
|
|||
// nsSchemaBuiltinType implementation
|
||||
//
|
||||
////////////////////////////////////////////////////////////
|
||||
nsSchemaBuiltinType::nsSchemaBuiltinType(PRUint16 aBuiltinType,
|
||||
const nsAReadableString& aNamespace)
|
||||
: mBuiltinType(aBuiltinType), mNamespace(aNamespace)
|
||||
nsSchemaBuiltinType::nsSchemaBuiltinType(PRUint16 aBuiltinType)
|
||||
: mBuiltinType(aBuiltinType)
|
||||
{
|
||||
NS_INIT_ISUPPORTS();
|
||||
}
|
||||
|
@ -49,7 +48,7 @@ NS_IMPL_ISUPPORTS4_CI(nsSchemaBuiltinType,
|
|||
NS_IMETHODIMP
|
||||
nsSchemaBuiltinType::GetTargetNamespace(nsAWritableString& aTargetNamespace)
|
||||
{
|
||||
aTargetNamespace.Assign(mNamespace);
|
||||
aTargetNamespace.Assign(NS_LITERAL_STRING(NS_SCHEMA_2001_NAMESPACE));
|
||||
|
||||
return NS_OK;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче