Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / XmlUtils / System / Xml / Xsl / XsltOld / BeginEvent.cs / 1 / BeginEvent.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace System.Xml.Xsl.XsltOld {
using Res = System.Xml.Utils.Res;
using System;
using System.Diagnostics;
using System.Xml;
using System.Xml.XPath;
internal class BeginEvent : Event {
private XPathNodeType nodeType;
private string namespaceUri;
private string name;
private string prefix;
private bool empty;
private object htmlProps;
#if DEBUG
private bool replaceNSAliasesDone;
#endif
public BeginEvent(Compiler compiler) {
NavigatorInput input = compiler.Input;
Debug.Assert(input != null);
Debug.Assert(input.NodeType != XPathNodeType.Namespace);
this.nodeType = input.NodeType;
this.namespaceUri = input.NamespaceURI;
this.name = input.LocalName;
this.prefix = input.Prefix;
this.empty = input.IsEmptyTag;
if (nodeType == XPathNodeType.Element) {
this.htmlProps = HtmlElementProps.GetProps(this.name);
}
else if (nodeType == XPathNodeType.Attribute) {
this.htmlProps = HtmlAttributeProps.GetProps(this.name);
}
}
public override void ReplaceNamespaceAlias(Compiler compiler){
#if DEBUG
Debug.Assert(! replaceNSAliasesDone, "Second attempt to replace NS aliases!. This bad.");
replaceNSAliasesDone = true;
#endif
if (this.nodeType == XPathNodeType.Attribute && this.namespaceUri.Length == 0) {
return ; // '#default' aren't apply to attributes.
}
NamespaceInfo ResultURIInfo = compiler.FindNamespaceAlias(this.namespaceUri);
if (ResultURIInfo != null) {
this.namespaceUri = ResultURIInfo.nameSpace;
if (ResultURIInfo.prefix != null) {
this.prefix = ResultURIInfo.prefix;
}
}
}
public override bool Output(Processor processor, ActionFrame frame) {
return processor.BeginEvent(this.nodeType, this.prefix, this.name, this.namespaceUri, this.empty, this.htmlProps, false);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace System.Xml.Xsl.XsltOld {
using Res = System.Xml.Utils.Res;
using System;
using System.Diagnostics;
using System.Xml;
using System.Xml.XPath;
internal class BeginEvent : Event {
private XPathNodeType nodeType;
private string namespaceUri;
private string name;
private string prefix;
private bool empty;
private object htmlProps;
#if DEBUG
private bool replaceNSAliasesDone;
#endif
public BeginEvent(Compiler compiler) {
NavigatorInput input = compiler.Input;
Debug.Assert(input != null);
Debug.Assert(input.NodeType != XPathNodeType.Namespace);
this.nodeType = input.NodeType;
this.namespaceUri = input.NamespaceURI;
this.name = input.LocalName;
this.prefix = input.Prefix;
this.empty = input.IsEmptyTag;
if (nodeType == XPathNodeType.Element) {
this.htmlProps = HtmlElementProps.GetProps(this.name);
}
else if (nodeType == XPathNodeType.Attribute) {
this.htmlProps = HtmlAttributeProps.GetProps(this.name);
}
}
public override void ReplaceNamespaceAlias(Compiler compiler){
#if DEBUG
Debug.Assert(! replaceNSAliasesDone, "Second attempt to replace NS aliases!. This bad.");
replaceNSAliasesDone = true;
#endif
if (this.nodeType == XPathNodeType.Attribute && this.namespaceUri.Length == 0) {
return ; // '#default' aren't apply to attributes.
}
NamespaceInfo ResultURIInfo = compiler.FindNamespaceAlias(this.namespaceUri);
if (ResultURIInfo != null) {
this.namespaceUri = ResultURIInfo.nameSpace;
if (ResultURIInfo.prefix != null) {
this.prefix = ResultURIInfo.prefix;
}
}
}
public override bool Output(Processor processor, ActionFrame frame) {
return processor.BeginEvent(this.nodeType, this.prefix, this.name, this.namespaceUri, this.empty, this.htmlProps, false);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ResolveMatchesApril2005.cs
- SystemResourceKey.cs
- QilName.cs
- ColumnTypeConverter.cs
- XmlCountingReader.cs
- RoutedCommand.cs
- DataGridItem.cs
- EventMap.cs
- DataReaderContainer.cs
- SweepDirectionValidation.cs
- XmlSchemaSimpleContent.cs
- ColumnPropertiesGroup.cs
- TimerEventSubscription.cs
- CodeMethodInvokeExpression.cs
- TypeSystem.cs
- SchemaInfo.cs
- ProgressBar.cs
- NameValuePair.cs
- DataSourceView.cs
- RestHandlerFactory.cs
- SortKey.cs
- OciEnlistContext.cs
- Attributes.cs
- OdbcHandle.cs
- DataControlFieldTypeEditor.cs
- DataBindingCollection.cs
- CommandID.cs
- ManagementQuery.cs
- Point3DCollection.cs
- DocumentReferenceCollection.cs
- TraceContext.cs
- PropertyIDSet.cs
- DataServiceRequestArgs.cs
- WebPartEditorApplyVerb.cs
- CodeDefaultValueExpression.cs
- DefaultProxySection.cs
- XmlSchemaAnnotated.cs
- UnmanagedMemoryStream.cs
- ServerIdentity.cs
- Socket.cs
- RtfToXamlReader.cs
- LineProperties.cs
- OracleInfoMessageEventArgs.cs
- SocketPermission.cs
- PlacementWorkspace.cs
- ContextTokenTypeConverter.cs
- String.cs
- IntSecurity.cs
- HelloOperationCD1AsyncResult.cs
- SqlConnectionStringBuilder.cs
- XmlDesignerDataSourceView.cs
- CustomTrackingRecord.cs
- SQLCharsStorage.cs
- DocumentCollection.cs
- AutomationProperty.cs
- DocumentCollection.cs
- WindowHideOrCloseTracker.cs
- UshortList2.cs
- BitmapSourceSafeMILHandle.cs
- ListViewTableCell.cs
- UITypeEditor.cs
- ThreadBehavior.cs
- ResumeStoryboard.cs
- DbConnectionPoolGroupProviderInfo.cs
- SafeMILHandle.cs
- ScriptMethodAttribute.cs
- PermissionRequestEvidence.cs
- BinaryObjectWriter.cs
- StrokeCollectionDefaultValueFactory.cs
- TextElementEnumerator.cs
- Validator.cs
- FlowchartSizeFeature.cs
- SqlDataSourceRefreshSchemaForm.cs
- XmlException.cs
- SqlParameterizer.cs
- Memoizer.cs
- StringUtil.cs
- TextTreeRootTextBlock.cs
- DrawListViewColumnHeaderEventArgs.cs
- TransactionWaitAsyncResult.cs
- NullableBoolConverter.cs
- TableRowCollection.cs
- ObjectStateManagerMetadata.cs
- ProtectedConfiguration.cs
- DataColumnCollection.cs
- LifetimeServices.cs
- BaseResourcesBuildProvider.cs
- HostingEnvironmentException.cs
- EventListener.cs
- EntityDataSourceChangedEventArgs.cs
- TemplatedWizardStep.cs
- HtmlWindow.cs
- SystemEvents.cs
- DeclarationUpdate.cs
- MenuCommand.cs
- InertiaTranslationBehavior.cs
- WindowsContainer.cs
- XpsS0ValidatingLoader.cs
- ConstructorBuilder.cs
- MasterPageBuildProvider.cs